feat: get the operator type from id #918 (#1323)

### What problem does this PR solve?

feat: get the operator type from id #918

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-07-01 10:27:32 +08:00
committed by GitHub
parent fc7cc1d36c
commit 4542346f18
6 changed files with 521 additions and 15 deletions

View File

@@ -2,7 +2,9 @@ import { useSetModalState } from '@/hooks/commonHooks';
import { useFetchFlowList, useSetFlow } from '@/hooks/flow-hooks';
import { useCallback, useState } from 'react';
import { useNavigate } from 'umi';
import { dsl } from '../mock';
// import { dsl } from '../mock';
import headhunterZhComponents from '../../../../../graph/test/dsl_examples/headhunter_zh.json';
import headhunter_zh from '../headhunter_zh.json';
export const useFetchDataOnMount = () => {
const { data, loading } = useFetchFlowList();
@@ -22,7 +24,10 @@ export const useSaveFlow = () => {
const onFlowOk = useCallback(
async (title: string) => {
const ret = await setFlow({ title, dsl });
const ret = await setFlow({
title,
dsl: { ...headhunterZhComponents, graph: headhunter_zh },
});
if (ret?.retcode === 0) {
hideFlowSettingModal();