Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): display default payload #5074

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
return;
}
this.open = true;
this.nodeToRun = this._store.selectSnapshot(WorkflowState.nodeSnapshot);
this.nodeToRun = cloneDeep(this._store.selectSnapshot(WorkflowState.nodeSnapshot));
this.currentNodeRun = this._store.selectSnapshot(WorkflowState.nodeRunSnapshot);
this.currentWorkflowRun = this._store.selectSnapshot(WorkflowState.workflowRunSnapshot);
this.workflow = this._store.selectSnapshot(WorkflowState.workflowSnapshot);
Expand All @@ -109,6 +109,11 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
if (this.currentNodeRun && this.currentNodeRun.workflow_node_id !== this.nodeToRun.id) {
delete this.currentNodeRun;
}

if (!this.nodeToRun) {
this.nodeToRun = this.workflow.workflow_data.node;
}

this.updateDefaultPipelineParameters();
if (this.nodeToRun && this.nodeToRun.context) {
// TODO fix condition when optinal chaining (? operator) when angular 9
Expand Down Expand Up @@ -137,7 +142,6 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
}
this.num = num;


// if the pipeline was already launched, we refresh data from API
// relaunch a workflow or a pipeline
if (num > 0 && nodeRunID > 0) {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/workflow/node/run/node.run.param.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="ui form payload">
<ng-container *ngIf="nodeToRun && nodeToRun.type === nodeTypeEnum.PIPELINE && parameters?.length > 0 ">
<h3>{{ 'workflow_node_context_pipeline_parameter' | translate}}</h3>
<app-parameter-list [project]="project" [parameters]="parameters"
<app-parameter-list [parameters]="parameters"
[paramsRef]="workflow.pipelines[nodeToRun.context.pipeline_id]?.parameters" mode="launcher"
[suggest]="[]"></app-parameter-list>
</ng-container>
Expand Down