From c87af0eba8b5764a3771a6efdf50a6d291c9b575 Mon Sep 17 00:00:00 2001 From: Devosend Date: Tue, 29 Mar 2022 17:39:46 +0800 Subject: [PATCH] [Fix][UI Next] Add workflow online status display (#9253) --- .../src/locales/modules/en_US.ts | 3 ++- .../src/locales/modules/zh_CN.ts | 3 ++- .../workflow/components/dag/dag-toolbar.tsx | 16 +++++++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts index 4bcab19d0b..1984050c3a 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts @@ -622,7 +622,8 @@ const project = { node_not_created: 'Failed to save node not created', copy_name: 'Copy Name', view_variables: 'View Variables', - startup_parameter: 'Startup Parameter' + startup_parameter: 'Startup Parameter', + online: 'Online' }, node: { current_node_settings: 'Current node settings', diff --git a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts index a6eb6554e2..8b884999ad 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts @@ -618,7 +618,8 @@ const project = { node_not_created: '未创建节点保存失败', copy_name: '复制名称', view_variables: '查看变量', - startup_parameter: '启动参数' + startup_parameter: '启动参数', + online: '已上线' }, node: { current_node_settings: '当前节点设置', diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-toolbar.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-toolbar.tsx index e991230d43..0af7313521 100644 --- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-toolbar.tsx +++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-toolbar.tsx @@ -18,7 +18,15 @@ import { defineComponent, ref, inject, PropType, Ref } from 'vue' import { useI18n } from 'vue-i18n' import Styles from './dag.module.scss' -import { NTooltip, NIcon, NButton, NSelect, NPopover, NText } from 'naive-ui' +import { + NTooltip, + NIcon, + NButton, + NSelect, + NPopover, + NText, + NTag +} from 'naive-ui' import { SearchOutlined, DownloadOutlined, @@ -195,6 +203,12 @@ export default defineComponent({ > )}
+ {route.name !== 'workflow-instance-detail' && + props.definition?.processDefinition?.releaseState === 'ONLINE' && ( + + {t('project.dag.online')} + + )} {route.name === 'workflow-instance-detail' && ( <>