Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pages/Scheduling/components/TriggerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const TriggerForm: React.FC<TriggerFormProps> = ({

form.setFieldsValue(formValues);

if (trigger.type === 'SCHEDULED') {
if (trigger.type === 'SCHEDULE') {
const triggerFormType = trigger.config?.type || 'interval';
setTriggerFormType(triggerFormType);
form.setFieldValue('triggerForm', triggerFormType);
Expand All @@ -119,7 +119,7 @@ const TriggerForm: React.FC<TriggerFormProps> = ({
}, [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
Expand Down Expand Up @@ -187,7 +187,7 @@ const TriggerForm: React.FC<TriggerFormProps> = ({
placeholder={t('trigger.select_type')}
disabled={mode === 'view'}
>
<Option value="SCHEDULED">{t('trigger.type_scheduled')}</Option>
<Option value="SCHEDULE">{t('trigger.type_scheduled')}</Option>
<Option value="EVENT">{t('trigger.type_event')}</Option>
</Select>
)}
Expand All @@ -196,7 +196,7 @@ const TriggerForm: React.FC<TriggerFormProps> = ({
<Form.Item noStyle shouldUpdate={(prevValues, currentValues) => prevValues.type !== currentValues.type}>
{({ getFieldValue }) => {
const triggerType = getFieldValue('type');
if (triggerType === 'SCHEDULED') {
if (triggerType === 'SCHEDULE') {
return (
<>
<Form.Item
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Scheduling/components/TriggerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const TriggerList: React.FC<TriggerListProps> = ({model, eventOnly = false}) =>

const getTypeColor = (type: string) => {
switch (type) {
case 'SCHEDULED':
case 'SCHEDULE':
return 'blue';
case 'EVENT':
return 'green';
Expand All @@ -141,7 +141,7 @@ const TriggerList: React.FC<TriggerListProps> = ({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');
Expand Down
8 changes: 0 additions & 8 deletions src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
ContainerOutlined,
DatabaseOutlined,
DeploymentUnitOutlined,
FileTextOutlined,
LineChartOutlined,
NodeIndexOutlined,
PlayCircleOutlined,
Expand All @@ -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";
Expand Down Expand Up @@ -101,12 +99,6 @@ export const projectRoutes: RouteConfig[] = [
icon: DeploymentUnitOutlined,
translationKey: "graphql_api",
},
{
path: "/project/:projectId/api/open-api",
element: <OpenAPI />,
icon: FileTextOutlined,
translationKey: "open_api",
},
{
path: "/project/:projectId/api/log",
element: <APILog />,
Expand Down
2 changes: 1 addition & 1 deletion src/services/trigger.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/types/trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading