fix: backend selection
This commit is contained in:
@@ -43,6 +43,12 @@ export const BackendSourceLabelMap: Record<string, string> = {
|
||||
[BackendSourceValueMap.USER_DEFINED]: 'models.form.backend.custom'
|
||||
};
|
||||
|
||||
export const TagColorMap: Record<string, string> = {
|
||||
[BackendSourceValueMap.CUSTOM]: 'purple',
|
||||
[BackendSourceValueMap.BUILTIN]: 'geekblue',
|
||||
[BackendSourceValueMap.COMMUNITY]: 'cyan'
|
||||
};
|
||||
|
||||
export const backendActions = [
|
||||
{
|
||||
label: 'common.button.edit',
|
||||
@@ -63,7 +69,7 @@ export const backendActions = [
|
||||
value: 'enable',
|
||||
key: 'enable',
|
||||
locale: true,
|
||||
icon: icons.Yaml,
|
||||
icon: icons.Charger,
|
||||
show: (record: any) =>
|
||||
!record.enabled &&
|
||||
record.backend_source === BackendSourceValueMap.COMMUNITY
|
||||
@@ -73,7 +79,7 @@ export const backendActions = [
|
||||
value: 'disable',
|
||||
key: 'disable',
|
||||
locale: true,
|
||||
icon: icons.Yaml,
|
||||
icon: icons.Disabled,
|
||||
show: (record: any) =>
|
||||
record.enabled &&
|
||||
record.backend_source === BackendSourceValueMap.COMMUNITY
|
||||
|
||||
@@ -7,6 +7,8 @@ export interface VersionConfigs {
|
||||
entrypoint?: string;
|
||||
version_no?: string;
|
||||
is_built_in?: boolean;
|
||||
backend_source?: string;
|
||||
environment: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface VersionListItem extends VersionConfigs {
|
||||
@@ -24,6 +26,8 @@ export interface FormData {
|
||||
allowed_proxy_uris?: string[];
|
||||
content?: string;
|
||||
enabled?: boolean;
|
||||
backend_source?: string;
|
||||
default_environment?: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface ListItem extends FormData {
|
||||
|
||||
Reference in New Issue
Block a user