chore: change disable to disabled

This commit is contained in:
scarqin
2024-12-31 16:17:53 +08:00
parent 894cd21032
commit e249b62d13
4 changed files with 7 additions and 7 deletions
@@ -28,7 +28,7 @@ export const AI_SERVICE_ROUTER_TABLE_COLUMNS: PageProColumns<AiServiceRouterTabl
},
{
title: '是否放行',
dataIndex: 'disable',
dataIndex: 'disabled',
ellipsis: true,
filters: true,
onFilter: true,
@@ -258,7 +258,7 @@ export const SYSTEM_API_TABLE_COLUMNS: PageProColumns<SystemApiTableListItem>[]
},
{
title: '是否放行',
dataIndex: 'disable',
dataIndex: 'disabled',
ellipsis: true,
filters: true,
onFilter: true,
@@ -29,7 +29,7 @@ type AiServiceRouterField = {
description: string
timeout: number
retry: number
disable: boolean
disabled: boolean
}
type AiServiceRouterConfig = {
@@ -70,7 +70,7 @@ const AiServiceInsideRouterCreate = () => {
?.validateFields()
.then(() => {
return form.validateFields().then((formValue) => {
const { name, path, description, variables, prompt, timeout, retry, pathMatch, disable } = formValue
const { name, path, description, variables, prompt, timeout, retry, pathMatch, disabled } = formValue
const body = {
name,
path: `${prefixForce ? apiPrefix + '/' : ''}${path.trim()}${pathMatch === 'prefix' ? '/*' : ''}`,
@@ -79,7 +79,7 @@ const AiServiceInsideRouterCreate = () => {
retry,
aiPrompt: { variables: variables, prompt: prompt },
aiModel: { id: defaultLlm?.id, provider: defaultLlm?.provider, config: defaultLlm?.config },
disable
disabled
}
return fetchData<BasicResponse<null>>('service/ai-router', {
method: routeId ? 'PUT' : 'POST',
@@ -405,7 +405,7 @@ const AiServiceInsideRouterCreate = () => {
</Row>
<Form.Item<AiServiceRouterField>
label={$t('拦截接口')}
name="disable"
name="disabled"
extra={$t('开启拦截后,网关会拦截所有该路径的请求。')}
>
<Switch />
@@ -180,7 +180,7 @@ const AiServiceInsideRouterList: FC = () => {
})
x.valueEnum = tmpValueEnum
}
if (x.filters && (x.dataIndex as string[])?.indexOf('disable') !== -1) {
if (x.filters && (x.dataIndex as string[])?.indexOf('disabled') !== -1) {
x.valueEnum = {
true: { text: <Typography.Text type="danger">{$t('拦截')}</Typography.Text> },
false: { text: <Typography.Text type="success">{$t('放行')}</Typography.Text> }