summaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components/sequence-flow
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/sequence-flow')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html13
-rw-r--r--sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts21
2 files changed, 19 insertions, 15 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html
index 3a4c6635..64feb605 100644
--- a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html
@@ -23,31 +23,30 @@
</div>
<div class="form-group row">
- <label class="col-md-3 form-control-label text-md-right">Name</label>
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_NAME' | translate}}</label>
<div class="col-md-9">
- <input class="form-control" type="text" [(ngModel)]="sequenceFlow.name">
+ <input class="form-control" type="text" [(ngModel)]="sequenceFlow.name" (ngModelChange)="nameChanged($event)">
</div>
</div>
<div class="form-group row">
- <label class="col-md-3 form-control-label text-md-right">Source</label>
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_SOURCE' | translate}}</label>
<div class="col-md-9">
<input class="form-control" disabled type="text" [(ngModel)]="sequenceFlow.sourceRef">
</div>
</div>
<div class="form-group row">
- <label class="col-md-3 form-control-label text-md-right">Target</label>
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_TARGET' | translate}}</label>
<div class="col-md-9">
<input class="form-control" disabled type="text" [(ngModel)]="sequenceFlow.targetRef">
</div>
</div>
<div class="form-group row">
- <label class="col-md-3 form-control-label text-md-right">Condition</label>
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_CONDITION' | translate}}</label>
<div class="col-md-9">
- <input class="form-control" type="text" [ngModel]="sequenceFlow.condition"
- (ngModelChange)="conditionChanged($event)">
+ <input class="form-control" type="text" [(ngModel)]="sequenceFlow.condition">
</div>
</div>
</div>
diff --git a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
index b114d0ae..f132a07f 100644
--- a/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
@@ -33,25 +33,30 @@ export class SequenceFlowComponent implements AfterViewInit {
public show = false;
constructor(private broadcastService: BroadcastService,
- private processService: ModelService,
+ private modelService: ModelService,
private jsPlumbService: JsPlumbService) {
}
public ngAfterViewInit() {
- this.broadcastService.showSequenceFlow$.subscribe(show => this.show = show);
- this.broadcastService.sequenceFlow$.subscribe(tmp => this.sequenceFlow = tmp);
+ this.broadcastService.showProperty$.subscribe(element => {
+ if (element && !this.modelService.isNode(element)) {
+ this.sequenceFlow = element as SequenceFlow;
+ this.show = true;
+ } else {
+ this.show = false;
+ }
+ });
}
- public conditionChanged(condition: string) {
- this.sequenceFlow.condition = condition;
- this.jsPlumbService.setLabel(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef, condition);
+ public nameChanged(name: string) {
+ this.sequenceFlow.name = name;
+ this.jsPlumbService.setLabel(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef, name);
}
public delete() {
this.show = false;
-
- this.processService.deleteConnection(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef);
+ this.modelService.deleteConnection(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef);
this.jsPlumbService.deleteConnect(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef);
}
}