diff --git a/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.html b/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.html index e164aefeda..5c58769b52 100644 --- a/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.html +++ b/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.html @@ -36,12 +36,12 @@

*ngIf="currentWorkflowNodeRun && (currentWorkflowNodeRun?.status === pipelineStatusEnum.BUILDING || currentWorkflowNodeRun?.status === pipelineStatusEnum.WAITING)"> - + - diff --git a/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.ts b/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.ts index 46a578de39..ec5474a803 100644 --- a/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.ts +++ b/ui/src/app/shared/workflow/sidebar/run-node/workflow.sidebar.run.node.component.ts @@ -36,6 +36,7 @@ export class WorkflowSidebarRunNodeComponent implements OnDestroy, OnInit { node: WNode; subNode: Subscription; + wNodeType = WNodeType; // Modal @ViewChild('workflowRunNode') @@ -131,11 +132,25 @@ export class WorkflowSidebarRunNodeComponent implements OnDestroy, OnInit { } displayLogs() { - this._router.navigate([ - '/project', this.project.key, - 'workflow', this.workflow.name, - 'run', this.currentWorkflowRun.num, - 'node', this.currentWorkflowNodeRun.id], { queryParams: { name: this.node.name}}); + switch (this.node.type) { + case WNodeType.OUTGOINGHOOK: + if (this.currentWorkflowNodeRun && this.node && this.node.outgoing_hook + && this.node.outgoing_hook.config['target_workflow']) { + this._router.navigate([ + '/project', this.project.key, + 'workflow', this.node.outgoing_hook.config['target_workflow'].value, + 'run', this.currentWorkflowNodeRun.callback.workflow_run_number + ], { queryParams: {} }); + } + break; + default: + this._router.navigate([ + '/project', this.project.key, + 'workflow', this.workflow.name, + 'run', this.currentWorkflowRun.num, + 'node', this.currentWorkflowNodeRun.id], { queryParams: { name: this.node.name } }); + } + } getDuration() { diff --git a/ui/src/app/shared/workflow/wnode/wnode.component.ts b/ui/src/app/shared/workflow/wnode/wnode.component.ts index 42e95e1544..c1031f29d6 100644 --- a/ui/src/app/shared/workflow/wnode/wnode.component.ts +++ b/ui/src/app/shared/workflow/wnode/wnode.component.ts @@ -111,8 +111,20 @@ export class WorkflowWNodeComponent implements OnInit { '/project', this.project.key, 'pipeline', Workflow.getPipeline(this.workflow, this.node).name ], {queryParams: {workflow: this.workflow.name, node_id: this.node.id, node_ref: this.node.ref}}); - break; } + break; + case WNodeType.OUTGOINGHOOK: + if (this._workflowEventStore.isRunSelected() + && this.currentNodeRun + && this.node.outgoing_hook.config['target_workflow'] + && this.currentNodeRun.callback) { + this._router.navigate([ + '/project', this.project.key, + 'workflow', this.node.outgoing_hook.config['target_workflow'].value, + 'run', this.currentNodeRun.callback.workflow_run_number + ], { queryParams: {} }); + } + break; } }