diff --git a/src/pages/Scheduling/components/TriggerForm.tsx b/src/pages/Scheduling/components/TriggerForm.tsx index 26f82bb..88a94f7 100644 --- a/src/pages/Scheduling/components/TriggerForm.tsx +++ b/src/pages/Scheduling/components/TriggerForm.tsx @@ -99,7 +99,7 @@ const TriggerForm: React.FC = ({ form.setFieldsValue(formValues); - if (trigger.type === 'SCHEDULED') { + if (trigger.type === 'SCHEDULE') { const triggerFormType = trigger.config?.type || 'interval'; setTriggerFormType(triggerFormType); form.setFieldValue('triggerForm', triggerFormType); @@ -119,7 +119,7 @@ const TriggerForm: React.FC = ({ }, [trigger, mode, form, eventOnly, model]); const handleSubmit = async (values: any) => { - if (values.type === 'SCHEDULED' && values.triggerForm) { + if (values.type === 'SCHEDULE' && values.triggerForm) { values.config = { ...values.config, type: values.triggerForm @@ -187,7 +187,7 @@ const TriggerForm: React.FC = ({ placeholder={t('trigger.select_type')} disabled={mode === 'view'} > - + )} @@ -196,7 +196,7 @@ const TriggerForm: React.FC = ({ prevValues.type !== currentValues.type}> {({ getFieldValue }) => { const triggerType = getFieldValue('type'); - if (triggerType === 'SCHEDULED') { + if (triggerType === 'SCHEDULE') { return ( <> = ({model, eventOnly = false}) => const getTypeColor = (type: string) => { switch (type) { - case 'SCHEDULED': + case 'SCHEDULE': return 'blue'; case 'EVENT': return 'green'; @@ -141,7 +141,7 @@ const TriggerList: React.FC = ({model, eventOnly = false}) => const getTypeText = (type: string) => { switch (type) { - case 'SCHEDULED': + case 'SCHEDULE': return t('trigger.type_scheduled'); case 'EVENT': return t('trigger.type_event'); diff --git a/src/routes.tsx b/src/routes.tsx index b5615f0..c1129e4 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -16,7 +16,6 @@ import { ContainerOutlined, DatabaseOutlined, DeploymentUnitOutlined, - FileTextOutlined, LineChartOutlined, NodeIndexOutlined, PlayCircleOutlined, @@ -29,7 +28,6 @@ import { KeyOutlined, FunctionOutlined, } from "@ant-design/icons"; import GraphQLAPI from "@/pages/GraphQLAPI"; -import OpenAPI from "@/pages/OpenAPI"; import Flow from "@/pages/Flow"; import FlowList from "@/pages/Flow/components/FlowList.tsx"; import FlowDesign from "@/pages/FlowDesign/index.tsx"; @@ -101,12 +99,6 @@ export const projectRoutes: RouteConfig[] = [ icon: DeploymentUnitOutlined, translationKey: "graphql_api", }, - { - path: "/project/:projectId/api/open-api", - element: , - icon: FileTextOutlined, - translationKey: "open_api", - }, { path: "/project/:projectId/api/log", element: , diff --git a/src/services/trigger.ts b/src/services/trigger.ts index 79d2133..75d29ba 100644 --- a/src/services/trigger.ts +++ b/src/services/trigger.ts @@ -1,7 +1,7 @@ import {api} from "@/utils/request"; // 根据OpenAPI规范定义的触发器类型 -export type TriggerType = "EVENT" | "SCHEDULED"; +export type TriggerType = "EVENT" | "SCHEDULE"; export interface Trigger { id?: string; diff --git a/src/types/trigger.ts b/src/types/trigger.ts index dd65107..945454b 100644 --- a/src/types/trigger.ts +++ b/src/types/trigger.ts @@ -39,7 +39,7 @@ export interface Trigger { id: string; name: string; description?: string; - type: 'scheduled' | 'event'; + type: 'schedule' | 'event'; status: 'active' | 'inactive'; flowId: string; flowName: string;