diff options
author | Lvbo163 <lv.bo163@zte.com.cn> | 2018-01-11 14:18:25 +0800 |
---|---|---|
committer | Lvbo163 <lv.bo163@zte.com.cn> | 2018-01-11 14:18:25 +0800 |
commit | 761b385b2a0a6dbec10717e6d94f1cd1e04bb2ef (patch) | |
tree | 43dc6ade00676d38bbf1831c5f18335a1eb8b858 /sdc-workflow-designer-ui/src/app/components/sequence-flow | |
parent | c825e1c7a6fa1aa8f1c430384620ffd0addf25f8 (diff) |
support exclusive-gateway
add exclusive gateway definition
Issue-ID: SDC-902
Change-Id: Id7ff89d30735fa16169c2a78b743e1565eb90410
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
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.html | 13 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts | 21 |
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); } } |