|
1 |
| -import {Component, Input, OnInit, ViewChild} from '@angular/core'; |
2 |
| -import {Router} from '@angular/router'; |
3 |
| -import {TranslateService} from '@ngx-translate/core'; |
4 |
| -import {cloneDeep} from 'lodash'; |
5 |
| -import {CodemirrorComponent} from 'ng2-codemirror-typescript/Codemirror'; |
6 |
| -import {ModalTemplate, SuiModalService, TemplateModalConfig} from 'ng2-semantic-ui'; |
7 |
| -import {ActiveModal} from 'ng2-semantic-ui/dist'; |
8 |
| -import {debounceTime, finalize, first} from 'rxjs/operators'; |
9 |
| -import {Parameter} from '../../../../model/parameter.model'; |
10 |
| -import {Pipeline} from '../../../../model/pipeline.model'; |
11 |
| -import {Project} from '../../../../model/project.model'; |
12 |
| -import {Commit} from '../../../../model/repositories.model'; |
13 |
| -import {WNode, WNodeContext, WNodeType, Workflow} from '../../../../model/workflow.model'; |
14 |
| -import {WorkflowNodeRun, WorkflowNodeRunManual, WorkflowRun, WorkflowRunRequest} from '../../../../model/workflow.run.model'; |
15 |
| -import {ApplicationWorkflowService} from '../../../../service/application/application.workflow.service'; |
16 |
| -import {WorkflowRunService} from '../../../../service/workflow/run/workflow.run.service'; |
17 |
| -import {WorkflowEventStore} from '../../../../service/workflow/workflow.event.store'; |
18 |
| -import {AutoUnsubscribe} from '../../../decorator/autoUnsubscribe'; |
19 |
| -import {ToastService} from '../../../toast/ToastService'; |
| 1 | +import { Component, Input, OnInit, ViewChild } from '@angular/core'; |
| 2 | +import { Router } from '@angular/router'; |
| 3 | +import { TranslateService } from '@ngx-translate/core'; |
| 4 | +import { cloneDeep } from 'lodash'; |
| 5 | +import { CodemirrorComponent } from 'ng2-codemirror-typescript/Codemirror'; |
| 6 | +import { ModalTemplate, SuiModalService, TemplateModalConfig } from 'ng2-semantic-ui'; |
| 7 | +import { ActiveModal } from 'ng2-semantic-ui/dist'; |
| 8 | +import { debounceTime, finalize, first
8000
} from 'rxjs/operators'; |
| 9 | +import { Parameter } from '../../../../model/parameter.model'; |
| 10 | +import { Pipeline } from '../../../../model/pipeline.model'; |
| 11 | +import { Project } from '../../../../model/project.model'; |
| 12 | +import { Commit } from '../../../../model/repositories.model'; |
| 13 | +import { WNode, WNodeContext, WNodeType, Workflow } from '../../../../model/workflow.model'; |
| 14 | +import { WorkflowNodeRun, WorkflowNodeRunManual, WorkflowRun, WorkflowRunRequest } from '../../../../model/workflow.run.model'; |
| 15 | +import { ApplicationWorkflowService } from '../../../../service/application/application.workflow.service'; |
| 16 | +import { WorkflowRunService } from '../../../../service/workflow/run/workflow.run.service'; |
| 17 | +import { WorkflowEventStore } from '../../../../service/workflow/workflow.event.store'; |
| 18 | +import { AutoUnsubscribe } from '../../../decorator/autoUnsubscribe'; |
| 19 | +import { ToastService } from '../../../toast/ToastService'; |
20 | 20 | declare var CodeMirror: any;
|
21 | 21 |
|
22 | 22 | @Component({
|
@@ -175,6 +175,9 @@ export class WorkflowNodeRunParamComponent implements OnInit {
|
175 | 175 | let currentPayload = payload;
|
176 | 176 | if (!currentPayload) {
|
177 | 177 | currentPayload = this.getCurrentPayload();
|
| 178 | + if (this.readOnly) { |
| 179 | + delete currentPayload['payload']; |
| 180 | + } |
178 | 181 | this.payloadString = JSON.stringify(currentPayload, undefined, 4);
|
179 | 182 | }
|
180 | 183 |
|
|
0 commit comments