From fc837c7dadc9633df9dfeb10ae29ef6d24823d80 Mon Sep 17 00:00:00 2001 From: Nut He <18328704+hetao92@users.noreply.github.com> Date: Wed, 17 Aug 2022 16:14:17 +0800 Subject: [PATCH] feat: cancel batch exec in console --- app/pages/Console/index.module.less | 10 +++++++++- app/pages/Console/index.tsx | 31 ++++++++++++++++++----------- app/stores/console.ts | 17 ++++++++-------- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/app/pages/Console/index.module.less b/app/pages/Console/index.module.less index 0161b5df..49499414 100644 --- a/app/pages/Console/index.module.less +++ b/app/pages/Console/index.module.less @@ -40,10 +40,12 @@ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); border-radius: 6px; padding: 14px 30px; - .panelHeader { + .flex { display: flex; align-items: center; justify-content: space-between; + } + .panelHeader { margin-bottom: 15px; .title { font-family: Roboto-Regular, sans-serif; @@ -52,6 +54,12 @@ color: @lightBlack; } .operations { + margin-top: 10px; + display: flex; + align-items: center; + justify-content: space-between; + } + .btnOperations { display: flex; align-items: center; .btnOperations { diff --git a/app/pages/Console/index.tsx b/app/pages/Console/index.tsx index e40f2e66..4bcc1abc 100644 --- a/app/pages/Console/index.tsx +++ b/app/pages/Console/index.tsx @@ -14,6 +14,7 @@ import FavoriteBtn from './FavoriteBtn'; import CypherParameterBox from './CypherParameterBox'; import ExportModal from './ExportModal'; import styles from './index.module.less'; +import classnames from 'classnames'; const Option = Select.Option; // split from semicolon out of quotation marks @@ -32,11 +33,12 @@ interface IProps { space: string; vertexes: any[], edges: any[] - }) => void + }) => void, + ConsoleHeaderChildren?: React.ReactNode, } const Console = (props: IProps) => { const { schema, console, global } = useStore(); - const { onExplorer } = props; + const { onExplorer, ConsoleHeaderChildren } = props; const { spaces, getSpaces, switchSpace, currentSpace, spaceVidType, updateVidType } = schema; const { runGQL, currentGQL, results, runGQLLoading, getParams, update, paramsMap } = console; const { nebulaVersion } = global; @@ -132,18 +134,23 @@ const Console = (props: IProps) => {