= (props) => {
};
return (
-
- {addedCount > 0 && (
-
- )}
-
- }
+ styles={{
+ body: {
+ paddingBlock: 0
+ },
+ wrapper: { width: 865 }
+ }}
+ footer={false}
>
-
-
+
+ {addedCount > 0 && (
+
+ )}
+
+ }
+ >
+
+
+
);
};
diff --git a/src/pages/cluster-management/components/success-result.tsx b/src/pages/cluster-management/components/success-result.tsx
index fd12e41a..96d8bfa5 100644
--- a/src/pages/cluster-management/components/success-result.tsx
+++ b/src/pages/cluster-management/components/success-result.tsx
@@ -1,4 +1,5 @@
import { CheckCircleFilled } from '@ant-design/icons';
+import { useIntl } from '@umijs/max';
import { Button, Flex, Result } from 'antd';
import React from 'react';
import { ProviderValueMap } from '../config';
@@ -8,14 +9,19 @@ const SuccessResult: React.FC<{
onSkip: () => void;
onAddWorker: () => void;
}> = ({ provider, onSkip, onAddWorker }) => {
- const k8sTips =
- 'Next, register this Kubernetes cluster. You can also skip this step and register it later from the cluster list.';
+ const intl = useIntl();
+
+ const k8sTips = (
+
+ {intl.formatMessage({ id: 'clusters.create.k8sTips1' })}
+ {intl.formatMessage({ id: 'clusters.create.k8sTips2' })}
+
+ );
+
const dockerTips = (
- Next, add worker to this cluster.
-
- You can also skip this step and add them later from the cluster list.
-
+ {intl.formatMessage({ id: 'clusters.create.dockerTips1' })}
+ {intl.formatMessage({ id: 'clusters.create.dockerTips2' })}
);
@@ -33,17 +39,17 @@ const SuccessResult: React.FC<{
/>
}
status="success"
- title="Cluster Created Successfully!"
+ title={intl.formatMessage({ id: 'clusters.create.complete.tips' })}
subTitle={provider === ProviderValueMap.Kubernetes ? k8sTips : dockerTips}
extra={[
-
- Skip for now
+
+ {intl.formatMessage({ id: 'clusters.create.skipfornow' })}
-
+
{provider === ProviderValueMap.Kubernetes
- ? 'Register Cluster'
- : 'Add Worker'}
+ ? intl.formatMessage({ id: 'clusters.button.register' })
+ : intl.formatMessage({ id: 'resources.button.create' })}
]}
diff --git a/src/pages/cluster-management/components/support-gpus.tsx b/src/pages/cluster-management/components/support-gpus.tsx
index 758e522a..2e7d32c2 100644
--- a/src/pages/cluster-management/components/support-gpus.tsx
+++ b/src/pages/cluster-management/components/support-gpus.tsx
@@ -110,7 +110,7 @@ const SupportedHardware: React.FC = ({
locale: false,
notes: AddWorkerDockerNotes[GPUDriverMap.ASCEND],
link: 'https://docs.gpustack.ai/latest/installation/requirements/#ascend-npu',
- icon:
+ icon:
},
{
label: intl.formatMessage({ id: 'vendor.hygon' }),
@@ -121,7 +121,7 @@ const SupportedHardware: React.FC = ({
locale: false,
notes: AddWorkerDockerNotes[GPUDriverMap.HYGON],
link: 'https://docs.gpustack.ai/latest/installation/requirements/#hygon-dcu',
- icon:
+ icon:
},
{
label: intl.formatMessage({ id: 'vendor.moorthreads' }),
@@ -133,7 +133,7 @@ const SupportedHardware: React.FC = ({
locale: false,
notes: AddWorkerDockerNotes[GPUDriverMap.MOORE_THREADS],
link: 'https://docs.gpustack.ai/latest/installation/requirements/#mthreads-gpu',
- icon:
+ icon:
},
{
label: intl.formatMessage({ id: 'vendor.iluvatar' }),
@@ -145,7 +145,7 @@ const SupportedHardware: React.FC = ({
locale: false,
notes: AddWorkerDockerNotes[GPUDriverMap.ILUVATAR],
link: 'https://docs.gpustack.ai/latest/installation/requirements/#iluvatar-gpu',
- icon:
+ icon:
},
{
label: intl.formatMessage({ id: 'vendor.cambricon' }),
@@ -157,7 +157,7 @@ const SupportedHardware: React.FC = ({
locale: false,
notes: AddWorkerDockerNotes[GPUDriverMap.CAMBRICON],
link: 'https://docs.gpustack.ai/latest/installation/requirements/#cambricon-mlu',
- icon:
+ icon:
},
{
label: intl.formatMessage({ id: 'vendor.metax' }),
diff --git a/src/pages/cluster-management/hooks/use-cluster-list.ts b/src/pages/cluster-management/hooks/use-cluster-list.ts
index b337f598..680e72e0 100644
--- a/src/pages/cluster-management/hooks/use-cluster-list.ts
+++ b/src/pages/cluster-management/hooks/use-cluster-list.ts
@@ -1,8 +1,4 @@
-import {
- clusterListAtom,
- resourceOverviewAtom,
- workerListAtom
-} from '@/atoms/models';
+import { resourceOverviewAtom } from '@/atoms/models';
import { queryClusterList } from '@/pages/cluster-management/apis';
import { queryWorkersList } from '@/pages/resources/apis';
import { useAtom } from 'jotai';
@@ -15,28 +11,6 @@ import { queryDashboardData } from '../../dashboard/apis';
* @returns
*/
export default function useClusterList() {
- const [clusterList, setClusterList] = useState<
- {
- label: string;
- value: number;
- id: number;
- state: string;
- provider: string;
- }[]
- >([]);
- const [workerList, setWorkerList] = useState<
- {
- cluster_id: number;
- state: string;
- label: string;
- value: number;
- id: number;
- labels: { [key: string]: string };
- name: string;
- }[]
- >([]);
- const [clustersAtom, setClusterListAtom] = useAtom(clusterListAtom);
- const [workersAtom, setWorkerListAtom] = useAtom(workerListAtom);
const [resourceAtom, setResourceOverview] = useAtom(resourceOverviewAtom);
const [resourceCount, setResourceCount] = useState>({
cluster_count: 0,
@@ -77,21 +51,6 @@ export default function useClusterList() {
}
};
- const fetchData = async () => {
- const [clusters, workers] = await Promise.all([
- fetchClusterList(),
- fetchWorkerList()
- ]);
- setClusterList(clusters);
- setWorkerList(workers);
- setClusterListAtom(clusters);
- setWorkerListAtom(workers);
- return {
- hasClusters: clusters.length > 0,
- hasWorkers: workers.length > 0
- };
- };
-
const fetchResource = async () => {
try {
const res = await queryDashboardData();
@@ -112,10 +71,6 @@ export default function useClusterList() {
};
return {
- clusterList,
- workerList,
- clustersAtom,
- workersAtom,
resourceAtom,
resourceCount,
fetchResource,
diff --git a/src/pages/cluster-management/step-forms/use-step-list.tsx b/src/pages/cluster-management/step-forms/use-step-list.tsx
index ea83f083..956fc98a 100644
--- a/src/pages/cluster-management/step-forms/use-step-list.tsx
+++ b/src/pages/cluster-management/step-forms/use-step-list.tsx
@@ -72,7 +72,7 @@ export default function useStepList() {
beforeNext: handleBack
},
{
- title: 'Completed',
+ title: intl.formatMessage({ id: 'clusters.create.complete' }),
content: '',
description: '',
showButtons: (provider?: ProviderType) => {