Skip to content

Commit 9c2ac89

Browse files
authored
fix(ui): display default payload (#5074)
1 parent 1900c22 commit 9c2ac89

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ui/src/app/shared/workflow/node/run/node.run.param.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
100100
return;
101101
}
102102
this.open = true;
103-
this.nodeToRun = this._store.selectSnapshot(WorkflowState.nodeSnapshot);
103+
this.nodeToRun = cloneDeep(this._store.selectSnapshot(WorkflowState.nodeSnapshot));
104104
this.currentNodeRun = this._store.selectSnapshot(WorkflowState.nodeRunSnapshot);
105105
this.currentWorkflowRun = this._store.selectSnapshot(WorkflowState.workflowRunSnapshot);
106106
this.workflow = this._store.selectSnapshot(WorkflowState.workflowSnapshot);
@@ -109,6 +109,11 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
109109
if (this.currentNodeRun && this.currentNodeRun.workflow_node_id !== this.nodeToRun.id) {
110110
delete this.currentNodeRun;
111111
}
112+
113+
if (!this.nodeToRun) {
114+
this.nodeToRun = this.workflow.workflow_data.node;
115+
}
116+
112117
this.updateDefaultPipelineParameters();
113118
if (this.nodeToRun && this.nodeToRun.context) {
114119
// TODO fix condition when optinal chaining (? operator) when angular 9
@@ -137,7 +142,6 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
137142
}
138143
this.num = num;
139144

140-
141145
// if the pipeline was already launched, we refresh data from API
142146
// relaunch a workflow or a pipeline
143147
if (num > 0 && nodeRunID > 0) {

ui/src/app/shared/workflow/node/run/node.run.param.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="ui form payload">
77
<ng-container *ngIf="nodeToRun && nodeToRun.type === nodeTypeEnum.PIPELINE && parameters?.length > 0 ">
88
<h3>{{ 'workflow_node_context_pipeline_parameter' | translate}}</h3>
9-
<app-parameter-list [project]="project" [parameters]="parameters"
9+
<app-parameter-list [parameters]="parameters"
1010
[paramsRef]="workflow.pipelines[nodeToRun.context.pipeline_id]?.parameters" mode="launcher"
1111
[suggest]="[]"></app-parameter-list>
1212
</ng-container>

0 commit comments

Comments
 (0)