Unverified Commit 442ce3b0 authored by Zzm0809's avatar Zzm0809 Committed by GitHub

[Optimization-2885][web] Automatically switch console and result tags (#2886)

* Spotless Apply * Spotless Apply * auto-check-tags * Spotless Apply --------- Co-authored-by: 's avatarZzm0809 <Zzm0809@users.noreply.github.com>
parent 0edde40a
...@@ -92,8 +92,7 @@ export default class LineageDagExt extends LineageDag { ...@@ -92,8 +92,7 @@ export default class LineageDagExt extends LineageDag {
edges: result.edges edges: result.edges
}; };
setTimeout( setTimeout(() => {
() => {
let tmpEdges = result.edges; let tmpEdges = result.edges;
result.edges = []; result.edges = [];
// this.canvas.wrapper.style.visibility = 'hidden'; // this.canvas.wrapper.style.visibility = 'hidden';
...@@ -141,8 +140,6 @@ export default class LineageDagExt extends LineageDag { ...@@ -141,8 +140,6 @@ export default class LineageDagExt extends LineageDag {
this.canvas.on('system.canvas.click', () => { this.canvas.on('system.canvas.click', () => {
this.canvas.unfocus(); this.canvas.unfocus();
}); });
}, }, _.get(this.props, 'config.delayDraw', 0));
_.get(this.props, 'config.delayDraw', 0)
);
} }
} }
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
import { LoadingBtn } from '@/components/CallBackButton/LoadingBtn'; import { LoadingBtn } from '@/components/CallBackButton/LoadingBtn';
import { PushpinIcon } from '@/components/Icons/CustomIcons'; import { PushpinIcon } from '@/components/Icons/CustomIcons';
import { FlexCenterDiv } from '@/components/StyledComponents'; import { FlexCenterDiv } from '@/components/StyledComponents';
import { LeftBottomKey } from '@/pages/DataStudio/data.d';
import { getCurrentData, getCurrentTab, mapDispatchToProps } from '@/pages/DataStudio/function'; import { getCurrentData, getCurrentTab, mapDispatchToProps } from '@/pages/DataStudio/function';
import Explain from '@/pages/DataStudio/HeaderContainer/Explain'; import Explain from '@/pages/DataStudio/HeaderContainer/Explain';
import FlinkGraph from '@/pages/DataStudio/HeaderContainer/FlinkGraph'; import FlinkGraph from '@/pages/DataStudio/HeaderContainer/FlinkGraph';
...@@ -100,6 +101,7 @@ const HeaderContainer = (props: connect) => { ...@@ -100,6 +101,7 @@ const HeaderContainer = (props: connect) => {
tabs: { panes, activeKey }, tabs: { panes, activeKey },
saveTabs, saveTabs,
updateJobRunningMsg, updateJobRunningMsg,
updateSelectBottomKey,
queryDsConfig, queryDsConfig,
queryTaskData, queryTaskData,
enabledDs enabledDs
...@@ -189,6 +191,7 @@ const HeaderContainer = (props: connect) => { ...@@ -189,6 +191,7 @@ const HeaderContainer = (props: connect) => {
}; };
const handlerDebug = async () => { const handlerDebug = async () => {
updateSelectBottomKey(LeftBottomKey.CONSOLE_KEY);
if (!currentData) return; if (!currentData) return;
// @ts-ignore // @ts-ignore
const editor = currentTab.monacoInstance.editor const editor = currentTab.monacoInstance.editor
...@@ -208,7 +211,12 @@ const HeaderContainer = (props: connect) => { ...@@ -208,7 +211,12 @@ const HeaderContainer = (props: connect) => {
{ ...currentData, statement: selectSql } { ...currentData, statement: selectSql }
); );
if (!res) return; if (!res) {
return;
} else {
updateSelectBottomKey(LeftBottomKey.RESULT_KEY);
}
updateJobRunningMsg({ updateJobRunningMsg({
taskId: currentData.id, taskId: currentData.id,
jobName: currentData.name, jobName: currentData.name,
...@@ -232,6 +240,8 @@ const HeaderContainer = (props: connect) => { ...@@ -232,6 +240,8 @@ const HeaderContainer = (props: connect) => {
}; };
const handlerSubmit = async () => { const handlerSubmit = async () => {
updateSelectBottomKey(LeftBottomKey.CONSOLE_KEY);
if (!currentData) return; if (!currentData) return;
const saved = currentData.step == JOB_LIFE_CYCLE.PUBLISH ? true : await handleSave(); const saved = currentData.step == JOB_LIFE_CYCLE.PUBLISH ? true : await handleSave();
if (!saved) return; if (!saved) return;
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* *
*/ */
import { LeftBottomKey, LeftMenuKey } from '@/pages/DataStudio/data.d';
import { getFooterValue, isDataStudioTabsItemType } from '@/pages/DataStudio/function'; import { getFooterValue, isDataStudioTabsItemType } from '@/pages/DataStudio/function';
import { getDataSourceList } from '@/pages/DataStudio/LeftContainer/DataSource/service'; import { getDataSourceList } from '@/pages/DataStudio/LeftContainer/DataSource/service';
import { getTaskData } from '@/pages/DataStudio/LeftContainer/Project/service'; import { getTaskData } from '@/pages/DataStudio/LeftContainer/Project/service';
...@@ -356,7 +357,7 @@ const Model: ModelType = { ...@@ -356,7 +357,7 @@ const Model: ModelType = {
toolContentHeight: 0, toolContentHeight: 0,
centerContentHeight: 0, centerContentHeight: 0,
leftContainer: { leftContainer: {
selectKey: 'menu.datastudio.project', selectKey: LeftMenuKey.PROJECT_KEY,
selectSubKey: {}, selectSubKey: {},
height: '100%', height: '100%',
width: 260 width: 260
...@@ -368,7 +369,7 @@ const Model: ModelType = { ...@@ -368,7 +369,7 @@ const Model: ModelType = {
width: 260 width: 260
}, },
bottomContainer: { bottomContainer: {
selectKey: 'menu.datastudio.console', selectKey: LeftBottomKey.CONSOLE_KEY,
selectSubKey: {}, selectSubKey: {},
height: 180, height: 180,
width: '100%' width: '100%'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment