From d7a203892ad760c205eb6cec908c28ab51669d98 Mon Sep 17 00:00:00 2001 From: Zzm0809 Date: Fri, 22 Dec 2023 14:41:06 +0000 Subject: [PATCH] Spotless Apply --- dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx | 4 +++- .../pages/DataStudio/MiddleContainer/StudioEditor/index.tsx | 5 ++--- dinky-web/src/pages/DataStudio/model.ts | 2 +- .../src/pages/DevOps/JobDetail/JobOperator/JobOperator.tsx | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx b/dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx index b5f2c91d3d..09ccfe7844 100644 --- a/dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx +++ b/dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx @@ -191,7 +191,9 @@ const HeaderContainer = (props: connect) => { const handlerDebug = async () => { if (!currentData) return; // @ts-ignore - const editor = currentTab.monacoInstance.editor.getEditors().find((x:any)=>x["id"]===currentData.id); + const editor = currentTab.monacoInstance.editor + .getEditors() + .find((x: any) => x['id'] === currentData.id); let selectSql = ''; if (editor) { diff --git a/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/index.tsx b/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/index.tsx index a82914977f..d9bc1e86d6 100644 --- a/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/index.tsx +++ b/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/index.tsx @@ -19,6 +19,7 @@ import CodeEdit from '@/components/CustomEditor/CodeEdit'; import { useEditor } from '@/hooks/useEditor'; +import { getCurrentTab } from '@/pages/DataStudio/function'; import { matchLanguage } from '@/pages/DataStudio/MiddleContainer/function'; import { TASK_VAR_FILTER } from '@/pages/DataStudio/MiddleContainer/StudioEditor/constants'; import DiffModal from '@/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal'; @@ -39,7 +40,6 @@ import { Monaco } from '@monaco-editor/react'; import { Button, Spin } from 'antd'; import { editor } from 'monaco-editor'; import React, { memo, useEffect, useRef, useState } from 'react'; -import {getCurrentData, getCurrentTab} from "@/pages/DataStudio/function"; export type EditorProps = { tabsItem: DataStudioTabsItemType; @@ -107,11 +107,10 @@ const StudioEditor: React.FC = (props) => { editor.focus(); editorInstance.current = editor; // @ts-ignore - editor['id']=getCurrentTab(tabs.panes,tabs.activeKey)?.params.taskId + editor['id'] = getCurrentTab(tabs.panes, tabs.activeKey)?.params.taskId; tabsItem.monacoInstance = monaco; editor.onDidChangeCursorPosition((e) => { - props.footContainer.codePosition = [e.position.lineNumber, e.position.column]; dispatch({ type: STUDIO_MODEL.saveFooterValue, diff --git a/dinky-web/src/pages/DataStudio/model.ts b/dinky-web/src/pages/DataStudio/model.ts index 51dc3dc00a..7b8467d753 100644 --- a/dinky-web/src/pages/DataStudio/model.ts +++ b/dinky-web/src/pages/DataStudio/model.ts @@ -882,7 +882,7 @@ const Model: ModelType = { ...state, suggestions: payload }; - }, + } } }; diff --git a/dinky-web/src/pages/DevOps/JobDetail/JobOperator/JobOperator.tsx b/dinky-web/src/pages/DevOps/JobDetail/JobOperator/JobOperator.tsx index e029c09ee3..7155908b9d 100644 --- a/dinky-web/src/pages/DevOps/JobDetail/JobOperator/JobOperator.tsx +++ b/dinky-web/src/pages/DevOps/JobDetail/JobOperator/JobOperator.tsx @@ -63,17 +63,17 @@ const JobOperator = (props: OperatorType) => { } else if (key == operatorType.SAVEPOINT_CANCEL) { getData(API_CONSTANTS.SAVEPOINT, { taskId: jobDetail?.instance?.taskId, - savePointType: "cancel" + savePointType: 'cancel' }); } else if (key == operatorType.SAVEPOINT_STOP) { getData(API_CONSTANTS.SAVEPOINT, { taskId: jobDetail?.instance?.taskId, - savePointType: "stop" + savePointType: 'stop' }); } else if (key == operatorType.SAVEPOINT_TRIGGER) { getData(API_CONSTANTS.SAVEPOINT, { taskId: jobDetail?.instance?.taskId, - savePointType: "trigger" + savePointType: 'trigger' }); } else { cancelTask('', jobDetail?.instance?.taskId);