From 6e9ab0d49f5c67032f1823a4049f54ecb7be7983 Mon Sep 17 00:00:00 2001 From: Zzm0809 Date: Tue, 17 Dec 2024 03:33:42 +0000 Subject: [PATCH] Spotless Apply --- .../SqlTask/PushDolphin/index.tsx | 2 +- .../CenterTabContent/SqlTask/index.tsx | 29 ++++++++++++------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/PushDolphin/index.tsx b/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/PushDolphin/index.tsx index 70c959532c..4b3a29acbf 100644 --- a/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/PushDolphin/index.tsx +++ b/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/PushDolphin/index.tsx @@ -46,7 +46,7 @@ import { InitPushDolphinParams } from '@/types/Studio/init.d'; import { Button, Form, Tag } from 'antd'; import { DefaultOptionType } from 'antd/es/select'; import React, { useEffect } from 'react'; -import {TaskState} from "@/pages/DataStudio/type"; +import { TaskState } from '@/pages/DataStudio/type'; type PushDolphinProps = { onCancel: () => void; diff --git a/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx b/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx index ab6e5d2953..50b3200eec 100644 --- a/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx +++ b/dinky-web/src/pages/DataStudio/CenterTabContent/SqlTask/index.tsx @@ -81,7 +81,12 @@ import { import { l } from '@/utils/intl'; import { editor } from 'monaco-editor'; import { DataStudioActionType } from '@/pages/DataStudio/data.d'; -import {getDataByParams, handleOption, handlePutDataJson, queryDataByParams} from '@/services/BusinessCrud'; +import { + getDataByParams, + handleOption, + handlePutDataJson, + queryDataByParams +} from '@/services/BusinessCrud'; import { API_CONSTANTS } from '@/services/endpoints'; import { Jobs, LineageDetailInfo } from '@/types/DevOps/data'; import { lockTask, matchLanguage } from '@/pages/DataStudio/function'; @@ -98,8 +103,12 @@ import { ResourceInfo } from '@/types/RegCenter/data'; import { buildResourceTreeDataAtTreeForm } from '@/pages/RegCenter/Resource/components/FileTree/function'; import { ProFormDependency } from '@ant-design/pro-form'; import { SavePoint } from '@/pages/DataStudio/CenterTabContent/SqlTask/SavePoint'; -import {DolphinTaskDefinition, DolphinTaskGroupInfo, DolphinTaskMinInfo} from "@/types/Studio/data"; -import PushDolphin from "@/pages/DataStudio/CenterTabContent/SqlTask/PushDolphin"; +import { + DolphinTaskDefinition, + DolphinTaskGroupInfo, + DolphinTaskMinInfo +} from '@/types/Studio/data'; +import PushDolphin from '@/pages/DataStudio/CenterTabContent/SqlTask/PushDolphin'; export type FlinkSqlProps = { showDesc: boolean; @@ -663,15 +672,15 @@ export const SqlTask = memo((props: FlinkSqlProps & any) => { ); let dolphinTaskGroup: DolphinTaskGroupInfo[] | undefined = undefined; - if (dolphinTaskDefinition?.projectCode){ - dolphinTaskGroup = await queryDataByParams< - DolphinTaskGroupInfo[] - >(API_CONSTANTS.SCHEDULER_QUERY_TASK_GROUP, { - projectCode: dolphinTaskDefinition?.projectCode || undefined - }); + if (dolphinTaskDefinition?.projectCode) { + dolphinTaskGroup = await queryDataByParams( + API_CONSTANTS.SCHEDULER_QUERY_TASK_GROUP, + { + projectCode: dolphinTaskDefinition?.projectCode || undefined + } + ); } - const formValuesInfo = dolphinTaskDefinition ? JSON.parse(JSON.stringify(dolphinTaskDefinition)) : {};