aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/container/container.component.html2
-rw-r--r--sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.css52
-rw-r--r--sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.html2
-rw-r--r--sdc-workflow-designer-ui/src/app/components/menus/rest-config/rest-config-list/rest-config-list.component.ts4
-rw-r--r--sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.html42
-rw-r--r--sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.ts188
-rw-r--r--sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.html46
-rw-r--r--sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.ts336
-rw-r--r--sdc-workflow-designer-ui/src/app/components/node/node.component.css456
-rw-r--r--sdc-workflow-designer-ui/src/app/components/node/node.component.html298
-rw-r--r--sdc-workflow-designer-ui/src/app/components/node/node.component.ts226
-rw-r--r--sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.css76
-rw-r--r--sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.html98
-rw-r--r--sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.ts308
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html2
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.html60
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.ts48
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html50
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts72
-rw-r--r--sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html2
-rw-r--r--sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.css124
-rw-r--r--sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html388
-rw-r--r--sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts98
23 files changed, 1490 insertions, 1488 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/container/container.component.html b/sdc-workflow-designer-ui/src/app/components/container/container.component.html
index 0d9c5222..c40fbcda 100644
--- a/sdc-workflow-designer-ui/src/app/components/container/container.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/container/container.component.html
@@ -19,4 +19,4 @@
<b4t-properties></b4t-properties>
-<b4t-sequence-flow></b4t-sequence-flow>
+<b4t-sequence-flow></b4t-sequence-flow> \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.css b/sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.css
index 431bf7c0..257a07df 100644
--- a/sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.css
+++ b/sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.css
@@ -1,26 +1,26 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-
-.edit{
- font-size: 24px;
- width: 300px;
- height: 30px;
- border: 1px solid #fff;
-}
-
-.edit:hover{
- border-color: #80bdff;
-}
-
-.edit:focus{
- border-color: #80bdff;
-}
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+
+.edit{
+ font-size: 24px;
+ width: 300px;
+ height: 30px;
+ border: 1px solid #fff;
+}
+
+.edit:hover{
+ border-color: #80bdff;
+}
+
+.edit:focus{
+ border-color: #80bdff;
+} \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.html b/sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.html
index 6a63f69a..3c804efb 100644
--- a/sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/editable-property/editable-property.component.html
@@ -2,4 +2,4 @@
(mouseover)="showEditComponent(true)" (mouseout)="showEditComponent(false)">
<button *ngIf="showEdit" type="button" class="btn blue1 pull-left" (click)="stopEdit();">
<i class="fa fa-check"></i>
-</button>
+</button> \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/menus/rest-config/rest-config-list/rest-config-list.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/rest-config/rest-config-list/rest-config-list.component.ts
index 59c9c9af..43120e85 100644
--- a/sdc-workflow-designer-ui/src/app/components/menus/rest-config/rest-config-list/rest-config-list.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/menus/rest-config/rest-config-list/rest-config-list.component.ts
@@ -36,7 +36,9 @@ export class RestConfigListComponent {
}
public addRestConfig() {
- const restConfig = this.restService.addRestConfig();
+
+ const restConfig = this.restService.newRestConfig();
+ this.restService.addRestConfig(restConfig);
this.onConfigSelected(restConfig);
}
diff --git a/sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.html b/sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.html
index 1b3e15c9..04e81966 100644
--- a/sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.html
@@ -1,21 +1,21 @@
-<!--
-/*******************************************************************************
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- *******************************************************************************/
--->
-<b4t-parameter *ngFor="let param of pathParams" [param]="param" [valueSource]= "inputSources" [planItems]="planItems"></b4t-parameter>
-<hr *ngIf="pathParams.length > 0">
-<b4t-parameter *ngFor="let param of queryParams" [param]="param" [valueSource]= "inputSources" [planItems]="planItems"></b4t-parameter>
-
-<b4t-parameter-tree [restConfigId]="restConfigId" [parameters]="inputParams" [valueSource]="inputSources"
- [planItems]="planItems"></b4t-parameter-tree>
-<b4t-parameter-tree [restConfigId]="restConfigId" [parameters]="outputParams" [valueSource]="outputSources"
- [planItems]="planItems"></b4t-parameter-tree>
+<!--
+/*******************************************************************************
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+-->
+<b4t-parameter *ngFor="let param of pathParams" [param]="param" [valueSource]= "inputSources" [planItems]="planItems"></b4t-parameter>
+<hr *ngIf="pathParams.length > 0">
+<b4t-parameter *ngFor="let param of queryParams" [param]="param" [valueSource]= "inputSources" [planItems]="planItems"></b4t-parameter>
+
+<b4t-parameter-tree [restConfigId]="restConfigId" [parameters]="inputParams" [valueSource]="inputSources"
+ [planItems]="planItems"></b4t-parameter-tree>
+<b4t-parameter-tree [restConfigId]="restConfigId" [parameters]="outputParams" [valueSource]="outputSources"
+ [planItems]="planItems"></b4t-parameter-tree>
diff --git a/sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.ts b/sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.ts
index 79643d36..5e7b24c7 100644
--- a/sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/node-parameters/node-parameters.component.ts
@@ -1,94 +1,94 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-
-import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
-import { TreeNode } from 'primeng/primeng';
-
-import { PlanTreeviewItem } from '../../model/plan-treeview-item';
-import { Swagger, SwaggerResponse } from '../../model/swagger';
-import { ValueSource } from '../../model/value-source.enum';
-import { RestParameter } from '../../model/workflow/rest-parameter';
-import { BroadcastService } from '../../services/broadcast.service';
-import { SwaggerTreeConverterService } from '../../services/swagger-tree-converter.service';
-import { RestService } from "../../services/rest.service";
-
-/**
- * property component presents information of a workflow node.
- * the presented information can be edit in this component.
- * it may load information dynamically. the content may be different for different node type.
- */
-@Component({
- selector: 'b4t-node-parameters',
- styleUrls: ['./node-parameters.component.css'],
- templateUrl: 'node-parameters.component.html',
-})
-export class NodeParametersComponent implements OnChanges {
- @Input() public swaggerInput: RestParameter[];
- @Input() public swaggerOutput: SwaggerResponse[];
- @Input() public restConfigId: string;
- @Input() public planItems: PlanTreeviewItem[];
-
- public inputSources: ValueSource[] = [ValueSource.String, ValueSource.Variable, ValueSource.Topology, ValueSource.Plan];
- public outputSources: ValueSource[] = [ValueSource.Topology, ValueSource.Plan];
- public valueSource = ValueSource;
- public pathParams: any[] = [];
- public queryParams: any[] = [];
- public inputParams: TreeNode[] = [];
- public outputParams: TreeNode[] = [];
-
- private index = 1;
-
- constructor(private broadcastService: BroadcastService,
- private restService: RestService,
- private swaggerTreeConverterService: SwaggerTreeConverterService) {
- }
-
- public ngOnChanges(changes: SimpleChanges): void {
- if (changes.swaggerInput && changes.swaggerInput.currentValue) {
- this.resetRequestParams(changes.swaggerInput.currentValue);
- }
- if (changes.swaggerOutput && changes.swaggerOutput.currentValue) {
- this.resetResponseParams(changes.swaggerOutput.currentValue);
- }
- }
-
- public resetRequestParams(parameters: RestParameter[]) {
- this.pathParams = [];
- this.queryParams = [];
- this.inputParams = [];
-
- parameters.forEach(param => {
- if (param.position === 'path') {
- this.pathParams.push(param);
- } else if (param.position === 'query') {
- this.queryParams.push(param);
- } else if (param.position === 'body') {
- const requestTreeNode = this.swaggerTreeConverterService
- .schema2TreeNode(this.restService.getSwaggerInfo(this.restConfigId), 'Request Param', param.schema, param.value);
- param.value = requestTreeNode.value;
- this.inputParams.push(requestTreeNode);
- } else {
- // TODO others param types not supported
- console.log('Unsupport parameter position(in):' + param.position);
- }
- });
- }
-
- public resetResponseParams(responses: SwaggerResponse[]) {
- this.outputParams = [];
- if (0 < responses.length && responses[0].schema) {
- const treeNode = this.swaggerTreeConverterService
- .schema2TreeNode(this.restService.getSwaggerInfo(this.restConfigId), 'Response Params', responses[0].schema, {});
- this.outputParams.push(treeNode);
- }
- }
-}
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+
+import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
+import { TreeNode } from 'primeng/primeng';
+
+import { PlanTreeviewItem } from '../../model/plan-treeview-item';
+import { Swagger, SwaggerResponse } from '../../model/swagger';
+import { ValueSource } from '../../model/value-source.enum';
+import { RestParameter } from '../../model/workflow/rest-parameter';
+import { BroadcastService } from '../../services/broadcast.service';
+import { SwaggerTreeConverterService } from '../../services/swagger-tree-converter.service';
+import { RestService } from "../../services/rest.service";
+
+/**
+ * property component presents information of a workflow node.
+ * the presented information can be edit in this component.
+ * it may load information dynamically. the content may be different for different node type.
+ */
+@Component({
+ selector: 'b4t-node-parameters',
+ styleUrls: ['./node-parameters.component.css'],
+ templateUrl: 'node-parameters.component.html',
+})
+export class NodeParametersComponent implements OnChanges {
+ @Input() public swaggerInput: RestParameter[];
+ @Input() public swaggerOutput: SwaggerResponse[];
+ @Input() public restConfigId: string;
+ @Input() public planItems: PlanTreeviewItem[];
+
+ public inputSources: ValueSource[] = [ValueSource.String, ValueSource.Variable, ValueSource.Topology, ValueSource.Plan];
+ public outputSources: ValueSource[] = [ValueSource.Topology, ValueSource.Plan];
+ public valueSource = ValueSource;
+ public pathParams: any[] = [];
+ public queryParams: any[] = [];
+ public inputParams: TreeNode[] = [];
+ public outputParams: TreeNode[] = [];
+
+ private index = 1;
+
+ constructor(private broadcastService: BroadcastService,
+ private restService: RestService,
+ private swaggerTreeConverterService: SwaggerTreeConverterService) {
+ }
+
+ public ngOnChanges(changes: SimpleChanges): void {
+ if (changes.swaggerInput && changes.swaggerInput.currentValue) {
+ this.resetRequestParams(changes.swaggerInput.currentValue);
+ }
+ if (changes.swaggerOutput && changes.swaggerOutput.currentValue) {
+ this.resetResponseParams(changes.swaggerOutput.currentValue);
+ }
+ }
+
+ public resetRequestParams(parameters: RestParameter[]) {
+ this.pathParams = [];
+ this.queryParams = [];
+ this.inputParams = [];
+
+ parameters.forEach(param => {
+ if (param.position === 'path') {
+ this.pathParams.push(param);
+ } else if (param.position === 'query') {
+ this.queryParams.push(param);
+ } else if (param.position === 'body') {
+ const requestTreeNode = this.swaggerTreeConverterService
+ .schema2TreeNode(this.restService.getSwaggerInfo(this.restConfigId), 'Request Param', param.schema, param.value);
+ param.value = requestTreeNode.value;
+ this.inputParams.push(requestTreeNode);
+ } else {
+ // TODO others param types not supported
+ console.log('Unsupport parameter position(in):' + param.position);
+ }
+ });
+ }
+
+ public resetResponseParams(responses: SwaggerResponse[]) {
+ this.outputParams = [];
+ if (0 < responses.length && responses[0].schema) {
+ const treeNode = this.swaggerTreeConverterService
+ .schema2TreeNode(this.restService.getSwaggerInfo(this.restConfigId), 'Response Params', responses[0].schema, {});
+ this.outputParams.push(treeNode);
+ }
+ }
+}
diff --git a/sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.html b/sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.html
index cc17916c..5c03dc05 100644
--- a/sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.html
@@ -1,23 +1,23 @@
-<p-tree *ngIf="parameters.length > 0" [value]="parameters">
- <ng-template let-node pTemplate="default">
- <b4t-parameter [param]="getParameter(node)" [canEditName]="node.keyEditable" [valueSource]="valueSource" [planItems]="planItems"
- [canDelete]="canDelete(node)" (paramChange)="paramChange($event, node)" (delete)="deleteTreeNode(node)"></b4t-parameter>
- </ng-template>
-
- <ng-template let-node pTemplate="array">
- <b4t-parameter [param]="getParameter(node)" [canEditName]="node.keyEditable" [valueSource]="getObjectValueSource()" [planItems]="planItems"
- [canInsert]="canInsert(node)" [canDelete]="canDelete(node)" (paramChange)="paramChange($event, node)"
- (insert)="addChildNode4ObjectArray(node)" (delete)="deleteTreeNode(node)"></b4t-parameter>
- </ng-template>
-
- <ng-template let-node pTemplate="object">
- <b4t-parameter [param]="getParameter(node)" [canEditName]="node.keyEditable" [valueSource]="getObjectValueSource()" [planItems]="planItems"
- [canDelete]="canDelete(node)" (paramChange)="paramChange($event, node)" (delete)="deleteTreeNode(node)"></b4t-parameter>
- </ng-template>
-
- <ng-template let-node pTemplate="map">
- <b4t-parameter [param]="getParameter(node)" [canEditName]="node.keyEditable" [valueSource]="getObjectValueSource()" [planItems]="planItems"
- [canInsert]="canInsert(node)" [canDelete]="canDelete(node)" (paramChange)="paramChange($event, node)"
- (insert)="addChildNode4DynamicObject(node)" (delete)="deleteTreeNode(node)"></b4t-parameter>
- </ng-template>
-</p-tree>
+<p-tree *ngIf="parameters.length > 0" [value]="parameters">
+ <ng-template let-node pTemplate="default">
+ <b4t-parameter [param]="getParameter(node)" [canEditName]="node.keyEditable" [valueSource]="valueSource" [planItems]="planItems"
+ [canDelete]="canDelete(node)" (paramChange)="paramChange($event, node)" (delete)="deleteTreeNode(node)"></b4t-parameter>
+ </ng-template>
+
+ <ng-template let-node pTemplate="array">
+ <b4t-parameter [param]="getParameter(node)" [canEditName]="node.keyEditable" [valueSource]="getObjectValueSource()" [planItems]="planItems"
+ [canInsert]="canInsert(node)" [canDelete]="canDelete(node)" (paramChange)="paramChange($event, node)"
+ (insert)="addChildNode4ObjectArray(node)" (delete)="deleteTreeNode(node)"></b4t-parameter>
+ </ng-template>
+
+ <ng-template let-node pTemplate="object">
+ <b4t-parameter [param]="getParameter(node)" [canEditName]="node.keyEditable" [valueSource]="getObjectValueSource()" [planItems]="planItems"
+ [canDelete]="canDelete(node)" (paramChange)="paramChange($event, node)" (delete)="deleteTreeNode(node)"></b4t-parameter>
+ </ng-template>
+
+ <ng-template let-node pTemplate="map">
+ <b4t-parameter [param]="getParameter(node)" [canEditName]="node.keyEditable" [valueSource]="getObjectValueSource()" [planItems]="planItems"
+ [canInsert]="canInsert(node)" [canDelete]="canDelete(node)" (paramChange)="paramChange($event, node)"
+ (insert)="addChildNode4DynamicObject(node)" (delete)="deleteTreeNode(node)"></b4t-parameter>
+ </ng-template>
+</p-tree> \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.ts b/sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.ts
index 1c74b707..b1f67d94 100644
--- a/sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/node-parameters/parameter-tree/parameter-tree.component.ts
@@ -1,168 +1,168 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-
-import { ChangeDetectionStrategy, Component, Input, OnChanges, Output, SimpleChange, SimpleChanges } from '@angular/core';
-import { TreeNode } from 'primeng/primeng';
-
-import { PlanTreeviewItem } from '../../../model/plan-treeview-item';
-import { ValueSource } from '../../../model/value-source.enum';
-import { ValueType } from '../../../model/value-type.enum';
-import { Parameter } from '../../../model/workflow/parameter';
-import { SwaggerTreeConverterService } from '../../../services/swagger-tree-converter.service';
-import { WorkflowUtil } from '../../../util/workflow-util';
-import { Swagger } from "../../../model/swagger";
-import { RestService } from "../../../services/rest.service";
-
-/**
- * parameter tree presents parameter of task node's input or output parameters.
- */
-@Component({
- selector: 'b4t-parameter-tree',
- styleUrls: ['./parameter-tree.component.css'],
- templateUrl: 'parameter-tree.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush
-})
-export class ParameterTreeComponent implements OnChanges {
- @Input() public parameters: TreeNode[];
- @Input() public restConfigId: string;
- @Input() public valueSource: ValueSource[];
- @Input() public planItems: PlanTreeviewItem[];
-
- constructor(private restService: RestService, private swaggerTreeConverterService: SwaggerTreeConverterService) { }
-
- public ngOnChanges(changes: SimpleChanges) {
- }
-
- public getParameter(node: any): Parameter {
- // console.log('Parameter init:' + node.label +'.'+ node.type+'.'+JSON.stringify(node.value.value)+'.'+node.value.valueSource);
-
- return new Parameter(node.label, node.value.value, node.value.valueSource, node.definition.type, node.definition.reqquired);
- }
-
-
- public paramChange(param: Parameter, node: any) {
- // console.log('Parameter change:' + param.name + ', Node label is:' + node.label);
-
- node.value.valueSource = param.valueSource;
- node.value.value = param.value;
-
- this.objectParameterChange(node);
-
- if (node.label !== param.name) {
- delete node.parent.value.value[node.label];
- node.label = param.name;
- }
- if (node.parent) {
- node.parent.value.value[node.label] = node.value;
- }else{
- // this parameter is 'request param' or 'response param'
- }
-
- }
-
- private objectParameterChange(node: any) {
- if (node.value.valueSource === ValueSource[ValueSource.Definition]) { // value will be set by node defintion
- const treeNode = this.swaggerTreeConverterService.schema2TreeNode(this.getSwagger(), node.label, node.definition, node.value);
- node.value = treeNode.value;
- node.children = treeNode.children;
- } else { // parameter value will be set by param
- node.children = [];
- }
- }
-
- private getSwagger(): Swagger {
- return this.restService.getSwaggerInfo(this.restConfigId);
- }
-
- public addChildNode4DynamicObject(node: any) {
- const copyItem = WorkflowUtil.deepClone(node.definition.additionalProperties);
- const key = Object.keys(node.value.value).length;
-
- const childrenNode = this.swaggerTreeConverterService
- .schema2TreeNode(this.getSwagger(), key, copyItem);
-
- childrenNode.keyEditable = true;
- node.value.value[key] = childrenNode.value;
-
- node.children.push(childrenNode);
- }
-
- public addChildNode4ObjectArray(node: any) {
- const copyItem = WorkflowUtil.deepClone(node.definition.items);
-
- const childrenNode = this.swaggerTreeConverterService
- .schema2TreeNode(
- this.getSwagger(),
- node.children.length,
- copyItem);
-
- node.value.value.push(childrenNode.value);
- node.children.push(childrenNode);
- }
-
- public deleteTreeNode(node: any) {
- if ('array' === node.parent.type) {
- // delete data
- node.parent.value.value.splice(node.label, 1);
- node.parent.children.splice(node.label, 1);
-
- // update node index
- node.parent.children.forEach((childNode, index) => childNode.label = index);
- } else if ('map' === node.parent.type) {
- delete node.parent.value.value[node.label];
- for (let index = 0; index < node.parent.children.length; index++) {
- const element = node.parent.children[index];
- if (element.label === node.label) {
- node.parent.children.splice(index, 1);
- break;
- }
- }
- }
- }
-
- public canInsert(node: any) {
- if (node.value.valueSource !== ValueSource[ValueSource.Definition]) {
- return false;
- } else {
- return this.isArrayObject(node) || this.isDynamicObject(node);
- }
- }
-
- public canDelete(node: any) {
- const parent = node.parent;
- if (parent &&
- (this.isArrayObject(parent) || this.isDynamicObject(parent))) {
- return true;
- } else {
- return false;
- }
- }
-
- public getObjectValueSource(): ValueSource[] {
- const result = [];
- this.valueSource.forEach(source => {
- if (ValueSource.String != source) {
- result.push(source);
- }
- });
- result.push(ValueSource.Definition);
- return result;
- }
-
- private isArrayObject(node: any): boolean {
- return node.type === 'array';
- }
-
- private isDynamicObject(node: any): boolean {
- return node.type === 'map';
- }
-}
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+
+import { ChangeDetectionStrategy, Component, Input, OnChanges, Output, SimpleChange, SimpleChanges } from '@angular/core';
+import { TreeNode } from 'primeng/primeng';
+
+import { PlanTreeviewItem } from '../../../model/plan-treeview-item';
+import { ValueSource } from '../../../model/value-source.enum';
+import { ValueType } from '../../../model/value-type.enum';
+import { Parameter } from '../../../model/workflow/parameter';
+import { SwaggerTreeConverterService } from '../../../services/swagger-tree-converter.service';
+import { WorkflowUtil } from '../../../util/workflow-util';
+import { Swagger } from "../../../model/swagger";
+import { RestService } from "../../../services/rest.service";
+
+/**
+ * parameter tree presents parameter of task node's input or output parameters.
+ */
+@Component({
+ selector: 'b4t-parameter-tree',
+ styleUrls: ['./parameter-tree.component.css'],
+ templateUrl: 'parameter-tree.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush
+})
+export class ParameterTreeComponent implements OnChanges {
+ @Input() public parameters: TreeNode[];
+ @Input() public restConfigId: string;
+ @Input() public valueSource: ValueSource[];
+ @Input() public planItems: PlanTreeviewItem[];
+
+ constructor(private restService: RestService, private swaggerTreeConverterService: SwaggerTreeConverterService) { }
+
+ public ngOnChanges(changes: SimpleChanges) {
+ }
+
+ public getParameter(node: any): Parameter {
+ // console.log('Parameter init:' + node.label +'.'+ node.type+'.'+JSON.stringify(node.value.value)+'.'+node.value.valueSource);
+
+ return new Parameter(node.label, node.value.value, node.value.valueSource, node.definition.type, node.definition.reqquired);
+ }
+
+
+ public paramChange(param: Parameter, node: any) {
+ // console.log('Parameter change:' + param.name + ', Node label is:' + node.label);
+
+ node.value.valueSource = param.valueSource;
+ node.value.value = param.value;
+
+ this.objectParameterChange(node);
+
+ if (node.label !== param.name) {
+ delete node.parent.value.value[node.label];
+ node.label = param.name;
+ }
+ if (node.parent) {
+ node.parent.value.value[node.label] = node.value;
+ }else{
+ // this parameter is 'request param' or 'response param'
+ }
+
+ }
+
+ private objectParameterChange(node: any) {
+ if (node.value.valueSource === ValueSource[ValueSource.Definition]) { // value will be set by node defintion
+ const treeNode = this.swaggerTreeConverterService.schema2TreeNode(this.getSwagger(), node.label, node.definition, node.value);
+ node.value = treeNode.value;
+ node.children = treeNode.children;
+ } else { // parameter value will be set by param
+ node.children = [];
+ }
+ }
+
+ private getSwagger(): Swagger {
+ return this.restService.getSwaggerInfo(this.restConfigId);
+ }
+
+ public addChildNode4DynamicObject(node: any) {
+ const copyItem = WorkflowUtil.deepClone(node.definition.additionalProperties);
+ const key = Object.keys(node.value.value).length;
+
+ const childrenNode = this.swaggerTreeConverterService
+ .schema2TreeNode(this.getSwagger(), key, copyItem);
+
+ childrenNode.keyEditable = true;
+ node.value.value[key] = childrenNode.value;
+
+ node.children.push(childrenNode);
+ }
+
+ public addChildNode4ObjectArray(node: any) {
+ const copyItem = WorkflowUtil.deepClone(node.definition.items);
+
+ const childrenNode = this.swaggerTreeConverterService
+ .schema2TreeNode(
+ this.getSwagger(),
+ node.children.length,
+ copyItem);
+
+ node.value.value.push(childrenNode.value);
+ node.children.push(childrenNode);
+ }
+
+ public deleteTreeNode(node: any) {
+ if ('array' === node.parent.type) {
+ // delete data
+ node.parent.value.value.splice(node.label, 1);
+ node.parent.children.splice(node.label, 1);
+
+ // update node index
+ node.parent.children.forEach((childNode, index) => childNode.label = index);
+ } else if ('map' === node.parent.type) {
+ delete node.parent.value.value[node.label];
+ for (let index = 0; index < node.parent.children.length; index++) {
+ const element = node.parent.children[index];
+ if (element.label === node.label) {
+ node.parent.children.splice(index, 1);
+ break;
+ }
+ }
+ }
+ }
+
+ public canInsert(node: any) {
+ if (node.value.valueSource !== ValueSource[ValueSource.Definition]) {
+ return false;
+ } else {
+ return this.isArrayObject(node) || this.isDynamicObject(node);
+ }
+ }
+
+ public canDelete(node: any) {
+ const parent = node.parent;
+ if (parent &&
+ (this.isArrayObject(parent) || this.isDynamicObject(parent))) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public getObjectValueSource(): ValueSource[] {
+ const result = [];
+ this.valueSource.forEach(source => {
+ if (ValueSource.String != source) {
+ result.push(source);
+ }
+ });
+ result.push(ValueSource.Definition);
+ return result;
+ }
+
+ private isArrayObject(node: any): boolean {
+ return node.type === 'array';
+ }
+
+ private isDynamicObject(node: any): boolean {
+ return node.type === 'map';
+ }
+}
diff --git a/sdc-workflow-designer-ui/src/app/components/node/node.component.css b/sdc-workflow-designer-ui/src/app/components/node/node.component.css
index d0c35868..85cb0422 100644
--- a/sdc-workflow-designer-ui/src/app/components/node/node.component.css
+++ b/sdc-workflow-designer-ui/src/app/components/node/node.component.css
@@ -1,228 +1,228 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-
-.node {
- cursor: pointer;
- display: inline-block;
- position: absolute;
- z-index: 2;
-}
-
-.node-icon{
- border-radius: 4px;
-}
-
-.node-icon svg{
- display: block;
- fill: #00ABFF;
-}
-
-.active {
- outline: 1px solid #00ABFF;
-}
-
-/**
- * Anchors
- */
-.anchors {
- position: absolute;
- border-radius: 1em;
- display: none;
- background-color: #2e6f9a;
- width: 12px;
- height: 12px;
- cursor: pointer;
- -ms-transition: all 0.15s ease-in-out;
- transition: all 0.15s ease-in-out;
- -moz-transition: all 0.15s ease-in-out;
- -webkit-transition: all 0.15s ease-in-out;
- -o-transition: all 0.15s ease-in-out;
-}
-
-.node-icon:hover > .anchors {
- display: inline-block;
-}
-
-.anchor-left {
- left: -6px;
- top: calc(50%);
-}
-
-.anchor-right {
- right: -6px;
- top: calc(50%);
-}
-
-.anchor-top {
- top: -6px;
- left: calc(50% - 6px);
-}
-
-.anchor-bottom {
- bottom: -6px;
- left: calc(50% - 6px);
-}
-
-/*right arrow*/
-.right {
- width: 10px;
- height: 10px;
- position: absolute;
- left: 4px;
- top: 1px;
-
-}
-
-.right-arrow1, .right-arrow2 {
- width: 0;
- height: 0;
- display: block;
- position: absolute;
- left: 0;
- top: 0;
- border-top: 5px transparent dashed;
- border-right: 5px transparent dashed;
- border-bottom: 5px transparent dashed;
- border-left: 5px #2e6f9a solid;
- overflow: hidden;
-}
-
-.right-arrow1 {
-
- border-left: 5px white solid;
-}
-
-.right-arrow2 {
- left: -2px;
-}
-
-/*left arrow */
-.left {
- width: 10px;
- height: 10px;
- position: absolute;
- left: -2px;
- top: 1px;
- z-index: 2;
-}
-
-.left-arrow1, .left-arrow2 {
- width: 0;
- height: 0;
- display: block;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 5; /*ie8-*/
- border-top: 5px transparent dashed;
- border-left: 5px transparent dashed;
- border-bottom: 5px transparent dashed;
- border-right: 5px #2e6f9a solid;
- overflow: hidden;
-}
-
-.left-arrow1 {
- border-right: 5px #fff solid;
-}
-
-.left-arrow2 {
- left: 2px;
-}
-
-/*top arrow*/
-.top {
- width: 10px;
- height: 10px;
- position: absolute;
- left: 1px;
- z-index: 2;
-}
-
-.top-arrow1, .top-arrow2 {
- width: 0;
- height: 0;
- display: block;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 5;
- border-bottom: 5px #2e6f9a solid;
- border-left: 5px transparent dashed;
- border-right: 5px transparent dashed;
- border-top: 5px transparent dashed;
- overflow: hidden;
-}
-
-.top-arrow1 {
- z-index: 6;
-}
-
-.top-arrow2 {
- top: -2px;
- border-bottom: 5px white solid;
-}
-
-/*bottom arrow*/
-.bottom {
- width: 10px;
- height: 10px;
- position: absolute;
- left: 1px;
- top: 4px;
- z-index: 2;
-}
-
-.bottom-arrow1, .bottom-arrow2 {
- width: 0;
- height: 0;
- display: block;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 5;
- border-bottom: 5px transparent dashed;
- border-left: 5px transparent dashed;
- border-right: 5px transparent dashed;
- border-top: 5px #2e6f9a solid;
- overflow: hidden;
-}
-
-.bottom-arrow1 {
- top: -2px;
- z-index: 6;
-}
-
-.bottom-arrow2 {
- border-top: 5px white solid;
-}
-/**
- * Anchors End
- */
-
-.node .name {
- width: 55px;
- height: 12px;
- text-align: center;
- white-space: nowrap;
- color: #5c6d90;
- line-height: 12px;
- cursor: pointer;
- font-family: Arial;
- font-size: 12px;
-}
-
-.resizeable {
- background-color: darkolivegreen;
- border:1px solid blue;
- margin: 10px;
-}
-
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+
+.node {
+ cursor: pointer;
+ display: inline-block;
+ position: absolute;
+ z-index: 2;
+}
+
+.node-icon{
+ border-radius: 4px;
+}
+
+.node-icon svg{
+ display: block;
+ fill: #00ABFF;
+}
+
+.active {
+ outline: 1px solid #00ABFF;
+}
+
+/**
+ * Anchors
+ */
+.anchors {
+ position: absolute;
+ border-radius: 1em;
+ display: none;
+ background-color: #2e6f9a;
+ width: 12px;
+ height: 12px;
+ cursor: pointer;
+ -ms-transition: all 0.15s ease-in-out;
+ transition: all 0.15s ease-in-out;
+ -moz-transition: all 0.15s ease-in-out;
+ -webkit-transition: all 0.15s ease-in-out;
+ -o-transition: all 0.15s ease-in-out;
+}
+
+.node-icon:hover > .anchors {
+ display: inline-block;
+}
+
+.anchor-left {
+ left: -6px;
+ top: calc(50%);
+}
+
+.anchor-right {
+ right: -6px;
+ top: calc(50%);
+}
+
+.anchor-top {
+ top: -6px;
+ left: calc(50% - 6px);
+}
+
+.anchor-bottom {
+ bottom: -6px;
+ left: calc(50% - 6px);
+}
+
+/*right arrow*/
+.right {
+ width: 10px;
+ height: 10px;
+ position: absolute;
+ left: 4px;
+ top: 1px;
+
+}
+
+.right-arrow1, .right-arrow2 {
+ width: 0;
+ height: 0;
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ border-top: 5px transparent dashed;
+ border-right: 5px transparent dashed;
+ border-bottom: 5px transparent dashed;
+ border-left: 5px #2e6f9a solid;
+ overflow: hidden;
+}
+
+.right-arrow1 {
+
+ border-left: 5px white solid;
+}
+
+.right-arrow2 {
+ left: -2px;
+}
+
+/*left arrow */
+.left {
+ width: 10px;
+ height: 10px;
+ position: absolute;
+ left: -2px;
+ top: 1px;
+ z-index: 2;
+}
+
+.left-arrow1, .left-arrow2 {
+ width: 0;
+ height: 0;
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 5; /*ie8-*/
+ border-top: 5px transparent dashed;
+ border-left: 5px transparent dashed;
+ border-bottom: 5px transparent dashed;
+ border-right: 5px #2e6f9a solid;
+ overflow: hidden;
+}
+
+.left-arrow1 {
+ border-right: 5px #fff solid;
+}
+
+.left-arrow2 {
+ left: 2px;
+}
+
+/*top arrow*/
+.top {
+ width: 10px;
+ height: 10px;
+ position: absolute;
+ left: 1px;
+ z-index: 2;
+}
+
+.top-arrow1, .top-arrow2 {
+ width: 0;
+ height: 0;
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 5;
+ border-bottom: 5px #2e6f9a solid;
+ border-left: 5px transparent dashed;
+ border-right: 5px transparent dashed;
+ border-top: 5px transparent dashed;
+ overflow: hidden;
+}
+
+.top-arrow1 {
+ z-index: 6;
+}
+
+.top-arrow2 {
+ top: -2px;
+ border-bottom: 5px white solid;
+}
+
+/*bottom arrow*/
+.bottom {
+ width: 10px;
+ height: 10px;
+ position: absolute;
+ left: 1px;
+ top: 4px;
+ z-index: 2;
+}
+
+.bottom-arrow1, .bottom-arrow2 {
+ width: 0;
+ height: 0;
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 5;
+ border-bottom: 5px transparent dashed;
+ border-left: 5px transparent dashed;
+ border-right: 5px transparent dashed;
+ border-top: 5px #2e6f9a solid;
+ overflow: hidden;
+}
+
+.bottom-arrow1 {
+ top: -2px;
+ z-index: 6;
+}
+
+.bottom-arrow2 {
+ border-top: 5px white solid;
+}
+/**
+ * Anchors End
+ */
+
+.node .name {
+ width: 55px;
+ height: 12px;
+ text-align: center;
+ white-space: nowrap;
+ color: #5c6d90;
+ line-height: 12px;
+ cursor: pointer;
+ font-family: Arial;
+ font-size: 12px;
+}
+
+.resizeable {
+ background-color: darkolivegreen;
+ border:1px solid blue;
+ margin: 10px;
+}
+
diff --git a/sdc-workflow-designer-ui/src/app/components/node/node.component.html b/sdc-workflow-designer-ui/src/app/components/node/node.component.html
index 3f4c9389..1b9c4b1a 100644
--- a/sdc-workflow-designer-ui/src/app/components/node/node.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/node/node.component.html
@@ -1,149 +1,149 @@
-<!--
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
--->
-<div (click)="onClick($event)" (mousedown)="onMousedown()" (dblclick)="showProperties($event)" class="node" id="{{node.id}}"
- (mouseover)="onMouseOver($event, $event.target.parentNode)" (mouseout)="onMouseOut($event, $event.target.parentNode)" [style.top]="node.position.top + 'px'"
- [style.left]="node.position.left + 'px'" [style.width]="node.position.width + 'px'" #nodeItem>
-
- <div class="name">{{node.name}}</div>
-
- <div *ngIf="canHaveChildren()" b4tResizable class="node-icon" [style.width]="node.position.width + 'px'" [style.height]="node.position.height + 'px'"
- [class.active]="active">
- <b4t-node *ngFor="let child of node.children" [node]="child" [rank]="rank + 10"></b4t-node>
- <div class="anchor anchors anchor-left">
- <span class="left">
- <i class="left-arrow1"></i>
- <i class="left-arrow2"></i>
- </span>
- </div>
- <div class="anchor anchors anchor-right">
- <span class="right">
- <i class="right-arrow1"></i>
- <i class="right-arrow2"></i>
- </span>
- </div>
- </div>
-
- <div *ngIf="!canHaveChildren()" class="node-icon" [class.active]="active">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" [style.width]="node.position.width + 'px'" [style.height]="node.position.height + 'px'">
- <g [ngSwitch]="node.type">
- <g *ngSwitchCase="nodeType[nodeType.startEvent]">
- <path class="st0" d="M15,2c7.2,0,13,5.8,13,13s-5.8,13-13,13S2,22.2,2,15S7.8,2,15,2 M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15
- s15-6.7,15-15S23.3,0,15,0L15,0z" />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.endEvent]">
- <path class="st0" d="M15,4c6.1,0,11,4.9,11,11s-4.9,11-11,11S4,21.1,4,15S8.9,4,15,4 M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15
- s15-6.7,15-15S23.3,0,15,0L15,0z" />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.errorStartEvent]">
- <path class="st0" d="M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15s15-6.7,15-15S23.3,0,15,0z M15,28C7.8,28,2,22.2,2,15S7.8,2,15,2
- s13,5.8,13,13S22.2,28,15,28z" />
- <path class="st0" d="M19.7,12H17l2-5.5c0.1-0.3,0.1-0.5-0.1-0.7c-0.2-0.2-0.3-0.3-0.6-0.3H14c-0.3,0-0.6,0.2-0.8,0.5L9.7,16
- c-0.1,0.3-0.1,0.5,0.1,0.7c0.2,0.2,0.3,0.3,0.6,0.3l3.6,0.1l-1,6.7c-0.1,0.3,0.2,0.8,0.5,0.9c0.1,0,0.2,0,0.3,0
- c0.3,0,0.7-0.2,0.9-0.4l5.5-11.1c0.1-0.3,0.1-0.5,0-0.8C20.2,12.1,19.9,12,19.7,12z M14.6,22.3l1.2-5.9c0-0.3,0-0.4-0.2-0.6
- c-0.2-0.2-0.3-0.3-0.6-0.3h-3.5L14.5,7h2.6l-2,5.4C15,12.8,15,13,15.2,13.2c0.2,0.2,0.3,0.3,0.6,0.3h2.5L14.6,22.3z"
- />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.errorEndEvent]">
- <path class="st0" d="M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15s15-6.7,15-15S23.3,0,15,0z M15,26C8.9,26,4,21.1,4,15S8.9,4,15,4
- s11,4.9,11,11S21.1,26,15,26z" />
- <path class="st0" d="M19.7,12.4H17l2-5.5c0.1-0.3,0.1-0.5-0.1-0.7c-0.2-0.2-0.3-0.3-0.6-0.3h-4.2c-0.3,0-0.6,0.2-0.8,0.5l-3.5,10
- c-0.1,0.3-0.1,0.5,0.1,0.7c0.2,0.2,0.3,0.3,0.6,0.3l3.6,0.1l-1,6.7c-0.1,0.3,0.2,0.8,0.5,0.9c0.1,0,0.2,0,0.3,0
- c0.3,0,0.7-0.2,0.9-0.4l5.5-11.1c0.1-0.3,0.1-0.5,0-0.8C20.2,12.6,20,12.4,19.7,12.4z" />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.toscaNodeManagementTask]">
- <path class="st0" d="M24,29H6c-2.8,0-5-2.2-5-5V6c0-2.8,2.2-5,5-5h18c2.8,0,5,2.2,5,5v18C29,26.8,26.8,29,24,29z M6,3
- C4.3,3,3,4.3,3,6v18c0,1.7,1.3,3,3,3h18c1.7,0,3-1.3,3-3V6c0-1.7-1.3-3-3-3H6z" />
- <path class="st0" d="M7.6,14.5h7.5c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,14.5,7.6,14.5z" />
- <path class="st0" d="M7.6,18.7h3.7c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,18.7,7.6,18.7z" />
- <path class="st0" d="M7.6,10.4H19c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,10.4,7.6,10.4z" />
- <path class="st0" d="M24.7,15.1h-5c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1h1.5v5.7c0,0.6,0.4,1,1,1s1-0.4,1-1v-5.7h1.5c0.6,0,1-0.4,1-1
- C25.7,15.5,25.2,15.1,24.7,15.1z" />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.restTask]">
- <path class="st0" d="M24,29H6c-2.8,0-5-2.2-5-5V6c0-2.8,2.2-5,5-5h18c2.8,0,5,2.2,5,5v18C29,26.8,26.8,29,24,29z M6,3
- C4.3,3,3,4.3,3,6v18c0,1.7,1.3,3,3,3h18c1.7,0,3-1.3,3-3V6c0-1.7-1.3-3-3-3H6z" />
- <path class="st0" d="M7.6,14.5h7.5c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,14.5,7.6,14.5z" />
- <path class="st0" d="M7.6,18.7h3.7c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,18.7,7.6,18.7z" />
- <path class="st0" d="M7.6,10.4H19c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,10.4,7.6,10.4z" />
- <path class="st0" d="M24.1,22.6l-1.6-2.7c0.9-0.4,1.5-1.2,1.5-2.2c0-1.4-1.2-2.5-2.8-2.5h-1.9c-0.2,0-0.4,0.1-0.6,0.2
- c-0.2,0.1-0.3,0.3-0.3,0.6v7c0,0.4,0.3,0.8,0.8,0.8c0.4,0,0.8-0.3,0.8-0.8v-2.8h0.8l1.9,3.2c0.1,0.2,0.4,0.4,0.7,0.4
- c0.1,0,0.3,0,0.4-0.1C24.2,23.5,24.4,23,24.1,22.6z M20.1,16.8h1.2c0.6,0,1.2,0.4,1.2,0.9s-0.5,0.9-1.2,0.9h-1.2V16.8z"
- />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.exclusiveGateway]">
- <path class="st0" d="M16.4,15l3.2-3.2c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0L15,13.6l-3.2-3.2c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4
- l3.2,3.2l-3.2,3.2c-0.4,0.4-0.4,1,0,1.4s1,0.4,1.4,0l3.2-3.2l3.2,3.2c0.4,0.4,1,0.4,1.4,0s0.4-1,0-1.4L16.4,15z"
- />
- <path class="st0" d="M29.1,12.9l-12-12c-1.1-1.1-3.1-1.1-4.2,0l-12,12C0.3,13.4,0,14.2,0,15s0.3,1.6,0.9,2.1l12,12
- c0.6,0.6,1.3,0.9,2.1,0.9s1.6-0.3,2.1-0.9l12-12c0.6-0.6,0.9-1.3,0.9-2.1S29.7,13.4,29.1,12.9z M27.7,15.7l-12,12
- c-0.4,0.4-1,0.4-1.4,0l-12-12C2.1,15.5,2,15.3,2,15s0.1-0.5,0.3-0.7l12-12C14.5,2.1,14.7,2,15,2s0.5,0.1,0.7,0.3l12,12
- c0.2,0.2,0.3,0.4,0.3,0.7S27.9,15.5,27.7,15.7z" />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.parallelGateway]">
- <path class="st0" d="M20.5,14H16V9.5c0-0.6-0.4-1-1-1s-1,0.4-1,1V14H9.5c-0.6,0-1,0.4-1,1s0.4,1,1,1H14v4.5c0,0.6,0.4,1,1,1
- s1-0.4,1-1V16h4.5c0.6,0,1-0.4,1-1S21.1,14,20.5,14z" />
- <path class="st0" d="M29.1,12.9l-12-12c-1.1-1.1-3.1-1.1-4.2,0l-12,12C0.3,13.4,0,14.2,0,15s0.3,1.6,0.9,2.1l12,12
- c0.6,0.6,1.3,0.9,2.1,0.9s1.6-0.3,2.1-0.9l12-12c0.6-0.6,0.9-1.3,0.9-2.1S29.7,13.4,29.1,12.9z M27.7,15.7l-12,12
- c-0.4,0.4-1,0.4-1.4,0l-12-12C2.1,15.5,2,15.3,2,15s0.1-0.5,0.3-0.7l12-12C14.5,2.1,14.7,2,15,2s0.5,0.1,0.7,0.3l12,12
- c0.2,0.2,0.3,0.4,0.3,0.7S27.9,15.5,27.7,15.7z" />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.subProcess]">
- <path class="st0" d="M24.5,1h-18c-2.8,0-5,2.2-5,5v18c0,2.8,2.2,5,5,5h18c2.8,0,5-2.2,5-5V6C29.5,3.2,27.2,1,24.5,1z M20.2,27h-9.4
- v-9.1c0-0.3,0.2-0.5,0.5-0.5h8.4c0.3,0,0.5,0.2,0.5,0.5V27z M27.5,24c0,1.7-1.3,3-3,3h-2.3v-9.1c0-1.4-1.1-2.5-2.5-2.5h-8.4
- c-1.4,0-2.5,1.1-2.5,2.5V27H6.5c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h18c1.7,0,3,1.3,3,3V24z" />
- <path class="st0" d="M19,21.3h-2.5v-2.5c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v2.5H12c-0.6,0-1,0.4-1,1s0.4,1,1,1h2.5v2.5
- c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1v-2.5H19c0.6,0,1-0.4,1-1S19.5,21.3,19,21.3z" />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.intermediateCatchEvent]">
- <path class="st0" d="M15,0C6.7,0,0,6.7,0,15c0,8.3,6.7,15,15,15c8.3,0,15-6.7,15-15C30,6.7,23.3,0,15,0z M16,27.9V26
- c0-0.6-0.4-1-1-1s-1,0.4-1,1v1.9C7.6,27.5,2.5,22.4,2.1,16H4c0.6,0,1-0.4,1-1s-0.4-1-1-1H2.1C2.5,7.6,7.6,2.5,14,2.1V4
- c0,0.6,0.4,1,1,1s1-0.4,1-1V2.1C22.4,2.5,27.5,7.6,27.9,14H26c-0.6,0-1,0.4-1,1s0.4,1,1,1h1.9C27.5,22.4,22.4,27.5,16,27.9z"
- />
- <path class="st0" d="M20,14h-3.6l2.5-6.6c0.2-0.5-0.1-1.1-0.6-1.3c-0.5-0.2-1.1,0.1-1.3,0.6l-3,8c-0.1,0.3-0.1,0.7,0.1,0.9
- c0.2,0.3,0.5,0.4,0.8,0.4h5c0.6,0,1-0.4,1-1S20.6,14,20,14z" />
- </g>
- <g *ngSwitchCase="nodeType[nodeType.scriptTask]">
- <path class="st0" d="M24,1H6C3.2,1,1,3.2,1,6v18c0,2.8,2.2,5,5,5h18c2.8,0,5-2.2,5-5V6C29,3.2,26.8,1,24,1z M16.9,3.4
- c0.5,0,0.9,0.2,1.3,0.5c0.4,0.4,0.5,0.8,0.5,1.3c0,0.5-0.2,0.9-0.5,1.3L17.7,7l-5.3,5.3c-0.2-0.6-0.5-1.2-0.9-1.6
- c-0.4-0.4-1-0.8-1.6-0.9l5.8-5.8C16,3.6,16.4,3.4,16.9,3.4z M10.3,27H6c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h8.2l-7.4,7.4
- c-0.1,0.1-0.2,0.2-0.3,0.3c-0.7,0.7-1,1.6-1,2.5c0,0.9,0.4,1.8,1,2.5l5.2,5.2l-1.3,1.3c-0.7,0.7-1,1.6-1,2.5
- C9.3,25.5,9.7,26.4,10.3,27z M14.1,25.9c-0.4,0.4-0.8,0.5-1.3,0.5c-0.5,0-0.9-0.2-1.3-0.5c-0.4-0.4-0.5-0.8-0.5-1.3
- c0-0.5,0.2-0.9,0.5-1.3l1.3-1.3l0.5,0.5l0.8,0.8c0.4,0.4,0.5,0.8,0.5,1.3C14.6,25.1,14.5,25.5,14.1,25.9z M14.5,21.3l-6.8-6.8
- c-0.4-0.4-0.5-0.8-0.5-1.3c0-0.5,0.2-0.9,0.5-1.3c0.4-0.4,0.8-0.5,1.3-0.5c0.5,0,0.9,0.2,1.3,0.5c0.4,0.4,0.5,0.8,0.5,1.3
- c0,0.5-0.2,0.9-0.5,1.3l0.9,0.9c0.2,0.2,0.4,0.2,0.6,0l5.2-5.2l4.4,4.4l0.8,0.8c0.4,0.4,0.5,0.8,0.5,1.3c0,0.5-0.2,0.9-0.5,1.3v0
- l-5.8,5.8c-0.1-0.6-0.5-1.2-0.9-1.6L14.5,21.3z M27,24c0,1.7-1.3,3-3,3h-8.6l7.9-7.9c0.7-0.7,1-1.6,1-2.5c0-0.9-0.4-1.8-1-2.5
- l-0.8-0.8L18.1,9l1.3-1.3c0.7-0.7,1-1.6,1-2.5c0-0.8-0.3-1.6-0.8-2.2H24c1.7,0,3,1.3,3,3V24z" />
- <path class="st0" d="M17.2,12.4c-0.3-0.3-0.8-0.3-1.1,0L12.6,16c-0.3,0.3-0.3,0.8,0,1.1c0.1,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2
- l3.6-3.6C17.5,13.1,17.5,12.7,17.2,12.4z" />
- <path class="st0" d="M18.9,14.2c-0.3-0.3-0.8-0.3-1.1,0l-3.6,3.6c-0.3,0.3-0.3,0.8,0,1.1c0.1,0.1,0.3,0.2,0.5,0.2
- c0.2,0,0.4-0.1,0.5-0.2l3.6-3.6C19.2,14.9,19.2,14.4,18.9,14.2z" />
- <path class="st0" d="M17.1,20.6l3.6-3.6c0.3-0.3,0.3-0.8,0-1.1s-0.8-0.3-1.1,0L16,19.5c-0.3,0.3-0.3,0.8,0,1.1
- c0.1,0.1,0.3,0.2,0.5,0.2S17,20.7,17.1,20.6z" />
- </g>
- </g>
- </svg>
- <div class="anchor anchors anchor-left">
- <span class="left">
- <i class="left-arrow1"></i>
- <i class="left-arrow2"></i>
- </span>
- </div>
- <div class="anchor anchors anchor-right">
- <span class="right">
- <i class="right-arrow1"></i>
- <i class="right-arrow2"></i>
- </span>
- </div>
- </div>
-</div>
+<!--
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+-->
+<div (click)="onClick($event)" (mousedown)="onMousedown()" (dblclick)="showProperties($event)" class="node" id="{{node.id}}"
+ (mouseover)="onMouseOver($event, $event.target.parentNode)" (mouseout)="onMouseOut($event, $event.target.parentNode)" [style.top]="node.position.top + 'px'"
+ [style.left]="node.position.left + 'px'" [style.width]="node.position.width + 'px'" #nodeItem>
+
+ <div class="name">{{node.name}}</div>
+
+ <div *ngIf="canHaveChildren()" b4tResizable class="node-icon" [style.width]="node.position.width + 'px'" [style.height]="node.position.height + 'px'"
+ [class.active]="active">
+ <b4t-node *ngFor="let child of node.children" [node]="child" [rank]="rank + 10"></b4t-node>
+ <div class="anchor anchors anchor-left">
+ <span class="left">
+ <i class="left-arrow1"></i>
+ <i class="left-arrow2"></i>
+ </span>
+ </div>
+ <div class="anchor anchors anchor-right">
+ <span class="right">
+ <i class="right-arrow1"></i>
+ <i class="right-arrow2"></i>
+ </span>
+ </div>
+ </div>
+
+ <div *ngIf="!canHaveChildren()" class="node-icon" [class.active]="active">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" [style.width]="node.position.width + 'px'" [style.height]="node.position.height + 'px'">
+ <g [ngSwitch]="node.type">
+ <g *ngSwitchCase="nodeType[nodeType.startEvent]">
+ <path class="st0" d="M15,2c7.2,0,13,5.8,13,13s-5.8,13-13,13S2,22.2,2,15S7.8,2,15,2 M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15
+ s15-6.7,15-15S23.3,0,15,0L15,0z" />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.endEvent]">
+ <path class="st0" d="M15,4c6.1,0,11,4.9,11,11s-4.9,11-11,11S4,21.1,4,15S8.9,4,15,4 M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15
+ s15-6.7,15-15S23.3,0,15,0L15,0z" />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.errorStartEvent]">
+ <path class="st0" d="M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15s15-6.7,15-15S23.3,0,15,0z M15,28C7.8,28,2,22.2,2,15S7.8,2,15,2
+ s13,5.8,13,13S22.2,28,15,28z" />
+ <path class="st0" d="M19.7,12H17l2-5.5c0.1-0.3,0.1-0.5-0.1-0.7c-0.2-0.2-0.3-0.3-0.6-0.3H14c-0.3,0-0.6,0.2-0.8,0.5L9.7,16
+ c-0.1,0.3-0.1,0.5,0.1,0.7c0.2,0.2,0.3,0.3,0.6,0.3l3.6,0.1l-1,6.7c-0.1,0.3,0.2,0.8,0.5,0.9c0.1,0,0.2,0,0.3,0
+ c0.3,0,0.7-0.2,0.9-0.4l5.5-11.1c0.1-0.3,0.1-0.5,0-0.8C20.2,12.1,19.9,12,19.7,12z M14.6,22.3l1.2-5.9c0-0.3,0-0.4-0.2-0.6
+ c-0.2-0.2-0.3-0.3-0.6-0.3h-3.5L14.5,7h2.6l-2,5.4C15,12.8,15,13,15.2,13.2c0.2,0.2,0.3,0.3,0.6,0.3h2.5L14.6,22.3z"
+ />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.errorEndEvent]">
+ <path class="st0" d="M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15s15-6.7,15-15S23.3,0,15,0z M15,26C8.9,26,4,21.1,4,15S8.9,4,15,4
+ s11,4.9,11,11S21.1,26,15,26z" />
+ <path class="st0" d="M19.7,12.4H17l2-5.5c0.1-0.3,0.1-0.5-0.1-0.7c-0.2-0.2-0.3-0.3-0.6-0.3h-4.2c-0.3,0-0.6,0.2-0.8,0.5l-3.5,10
+ c-0.1,0.3-0.1,0.5,0.1,0.7c0.2,0.2,0.3,0.3,0.6,0.3l3.6,0.1l-1,6.7c-0.1,0.3,0.2,0.8,0.5,0.9c0.1,0,0.2,0,0.3,0
+ c0.3,0,0.7-0.2,0.9-0.4l5.5-11.1c0.1-0.3,0.1-0.5,0-0.8C20.2,12.6,20,12.4,19.7,12.4z" />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.toscaNodeManagementTask]">
+ <path class="st0" d="M24,29H6c-2.8,0-5-2.2-5-5V6c0-2.8,2.2-5,5-5h18c2.8,0,5,2.2,5,5v18C29,26.8,26.8,29,24,29z M6,3
+ C4.3,3,3,4.3,3,6v18c0,1.7,1.3,3,3,3h18c1.7,0,3-1.3,3-3V6c0-1.7-1.3-3-3-3H6z" />
+ <path class="st0" d="M7.6,14.5h7.5c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,14.5,7.6,14.5z" />
+ <path class="st0" d="M7.6,18.7h3.7c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,18.7,7.6,18.7z" />
+ <path class="st0" d="M7.6,10.4H19c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,10.4,7.6,10.4z" />
+ <path class="st0" d="M24.7,15.1h-5c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1h1.5v5.7c0,0.6,0.4,1,1,1s1-0.4,1-1v-5.7h1.5c0.6,0,1-0.4,1-1
+ C25.7,15.5,25.2,15.1,24.7,15.1z" />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.restTask]">
+ <path class="st0" d="M24,29H6c-2.8,0-5-2.2-5-5V6c0-2.8,2.2-5,5-5h18c2.8,0,5,2.2,5,5v18C29,26.8,26.8,29,24,29z M6,3
+ C4.3,3,3,4.3,3,6v18c0,1.7,1.3,3,3,3h18c1.7,0,3-1.3,3-3V6c0-1.7-1.3-3-3-3H6z" />
+ <path class="st0" d="M7.6,14.5h7.5c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,14.5,7.6,14.5z" />
+ <path class="st0" d="M7.6,18.7h3.7c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,18.7,7.6,18.7z" />
+ <path class="st0" d="M7.6,10.4H19c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,10.4,7.6,10.4z" />
+ <path class="st0" d="M24.1,22.6l-1.6-2.7c0.9-0.4,1.5-1.2,1.5-2.2c0-1.4-1.2-2.5-2.8-2.5h-1.9c-0.2,0-0.4,0.1-0.6,0.2
+ c-0.2,0.1-0.3,0.3-0.3,0.6v7c0,0.4,0.3,0.8,0.8,0.8c0.4,0,0.8-0.3,0.8-0.8v-2.8h0.8l1.9,3.2c0.1,0.2,0.4,0.4,0.7,0.4
+ c0.1,0,0.3,0,0.4-0.1C24.2,23.5,24.4,23,24.1,22.6z M20.1,16.8h1.2c0.6,0,1.2,0.4,1.2,0.9s-0.5,0.9-1.2,0.9h-1.2V16.8z"
+ />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.exclusiveGateway]">
+ <path class="st0" d="M16.4,15l3.2-3.2c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0L15,13.6l-3.2-3.2c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4
+ l3.2,3.2l-3.2,3.2c-0.4,0.4-0.4,1,0,1.4s1,0.4,1.4,0l3.2-3.2l3.2,3.2c0.4,0.4,1,0.4,1.4,0s0.4-1,0-1.4L16.4,15z"
+ />
+ <path class="st0" d="M29.1,12.9l-12-12c-1.1-1.1-3.1-1.1-4.2,0l-12,12C0.3,13.4,0,14.2,0,15s0.3,1.6,0.9,2.1l12,12
+ c0.6,0.6,1.3,0.9,2.1,0.9s1.6-0.3,2.1-0.9l12-12c0.6-0.6,0.9-1.3,0.9-2.1S29.7,13.4,29.1,12.9z M27.7,15.7l-12,12
+ c-0.4,0.4-1,0.4-1.4,0l-12-12C2.1,15.5,2,15.3,2,15s0.1-0.5,0.3-0.7l12-12C14.5,2.1,14.7,2,15,2s0.5,0.1,0.7,0.3l12,12
+ c0.2,0.2,0.3,0.4,0.3,0.7S27.9,15.5,27.7,15.7z" />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.parallelGateway]">
+ <path class="st0" d="M20.5,14H16V9.5c0-0.6-0.4-1-1-1s-1,0.4-1,1V14H9.5c-0.6,0-1,0.4-1,1s0.4,1,1,1H14v4.5c0,0.6,0.4,1,1,1
+ s1-0.4,1-1V16h4.5c0.6,0,1-0.4,1-1S21.1,14,20.5,14z" />
+ <path class="st0" d="M29.1,12.9l-12-12c-1.1-1.1-3.1-1.1-4.2,0l-12,12C0.3,13.4,0,14.2,0,15s0.3,1.6,0.9,2.1l12,12
+ c0.6,0.6,1.3,0.9,2.1,0.9s1.6-0.3,2.1-0.9l12-12c0.6-0.6,0.9-1.3,0.9-2.1S29.7,13.4,29.1,12.9z M27.7,15.7l-12,12
+ c-0.4,0.4-1,0.4-1.4,0l-12-12C2.1,15.5,2,15.3,2,15s0.1-0.5,0.3-0.7l12-12C14.5,2.1,14.7,2,15,2s0.5,0.1,0.7,0.3l12,12
+ c0.2,0.2,0.3,0.4,0.3,0.7S27.9,15.5,27.7,15.7z" />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.subProcess]">
+ <path class="st0" d="M24.5,1h-18c-2.8,0-5,2.2-5,5v18c0,2.8,2.2,5,5,5h18c2.8,0,5-2.2,5-5V6C29.5,3.2,27.2,1,24.5,1z M20.2,27h-9.4
+ v-9.1c0-0.3,0.2-0.5,0.5-0.5h8.4c0.3,0,0.5,0.2,0.5,0.5V27z M27.5,24c0,1.7-1.3,3-3,3h-2.3v-9.1c0-1.4-1.1-2.5-2.5-2.5h-8.4
+ c-1.4,0-2.5,1.1-2.5,2.5V27H6.5c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h18c1.7,0,3,1.3,3,3V24z" />
+ <path class="st0" d="M19,21.3h-2.5v-2.5c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v2.5H12c-0.6,0-1,0.4-1,1s0.4,1,1,1h2.5v2.5
+ c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1v-2.5H19c0.6,0,1-0.4,1-1S19.5,21.3,19,21.3z" />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.intermediateCatchEvent]">
+ <path class="st0" d="M15,0C6.7,0,0,6.7,0,15c0,8.3,6.7,15,15,15c8.3,0,15-6.7,15-15C30,6.7,23.3,0,15,0z M16,27.9V26
+ c0-0.6-0.4-1-1-1s-1,0.4-1,1v1.9C7.6,27.5,2.5,22.4,2.1,16H4c0.6,0,1-0.4,1-1s-0.4-1-1-1H2.1C2.5,7.6,7.6,2.5,14,2.1V4
+ c0,0.6,0.4,1,1,1s1-0.4,1-1V2.1C22.4,2.5,27.5,7.6,27.9,14H26c-0.6,0-1,0.4-1,1s0.4,1,1,1h1.9C27.5,22.4,22.4,27.5,16,27.9z"
+ />
+ <path class="st0" d="M20,14h-3.6l2.5-6.6c0.2-0.5-0.1-1.1-0.6-1.3c-0.5-0.2-1.1,0.1-1.3,0.6l-3,8c-0.1,0.3-0.1,0.7,0.1,0.9
+ c0.2,0.3,0.5,0.4,0.8,0.4h5c0.6,0,1-0.4,1-1S20.6,14,20,14z" />
+ </g>
+ <g *ngSwitchCase="nodeType[nodeType.scriptTask]">
+ <path class="st0" d="M24,1H6C3.2,1,1,3.2,1,6v18c0,2.8,2.2,5,5,5h18c2.8,0,5-2.2,5-5V6C29,3.2,26.8,1,24,1z M16.9,3.4
+ c0.5,0,0.9,0.2,1.3,0.5c0.4,0.4,0.5,0.8,0.5,1.3c0,0.5-0.2,0.9-0.5,1.3L17.7,7l-5.3,5.3c-0.2-0.6-0.5-1.2-0.9-1.6
+ c-0.4-0.4-1-0.8-1.6-0.9l5.8-5.8C16,3.6,16.4,3.4,16.9,3.4z M10.3,27H6c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h8.2l-7.4,7.4
+ c-0.1,0.1-0.2,0.2-0.3,0.3c-0.7,0.7-1,1.6-1,2.5c0,0.9,0.4,1.8,1,2.5l5.2,5.2l-1.3,1.3c-0.7,0.7-1,1.6-1,2.5
+ C9.3,25.5,9.7,26.4,10.3,27z M14.1,25.9c-0.4,0.4-0.8,0.5-1.3,0.5c-0.5,0-0.9-0.2-1.3-0.5c-0.4-0.4-0.5-0.8-0.5-1.3
+ c0-0.5,0.2-0.9,0.5-1.3l1.3-1.3l0.5,0.5l0.8,0.8c0.4,0.4,0.5,0.8,0.5,1.3C14.6,25.1,14.5,25.5,14.1,25.9z M14.5,21.3l-6.8-6.8
+ c-0.4-0.4-0.5-0.8-0.5-1.3c0-0.5,0.2-0.9,0.5-1.3c0.4-0.4,0.8-0.5,1.3-0.5c0.5,0,0.9,0.2,1.3,0.5c0.4,0.4,0.5,0.8,0.5,1.3
+ c0,0.5-0.2,0.9-0.5,1.3l0.9,0.9c0.2,0.2,0.4,0.2,0.6,0l5.2-5.2l4.4,4.4l0.8,0.8c0.4,0.4,0.5,0.8,0.5,1.3c0,0.5-0.2,0.9-0.5,1.3v0
+ l-5.8,5.8c-0.1-0.6-0.5-1.2-0.9-1.6L14.5,21.3z M27,24c0,1.7-1.3,3-3,3h-8.6l7.9-7.9c0.7-0.7,1-1.6,1-2.5c0-0.9-0.4-1.8-1-2.5
+ l-0.8-0.8L18.1,9l1.3-1.3c0.7-0.7,1-1.6,1-2.5c0-0.8-0.3-1.6-0.8-2.2H24c1.7,0,3,1.3,3,3V24z" />
+ <path class="st0" d="M17.2,12.4c-0.3-0.3-0.8-0.3-1.1,0L12.6,16c-0.3,0.3-0.3,0.8,0,1.1c0.1,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2
+ l3.6-3.6C17.5,13.1,17.5,12.7,17.2,12.4z" />
+ <path class="st0" d="M18.9,14.2c-0.3-0.3-0.8-0.3-1.1,0l-3.6,3.6c-0.3,0.3-0.3,0.8,0,1.1c0.1,0.1,0.3,0.2,0.5,0.2
+ c0.2,0,0.4-0.1,0.5-0.2l3.6-3.6C19.2,14.9,19.2,14.4,18.9,14.2z" />
+ <path class="st0" d="M17.1,20.6l3.6-3.6c0.3-0.3,0.3-0.8,0-1.1s-0.8-0.3-1.1,0L16,19.5c-0.3,0.3-0.3,0.8,0,1.1
+ c0.1,0.1,0.3,0.2,0.5,0.2S17,20.7,17.1,20.6z" />
+ </g>
+ </g>
+ </svg>
+ <div class="anchor anchors anchor-left">
+ <span class="left">
+ <i class="left-arrow1"></i>
+ <i class="left-arrow2"></i>
+ </span>
+ </div>
+ <div class="anchor anchors anchor-right">
+ <span class="right">
+ <i class="right-arrow1"></i>
+ <i class="right-arrow2"></i>
+ </span>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/node/node.component.ts b/sdc-workflow-designer-ui/src/app/components/node/node.component.ts
index e688e973..5fd2caef 100644
--- a/sdc-workflow-designer-ui/src/app/components/node/node.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/node/node.component.ts
@@ -1,113 +1,113 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild } from '@angular/core';
-
-import { Subscription } from 'rxjs/Subscription';
-import { SubProcess } from '../../model/workflow/sub-process';
-import { WorkflowNode } from '../../model/workflow/workflow-node';
-import { BroadcastService } from '../../services/broadcast.service';
-import { JsPlumbService } from '../../services/jsplumb.service';
-import { ModelService } from '../../services/model.service';
-import { NodeType } from '../../model/workflow/node-type.enum';
-
-/**
- * node component represent a single workflow node.
- * every node would be rendered on the container component
- */
-@Component({
- selector: 'b4t-node',
- styleUrls: ['./node.component.css'],
- templateUrl: 'node.component.html',
-})
-export class NodeComponent implements AfterViewInit, OnDestroy {
- @Input() public node: WorkflowNode;
- @Input() public rank: number;
- @ViewChild('nodeItem') nodeItem: ElementRef;
-
- public nodeType = NodeType;
- public active = false;
- private currentWorkflowSubscription: Subscription;
- private isMoving = false;
-
- constructor(private jsPlumbService: JsPlumbService,
- private modelService: ModelService,
- private broadcastService: BroadcastService) {
- }
-
- public ngAfterViewInit() {
- this.jsPlumbService.initJsPlumbInstance(this.node.parentId);
- this.jsPlumbService.initNode(this.node);
-
- if (this.canHaveChildren()) {
- this.jsPlumbService.nodeDroppable(this.node, this.rank);
- this.jsPlumbService.connectChildrenNodes(this.node.id);
- }
-
- this.currentWorkflowSubscription = this.broadcastService.selectedElement$.subscribe(activeNodes => {
- let active = false;
- for (let index = 0; index < activeNodes.length; index++) {
- let activeNode = activeNodes[index] as WorkflowNode;
- if (activeNode.id === this.node.id) {
- active = true;
- break;
- }
- }
- this.active = active;
- });
- }
-
- public ngOnDestroy() {
- this.currentWorkflowSubscription.unsubscribe();
- if (this.nodeItem.nativeElement.onmousemove) {
- this.nodeItem.nativeElement.onmousemove = null;
- }
- }
-
- public onMousedown() {
- let currentThis = this;
- this.nodeItem.nativeElement.onmousemove = function () {
- currentThis.isMoving = true;
- };
- }
-
- public onClick(event) {
- if (this.nodeItem.nativeElement.onmousemove) {
- this.nodeItem.nativeElement.onmousemove = null;
- }
- if (this.isMoving && this.active) {
- this.isMoving = false;
- return;
- }
- event.stopPropagation();
- this.broadcastService.broadcast(this.broadcastService.showProperty, null);
- this.broadcastService.broadcast(this.broadcastService.selectedElement, [this.node]);
- }
-
- public canHaveChildren(): boolean {
- return this.node.type === 'subProcess';
- }
-
- public onMouseOut(event, target) {
- event.stopPropagation();
- target.classList.remove('hover');
- }
-
- public onMouseOver(event, target) {
- event.stopPropagation();
- target.classList.add('hover');
- }
-
- public showProperties(event) {
- event.stopPropagation();
- this.broadcastService.broadcast(this.broadcastService.showProperty, this.node);
- }
-}
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild } from '@angular/core';
+
+import { Subscription } from 'rxjs/Subscription';
+import { SubProcess } from '../../model/workflow/sub-process';
+import { WorkflowNode } from '../../model/workflow/workflow-node';
+import { BroadcastService } from '../../services/broadcast.service';
+import { JsPlumbService } from '../../services/jsplumb.service';
+import { ModelService } from '../../services/model.service';
+import { NodeType } from '../../model/workflow/node-type.enum';
+
+/**
+ * node component represent a single workflow node.
+ * every node would be rendered on the container component
+ */
+@Component({
+ selector: 'b4t-node',
+ styleUrls: ['./node.component.css'],
+ templateUrl: 'node.component.html',
+})
+export class NodeComponent implements AfterViewInit, OnDestroy {
+ @Input() public node: WorkflowNode;
+ @Input() public rank: number;
+ @ViewChild('nodeItem') nodeItem: ElementRef;
+
+ public nodeType = NodeType;
+ public active = false;
+ private currentWorkflowSubscription: Subscription;
+ private isMoving = false;
+
+ constructor(private jsPlumbService: JsPlumbService,
+ private modelService: ModelService,
+ private broadcastService: BroadcastService) {
+ }
+
+ public ngAfterViewInit() {
+ this.jsPlumbService.initJsPlumbInstance(this.node.parentId);
+ this.jsPlumbService.initNode(this.node);
+
+ if (this.canHaveChildren()) {
+ this.jsPlumbService.nodeDroppable(this.node, this.rank);
+ this.jsPlumbService.connectChildrenNodes(this.node.id);
+ }
+
+ this.currentWorkflowSubscription = this.broadcastService.selectedElement$.subscribe(activeNodes => {
+ let active = false;
+ for (let index = 0; index < activeNodes.length; index++) {
+ let activeNode = activeNodes[index] as WorkflowNode;
+ if (activeNode.id === this.node.id) {
+ active = true;
+ break;
+ }
+ }
+ this.active = active;
+ });
+ }
+
+ public ngOnDestroy() {
+ this.currentWorkflowSubscription.unsubscribe();
+ if (this.nodeItem.nativeElement.onmousemove) {
+ this.nodeItem.nativeElement.onmousemove = null;
+ }
+ }
+
+ public onMousedown() {
+ let currentThis = this;
+ this.nodeItem.nativeElement.onmousemove = function () {
+ currentThis.isMoving = true;
+ };
+ }
+
+ public onClick(event) {
+ if (this.nodeItem.nativeElement.onmousemove) {
+ this.nodeItem.nativeElement.onmousemove = null;
+ }
+ if (this.isMoving && this.active) {
+ this.isMoving = false;
+ return;
+ }
+ event.stopPropagation();
+ this.broadcastService.broadcast(this.broadcastService.showProperty, null);
+ this.broadcastService.broadcast(this.broadcastService.selectedElement, [this.node]);
+ }
+
+ public canHaveChildren(): boolean {
+ return this.node.type === 'subProcess';
+ }
+
+ public onMouseOut(event, target) {
+ event.stopPropagation();
+ target.classList.remove('hover');
+ }
+
+ public onMouseOver(event, target) {
+ event.stopPropagation();
+ target.classList.add('hover');
+ }
+
+ public showProperties(event) {
+ event.stopPropagation();
+ this.broadcastService.broadcast(this.broadcastService.showProperty, this.node);
+ }
+}
diff --git a/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.css b/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.css
index fdcd38d7..9cf5d60f 100644
--- a/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.css
+++ b/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.css
@@ -1,38 +1,38 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
- .form-control-label{
- margin-bottom: 0;
- width: 100px;
- vertical-align: middle;
-}
-
-.parameter-item{
- display: inline;
- margin-left: 5px;
- vertical-align: middle;
-}
-
-.form-control-required{
- color: red;
- height: 30px;
- line-height: 30px;
-}
-
-.form-control-input{
- width: 120px;
- vertical-align: middle;
-}
-
-.form-control-value{
- width: 160px;
- display: inline-block;
-}
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+.form-control-label{
+ margin-bottom: 0;
+ width: 100px;
+ vertical-align: middle;
+}
+
+.parameter-item{
+ display: inline;
+ margin-left: 5px;
+ vertical-align: middle;
+}
+
+.form-control-required{
+ color: red;
+ height: 30px;
+ line-height: 30px;
+}
+
+.form-control-input{
+ width: 120px;
+ vertical-align: middle;
+}
+
+.form-control-value{
+ width: 160px;
+ display: inline-block;
+}
diff --git a/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.html b/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.html
index 72e77990..50ec0449 100644
--- a/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.html
@@ -1,49 +1,49 @@
-<!--
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
--->
-
-<div class="form-group">
- <div *ngIf="showLabel" class="parameter-item" style="margin:0;">
- <label *ngIf="true === param.required" class="form-control-required">*</label>
- <input *ngIf="canEditName" class="form-control form-control-input" type="text" [ngModel]="param.name" (ngModelChange)="keyChange($event)">
- <label *ngIf="!canEditName" class="form-control-label">{{param.name}}</label>
- </div>
- <div class="parameter-item">
- <div *ngIf="showValue" [ngSwitch]="param.valueSource" class="parameter-item">
- <input *ngSwitchCase="sourceEnum[sourceEnum.String]" class="form-control form-control-value" type="text" [ngModel]="param.value"
- (ngModelChange)="valueChange($event)">
- <input *ngSwitchCase="sourceEnum[sourceEnum.Variable]" class="form-control form-control-value" type="text" [ngModel]="param.value"
- (ngModelChange)="valueChange($event)">
- <tree-select *ngSwitchCase="sourceEnum[sourceEnum.Plan]" name="simpleSelect" style="vertical-align:top;" [items]="planOptions" childrenField="children"
- #simpleSelect="ngModel" class="form-control-value" [ngModel]="planValue" (ngModelChange)="valueChange($event)"></tree-select>
- <select *ngSwitchCase="sourceEnum[sourceEnum.Topology]" class="form-control form-control-value" type="text" [ngModel]="param.value"
- (ngModelChange)="valueChange($event)">
- <option *ngFor="let topology of topologyOptions" value="{{topology.value}}">{{topology.name}}</option>
- </select>
- </div>
- <select *ngIf="showValueSource" class="form-control parameter-item" style="width:auto;" type="text" [ngModel]="param.valueSource"
- (ngModelChange)="valueSourceChange($event)">
- <option *ngFor="let sourceType of valueSource" value="{{sourceEnum[sourceType]}}">{{sourceEnum[sourceType]}}</option>
- </select>
- </div>
- <div *ngIf="canInsert" class="parameter-item">
- <button type="button" class="btn blue1" (click)="insertParam()">
- <i class="fa fa-plus"></i>
- </button>
- </div>
- <div *ngIf="canDelete" class="parameter-item">
- <button type="button" class="btn oes-red-bg" (click)="deleteParam()">
- <i class="fa fa-minus"></i>
- </button>
- </div>
-</div>
+<!--
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+-->
+
+<div class="form-group">
+ <div *ngIf="showLabel" class="parameter-item" style="margin:0;">
+ <label *ngIf="true === param.required" class="form-control-required">*</label>
+ <input *ngIf="canEditName" class="form-control form-control-input" type="text" [ngModel]="param.name" (ngModelChange)="keyChange($event)">
+ <label *ngIf="!canEditName" class="form-control-label">{{param.name}}</label>
+ </div>
+ <div class="parameter-item">
+ <div *ngIf="showValue" [ngSwitch]="param.valueSource" class="parameter-item">
+ <input *ngSwitchCase="sourceEnum[sourceEnum.String]" class="form-control form-control-value" type="text" [ngModel]="param.value"
+ (ngModelChange)="valueChange($event)">
+ <input *ngSwitchCase="sourceEnum[sourceEnum.Variable]" class="form-control form-control-value" type="text" [ngModel]="param.value"
+ (ngModelChange)="valueChange($event)">
+ <tree-select *ngSwitchCase="sourceEnum[sourceEnum.Plan]" name="simpleSelect" style="vertical-align:top;" [items]="planOptions" childrenField="children"
+ #simpleSelect="ngModel" class="form-control-value" [ngModel]="planValue" (ngModelChange)="valueChange($event)"></tree-select>
+ <select *ngSwitchCase="sourceEnum[sourceEnum.Topology]" class="form-control form-control-value" type="text" [ngModel]="param.value"
+ (ngModelChange)="valueChange($event)">
+ <option *ngFor="let topology of topologyOptions" value="{{topology.value}}">{{topology.name}}</option>
+ </select>
+ </div>
+ <select *ngIf="showValueSource" class="form-control parameter-item" style="width:auto;" type="text" [ngModel]="param.valueSource"
+ (ngModelChange)="valueSourceChange($event)">
+ <option *ngFor="let sourceType of valueSource" value="{{sourceEnum[sourceType]}}">{{sourceEnum[sourceType]}}</option>
+ </select>
+ </div>
+ <div *ngIf="canInsert" class="parameter-item">
+ <button type="button" class="btn blue1" (click)="insertParam()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ <div *ngIf="canDelete" class="parameter-item">
+ <button type="button" class="btn oes-red-bg" (click)="deleteParam()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+</div> \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.ts b/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.ts
index 31782962..8c614460 100644
--- a/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.ts
@@ -1,154 +1,154 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-
-import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
-
-import { PlanTreeviewItem } from '../../model/plan-treeview-item';
-import { ValueSource } from '../../model/value-source.enum';
-import { Parameter } from '../../model/workflow/parameter';
-import { DataService } from '../../services/data/data.service';
-
-/**
- * this component contains in property component if the corresponding node has parameter properties
- * eg. task node have input and output params, start event node has input param
- */
-@Component({
- selector: 'b4t-parameter',
- styleUrls: ['./parameter.component.css'],
- templateUrl: 'parameter.component.html',
-})
-export class ParameterComponent implements OnChanges, OnInit {
- @Input() public param: Parameter;
- @Input() public valueSource: ValueSource[];
- @Input() public canEditName: boolean;
- @Input() public showLabel = true;
- @Input() public canInsert: boolean;
- @Input() public canDelete: boolean;
- @Input() public planItems: PlanTreeviewItem[];
- @Output() public paramChange = new EventEmitter<Parameter>();
- @Output() insert: EventEmitter<Parameter> = new EventEmitter<Parameter>();
- @Output() delete: EventEmitter<Parameter> = new EventEmitter<Parameter>();
-
- public sourceEnum = ValueSource;
- public valueGroupClass;
- public valueClass;
- public valueSourceClass;
- public planOptions = [];
- public topologyOptions: { name: string, value: string }[] = [];
- public showValue = true;
- public showValueSource = true;
- public planValue: any = {};
-
- constructor(private dataService: DataService) { }
-
- public ngOnChanges(changes: SimpleChanges): void {
- // if (changes.canInsert && !changes.canInsert.isFirstChange()) {
- // this.resetValueGroupClass(changes.canInsert.currentValue, this.canDelete);
- // }
- // if (changes.canDelete && !changes.canDelete.isFirstChange()) {
- // this.resetValueGroupClass(this.canInsert, changes.canDelete.currentValue);
- // }
- }
-
- public ngOnInit(): void {
- // console.warn('Parameter OnInit, parameter name is:' + this.param.name);
- if (1 === this.valueSource.length) {
- this.showValueSource = false;
- }
- this.topologyOptions = this.dataService.getTopologyProperties();
- // this.valueClass = {
- // 'col-md-7': this.showValueSource,
- // 'col-md-12': !this.showValueSource
- // };
- // this.resetValueGroupClass(this.canInsert, this.canDelete);
- this.updateValueSource(this.param.valueSource);
- // trans plan options to tree view items.
- this.initPlanTreeviewItems(this.planItems);
- if (ValueSource[ValueSource.Plan] === this.param.valueSource) {
- this.planValue = { id: this.param.value };
- }
- }
-
- public keyChange(key: string) {
- this.param.name = key;
- this.paramChange.emit(this.param);
- }
-
- public valueChange(value: any) {
- if (ValueSource[ValueSource.Plan] === this.param.valueSource) {
- if ('object' === typeof (value)) {
- this.planValue = value;
- this.param.value = value.id;
- } else {
- this.planValue = { id: '' };
- this.param.value = '';
- }
- } else {
- this.param.value = value;
- }
- this.paramChange.emit(this.param);
- }
-
- public valueSourceChange(valueSource: string) {
- this.updateValueSource(valueSource);
- this.param.valueSource = valueSource;
- this.valueChange('');
- }
-
- public insertParam(): void {
- this.insert.emit();
- }
-
- public deleteParam(): void {
- this.delete.emit();
- }
-
- private updateValueSource(valueSource: string):void{
- if(ValueSource[ValueSource.Definition] === valueSource){
- this.showValue = false;
- }else{
- this.showValue = true;
- }
- // this.resetValueSourceClass(this.showValue);
- }
-
- private resetValueGroupClass(canInsert: boolean, canDelete: boolean): void {
- // this.valueGroupClass = {
- // 'col-md-5': canInsert && canDelete,
- // 'col-md-7': (canInsert && !canDelete) || (!canInsert && canDelete),
- // 'col-md-9': !canInsert && !canDelete
- // };
- }
-
- private initPlanTreeviewItems(planTreeviewItems: PlanTreeviewItem[]): void {
- this.planOptions = this.getTreeviewChild(planTreeviewItems);
- }
-
- private getTreeviewChild(planTreeviewItems: PlanTreeviewItem[]): any[] {
- let treeviewItems = [];
- if (undefined == planTreeviewItems || 0 === planTreeviewItems.length) {
- // todo: debug check if it need [] or undefined.
- return treeviewItems;
- }
- planTreeviewItems.forEach(item => {
- const treeviewItem = {
- id: item.value,
- name: item.name,
- disabled: false,
- // !item.canSelect,
- children: this.getTreeviewChild(item.children)
- };
- treeviewItems.push(treeviewItem);
- });
- return treeviewItems;
- }
-}
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+
+import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
+
+import { PlanTreeviewItem } from '../../model/plan-treeview-item';
+import { ValueSource } from '../../model/value-source.enum';
+import { Parameter } from '../../model/workflow/parameter';
+import { DataService } from '../../services/data/data.service';
+
+/**
+ * this component contains in property component if the corresponding node has parameter properties
+ * eg. task node have input and output params, start event node has input param
+ */
+@Component({
+ selector: 'b4t-parameter',
+ styleUrls: ['./parameter.component.css'],
+ templateUrl: 'parameter.component.html',
+})
+export class ParameterComponent implements OnChanges, OnInit {
+ @Input() public param: Parameter;
+ @Input() public valueSource: ValueSource[];
+ @Input() public canEditName: boolean;
+ @Input() public showLabel = true;
+ @Input() public canInsert: boolean;
+ @Input() public canDelete: boolean;
+ @Input() public planItems: PlanTreeviewItem[];
+ @Output() public paramChange = new EventEmitter<Parameter>();
+ @Output() insert: EventEmitter<Parameter> = new EventEmitter<Parameter>();
+ @Output() delete: EventEmitter<Parameter> = new EventEmitter<Parameter>();
+
+ public sourceEnum = ValueSource;
+ public valueGroupClass;
+ public valueClass;
+ public valueSourceClass;
+ public planOptions = [];
+ public topologyOptions: { name: string, value: string }[] = [];
+ public showValue = true;
+ public showValueSource = true;
+ public planValue: any = {};
+
+ constructor(private dataService: DataService) { }
+
+ public ngOnChanges(changes: SimpleChanges): void {
+ // if (changes.canInsert && !changes.canInsert.isFirstChange()) {
+ // this.resetValueGroupClass(changes.canInsert.currentValue, this.canDelete);
+ // }
+ // if (changes.canDelete && !changes.canDelete.isFirstChange()) {
+ // this.resetValueGroupClass(this.canInsert, changes.canDelete.currentValue);
+ // }
+ }
+
+ public ngOnInit(): void {
+ // console.warn('Parameter OnInit, parameter name is:' + this.param.name);
+ if (1 === this.valueSource.length) {
+ this.showValueSource = false;
+ }
+ this.topologyOptions = this.dataService.getTopologyProperties();
+ // this.valueClass = {
+ // 'col-md-7': this.showValueSource,
+ // 'col-md-12': !this.showValueSource
+ // };
+ // this.resetValueGroupClass(this.canInsert, this.canDelete);
+ this.updateValueSource(this.param.valueSource);
+ // trans plan options to tree view items.
+ this.initPlanTreeviewItems(this.planItems);
+ if (ValueSource[ValueSource.Plan] === this.param.valueSource) {
+ this.planValue = { id: this.param.value };
+ }
+ }
+
+ public keyChange(key: string) {
+ this.param.name = key;
+ this.paramChange.emit(this.param);
+ }
+
+ public valueChange(value: any) {
+ if (ValueSource[ValueSource.Plan] === this.param.valueSource) {
+ if ('object' === typeof (value)) {
+ this.planValue = value;
+ this.param.value = value.id;
+ } else {
+ this.planValue = { id: '' };
+ this.param.value = '';
+ }
+ } else {
+ this.param.value = value;
+ }
+ this.paramChange.emit(this.param);
+ }
+
+ public valueSourceChange(valueSource: string) {
+ this.updateValueSource(valueSource);
+ this.param.valueSource = valueSource;
+ this.valueChange('');
+ }
+
+ public insertParam(): void {
+ this.insert.emit();
+ }
+
+ public deleteParam(): void {
+ this.delete.emit();
+ }
+
+ private updateValueSource(valueSource: string):void{
+ if(ValueSource[ValueSource.Definition] === valueSource){
+ this.showValue = false;
+ }else{
+ this.showValue = true;
+ }
+ // this.resetValueSourceClass(this.showValue);
+ }
+
+ private resetValueGroupClass(canInsert: boolean, canDelete: boolean): void {
+ // this.valueGroupClass = {
+ // 'col-md-5': canInsert && canDelete,
+ // 'col-md-7': (canInsert && !canDelete) || (!canInsert && canDelete),
+ // 'col-md-9': !canInsert && !canDelete
+ // };
+ }
+
+ private initPlanTreeviewItems(planTreeviewItems: PlanTreeviewItem[]): void {
+ this.planOptions = this.getTreeviewChild(planTreeviewItems);
+ }
+
+ private getTreeviewChild(planTreeviewItems: PlanTreeviewItem[]): any[] {
+ let treeviewItems = [];
+ if (undefined == planTreeviewItems || 0 === planTreeviewItems.length) {
+ // todo: debug check if it need [] or undefined.
+ return treeviewItems;
+ }
+ planTreeviewItems.forEach(item => {
+ const treeviewItem = {
+ id: item.value,
+ name: item.name,
+ disabled: false,
+ // !item.canSelect,
+ children: this.getTreeviewChild(item.children)
+ };
+ treeviewItems.push(treeviewItem);
+ });
+ return treeviewItems;
+ }
+}
diff --git a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html
index 089d242d..e0d368d6 100644
--- a/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/property/rest-task/rest-task.component.html
@@ -42,4 +42,4 @@
<div class="ui-fluid">
<b4t-node-parameters [restConfigId]="this.node.restConfigId" [swaggerInput]="this.node.parameters" [swaggerOutput]="this.node.responses" [planItems]="planItems"></b4t-node-parameters>
-</div>
+</div> \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.html b/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.html
index 53e253e2..ee1ac4d4 100644
--- a/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.html
@@ -1,30 +1,30 @@
-<!--
-/*******************************************************************************
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- *******************************************************************************/
--->
-
-<div class="form-group row">
- <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.SCRIPT_FORMAT' | translate}}</label>
- <div class="col-md-9">
- <select class="form-control" [(ngModel)]="node.scriptFormat">
- <option *ngFor="let script of scriptOperations" value="{{script}}">{{script}}</option>
- </select>
- </div>
-</div>
-
-<div class="form-group row">
- <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.SCRIPT' | translate}}</label>
- <div class="col-md-9">
- <textarea class="form-control" type="text" rows="20" [(ngModel)]="node.script"></textarea>
- </div>
-</div>
-
+<!--
+/*******************************************************************************
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+-->
+
+<div class="form-group row">
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.SCRIPT_FORMAT' | translate}}</label>
+ <div class="col-md-9">
+ <select class="form-control" [(ngModel)]="node.scriptFormat">
+ <option *ngFor="let script of scriptOperations" value="{{script}}">{{script}}</option>
+ </select>
+ </div>
+</div>
+
+<div class="form-group row">
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.SCRIPT' | translate}}</label>
+ <div class="col-md-9">
+ <textarea class="form-control" type="text" rows="20" [(ngModel)]="node.script"></textarea>
+ </div>
+</div>
+
diff --git a/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.ts b/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.ts
index 1dd3b7a6..145768fa 100644
--- a/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.ts
@@ -1,24 +1,24 @@
-/*******************************************************************************
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- *******************************************************************************/
-import { AfterViewInit, Component, Input } from '@angular/core';
-
-import { ScriptTask } from "../../../model/workflow/script-task";
-
-@Component({
- selector: 'b4t-script-task',
- templateUrl: 'script-task.component.html',
-})
-export class ScriptTaskComponent {
- @Input() public node: ScriptTask;
-
- public scriptOperations = ['JavaScript'];
-}
+/*******************************************************************************
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+import { AfterViewInit, Component, Input } from '@angular/core';
+
+import { ScriptTask } from "../../../model/workflow/script-task";
+
+@Component({
+ selector: 'b4t-script-task',
+ templateUrl: 'script-task.component.html',
+})
+export class ScriptTaskComponent {
+ @Input() public node: ScriptTask;
+
+ public scriptOperations = ['JavaScript'];
+}
diff --git a/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html b/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html
index d10128c7..d6aaafd8 100644
--- a/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html
@@ -1,25 +1,25 @@
-<!--
-/*******************************************************************************
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- *******************************************************************************/
--->
-
-<div class="form-group row">
- <div class="col-md-10"></div>
- <div class="col-md-2">
- <button (click)="create();" type="button" class="btn blue1 pull-right">
- <i class="fa fa-plus"></i>
- </button>
- </div>
-</div>
-
-<b4t-parameter *ngFor="let param of node.parameters; let i = index;" [param]="param" [canEditName]="true"
- [valueSource]="sources" [canDelete]="true" (delete)="delete(i)"></b4t-parameter>
+<!--
+/*******************************************************************************
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+-->
+
+<div class="form-group row">
+ <div class="col-md-10"></div>
+ <div class="col-md-2">
+ <button (click)="create();" type="button" class="btn blue1 pull-right">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+</div>
+
+<b4t-parameter *ngFor="let param of node.parameters; let i = index;" [param]="param" [canEditName]="true"
+ [valueSource]="sources" [canDelete]="true" (delete)="delete(i)"></b4t-parameter> \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts b/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts
index 96701625..adef3297 100644
--- a/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts
@@ -1,36 +1,36 @@
-/*******************************************************************************
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- *******************************************************************************/
-import { Component, Input } from '@angular/core';
-import { Subscription } from 'rxjs/Subscription';
-
-import { ValueSource } from '../../../model/value-source.enum';
-import { Parameter } from '../../../model/workflow/parameter';
-import { StartEvent } from '../../../model/workflow/start-event';
-import { BroadcastService } from '../../../services/broadcast.service';
-import { WorkflowUtil } from '../../../util/workflow-util';
-
-@Component({
- selector: 'b4t-start-event',
- templateUrl: 'start-event.component.html',
-})
-export class StartEventComponent {
- @Input() public node: StartEvent;
- public sources: ValueSource[] = [ValueSource.String];
-
- public create(): void {
- this.node.parameters.push(new Parameter('', '', ValueSource[ValueSource.String]));
- }
-
- public delete(index: number): void {
- this.node.parameters.splice(index, 1);
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+import { Component, Input } from '@angular/core';
+import { Subscription } from 'rxjs/Subscription';
+
+import { ValueSource } from '../../../model/value-source.enum';
+import { Parameter } from '../../../model/workflow/parameter';
+import { StartEvent } from '../../../model/workflow/start-event';
+import { BroadcastService } from '../../../services/broadcast.service';
+import { WorkflowUtil } from '../../../util/workflow-util';
+
+@Component({
+ selector: 'b4t-start-event',
+ templateUrl: 'start-event.component.html',
+})
+export class StartEventComponent {
+ @Input() public node: StartEvent;
+ public sources: ValueSource[] = [ValueSource.String];
+
+ public create(): void {
+ this.node.parameters.push(new Parameter('', '', ValueSource[ValueSource.String]));
+ }
+
+ public delete(index: number): void {
+ this.node.parameters.splice(index, 1);
+ }
+}
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 64feb605..e7096ab7 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
@@ -49,4 +49,4 @@
<input class="form-control" type="text" [(ngModel)]="sequenceFlow.condition">
</div>
</div>
-</div>
+</div> \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.css b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.css
index 460dff67..4da64d16 100644
--- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.css
+++ b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.css
@@ -1,62 +1,62 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-.toolbar-head{
- color:#404040;
- font-size: 14px;
-}
-
-.toolbar-head:hover{
- cursor: pointer;
-}
-
-.fold-icon{
- width: 15px;
- font-size: 8px;
- color: #00abff;
-}
-
-.item{
- width: 50px;
- height: 50px;
- text-align: center;
- float: left;
- margin-left: 6px;
- margin-bottom: 10px;
-}
-
-.item:hover{
- cursor: pointer;
-}
-
-.item svg{
- width:24px;
- height:24px;
- margin: 4px 13px;
- display: block;
- /* fill: #A9B2BA; */
- fill: #00ABFF;
-}
-
-.item span{
- font-size: 12px;
- color: #595959;
- display: block;
-}
-
-.getway{
- padding-top: 5px;
-}
-
-.getway div{
- width: 30px !important;
- height: 30px !important;
-}
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+.toolbar-head{
+ color:#404040;
+ font-size: 14px;
+}
+
+.toolbar-head:hover{
+ cursor: pointer;
+}
+
+.fold-icon{
+ width: 15px;
+ font-size: 8px;
+ color: #00abff;
+}
+
+.item{
+ width: 50px;
+ height: 50px;
+ text-align: center;
+ float: left;
+ margin-left: 6px;
+ margin-bottom: 10px;
+}
+
+.item:hover{
+ cursor: pointer;
+}
+
+.item svg{
+ width:24px;
+ height:24px;
+ margin: 4px 13px;
+ display: block;
+ /* fill: #A9B2BA; */
+ fill: #00ABFF;
+}
+
+.item span{
+ font-size: 12px;
+ color: #595959;
+ display: block;
+}
+
+.getway{
+ padding-top: 5px;
+}
+
+.getway div{
+ width: 30px !important;
+ height: 30px !important;
+} \ No newline at end of file
diff --git a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html
index 0c5a7240..19df5efd 100644
--- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html
+++ b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html
@@ -1,194 +1,194 @@
-<!--
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
--->
-<accordion>
- <accordion-group [isOpen]="true" #event>
- <div accordion-heading class="toolbar-head">
- <i class="fa fold-icon" [ngClass]="{'fa-chevron-down': event?.isOpen, 'fa-chevron-right': !event?.isOpen}"></i>
- <i class="fa fa-th-list"></i>
- <span>{{ 'WORKFLOW.BPMN_EVENT' | translate }}</span>
- </div>
- <div nodeType="startEvent" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M15,2c7.2,0,13,5.8,13,13s-5.8,13-13,13S2,22.2,2,15S7.8,2,15,2 M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15
- s15-6.7,15-15S23.3,0,15,0L15,0z" />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.START_EVENT' | translate }}</span>
- </div>
- <div nodeType="endEvent" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M15,4c6.1,0,11,4.9,11,11s-4.9,11-11,11S4,21.1,4,15S8.9,4,15,4 M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15
- s15-6.7,15-15S23.3,0,15,0L15,0z" />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.END_EVENT' | translate }}</span>
- </div>
- <div nodeType="intermediateCatchEvent" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M15,0C6.7,0,0,6.7,0,15c0,8.3,6.7,15,15,15c8.3,0,15-6.7,15-15C30,6.7,23.3,0,15,0z M16,27.9V26
- c0-0.6-0.4-1-1-1s-1,0.4-1,1v1.9C7.6,27.5,2.5,22.4,2.1,16H4c0.6,0,1-0.4,1-1s-0.4-1-1-1H2.1C2.5,7.6,7.6,2.5,14,2.1V4
- c0,0.6,0.4,1,1,1s1-0.4,1-1V2.1C22.4,2.5,27.5,7.6,27.9,14H26c-0.6,0-1,0.4-1,1s0.4,1,1,1h1.9C27.5,22.4,22.4,27.5,16,27.9z"
- />
- <path class="st0" d="M20,14h-3.6l2.5-6.6c0.2-0.5-0.1-1.1-0.6-1.3c-0.5-0.2-1.1,0.1-1.3,0.6l-3,8c-0.1,0.3-0.1,0.7,0.1,0.9
- c0.2,0.3,0.5,0.4,0.8,0.4h5c0.6,0,1-0.4,1-1S20.6,14,20,14z" />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.TIMER_EVENT' | translate }}</span>
- </div>
- <!--
- <div nodeType="errorStartEvent" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15s15-6.7,15-15S23.3,0,15,0z M15,28C7.8,28,2,22.2,2,15S7.8,2,15,2
- s13,5.8,13,13S22.2,28,15,28z" />
- <path class="st0" d="M19.7,12H17l2-5.5c0.1-0.3,0.1-0.5-0.1-0.7c-0.2-0.2-0.3-0.3-0.6-0.3H14c-0.3,0-0.6,0.2-0.8,0.5L9.7,16
- c-0.1,0.3-0.1,0.5,0.1,0.7c0.2,0.2,0.3,0.3,0.6,0.3l3.6,0.1l-1,6.7c-0.1,0.3,0.2,0.8,0.5,0.9c0.1,0,0.2,0,0.3,0
- c0.3,0,0.7-0.2,0.9-0.4l5.5-11.1c0.1-0.3,0.1-0.5,0-0.8C20.2,12.1,19.9,12,19.7,12z M14.6,22.3l1.2-5.9c0-0.3,0-0.4-0.2-0.6
- c-0.2-0.2-0.3-0.3-0.6-0.3h-3.5L14.5,7h2.6l-2,5.4C15,12.8,15,13,15.2,13.2c0.2,0.2,0.3,0.3,0.6,0.3h2.5L14.6,22.3z"
- />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.ERROR_START_EVENT' | translate }}</span>
- </div>
- <div nodeType="errorEndEvent" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15s15-6.7,15-15S23.3,0,15,0z M15,26C8.9,26,4,21.1,4,15S8.9,4,15,4
- s11,4.9,11,11S21.1,26,15,26z" />
- <path class="st0" d="M19.7,12.4H17l2-5.5c0.1-0.3,0.1-0.5-0.1-0.7c-0.2-0.2-0.3-0.3-0.6-0.3h-4.2c-0.3,0-0.6,0.2-0.8,0.5l-3.5,10
- c-0.1,0.3-0.1,0.5,0.1,0.7c0.2,0.2,0.3,0.3,0.6,0.3l3.6,0.1l-1,6.7c-0.1,0.3,0.2,0.8,0.5,0.9c0.1,0,0.2,0,0.3,0
- c0.3,0,0.7-0.2,0.9-0.4l5.5-11.1c0.1-0.3,0.1-0.5,0-0.8C20.2,12.6,20,12.4,19.7,12.4z" />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.ERROR_END_EVENT' | translate }}</span>
- </div>
- -->
- </accordion-group>
- <accordion-group [isOpen]="true" #task>
- <div accordion-heading class="toolbar-head">
- <i class="fa fold-icon" [ngClass]="{'fa-chevron-down': task?.isOpen, 'fa-chevron-right': !task?.isOpen}"></i>
- <i class="fa fa-th-list"></i>
- <span>{{ 'WORKFLOW.BPMN_TASK' | translate }}</span>
- </div>
- <div *ngIf="!isCatalog" nodeType="toscaNodeManagementTask" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M24,29H6c-2.8,0-5-2.2-5-5V6c0-2.8,2.2-5,5-5h18c2.8,0,5,2.2,5,5v18C29,26.8,26.8,29,24,29z M6,3
- C4.3,3,3,4.3,3,6v18c0,1.7,1.3,3,3,3h18c1.7,0,3-1.3,3-3V6c0-1.7-1.3-3-3-3H6z" />
- <path class="st0" d="M7.6,14.5h7.5c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,14.5,7.6,14.5z" />
- <path class="st0" d="M7.6,18.7h3.7c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,18.7,7.6,18.7z" />
- <path class="st0" d="M7.6,10.4H19c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,10.4,7.6,10.4z" />
- <path class="st0" d="M24.7,15.1h-5c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1h1.5v5.7c0,0.6,0.4,1,1,1s1-0.4,1-1v-5.7h1.5c0.6,0,1-0.4,1-1
- C25.7,15.5,25.2,15.1,24.7,15.1z" />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.TOSCA_TASK' | translate }}</span>
- </div>
- <div *ngIf="isCatalog" nodeType="restTask" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M24,29H6c-2.8,0-5-2.2-5-5V6c0-2.8,2.2-5,5-5h18c2.8,0,5,2.2,5,5v18C29,26.8,26.8,29,24,29z M6,3
- C4.3,3,3,4.3,3,6v18c0,1.7,1.3,3,3,3h18c1.7,0,3-1.3,3-3V6c0-1.7-1.3-3-3-3H6z" />
- <path class="st0" d="M7.6,14.5h7.5c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,14.5,7.6,14.5z" />
- <path class="st0" d="M7.6,18.7h3.7c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,18.7,7.6,18.7z" />
- <path class="st0" d="M7.6,10.4H19c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,10.4,7.6,10.4z" />
- <path class="st0" d="M24.1,22.6l-1.6-2.7c0.9-0.4,1.5-1.2,1.5-2.2c0-1.4-1.2-2.5-2.8-2.5h-1.9c-0.2,0-0.4,0.1-0.6,0.2
- c-0.2,0.1-0.3,0.3-0.3,0.6v7c0,0.4,0.3,0.8,0.8,0.8c0.4,0,0.8-0.3,0.8-0.8v-2.8h0.8l1.9,3.2c0.1,0.2,0.4,0.4,0.7,0.4
- c0.1,0,0.3,0,0.4-0.1C24.2,23.5,24.4,23,24.1,22.6z M20.1,16.8h1.2c0.6,0,1.2,0.4,1.2,0.9s-0.5,0.9-1.2,0.9h-1.2V16.8z"
- />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.REST_TASK' | translate }}</span>
- </div>
- <div nodeType="scriptTask" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M24,1H6C3.2,1,1,3.2,1,6v18c0,2.8,2.2,5,5,5h18c2.8,0,5-2.2,5-5V6C29,3.2,26.8,1,24,1z M16.9,3.4
- c0.5,0,0.9,0.2,1.3,0.5c0.4,0.4,0.5,0.8,0.5,1.3c0,0.5-0.2,0.9-0.5,1.3L17.7,7l-5.3,5.3c-0.2-0.6-0.5-1.2-0.9-1.6
- c-0.4-0.4-1-0.8-1.6-0.9l5.8-5.8C16,3.6,16.4,3.4,16.9,3.4z M10.3,27H6c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h8.2l-7.4,7.4
- c-0.1,0.1-0.2,0.2-0.3,0.3c-0.7,0.7-1,1.6-1,2.5c0,0.9,0.4,1.8,1,2.5l5.2,5.2l-1.3,1.3c-0.7,0.7-1,1.6-1,2.5
- C9.3,25.5,9.7,26.4,10.3,27z M14.1,25.9c-0.4,0.4-0.8,0.5-1.3,0.5c-0.5,0-0.9-0.2-1.3-0.5c-0.4-0.4-0.5-0.8-0.5-1.3
- c0-0.5,0.2-0.9,0.5-1.3l1.3-1.3l0.5,0.5l0.8,0.8c0.4,0.4,0.5,0.8,0.5,1.3C14.6,25.1,14.5,25.5,14.1,25.9z M14.5,21.3l-6.8-6.8
- c-0.4-0.4-0.5-0.8-0.5-1.3c0-0.5,0.2-0.9,0.5-1.3c0.4-0.4,0.8-0.5,1.3-0.5c0.5,0,0.9,0.2,1.3,0.5c0.4,0.4,0.5,0.8,0.5,1.3
- c0,0.5-0.2,0.9-0.5,1.3l0.9,0.9c0.2,0.2,0.4,0.2,0.6,0l5.2-5.2l4.4,4.4l0.8,0.8c0.4,0.4,0.5,0.8,0.5,1.3c0,0.5-0.2,0.9-0.5,1.3v0
- l-5.8,5.8c-0.1-0.6-0.5-1.2-0.9-1.6L14.5,21.3z M27,24c0,1.7-1.3,3-3,3h-8.6l7.9-7.9c0.7-0.7,1-1.6,1-2.5c0-0.9-0.4-1.8-1-2.5
- l-0.8-0.8L18.1,9l1.3-1.3c0.7-0.7,1-1.6,1-2.5c0-0.8-0.3-1.6-0.8-2.2H24c1.7,0,3,1.3,3,3V24z" />
- <path class="st0" d="M17.2,12.4c-0.3-0.3-0.8-0.3-1.1,0L12.6,16c-0.3,0.3-0.3,0.8,0,1.1c0.1,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2
- l3.6-3.6C17.5,13.1,17.5,12.7,17.2,12.4z" />
- <path class="st0" d="M18.9,14.2c-0.3-0.3-0.8-0.3-1.1,0l-3.6,3.6c-0.3,0.3-0.3,0.8,0,1.1c0.1,0.1,0.3,0.2,0.5,0.2
- c0.2,0,0.4-0.1,0.5-0.2l3.6-3.6C19.2,14.9,19.2,14.4,18.9,14.2z" />
- <path class="st0" d="M17.1,20.6l3.6-3.6c0.3-0.3,0.3-0.8,0-1.1s-0.8-0.3-1.1,0L16,19.5c-0.3,0.3-0.3,0.8,0,1.1
- c0.1,0.1,0.3,0.2,0.5,0.2S17,20.7,17.1,20.6z" />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.SCRIPT_TASK' | translate }}</span>
- </div>
- </accordion-group>
- <accordion-group [isOpen]="true" #getway>
- <div accordion-heading class="toolbar-head">
- <i class="fa fold-icon" [ngClass]="{'fa-chevron-down': getway?.isOpen, 'fa-chevron-right': !getway?.isOpen}"></i>
- <i class="fa fa-th-list"></i>
- <span>{{ 'WORKFLOW.BPMN_GETWAY' | translate }}</span>
- </div>
- <div nodeType="exclusiveGateway" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M16.4,15l3.2-3.2c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0L15,13.6l-3.2-3.2c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4
- l3.2,3.2l-3.2,3.2c-0.4,0.4-0.4,1,0,1.4s1,0.4,1.4,0l3.2-3.2l3.2,3.2c0.4,0.4,1,0.4,1.4,0s0.4-1,0-1.4L16.4,15z"
- />
- <path class="st0" d="M29.1,12.9l-12-12c-1.1-1.1-3.1-1.1-4.2,0l-12,12C0.3,13.4,0,14.2,0,15s0.3,1.6,0.9,2.1l12,12
- c0.6,0.6,1.3,0.9,2.1,0.9s1.6-0.3,2.1-0.9l12-12c0.6-0.6,0.9-1.3,0.9-2.1S29.7,13.4,29.1,12.9z M27.7,15.7l-12,12
- c-0.4,0.4-1,0.4-1.4,0l-12-12C2.1,15.5,2,15.3,2,15s0.1-0.5,0.3-0.7l12-12C14.5,2.1,14.7,2,15,2s0.5,0.1,0.7,0.3l12,12
- c0.2,0.2,0.3,0.4,0.3,0.7S27.9,15.5,27.7,15.7z" />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.EXCLUSIVE_GATEWAY' | translate }}</span>
- </div>
- <div nodeType="parallelGateway" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M20.5,14H16V9.5c0-0.6-0.4-1-1-1s-1,0.4-1,1V14H9.5c-0.6,0-1,0.4-1,1s0.4,1,1,1H14v4.5c0,0.6,0.4,1,1,1
- s1-0.4,1-1V16h4.5c0.6,0,1-0.4,1-1S21.1,14,20.5,14z" />
- <path class="st0" d="M29.1,12.9l-12-12c-1.1-1.1-3.1-1.1-4.2,0l-12,12C0.3,13.4,0,14.2,0,15s0.3,1.6,0.9,2.1l12,12
- c0.6,0.6,1.3,0.9,2.1,0.9s1.6-0.3,2.1-0.9l12-12c0.6-0.6,0.9-1.3,0.9-2.1S29.7,13.4,29.1,12.9z M27.7,15.7l-12,12
- c-0.4,0.4-1,0.4-1.4,0l-12-12C2.1,15.5,2,15.3,2,15s0.1-0.5,0.3-0.7l12-12C14.5,2.1,14.7,2,15,2s0.5,0.1,0.7,0.3l12,12
- c0.2,0.2,0.3,0.4,0.3,0.7S27.9,15.5,27.7,15.7z" />
- </g>
- </svg>
- <span>{{ 'WORKFLOW.PARALLEL_GATEWAY' | translate }}</span>
- </div>
- </accordion-group>
- <!-- <accordion-group [isOpen]="true" #structural>
- <div accordion-heading class="toolbar-head">
- <i class="fa fold-icon" [ngClass]="{'fa-chevron-down': structural?.isOpen, 'fa-chevron-right': !structural?.isOpen}"></i>
- <i class="fa fa-th-list"></i>
- <span>{{ 'WORKFLOW.BPMN_STRUCTURAL' | translate }}</span>
- </div>
- <div nodeType="subProcess" class="item ui-draggable">
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
- <g>
- <path class="st0" d="M24.5,1h-18c-2.8,0-5,2.2-5,5v18c0,2.8,2.2,5,5,5h18c2.8,0,5-2.2,5-5V6C29.5,3.2,27.2,1,24.5,1z M20.2,27h-9.4
- v-9.1c0-0.3,0.2-0.5,0.5-0.5h8.4c0.3,0,0.5,0.2,0.5,0.5V27z M27.5,24c0,1.7-1.3,3-3,3h-2.3v-9.1c0-1.4-1.1-2.5-2.5-2.5h-8.4
- c-1.4,0-2.5,1.1-2.5,2.5V27H6.5c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h18c1.7,0,3,1.3,3,3V24z"/>
- <path class="st0" d="M19,21.3h-2.5v-2.5c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v2.5H12c-0.6,0-1,0.4-1,1s0.4,1,1,1h2.5v2.5
- c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1v-2.5H19c0.6,0,1-0.4,1-1S19.5,21.3,19,21.3z"/>
- </g>
- </svg>
- <span>{{ 'WORKFLOW.SUB_PROCESS' | translate }}</span>
- </div>
- </accordion-group> -->
-</accordion>
+<!--
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+-->
+<accordion>
+ <accordion-group [isOpen]="true" #event>
+ <div accordion-heading class="toolbar-head">
+ <i class="fa fold-icon" [ngClass]="{'fa-chevron-down': event?.isOpen, 'fa-chevron-right': !event?.isOpen}"></i>
+ <i class="fa fa-th-list"></i>
+ <span>{{ 'WORKFLOW.BPMN_EVENT' | translate }}</span>
+ </div>
+ <div nodeType="startEvent" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M15,2c7.2,0,13,5.8,13,13s-5.8,13-13,13S2,22.2,2,15S7.8,2,15,2 M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15
+ s15-6.7,15-15S23.3,0,15,0L15,0z" />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.START_EVENT' | translate }}</span>
+ </div>
+ <div nodeType="endEvent" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M15,4c6.1,0,11,4.9,11,11s-4.9,11-11,11S4,21.1,4,15S8.9,4,15,4 M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15
+ s15-6.7,15-15S23.3,0,15,0L15,0z" />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.END_EVENT' | translate }}</span>
+ </div>
+ <div nodeType="intermediateCatchEvent" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M15,0C6.7,0,0,6.7,0,15c0,8.3,6.7,15,15,15c8.3,0,15-6.7,15-15C30,6.7,23.3,0,15,0z M16,27.9V26
+ c0-0.6-0.4-1-1-1s-1,0.4-1,1v1.9C7.6,27.5,2.5,22.4,2.1,16H4c0.6,0,1-0.4,1-1s-0.4-1-1-1H2.1C2.5,7.6,7.6,2.5,14,2.1V4
+ c0,0.6,0.4,1,1,1s1-0.4,1-1V2.1C22.4,2.5,27.5,7.6,27.9,14H26c-0.6,0-1,0.4-1,1s0.4,1,1,1h1.9C27.5,22.4,22.4,27.5,16,27.9z"
+ />
+ <path class="st0" d="M20,14h-3.6l2.5-6.6c0.2-0.5-0.1-1.1-0.6-1.3c-0.5-0.2-1.1,0.1-1.3,0.6l-3,8c-0.1,0.3-0.1,0.7,0.1,0.9
+ c0.2,0.3,0.5,0.4,0.8,0.4h5c0.6,0,1-0.4,1-1S20.6,14,20,14z" />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.TIMER_EVENT' | translate }}</span>
+ </div>
+ <!--
+ <div nodeType="errorStartEvent" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15s15-6.7,15-15S23.3,0,15,0z M15,28C7.8,28,2,22.2,2,15S7.8,2,15,2
+ s13,5.8,13,13S22.2,28,15,28z" />
+ <path class="st0" d="M19.7,12H17l2-5.5c0.1-0.3,0.1-0.5-0.1-0.7c-0.2-0.2-0.3-0.3-0.6-0.3H14c-0.3,0-0.6,0.2-0.8,0.5L9.7,16
+ c-0.1,0.3-0.1,0.5,0.1,0.7c0.2,0.2,0.3,0.3,0.6,0.3l3.6,0.1l-1,6.7c-0.1,0.3,0.2,0.8,0.5,0.9c0.1,0,0.2,0,0.3,0
+ c0.3,0,0.7-0.2,0.9-0.4l5.5-11.1c0.1-0.3,0.1-0.5,0-0.8C20.2,12.1,19.9,12,19.7,12z M14.6,22.3l1.2-5.9c0-0.3,0-0.4-0.2-0.6
+ c-0.2-0.2-0.3-0.3-0.6-0.3h-3.5L14.5,7h2.6l-2,5.4C15,12.8,15,13,15.2,13.2c0.2,0.2,0.3,0.3,0.6,0.3h2.5L14.6,22.3z"
+ />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.ERROR_START_EVENT' | translate }}</span>
+ </div>
+ <div nodeType="errorEndEvent" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M15,0C6.7,0,0,6.7,0,15s6.7,15,15,15s15-6.7,15-15S23.3,0,15,0z M15,26C8.9,26,4,21.1,4,15S8.9,4,15,4
+ s11,4.9,11,11S21.1,26,15,26z" />
+ <path class="st0" d="M19.7,12.4H17l2-5.5c0.1-0.3,0.1-0.5-0.1-0.7c-0.2-0.2-0.3-0.3-0.6-0.3h-4.2c-0.3,0-0.6,0.2-0.8,0.5l-3.5,10
+ c-0.1,0.3-0.1,0.5,0.1,0.7c0.2,0.2,0.3,0.3,0.6,0.3l3.6,0.1l-1,6.7c-0.1,0.3,0.2,0.8,0.5,0.9c0.1,0,0.2,0,0.3,0
+ c0.3,0,0.7-0.2,0.9-0.4l5.5-11.1c0.1-0.3,0.1-0.5,0-0.8C20.2,12.6,20,12.4,19.7,12.4z" />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.ERROR_END_EVENT' | translate }}</span>
+ </div>
+ -->
+ </accordion-group>
+ <accordion-group [isOpen]="true" #task>
+ <div accordion-heading class="toolbar-head">
+ <i class="fa fold-icon" [ngClass]="{'fa-chevron-down': task?.isOpen, 'fa-chevron-right': !task?.isOpen}"></i>
+ <i class="fa fa-th-list"></i>
+ <span>{{ 'WORKFLOW.BPMN_TASK' | translate }}</span>
+ </div>
+ <div *ngIf="!isCatalog" nodeType="toscaNodeManagementTask" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M24,29H6c-2.8,0-5-2.2-5-5V6c0-2.8,2.2-5,5-5h18c2.8,0,5,2.2,5,5v18C29,26.8,26.8,29,24,29z M6,3
+ C4.3,3,3,4.3,3,6v18c0,1.7,1.3,3,3,3h18c1.7,0,3-1.3,3-3V6c0-1.7-1.3-3-3-3H6z" />
+ <path class="st0" d="M7.6,14.5h7.5c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,14.5,7.6,14.5z" />
+ <path class="st0" d="M7.6,18.7h3.7c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,18.7,7.6,18.7z" />
+ <path class="st0" d="M7.6,10.4H19c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,10.4,7.6,10.4z" />
+ <path class="st0" d="M24.7,15.1h-5c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1h1.5v5.7c0,0.6,0.4,1,1,1s1-0.4,1-1v-5.7h1.5c0.6,0,1-0.4,1-1
+ C25.7,15.5,25.2,15.1,24.7,15.1z" />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.TOSCA_TASK' | translate }}</span>
+ </div>
+ <div *ngIf="isCatalog" nodeType="restTask" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M24,29H6c-2.8,0-5-2.2-5-5V6c0-2.8,2.2-5,5-5h18c2.8,0,5,2.2,5,5v18C29,26.8,26.8,29,24,29z M6,3
+ C4.3,3,3,4.3,3,6v18c0,1.7,1.3,3,3,3h18c1.7,0,3-1.3,3-3V6c0-1.7-1.3-3-3-3H6z" />
+ <path class="st0" d="M7.6,14.5h7.5c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,14.5,7.6,14.5z" />
+ <path class="st0" d="M7.6,18.7h3.7c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,18.7,7.6,18.7z" />
+ <path class="st0" d="M7.6,10.4H19c0.5,0,0.8-0.4,0.8-1s-0.3-1-0.8-1H7.6c-0.5,0-0.8,0.4-0.8,1S7.1,10.4,7.6,10.4z" />
+ <path class="st0" d="M24.1,22.6l-1.6-2.7c0.9-0.4,1.5-1.2,1.5-2.2c0-1.4-1.2-2.5-2.8-2.5h-1.9c-0.2,0-0.4,0.1-0.6,0.2
+ c-0.2,0.1-0.3,0.3-0.3,0.6v7c0,0.4,0.3,0.8,0.8,0.8c0.4,0,0.8-0.3,0.8-0.8v-2.8h0.8l1.9,3.2c0.1,0.2,0.4,0.4,0.7,0.4
+ c0.1,0,0.3,0,0.4-0.1C24.2,23.5,24.4,23,24.1,22.6z M20.1,16.8h1.2c0.6,0,1.2,0.4,1.2,0.9s-0.5,0.9-1.2,0.9h-1.2V16.8z"
+ />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.REST_TASK' | translate }}</span>
+ </div>
+ <div nodeType="scriptTask" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M24,1H6C3.2,1,1,3.2,1,6v18c0,2.8,2.2,5,5,5h18c2.8,0,5-2.2,5-5V6C29,3.2,26.8,1,24,1z M16.9,3.4
+ c0.5,0,0.9,0.2,1.3,0.5c0.4,0.4,0.5,0.8,0.5,1.3c0,0.5-0.2,0.9-0.5,1.3L17.7,7l-5.3,5.3c-0.2-0.6-0.5-1.2-0.9-1.6
+ c-0.4-0.4-1-0.8-1.6-0.9l5.8-5.8C16,3.6,16.4,3.4,16.9,3.4z M10.3,27H6c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h8.2l-7.4,7.4
+ c-0.1,0.1-0.2,0.2-0.3,0.3c-0.7,0.7-1,1.6-1,2.5c0,0.9,0.4,1.8,1,2.5l5.2,5.2l-1.3,1.3c-0.7,0.7-1,1.6-1,2.5
+ C9.3,25.5,9.7,26.4,10.3,27z M14.1,25.9c-0.4,0.4-0.8,0.5-1.3,0.5c-0.5,0-0.9-0.2-1.3-0.5c-0.4-0.4-0.5-0.8-0.5-1.3
+ c0-0.5,0.2-0.9,0.5-1.3l1.3-1.3l0.5,0.5l0.8,0.8c0.4,0.4,0.5,0.8,0.5,1.3C14.6,25.1,14.5,25.5,14.1,25.9z M14.5,21.3l-6.8-6.8
+ c-0.4-0.4-0.5-0.8-0.5-1.3c0-0.5,0.2-0.9,0.5-1.3c0.4-0.4,0.8-0.5,1.3-0.5c0.5,0,0.9,0.2,1.3,0.5c0.4,0.4,0.5,0.8,0.5,1.3
+ c0,0.5-0.2,0.9-0.5,1.3l0.9,0.9c0.2,0.2,0.4,0.2,0.6,0l5.2-5.2l4.4,4.4l0.8,0.8c0.4,0.4,0.5,0.8,0.5,1.3c0,0.5-0.2,0.9-0.5,1.3v0
+ l-5.8,5.8c-0.1-0.6-0.5-1.2-0.9-1.6L14.5,21.3z M27,24c0,1.7-1.3,3-3,3h-8.6l7.9-7.9c0.7-0.7,1-1.6,1-2.5c0-0.9-0.4-1.8-1-2.5
+ l-0.8-0.8L18.1,9l1.3-1.3c0.7-0.7,1-1.6,1-2.5c0-0.8-0.3-1.6-0.8-2.2H24c1.7,0,3,1.3,3,3V24z" />
+ <path class="st0" d="M17.2,12.4c-0.3-0.3-0.8-0.3-1.1,0L12.6,16c-0.3,0.3-0.3,0.8,0,1.1c0.1,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2
+ l3.6-3.6C17.5,13.1,17.5,12.7,17.2,12.4z" />
+ <path class="st0" d="M18.9,14.2c-0.3-0.3-0.8-0.3-1.1,0l-3.6,3.6c-0.3,0.3-0.3,0.8,0,1.1c0.1,0.1,0.3,0.2,0.5,0.2
+ c0.2,0,0.4-0.1,0.5-0.2l3.6-3.6C19.2,14.9,19.2,14.4,18.9,14.2z" />
+ <path class="st0" d="M17.1,20.6l3.6-3.6c0.3-0.3,0.3-0.8,0-1.1s-0.8-0.3-1.1,0L16,19.5c-0.3,0.3-0.3,0.8,0,1.1
+ c0.1,0.1,0.3,0.2,0.5,0.2S17,20.7,17.1,20.6z" />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.SCRIPT_TASK' | translate }}</span>
+ </div>
+ </accordion-group>
+ <accordion-group [isOpen]="true" #getway>
+ <div accordion-heading class="toolbar-head">
+ <i class="fa fold-icon" [ngClass]="{'fa-chevron-down': getway?.isOpen, 'fa-chevron-right': !getway?.isOpen}"></i>
+ <i class="fa fa-th-list"></i>
+ <span>{{ 'WORKFLOW.BPMN_GETWAY' | translate }}</span>
+ </div>
+ <div nodeType="exclusiveGateway" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M16.4,15l3.2-3.2c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0L15,13.6l-3.2-3.2c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4
+ l3.2,3.2l-3.2,3.2c-0.4,0.4-0.4,1,0,1.4s1,0.4,1.4,0l3.2-3.2l3.2,3.2c0.4,0.4,1,0.4,1.4,0s0.4-1,0-1.4L16.4,15z"
+ />
+ <path class="st0" d="M29.1,12.9l-12-12c-1.1-1.1-3.1-1.1-4.2,0l-12,12C0.3,13.4,0,14.2,0,15s0.3,1.6,0.9,2.1l12,12
+ c0.6,0.6,1.3,0.9,2.1,0.9s1.6-0.3,2.1-0.9l12-12c0.6-0.6,0.9-1.3,0.9-2.1S29.7,13.4,29.1,12.9z M27.7,15.7l-12,12
+ c-0.4,0.4-1,0.4-1.4,0l-12-12C2.1,15.5,2,15.3,2,15s0.1-0.5,0.3-0.7l12-12C14.5,2.1,14.7,2,15,2s0.5,0.1,0.7,0.3l12,12
+ c0.2,0.2,0.3,0.4,0.3,0.7S27.9,15.5,27.7,15.7z" />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.EXCLUSIVE_GATEWAY' | translate }}</span>
+ </div>
+ <div nodeType="parallelGateway" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M20.5,14H16V9.5c0-0.6-0.4-1-1-1s-1,0.4-1,1V14H9.5c-0.6,0-1,0.4-1,1s0.4,1,1,1H14v4.5c0,0.6,0.4,1,1,1
+ s1-0.4,1-1V16h4.5c0.6,0,1-0.4,1-1S21.1,14,20.5,14z" />
+ <path class="st0" d="M29.1,12.9l-12-12c-1.1-1.1-3.1-1.1-4.2,0l-12,12C0.3,13.4,0,14.2,0,15s0.3,1.6,0.9,2.1l12,12
+ c0.6,0.6,1.3,0.9,2.1,0.9s1.6-0.3,2.1-0.9l12-12c0.6-0.6,0.9-1.3,0.9-2.1S29.7,13.4,29.1,12.9z M27.7,15.7l-12,12
+ c-0.4,0.4-1,0.4-1.4,0l-12-12C2.1,15.5,2,15.3,2,15s0.1-0.5,0.3-0.7l12-12C14.5,2.1,14.7,2,15,2s0.5,0.1,0.7,0.3l12,12
+ c0.2,0.2,0.3,0.4,0.3,0.7S27.9,15.5,27.7,15.7z" />
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.PARALLEL_GATEWAY' | translate }}</span>
+ </div>
+ </accordion-group>
+ <!-- <accordion-group [isOpen]="true" #structural>
+ <div accordion-heading class="toolbar-head">
+ <i class="fa fold-icon" [ngClass]="{'fa-chevron-down': structural?.isOpen, 'fa-chevron-right': !structural?.isOpen}"></i>
+ <i class="fa fa-th-list"></i>
+ <span>{{ 'WORKFLOW.BPMN_STRUCTURAL' | translate }}</span>
+ </div>
+ <div nodeType="subProcess" class="item ui-draggable">
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30">
+ <g>
+ <path class="st0" d="M24.5,1h-18c-2.8,0-5,2.2-5,5v18c0,2.8,2.2,5,5,5h18c2.8,0,5-2.2,5-5V6C29.5,3.2,27.2,1,24.5,1z M20.2,27h-9.4
+ v-9.1c0-0.3,0.2-0.5,0.5-0.5h8.4c0.3,0,0.5,0.2,0.5,0.5V27z M27.5,24c0,1.7-1.3,3-3,3h-2.3v-9.1c0-1.4-1.1-2.5-2.5-2.5h-8.4
+ c-1.4,0-2.5,1.1-2.5,2.5V27H6.5c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h18c1.7,0,3,1.3,3,3V24z"/>
+ <path class="st0" d="M19,21.3h-2.5v-2.5c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v2.5H12c-0.6,0-1,0.4-1,1s0.4,1,1,1h2.5v2.5
+ c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1v-2.5H19c0.6,0,1-0.4,1-1S19.5,21.3,19,21.3z"/>
+ </g>
+ </svg>
+ <span>{{ 'WORKFLOW.SUB_PROCESS' | translate }}</span>
+ </div>
+ </accordion-group> -->
+</accordion>
diff --git a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts
index dcb93120..1242215c 100644
--- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts
+++ b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts
@@ -1,49 +1,49 @@
-/**
- * Copyright (c) 2017 ZTE Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * and the Apache License 2.0 which both accompany this distribution,
- * and are available at http://www.eclipse.org/legal/epl-v10.html
- * and http://www.apache.org/licenses/LICENSE-2.0
- *
- * Contributors:
- * ZTE - initial API and implementation and/or initial documentation
- */
-
-import { AfterViewChecked, Component, OnInit } from '@angular/core';
-
-import { DataService } from '../../services/data/data.service';
-import { BroadcastService } from '../../services/broadcast.service';
-import { JsPlumbService } from '../../services/jsplumb.service';
-
-/**
- * toolbar component contains some basic operations(save) and all of the supported workflow nodes.
- * The supported nodes can be dragged to container component. which will add a new node to the workflow.
- */
-@Component({
- selector: 'b4t-toolbar',
- templateUrl: 'toolbar.component.html',
- styleUrls: ['./toolbar.component.css']
-})
-export class ToolbarComponent implements AfterViewChecked, OnInit {
- public isCatalog = true;
- private needInitButton = false;
-
- constructor(private jsPlumbService: JsPlumbService, private broadcastService: BroadcastService,
- private dataService: DataService) { }
-
- public ngOnInit() {
- this.broadcastService.backendServiceReady$.subscribe(() => {
- this.isCatalog = 'Catalog' === this.dataService.getBackendType();
- this.needInitButton = true;
- });
- }
-
- public ngAfterViewChecked() {
- if (this.needInitButton) {
- this.jsPlumbService.buttonDraggable();
- this.jsPlumbService.buttonDroppable();
- this.needInitButton = false;
- }
- }
-}
+/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+
+import { AfterViewChecked, Component, OnInit } from '@angular/core';
+
+import { DataService } from '../../services/data/data.service';
+import { BroadcastService } from '../../services/broadcast.service';
+import { JsPlumbService } from '../../services/jsplumb.service';
+
+/**
+ * toolbar component contains some basic operations(save) and all of the supported workflow nodes.
+ * The supported nodes can be dragged to container component. which will add a new node to the workflow.
+ */
+@Component({
+ selector: 'b4t-toolbar',
+ templateUrl: 'toolbar.component.html',
+ styleUrls: ['./toolbar.component.css']
+})
+export class ToolbarComponent implements AfterViewChecked, OnInit {
+ public isCatalog = true;
+ private needInitButton = false;
+
+ constructor(private jsPlumbService: JsPlumbService, private broadcastService: BroadcastService,
+ private dataService: DataService) { }
+
+ public ngOnInit() {
+ this.broadcastService.backendServiceReady$.subscribe(() => {
+ this.isCatalog = 'Catalog' === this.dataService.getBackendType();
+ this.needInitButton = true;
+ });
+ }
+
+ public ngAfterViewChecked() {
+ if (this.needInitButton) {
+ this.jsPlumbService.buttonDraggable();
+ this.jsPlumbService.buttonDroppable();
+ this.needInitButton = false;
+ }
+ }
+}