feat: add cluster detail page

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent 62dbd18ef8
commit 64bbba7576
14 changed files with 170 additions and 120 deletions
@@ -0,0 +1,42 @@
import GSDrawer from '@/components/scroller-modal/gs-drawer';
import React from 'react';
import ClusterDetailContent from './cluster-detail-content';
interface ClusterDetailModalProps {
open: boolean;
onClose?: () => void;
id: number;
}
const ClusterDetailModal: React.FC<ClusterDetailModalProps> = ({
open,
onClose,
id: clusterId
}) => {
const [data, setData] = React.useState<any>({
id: 1,
name: 'kubernetes-cluster',
provider: 'kubernetes',
clusterType: 'Kubernetes',
workers: 2,
gpus: 4,
status: 'ready',
deployments: 1
});
const handleOnClose = () => {
onClose?.();
};
return (
<GSDrawer
width={800}
title={`Cluster Detail - ${clusterId}`}
open={open}
onClose={handleOnClose}
>
<ClusterDetailContent data={data} />
</GSDrawer>
);
};
export default ClusterDetailModal;