You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by wa...@apache.org on 2022/08/10 03:45:26 UTC
[dolphinscheduler] branch dev updated: [Fix-11366][UI] Workflow instance should not support right-click running (#11367)
This is an automated email from the ASF dual-hosted git repository.
wanggenhua pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 82e9c40df8 [Fix-11366][UI] Workflow instance should not support right-click running (#11367)
82e9c40df8 is described below
commit 82e9c40df872b77b66e32cbd26660ccb8b56f620
Author: Sheldon <39...@users.noreply.github.com>
AuthorDate: Wed Aug 10 11:45:20 2022 +0800
[Fix-11366][UI] Workflow instance should not support right-click running (#11367)
Co-authored-by: sheldonliu <sheldonliu>
---
.../workflow/components/dag/dag-context-menu.tsx | 20 +++++++++++++-------
.../views/projects/workflow/components/dag/index.tsx | 1 +
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-context-menu.tsx b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-context-menu.tsx
index 74b8317b88..87161c3d27 100644
--- a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-context-menu.tsx
+++ b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-context-menu.tsx
@@ -26,6 +26,10 @@ import { IWorkflowTaskInstance } from './types'
import { NButton } from 'naive-ui'
const props = {
+ startButtonDisplay: {
+ type: Boolean as PropType<boolean>,
+ default: true
+ },
startReadonly: {
type: Boolean as PropType<boolean>,
default: false
@@ -127,13 +131,15 @@ export default defineComponent({
class={styles['dag-context-menu']}
style={{ left: `${this.left}px`, top: `${this.top}px` }}
>
- <NButton
- class={`${styles['menu-item']}`}
- disabled={this.startReadonly}
- onClick={this.startRunning}
- >
- {t('project.node.start')}
- </NButton>
+ {this.startButtonDisplay && (
+ <NButton
+ class={`${styles['menu-item']}`}
+ disabled={this.startReadonly}
+ onClick={this.startRunning}
+ >
+ {t('project.node.start')}
+ </NButton>)
+ }
<NButton
class={`${styles['menu-item']}`}
disabled={this.menuReadonly}
diff --git a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx
index fcb49bbe8f..3e167bd81e 100644
--- a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx
+++ b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/index.tsx
@@ -362,6 +362,7 @@ export default defineComponent({
onCancel={taskCancel}
/>
<ContextMenuItem
+ startButtonDisplay={!props.instance}
startReadonly={startReadonly.value}
menuReadonly={menuReadonly.value}
taskInstance={taskInstance.value}