Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Optimize-data-development-initia…
Browse files Browse the repository at this point in the history
…lization-data-calling-method' into Optimize-data-development-initialization-data-calling-method
  • Loading branch information
Zzm0809 committed Dec 24, 2023
2 parents d7d5768 + 1d34d4c commit fa4d14f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
21 changes: 11 additions & 10 deletions dinky-web/src/pages/DataStudio/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import {
FooterType,
JobRunningMsgType,
MetadataTabsItemType,
STUDIO_MODEL, STUDIO_MODEL_ASYNC,
STUDIO_MODEL,
STUDIO_MODEL_ASYNC,
TabsItemType,
TabsPageType,
TaskDataType
Expand Down Expand Up @@ -86,27 +87,27 @@ export const mapDispatchToProps = (dispatch: Dispatch) => ({
}),
queryDatabaseList: () =>
dispatch({
type: STUDIO_MODEL_ASYNC.queryDatabaseList,
type: STUDIO_MODEL_ASYNC.queryDatabaseList
}),
queryTaskData: () => {
dispatch({
type: STUDIO_MODEL_ASYNC.queryTaskData,
type: STUDIO_MODEL_ASYNC.queryTaskData
});
},
querySessionData: () => {
dispatch({
type: STUDIO_MODEL_ASYNC.querySessionData,
});
dispatch({
type: STUDIO_MODEL_ASYNC.querySessionData
});
},
queryEnv: () => {
dispatch({
type: STUDIO_MODEL_ASYNC.queryEnv,
type: STUDIO_MODEL_ASYNC.queryEnv
});
},
queryClusterConfigurationData: () => {
dispatch({
type: STUDIO_MODEL_ASYNC.queryClusterConfigurationData,
});
dispatch({
type: STUDIO_MODEL_ASYNC.queryClusterConfigurationData
});
},

saveProject: (data: any[]) =>
Expand Down
6 changes: 3 additions & 3 deletions dinky-web/src/pages/DataStudio/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ import {
import RightContainer from '@/pages/DataStudio/RightContainer';
import { LeftBottomMoreTabs, LeftBottomSide, LeftSide, RightSide } from '@/pages/DataStudio/route';
import { PageContainer } from '@ant-design/pro-layout';
import { connect, getDvaApp } from '@umijs/max';
import { useAsyncEffect } from 'ahooks';
import { Layout, Menu, theme } from 'antd';
import React, { useEffect, useState } from 'react';
import { PersistGate } from 'redux-persist/integration/react';
import {connect, getDvaApp} from "@umijs/max";

const { Sider, Content } = Layout;

const { useToken } = theme;

const DataStudio: React.FC<connect> = (props: any ) => {
const DataStudio: React.FC<connect> = (props: any) => {
const {
bottomContainer,
leftContainer,
Expand All @@ -66,7 +66,7 @@ const DataStudio: React.FC<connect> = (props: any ) => {
queryClusterConfigurationData,
activeBreadcrumbTitle,
updateSelectBottomSubKey,
tabs: { panes, activeKey },
tabs: { panes, activeKey }
} = props;
const isProject = isProjectTabs(panes, activeKey);
const { token } = useToken();
Expand Down
15 changes: 8 additions & 7 deletions dinky-web/src/pages/DataStudio/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
*/

import { getFooterValue, isDataStudioTabsItemType } from '@/pages/DataStudio/function';
import { getDataSourceList } from '@/pages/DataStudio/LeftContainer/DataSource/service';
import { getTaskData } from '@/pages/DataStudio/LeftContainer/Project/service';
import {
getClusterConfigurationData,
getEnvData,
getFlinkConfigs, getSessionData,
getFlinkConfigs,
getSessionData,
querySuggessionData
} from '@/pages/DataStudio/RightContainer/JobConfig/service';
import { QueryParams } from '@/pages/RegCenter/DataSource/components/DataSourceDetail/RightTagsRouter/data';
Expand All @@ -36,7 +38,6 @@ import { DefaultOptionType } from 'antd/es/select';
import { editor } from 'monaco-editor';
import React from 'react';
import ICodeEditor = editor.ICodeEditor;
import {getDataSourceList} from "@/pages/DataStudio/LeftContainer/DataSource/service";

/**
* 初始化布局宽高度
Expand Down Expand Up @@ -307,7 +308,7 @@ export type ModelType = {
queryFlinkConfigOptions: Effect;
querySuggestions: Effect;
queryEnv: Effect;
queryDatabaseList: Effect
queryDatabaseList: Effect;
queryTaskData: Effect;
querySessionData: Effect;
queryClusterConfigurationData: Effect;
Expand Down Expand Up @@ -436,9 +437,9 @@ const Model: ModelType = {
*queryDatabaseList({ payload }, { call, put }) {
const response: DataSources.DataSource[] = yield call(getDataSourceList, payload);
yield put({
type:'saveDataBase',
payload:response
})
type: 'saveDataBase',
payload: response
});
},
*queryTaskData({ payload }, { call, put }) {
const response: TaskType = yield call(getTaskData, payload);
Expand All @@ -457,7 +458,7 @@ const Model: ModelType = {
*queryEnv({ payload }, { call, put }) {
const response: EnvType[] = yield call(getEnvData, payload);
yield put({
type:'saveEnv',
type: 'saveEnv',
payload: response
});
},
Expand Down

0 comments on commit fa4d14f

Please sign in to comment.