feat: add backend pages
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import icons from '@/components/icon-font/icons';
|
||||
|
||||
export const backendActions = [
|
||||
{
|
||||
label: 'Edit Versions',
|
||||
value: 'version',
|
||||
key: 'version',
|
||||
icon: icons.EditOutlined,
|
||||
locale: false
|
||||
},
|
||||
{
|
||||
label: 'Edit Parameters',
|
||||
value: 'parameter',
|
||||
key: 'parameter',
|
||||
icon: icons.EditOutlined,
|
||||
locale: false
|
||||
},
|
||||
{
|
||||
label: 'Edit by Yaml',
|
||||
value: 'yaml',
|
||||
key: 'edit',
|
||||
icon: icons.EditOutlined,
|
||||
locale: false
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
value: 'delete',
|
||||
key: 'delete',
|
||||
icon: icons.DeleteOutlined,
|
||||
locale: false,
|
||||
danger: true
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,54 @@
|
||||
import nvidiaLogo from '@/assets/logo/nvidia.png';
|
||||
import SGLangLogo from '@/assets/logo/sglang.png';
|
||||
import vLLMLogo from '@/assets/logo/vllm.png';
|
||||
|
||||
export default [
|
||||
{
|
||||
id: 1,
|
||||
backend_name: 'SGlang',
|
||||
icon: SGLangLogo,
|
||||
version_configs: {
|
||||
'v1.0': {
|
||||
image_name: 'example/image:v1.0',
|
||||
run_command: 'run.sh'
|
||||
}
|
||||
},
|
||||
compatibility_type: 'template_string',
|
||||
health_check_path: '/v1/models',
|
||||
default_version: 'v1.0',
|
||||
default_backend_param: ['--param1', '--param2'],
|
||||
description: 'sglang description'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
backend_name: 'vLLM',
|
||||
icon: vLLMLogo,
|
||||
version_configs: {
|
||||
'v1.0': {
|
||||
image_name: 'example/image:v1.0',
|
||||
run_command: 'run.sh'
|
||||
}
|
||||
},
|
||||
compatibility_type: 'template_string',
|
||||
health_check_path: '/v1/models',
|
||||
default_version: 'v1.0',
|
||||
default_backend_param: ['--param1', '--param2'],
|
||||
description: 'vllm description'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
backend_name: 'TensorRT',
|
||||
icon: nvidiaLogo,
|
||||
version_configs: {
|
||||
'v1.0': {
|
||||
image_name: 'example/image:v1.0',
|
||||
run_command: 'run.sh'
|
||||
}
|
||||
},
|
||||
compatibility_type: 'template_string',
|
||||
health_check_path: '/v1/models',
|
||||
default_version: 'v1.0',
|
||||
default_backend_param: ['--param1', '--param2'],
|
||||
description: 'TensorRT description'
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,23 @@
|
||||
export interface VersionConfigs {
|
||||
[key: string]: {
|
||||
image_name: string;
|
||||
run_command: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface FormData {
|
||||
backend_name: string;
|
||||
description?: string;
|
||||
version_configs?: VersionConfigs;
|
||||
compatibility_type?: string;
|
||||
health_check_path?: string;
|
||||
default_version?: string;
|
||||
default_backend_param?: string[];
|
||||
allowed_proxy_uris?: string[];
|
||||
}
|
||||
|
||||
export interface ListItem extends FormData {
|
||||
id: number;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
Reference in New Issue
Block a user