feat: add instance view
This commit is contained in:
+1
-1
@@ -114,7 +114,7 @@ export default [
|
|||||||
selectedIcon: 'icon-rocket-launch-fill',
|
selectedIcon: 'icon-rocket-launch-fill',
|
||||||
defaultIcon: 'icon-rocket-launch1',
|
defaultIcon: 'icon-rocket-launch1',
|
||||||
access: 'canSeeAdmin',
|
access: 'canSeeAdmin',
|
||||||
component: './llmodels/index'
|
component: './llmodels/deployments'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'routes',
|
name: 'routes',
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ const NO_CONTAINER_PAGES = [
|
|||||||
'clusterDetail',
|
'clusterDetail',
|
||||||
'clusterCreate',
|
'clusterCreate',
|
||||||
'benchmarkDetail',
|
'benchmarkDetail',
|
||||||
|
'deployment',
|
||||||
'video'
|
'video'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
import IconFont from '@/components/icon-font';
|
||||||
|
import { PageContainerInner } from '@/pages/_components/page-box';
|
||||||
|
import { useIntl } from '@umijs/max';
|
||||||
|
import { Segmented, Tabs } from 'antd';
|
||||||
|
import { useMemo, useState } from 'react';
|
||||||
|
import ModelView from './index';
|
||||||
|
import InstanceView from './instance-view';
|
||||||
|
|
||||||
|
const TabsValueMap = {
|
||||||
|
ModelView: 'modelView',
|
||||||
|
InstanceView: 'instanceView'
|
||||||
|
};
|
||||||
|
|
||||||
|
const Playground: React.FC = () => {
|
||||||
|
const intl = useIntl();
|
||||||
|
const [activeKey, setActiveKey] = useState(TabsValueMap.ModelView);
|
||||||
|
|
||||||
|
const header = useMemo(() => {
|
||||||
|
return {
|
||||||
|
title: (
|
||||||
|
<div className="flex items-center">
|
||||||
|
<span className="font-600">
|
||||||
|
{intl.formatMessage({ id: 'menu.models.deployment' })}
|
||||||
|
</span>
|
||||||
|
<Segmented
|
||||||
|
options={[
|
||||||
|
{
|
||||||
|
label: 'Model View',
|
||||||
|
value: TabsValueMap.ModelView,
|
||||||
|
icon: <IconFont type={'icon-models'}></IconFont>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Instance View',
|
||||||
|
value: TabsValueMap.InstanceView,
|
||||||
|
icon: <IconFont type={'icon-database'}></IconFont>
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
size="middle"
|
||||||
|
className="m-l-24 font-600"
|
||||||
|
value={activeKey}
|
||||||
|
onChange={(key) => setActiveKey(key)}
|
||||||
|
></Segmented>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
}, [activeKey, intl]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<PageContainerInner header={header}>
|
||||||
|
<Tabs
|
||||||
|
renderTabBar={() => <></>}
|
||||||
|
items={[
|
||||||
|
{
|
||||||
|
key: TabsValueMap.ModelView,
|
||||||
|
label: 'Model View',
|
||||||
|
children: <ModelView></ModelView>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TabsValueMap.InstanceView,
|
||||||
|
label: 'Instance View',
|
||||||
|
children: <InstanceView></InstanceView>
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
activeKey={activeKey}
|
||||||
|
></Tabs>
|
||||||
|
</PageContainerInner>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Playground;
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const InstanceView: React.FC = () => {
|
||||||
|
return <div>InstanceView</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default InstanceView;
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
border-radius: var(--border-radius-mini);
|
border-radius: var(--border-radius-mini);
|
||||||
font-weight: var(--font-weight-500);
|
color: var(--ant-color-text-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
|
|||||||
Reference in New Issue
Block a user