style: cluster table list

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent 553ec724c2
commit 84859d1b7c
11 changed files with 217 additions and 76 deletions
@@ -1,27 +1,19 @@
import GSDrawer from '@/components/scroller-modal/gs-drawer';
import React from 'react';
import { ClusterListItem } from '../config/types';
import ClusterDetailContent from './cluster-detail-content';
interface ClusterDetailModalProps {
open: boolean;
onClose?: () => void;
id: number;
currentData: ClusterListItem | null;
}
const ClusterDetailModal: React.FC<ClusterDetailModalProps> = ({
open,
onClose,
id: clusterId
currentData = {} as ClusterListItem
}) => {
const [data, setData] = React.useState<any>({
id: 2,
name: 'Digital-Ocean-cluster',
provider: 'digitalocean',
workers: 3,
gpus: 6,
status: 'error',
deployments: 2
});
const handleOnClose = () => {
onClose?.();
};
@@ -29,11 +21,11 @@ const ClusterDetailModal: React.FC<ClusterDetailModalProps> = ({
return (
<GSDrawer
width={'80vw'}
title={`Cluster Detail - ${clusterId}`}
title={`Cluster Detail - ${currentData?.name}`}
open={open}
onClose={handleOnClose}
>
<ClusterDetailContent data={data} />
<ClusterDetailContent data={currentData} />
</GSDrawer>
);
};