This is an automated email from the ASF dual-hosted git repository.
liudongkai 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 84cad13782 [Fix][UI Next][V1.0.0-Beta] Add the 'startNodeList' field
to the 'start-process-instance' interface. (#9769)
84cad13782 is described below
commit 84cad137824ee886d0e50bd741c23c87823aebe3
Author: Amy0104 <[email protected]>
AuthorDate: Tue Apr 26 11:14:17 2022 +0800
[Fix][UI Next][V1.0.0-Beta] Add the 'startNodeList' field to the
'start-process-instance' interface. (#9769)
---
dolphinscheduler-ui-next/src/store/project/task-node.ts | 2 +-
dolphinscheduler-ui-next/src/utils/truncate-text.ts | 2 +-
.../views/projects/workflow/components/dag/dag-context-menu.tsx | 7 +++++--
.../src/views/projects/workflow/components/dag/index.tsx | 1 +
.../src/views/projects/workflow/components/dag/use-node-menu.ts | 6 ++++--
.../views/projects/workflow/definition/components/start-modal.tsx | 5 +++++
6 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/dolphinscheduler-ui-next/src/store/project/task-node.ts
b/dolphinscheduler-ui-next/src/store/project/task-node.ts
index 15d7c1be6c..23a077b672 100644
--- a/dolphinscheduler-ui-next/src/store/project/task-node.ts
+++ b/dolphinscheduler-ui-next/src/store/project/task-node.ts
@@ -131,7 +131,7 @@ export const useTaskNodeStore = defineStore({
},
updateDependentResult(dependentResult: BDependentResultType) {
const result = {} as DependentResultType
- for (let [key, value] of Object.entries(dependentResult)) {
+ for (const [key, value] of Object.entries(dependentResult)) {
result[key] = value === 'FAILED' ? 'FAILURE' : value
}
this.dependentResult = result
diff --git a/dolphinscheduler-ui-next/src/utils/truncate-text.ts
b/dolphinscheduler-ui-next/src/utils/truncate-text.ts
index 9799bda3aa..2991b43cff 100644
--- a/dolphinscheduler-ui-next/src/utils/truncate-text.ts
+++ b/dolphinscheduler-ui-next/src/utils/truncate-text.ts
@@ -50,4 +50,4 @@ const truncateText = (text: string, n: number) => {
return res
}
-export default truncateText
\ No newline at end of file
+export default truncateText
diff --git
a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx
b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx
index 20b966a50e..74b8317b88 100644
---
a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx
+++
b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-context-menu.tsx
@@ -70,7 +70,7 @@ export default defineComponent({
}
const startRunning = () => {
- ctx.emit('start')
+ ctx.emit('start', Number(props.cell?.id))
}
const handleEdit = () => {
@@ -156,7 +156,10 @@ export default defineComponent({
{t('project.node.delete')}
</NButton>
{this.taskInstance && (
- <NButton class={`${styles['menu-item']}`}
onClick={this.handleViewLog}>
+ <NButton
+ class={`${styles['menu-item']}`}
+ onClick={this.handleViewLog}
+ >
{t('project.node.view_log')}
</NButton>
)}
diff --git
a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/index.tsx
b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/index.tsx
index 886e96c4bf..c4b246deb7 100644
---
a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/index.tsx
+++
b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/index.tsx
@@ -357,6 +357,7 @@ export default defineComponent({
<StartModal
v-model:row={props.definition.processDefinition}
v-model:show={nodeVariables.startModalShow}
+ taskCode={nodeVariables.taskCode}
/>
)}
{!!props.instance && (
diff --git
a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-node-menu.ts
b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-node-menu.ts
index 26d2d0c7a7..322902ffeb 100644
---
a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-node-menu.ts
+++
b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-node-menu.ts
@@ -42,7 +42,8 @@ export function useNodeMenu(options: Options) {
logRef: '',
logLoadingRef: ref(true),
skipLineNum: ref(0),
- limit: ref(1000)
+ limit: ref(1000),
+ taskCode: ''
})
const menuHide = () => {
@@ -52,8 +53,9 @@ export function useNodeMenu(options: Options) {
graph.value?.unlockScroller()
}
- const menuStart = () => {
+ const menuStart = (code: number) => {
nodeVariables.startModalShow = true
+ nodeVariables.taskCode = String(code)
}
const viewLog = (taskId: number, taskType: string) => {
diff --git
a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx
b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx
index 42359f07fb..2f57b17dd5 100644
---
a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx
+++
b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/start-modal.tsx
@@ -59,6 +59,9 @@ const props = {
show: {
type: Boolean as PropType<boolean>,
default: false
+ },
+ taskCode: {
+ type: String
}
}
@@ -190,6 +193,8 @@ export default defineComponent({
() => {
if (props.show) {
getStartParamsList(props.row.code)
+ if (props.taskCode)
+ startState.startForm.startNodeList = props.taskCode
}
}
)