8000 fix(ui): don't display raw payload (#3755) · ovh/cds@f2d1c14 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit f2d1c14

Browse files
bnjjjyesnault
authored andcommitted
fix(ui): don't display raw payload (#3755)
Signed-off-by: Benjamin Coenen <benjamin.coenen@corp.ovh.com>
1 parent a9b495e commit f2d1c14

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

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

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
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';
2020
declare var CodeMirror: any;
2121

2222
@Component({
@@ -175,6 +175,9 @@ export class WorkflowNodeRunParamComponent implements OnInit {
175175
let currentPayload = payload;
176176
if (!currentPayload) {
177177
currentPayload = this.getCurrentPayload();
178+
if (this.readOnly) {
179+
delete currentPayload['payload'];
180+
}
178181
this.payloadString = JSON.stringify(currentPayload, undefined, 4);
179182
}
180183

0 commit comments

Comments
 (0)
0