You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by so...@apache.org on 2022/03/05 05:35:37 UTC
[dolphinscheduler] branch dev updated: [Fix-8633][UI Next][V1.0.0-Alpha] Work out this issue to edit the process definition when clicking the edit button. (#8705)
This is an automated email from the ASF dual-hosted git repository.
songjian 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 304d7a7 [Fix-8633][UI Next][V1.0.0-Alpha] Work out this issue to edit the process definition when clicking the edit button. (#8705)
304d7a7 is described below
commit 304d7a76587ccff45ae65bdc96d895b697c4a88f
Author: calvin <ji...@163.com>
AuthorDate: Sat Mar 5 13:35:26 2022 +0800
[Fix-8633][UI Next][V1.0.0-Alpha] Work out this issue to edit the process definition when clicking the edit button. (#8705)
---
.../projects/workflow/definition/components/table-action.tsx | 8 ++++++++
.../src/views/projects/workflow/definition/use-table.ts | 10 ++++++++++
2 files changed, 18 insertions(+)
diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx
index 89c09ff..06cf490 100644
--- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx
+++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/table-action.tsx
@@ -43,6 +43,7 @@ export default defineComponent({
name: 'TableAction',
props,
emits: [
+ 'editWorkflow',
'updateList',
'startWorkflow',
'timingWorkflow',
@@ -55,6 +56,11 @@ export default defineComponent({
'gotoWorkflowTree'
],
setup(props, ctx) {
+
+ const handleEditWorkflow = () => {
+ ctx.emit('editWorkflow')
+ }
+
const handleStartWorkflow = () => {
ctx.emit('startWorkflow')
}
@@ -92,6 +98,7 @@ export default defineComponent({
}
return {
+ handleEditWorkflow,
handleStartWorkflow,
handleTimingWorkflow,
handleVersionWorkflow,
@@ -120,6 +127,7 @@ export default defineComponent({
type='info'
tag='div'
circle
+ onClick={this.handleEditWorkflow}
disabled={releaseState === 'ONLINE'}
/* TODO: Edit workflow */
>
diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/use-table.ts b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/use-table.ts
index 25ce557..956687d 100644
--- a/dolphinscheduler-ui-next/src/views/projects/workflow/definition/use-table.ts
+++ b/dolphinscheduler-ui-next/src/views/projects/workflow/definition/use-table.ts
@@ -152,6 +152,7 @@ export function useTable() {
render: (row) =>
h(TableAction, {
row,
+ onEditWorkflow: () => editWorkflow(row),
onStartWorkflow: () => startWorkflow(row),
onTimingWorkflow: () => timingWorkflow(row),
onVersionWorkflow: () => versionWorkflow(row),
@@ -165,6 +166,15 @@ export function useTable() {
}
] as TableColumns<any>
}
+
+ const editWorkflow = (row: any) => {
+ variables.row = row
+ router.push({
+ name: 'workflow-definition-detail',
+ params: { code: row.code }
+ })
+ }
+
const startWorkflow = (row: any) => {
variables.startShowRef = true
variables.row = row