Skip to content

Commit

Permalink
Spotless Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 authored and github-actions[bot] committed Nov 23, 2024
1 parent fc51f7f commit d4c81c2
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dinky-web/src/models/UseWebSocketModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export enum Topic {
PROCESS_CONSOLE = 'PROCESS_CONSOLE',
PRINT_TABLE = 'PRINT_TABLE',
METRICS = 'METRICS',
TASK_RUN_INSTANCE = 'TASK_RUN_INSTANCE',
TASK_RUN_INSTANCE = 'TASK_RUN_INSTANCE'
}

export type SubscriberData = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import CodeEdit from '@/components/CustomEditor/CodeEdit';
import DiffModal from '@/pages/DataStudio/CenterTabContent/SqlTask/DiffModal';
import TaskConfig from '@/pages/DataStudio/CenterTabContent/SqlTask/TaskConfig';
import SelectDb from '@/pages/DataStudio/CenterTabContent/RunToolbar/SelectDb';
import {SseData, Topic} from "@/models/UseWebSocketModel";
import { SseData, Topic } from '@/models/UseWebSocketModel';

export type FlinkSqlProps = {
showDesc: boolean;
Expand Down Expand Up @@ -388,7 +388,7 @@ export const SqlTask = memo((props: FlinkSqlProps & any) => {
const handleSubmit = useCallback(async () => {
setIsSubmitting(true);
try {
if(currentState.step !== JOB_LIFE_CYCLE.PUBLISH){
if (currentState.step !== JOB_LIFE_CYCLE.PUBLISH) {
await handleSave();
}
updateAction({
Expand Down Expand Up @@ -677,8 +677,7 @@ export const SqlTask = memo((props: FlinkSqlProps & any) => {
/>
<RunToolBarButton
isShow={
!isRunning &&
assert(currentState.dialect, [DIALECT.FLINK_SQL], true, 'includes')
!isRunning && assert(currentState.dialect, [DIALECT.FLINK_SQL], true, 'includes')
}
showDesc={showDesc}
disabled={isLockTask || isSubmitting}
Expand All @@ -699,7 +698,7 @@ export const SqlTask = memo((props: FlinkSqlProps & any) => {
showDesc={showDesc}
color={'red'}
desc={l('pages.datastudio.editor.stop')}
icon={<XFilled style={{color:'#b10404'}}/>}
icon={<XFilled style={{ color: '#b10404' }} />}
onClick={handleStop}
hotKey={{
...hotKeyConfig,
Expand Down
6 changes: 4 additions & 2 deletions dinky-web/src/pages/DataStudio/Toolbar/Project/function.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export const buildProjectTree = (
currentUser: UserBaseInfo.User,
taskOwnerLockingStrategy: TaskOwnerLockingStrategy,
users: UserBaseInfo.User[] = [],
currentRunningTaskIds: number[] = [],
currentRunningTaskIds: number[] = []
): any =>
data
? data.map((item: Catalogue) => {
Expand All @@ -256,7 +256,9 @@ export const buildProjectTree = (
// 渲染后缀图标
const renderSuffixIcon = (
<>
{currentRunningTaskIds.includes(item.taskId)?<FireTwoTone twoToneColor="#ff0000"/>:undefined}
{currentRunningTaskIds.includes(item.taskId) ? (
<FireTwoTone twoToneColor='#ff0000' />
) : undefined}
{lockTask(
item?.task?.firstLevelOwner,
item?.task?.secondLevelOwners,
Expand Down
2 changes: 1 addition & 1 deletion dinky-web/src/pages/DataStudio/Toolbar/Project/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { useRightContext } from '@/pages/DataStudio/Toolbar/Project/RightContext
import { TreeVo } from '@/pages/DataStudio/type';
import FolderModal from '@/pages/DataStudio/Toolbar/Project/FolderModal';
import { getTaskSortTypeData } from '@/pages/DataStudio/service';
import {SseData, Topic} from "@/models/UseWebSocketModel";
import { SseData, Topic } from '@/models/UseWebSocketModel';

export const Project = (props: any) => {
const {
Expand Down
20 changes: 12 additions & 8 deletions dinky-web/src/pages/DataStudio/Toolbar/Service/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import { assert } from '@/pages/DataStudio/utils';
import { connect } from '@umijs/max';
import { Lineage } from '@/pages/DataStudio/Toolbar/Service/Lineage';
import { useModel } from '@umijs/max';
import {SseData, Topic} from "@/models/UseWebSocketModel";
import { SseData, Topic } from '@/models/UseWebSocketModel';

const Service = (props: { showDesc: boolean; tabs: CenterTab[]; action: any }) => {
const {
Expand Down Expand Up @@ -207,10 +207,14 @@ const Service = (props: { showDesc: boolean; tabs: CenterTab[]; action: any }) =
) as TreeDataNode;
}
currentDialectTree.children!!.push({
title: (<Space align={'baseline'} size={'small'}>
{tab.title}
{currentRunningTaskIds.includes(tab.params.taskId)?<FireTwoTone twoToneColor="#ff0000"/>:undefined}
</Space>),
title: (
<Space align={'baseline'} size={'small'}>
{tab.title}
{currentRunningTaskIds.includes(tab.params.taskId) ? (
<FireTwoTone twoToneColor='#ff0000' />
) : undefined}
</Space>
),
key: tab.params.taskId,
icon: icon,
isLeaf: true
Expand All @@ -224,7 +228,7 @@ const Service = (props: { showDesc: boolean; tabs: CenterTab[]; action: any }) =
expandKeys.length == 0 && setExpandKeys(getAllNodeKeys(newTreeData));
}, [tabs, currentRunningTaskIds]);

const renderContent = useMemo(() => {
const renderContent = useMemo(() => {
if (selectedKey.length === 1) {
const taskId = selectedKey[0] as number;
const taskParams = tabs.find((tab) => tab.params.taskId === taskId)?.params;
Expand Down Expand Up @@ -260,7 +264,7 @@ const Service = (props: { showDesc: boolean; tabs: CenterTab[]; action: any }) =
key: 'history',
label: l('menu.datastudio.history'),
icon: <HistoryOutlined />,
children: <ExecutionHistory taskId={taskId} dialect={taskParams?.dialect}/>
children: <ExecutionHistory taskId={taskId} dialect={taskParams?.dialect} />
});
}
if (assert(taskParams?.dialect, [DIALECT.FLINK_SQL], true, 'includes')) {
Expand Down Expand Up @@ -288,7 +292,7 @@ const Service = (props: { showDesc: boolean; tabs: CenterTab[]; action: any }) =
/>
);
}
},[tabs, selectedKey, props.action, tabActiveKey]);
}, [tabs, selectedKey, props.action, tabActiveKey]);
return (
<PanelGroup direction={'horizontal'}>
<Panel defaultSize={20} style={{ display: 'flex', flexDirection: 'column', padding: 10 }}>
Expand Down
2 changes: 1 addition & 1 deletion dinky-web/src/pages/DevOps/JobList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { buildProjectTree } from '@/pages/DataStudio/Toolbar/Project/function';
import { showFirstLevelOwner, showSecondLevelOwners } from '@/pages/DataStudio/function';
import { generateList, getLeafKeyList, searchInTree } from '@/utils/treeUtils';
import { mapDispatchToProps } from '@/pages/DataStudio/DvaFunction';
import {SseData, Topic} from "@/models/UseWebSocketModel";
import { SseData, Topic } from '@/models/UseWebSocketModel';

const { DirectoryTree } = Tree;

Expand Down

0 comments on commit d4c81c2

Please sign in to comment.