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
+2 -1
View File
@@ -28,7 +28,8 @@ const icons = {
ModelScope: React.createElement(IconFont, { type: 'icon-tu2' }),
LocalPath: React.createElement(IconFont, { type: 'icon-hard-disk' }),
Launch: React.createElement(IconFont, { type: 'icon-rocket-launch' }),
Deployment: React.createElement(IconFont, { type: 'icon-rocket-launch1' })
Deployment: React.createElement(IconFont, { type: 'icon-rocket-launch1' }),
Docker: React.createElement(IconFont, { type: 'icon-docker' })
};
export default icons;
+1 -1
View File
@@ -2,7 +2,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
// import './iconfont/iconfont.js';
const IconFont = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/c/font_4613488_pouhrqmodr9.js'
scriptUrl: '//at.alicdn.com/t/c/font_4613488_arejw0wk0kd.js'
});
export default IconFont;
+29 -4
View File
@@ -1,15 +1,40 @@
import { useEscHint } from '@/hooks/use-esc-hint';
import { Drawer, type DrawerProps } from 'antd';
import { CloseOutlined } from '@ant-design/icons';
import { Button, Drawer, type DrawerProps } from 'antd';
const ScrollerModal = (props: DrawerProps) => {
const { title, closable = true, ...restProps } = props;
const { EscHint } = useEscHint({
enabled: !props.keyboard && props.open
});
const handleCancel = (e: React.MouseEvent<HTMLElement>) => {
props.onClose?.(e);
};
return (
<>
<Drawer {...props}>
{props.children}
<Drawer
{...restProps}
closable={false}
title={
<div className="flex-between flex-center">
<span
style={{
color: 'var(--ant-color-text)',
fontWeight: 'var(--font-weight-medium)',
fontSize: 'var(--font-size-middle)'
}}
>
{title}
</span>
{closable && (
<Button type="text" size="small" onClick={handleCancel}>
<CloseOutlined></CloseOutlined>
</Button>
)}
</div>
}
>
{restProps.children}
{EscHint}
</Drawer>
</>