From 13ab4b5d390f73d820619a444b050e7961bc2d44 Mon Sep 17 00:00:00 2001 From: Zzm0809 Date: Wed, 20 Dec 2023 14:53:59 +0000 Subject: [PATCH 1/3] Spotless Apply --- dinky-web/src/components/CustomEditor/CodeEdit/function.tsx | 2 +- dinky-web/src/components/CustomEditor/CodeEdit/index.tsx | 2 +- dinky-web/src/components/CustomEditor/CodeShow/index.tsx | 5 ++--- .../DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx | 4 ++-- dinky-web/src/requestErrorConfig.ts | 1 - 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dinky-web/src/components/CustomEditor/CodeEdit/function.tsx b/dinky-web/src/components/CustomEditor/CodeEdit/function.tsx index 934f0f385f..88f11a2d49 100644 --- a/dinky-web/src/components/CustomEditor/CodeEdit/function.tsx +++ b/dinky-web/src/components/CustomEditor/CodeEdit/function.tsx @@ -19,6 +19,7 @@ import { SuggestionInfo } from '@/types/Public/data'; +import { loader } from '@monaco-editor/react'; import * as monaco from 'monaco-editor'; import { editor, languages } from 'monaco-editor'; import keyWordJsonData from './keyword.json'; @@ -26,7 +27,6 @@ import ITextModel = editor.ITextModel; import ProviderResult = languages.ProviderResult; import CompletionList = languages.CompletionList; import CompletionItem = languages.CompletionItem; -import {loader} from "@monaco-editor/react"; // 导入 lodash loader.config({ monaco }); diff --git a/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx b/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx index fee34bcbe6..5b06eb2551 100644 --- a/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx +++ b/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx @@ -25,7 +25,7 @@ import { handleInitEditorAndLanguageOnBeforeMount } from '@/components/CustomEdi import { StateType } from '@/pages/DataStudio/model'; import { MonacoEditorOptions, SuggestionInfo } from '@/types/Public/data'; import { convertCodeEditTheme } from '@/utils/function'; -import {Editor, loader, Monaco, OnChange} from '@monaco-editor/react'; +import { Editor, loader, Monaco, OnChange } from '@monaco-editor/react'; import { connect } from '@umijs/max'; import useMemoCallback from 'rc-menu/es/hooks/useMemoCallback'; import { memo, useCallback, useRef } from 'react'; diff --git a/dinky-web/src/components/CustomEditor/CodeShow/index.tsx b/dinky-web/src/components/CustomEditor/CodeShow/index.tsx index b2a77e1107..6230f1f0b3 100644 --- a/dinky-web/src/components/CustomEditor/CodeShow/index.tsx +++ b/dinky-web/src/components/CustomEditor/CodeShow/index.tsx @@ -28,13 +28,12 @@ import { EditorLanguage } from 'monaco-editor/esm/metadata'; import FullscreenBtn from '@/components/CustomEditor/FullscreenBtn'; import { handleInitEditorAndLanguageOnBeforeMount } from '@/components/CustomEditor/function'; -import {Editor, loader, Monaco} from '@monaco-editor/react'; +import { Editor, loader, Monaco } from '@monaco-editor/react'; +import * as monaco from 'monaco-editor'; import { CSSProperties, useRef, useState } from 'react'; -import * as monaco from "monaco-editor"; loader.config({ monaco }); - export type CodeShowFormProps = { height?: string | number; width?: string; diff --git a/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx b/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx index c5f1df43ca..ce5f678e8e 100644 --- a/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx +++ b/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx @@ -24,11 +24,11 @@ import { } from '@/pages/DataStudio/MiddleContainer/StudioEditor/constants'; import { convertCodeEditTheme } from '@/utils/function'; import { l } from '@/utils/intl'; -import {DiffEditor, loader} from '@monaco-editor/react'; +import { DiffEditor, loader } from '@monaco-editor/react'; import { Col, Modal, Row, Space, Table, Tabs, Typography } from 'antd'; +import * as monaco from 'monaco-editor'; import React, { memo } from 'react'; import styles from './index.less'; -import * as monaco from "monaco-editor"; loader.config({ monaco }); diff --git a/dinky-web/src/requestErrorConfig.ts b/dinky-web/src/requestErrorConfig.ts index a413c60d29..0caf4cebb2 100644 --- a/dinky-web/src/requestErrorConfig.ts +++ b/dinky-web/src/requestErrorConfig.ts @@ -87,7 +87,6 @@ export const errorConfig: RequestConfig = { }, // 错误接收及处理 errorHandler: (error: any, opts: any) => { - if (opts?.skipErrorHandler) throw error; // 我们的 errorThrower 抛出的错误。 if (error.name === 'BizError') { From b063ccdac4497130f8f52484fa137f3ca303aa0d Mon Sep 17 00:00:00 2001 From: Zzm0809 <934230207@qq.com> Date: Wed, 20 Dec 2023 23:04:32 +0800 Subject: [PATCH 2/3] support-devops-card-checkstyle --- .../JobList/components/Overview/StatisticsCard.tsx | 9 +++++++-- .../pages/DevOps/JobList/components/Overview/index.tsx | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx b/dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx index 18374e17a1..685eb4086f 100644 --- a/dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx +++ b/dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx @@ -30,12 +30,17 @@ type StatisticsCardParams = { extra?: any; divider?: boolean; atClick?: () => void; + isChecked?: boolean; // 是否选中 }; const StatisticsCard = (props: StatisticsCardParams) => { - const { title, value, icon, extra = <>, divider = true, link, atClick } = props; + const { title, value,isChecked= false, icon, extra = <>, divider = true, link, atClick } = props; return ( <> - (atClick ? atClick() : {})} hoverable={true}> + (atClick ? atClick() : {})} + hoverable={true} + > {icon} diff --git a/dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx b/dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx index f012a719c9..ecc9530983 100644 --- a/dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx +++ b/dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx @@ -63,6 +63,7 @@ const JobOverview = (props: any) => { atClick={() => { setStatusFilter(undefined); }} + isChecked={!statusFilter} extra={