aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components
diff options
context:
space:
mode:
authorLvbo163 <lv.bo163@zte.com.cn>2018-01-11 14:18:25 +0800
committerLvbo163 <lv.bo163@zte.com.cn>2018-01-11 14:18:25 +0800
commit761b385b2a0a6dbec10717e6d94f1cd1e04bb2ef (patch)
tree43dc6ade00676d38bbf1831c5f18335a1eb8b858 /sdc-workflow-designer-ui/src/app/components
parentc825e1c7a6fa1aa8f1c430384620ffd0addf25f8 (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')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menus/menus.component.ts2
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.ts8
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.ts3
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.ts4
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.ts2
-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
7 files changed, 26 insertions, 27 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/menus/menus.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.ts
index e5f68ad1..c60e3b25 100644
--- a/sdc-workflow-designer-ui/src/app/components/menus/menus.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.ts
@@ -15,7 +15,7 @@ import { WorkflowService } from '../../services/workflow.service';
import { MicroserviceComponent } from "./microservice/microservice.component";
import { WorkflowsComponent } from "./workflows/workflows.component";
import { BroadcastService } from "../../services/broadcast.service";
-import { PlanModel } from "../../model/workflow/plan-model";
+import { PlanModel } from "../../model/plan-model";
@Component({
selector: 'menus',
diff --git a/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.ts
index bffaef42..c4c9649b 100644
--- a/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.ts
@@ -13,10 +13,9 @@
import { Component, Input, OnChanges, ViewChild } from '@angular/core';
import { ModalDirective } from 'ngx-bootstrap/modal';
-import { Microservice } from '../../../../model/workflow/microservice';
-import { WorkflowConfigService } from '../../../../services/workflow-config.service';
import { Swagger } from "../../../../model/swagger";
import { RestConfig } from '../../../../model/rest-config';
+import { RestService } from '../../../../services/rest.service';
/**
* toolbar component contains some basic operations(save) and all of the supported workflow nodes.
@@ -32,7 +31,7 @@ export class MicroserviceDetailComponent implements OnChanges {
public detail: string;
public dynamic = false;
- constructor(private configService: WorkflowConfigService) {
+ constructor(private configService: RestService) {
}
public ngOnChanges() {
@@ -85,10 +84,9 @@ export class MicroserviceDetailComponent implements OnChanges {
}
private loadDynamicInfo() {
- this.configService.loadDynamicInfo(this.microservice.url)
+ this.configService.getDynamicSwaggerInfo(this.microservice.url)
.subscribe(response => {
try {
-
this.microservice.swagger = response;
this.parseSwagger2String();
} catch (e) {
diff --git a/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.ts
index b44d423f..6b17f8b7 100644
--- a/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.ts
@@ -13,7 +13,6 @@
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { ModalDirective } from 'ngx-bootstrap/modal';
-import { Microservice } from '../../../../model/workflow/microservice';
import { RestConfig } from '../../../../model/rest-config';
/**
@@ -39,7 +38,7 @@ export class MicroserviceListComponent {
this.onMicroserviceSelected(microservice);
}
- public deleteMicroservice(index: number, microservice: Microservice) {
+ public deleteMicroservice(index: number, microservice: RestConfig) {
this.deleteMicroService(microservice.name, microservice.version);
// set the next microservice selected
diff --git a/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.ts
index eeedac47..5c659313 100644
--- a/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.ts
@@ -14,8 +14,6 @@ import { AfterViewInit, Component, ViewChild } from '@angular/core';
import { ModalDirective } from 'ngx-bootstrap/modal';
import { MicroserviceListComponent } from './microservice-list/microservice-list.component';
-import { Microservice } from "../../../model/workflow/microservice";
-import { WorkflowConfigService } from "../../../services/workflow-config.service";
import { RestService } from '../../../services/rest.service';
import { RestConfig } from '../../../model/rest-config';
@@ -31,7 +29,7 @@ export class MicroserviceComponent {
@ViewChild('microserviceModal') public microserviceModal: ModalDirective;
public microservices: RestConfig[];
- public currentMicroservice: Microservice;
+ public currentMicroservice: RestConfig;
constructor(private restService: RestService) {
}
diff --git a/sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.ts
index bf884983..c771b535 100644
--- a/sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.ts
@@ -14,7 +14,7 @@ import { AfterViewInit, Component, ViewChild } from '@angular/core';
import { ModalDirective } from 'ngx-bootstrap/modal';
import { WorkflowService } from "../../../services/workflow.service";
-import { PlanModel } from "../../../model/workflow/plan-model";
+import { PlanModel } from "../../../model/plan-model";
/**
* workflows component
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);
}
}