fix: default_env field not display in backend editing yaml
This commit is contained in:
@@ -145,11 +145,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
|
|||||||
is_built_in:
|
is_built_in:
|
||||||
data.is_built_in &&
|
data.is_built_in &&
|
||||||
data.backend_source === BackendSourceValueMap.BUILTIN,
|
data.backend_source === BackendSourceValueMap.BUILTIN,
|
||||||
..._.pick(values.built_in_version_configs?.[key], [
|
..._.pick(values.built_in_version_configs?.[key], versionFields)
|
||||||
'image_name',
|
|
||||||
'run_command',
|
|
||||||
'entrypoint'
|
|
||||||
])
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -192,7 +192,8 @@ export const customBackendFields = [
|
|||||||
'health_check_path',
|
'health_check_path',
|
||||||
'default_run_command',
|
'default_run_command',
|
||||||
'version_configs',
|
'version_configs',
|
||||||
'default_backend_param'
|
'default_backend_param',
|
||||||
|
'default_env'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -201,7 +202,8 @@ export const customBackendFields = [
|
|||||||
export const builtInBackendFields = [
|
export const builtInBackendFields = [
|
||||||
'description',
|
'description',
|
||||||
'version_configs',
|
'version_configs',
|
||||||
'default_backend_param'
|
'default_backend_param',
|
||||||
|
'default_env'
|
||||||
];
|
];
|
||||||
|
|
||||||
export const frameworks = [
|
export const frameworks = [
|
||||||
@@ -278,6 +280,7 @@ export const yamlTemplate = `# ----------------------------------------
|
|||||||
# - custom_framework:
|
# - custom_framework:
|
||||||
# - required
|
# - required
|
||||||
# - choose from: ${Object.values(GPUDriverMap).join(', ')}, cpu
|
# - choose from: ${Object.values(GPUDriverMap).join(', ')}, cpu
|
||||||
|
# - env: optional, map of env key and value
|
||||||
|
|
||||||
backend_name: vllm-custom
|
backend_name: vllm-custom
|
||||||
description: this is my custom vllm backend
|
description: this is my custom vllm backend
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import IconFont from '@/components/icon-font';
|
import IconFont from '@/components/icon-font';
|
||||||
import { PageAction } from '@/config';
|
import { PageAction } from '@/config';
|
||||||
|
import { PageActionType } from '@/config/types';
|
||||||
import useBodyScroll from '@/hooks/use-body-scroll';
|
import useBodyScroll from '@/hooks/use-body-scroll';
|
||||||
import { ListItem } from '../config/types';
|
import { ListItem } from '../config/types';
|
||||||
import useCommunityBackend from './use-community-backend';
|
import useCommunityBackend from './use-community-backend';
|
||||||
@@ -30,7 +31,7 @@ const useCreateBackend = () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const handleEditBackend = (
|
const handleEditBackend = (
|
||||||
action: PageAction,
|
action: PageActionType,
|
||||||
title: string,
|
title: string,
|
||||||
row: ListItem
|
row: ListItem
|
||||||
) => {
|
) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user