aboutsummaryrefslogtreecommitdiffstats
path: root/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-07-24 17:34:04 +0300
committervempo <vitaliy.emporopulo@amdocs.com>2018-07-25 11:39:10 +0300
commita52d50e788792a63e97a9176ab319d53db7a2853 (patch)
treeb1c2222cacf4b8192aea16d1e0315b1f005c5347 /deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow
parent3c2665debb400aef7f0ed9e235698d2ff9f859db (diff)
Replaced old implementation at root
Old project files and directories has been moved under 'deprecated-workflow-designer'. The old project is not built by the CI anymore, but can be still built manually. New modules/directories have been moved up and integrated with the CI system. Change-Id: I1528c792bcbcce9e50bfc294a1328a20e72c91cf Issue-ID: SDC-1559 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow')
-rw-r--r--deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.css43
-rw-r--r--deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html52
-rw-r--r--deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts76
3 files changed, 171 insertions, 0 deletions
diff --git a/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.css b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.css
new file mode 100644
index 00000000..a2d481d4
--- /dev/null
+++ b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.css
@@ -0,0 +1,43 @@
+/**
+ * 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
+ */
+
+.wm-sequence-flow-wrapper {
+ background-color: white;
+ position: fixed;
+ width: 500px;
+ height: 100%;
+ border-left: 1px solid #00aaff;
+ z-index: 2000;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ padding-left: 20px;
+ margin-bottom: 0;
+ padding-right: 20px;
+ padding-top: 40px;
+ -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
+ border-radius: 0;
+ overflow-y: scroll;
+}
+
+.edit {
+ display: none;
+}
+
+.editing .view {
+ display: none;
+}
+
+.editing .edit {
+ display: block;
+}
diff --git a/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html
new file mode 100644
index 00000000..e9d4d22f
--- /dev/null
+++ b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.html
@@ -0,0 +1,52 @@
+<!--
+/**
+ * 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="wm-sequence-flow-wrapper" *ngIf="show">
+ <div class="form-group row">
+ <div class="col-md-10"></div>
+ <div class="col-md-2 float-right">
+ <button (click)="delete()" type="button" class="btn btn-danger">
+ <i class="fa fa-trash" style="margin-right: 5px;"></i>
+ </button>
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_NAME' | translate}}</label>
+ <div class="col-md-9">
+ <input class="form-control" type="text" [(ngModel)]="sequenceFlow.name" (ngModelChange)="nameChanged($event)">
+ </div>
+ </div>
+
+ <!-- <div class="form-group row">
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_SOURCE' | translate}}</label>
+ <div class="col-md-9">
+ <input class="form-control" disabled type="text" [(ngModel)]="sequenceFlow.sourceRef">
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_TARGET' | translate}}</label>
+ <div class="col-md-9">
+ <input class="form-control" disabled type="text" [(ngModel)]="sequenceFlow.targetRef">
+ </div>
+ </div> -->
+
+ <div *ngIf="showCondition(sequenceFlow.sourceRef)" class="form-group row">
+ <label class="col-md-3 form-control-label text-md-right">{{'WORKFLOW.CONNECTION_CONDITION' | translate}}</label>
+ <div class="col-md-9">
+ <input class="form-control" type="text" [(ngModel)]="sequenceFlow.condition">
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
new file mode 100644
index 00000000..55d051f2
--- /dev/null
+++ b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/sequence-flow/sequence-flow.component.ts
@@ -0,0 +1,76 @@
+/**
+ * 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 } from '@angular/core';
+import { TreeNode } from 'primeng/primeng';
+
+import { SequenceFlow } from '../../model/workflow/sequence-flow';
+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';
+
+/**
+ * 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: 'wfm-sequence-flow',
+ styleUrls: ['./sequence-flow.component.css'],
+ templateUrl: 'sequence-flow.component.html',
+})
+export class SequenceFlowComponent implements AfterViewInit {
+ public sequenceFlow: SequenceFlow;
+ public show = false;
+
+ constructor(private broadcastService: BroadcastService,
+ private modelService: ModelService,
+ private jsPlumbService: JsPlumbService) {
+
+ }
+
+ public ngAfterViewInit() {
+ this.broadcastService.showProperty$.subscribe(element => {
+ if (element && !this.modelService.isNode(element)) {
+ this.sequenceFlow = element as SequenceFlow;
+ this.show = true;
+ } else {
+ this.show = false;
+ }
+ });
+ }
+
+ public showCondition(sourceRef: string): boolean {
+ if (sourceRef) {
+ let node = this.modelService.getNodeMap().get(sourceRef);
+ if (node && (NodeType[NodeType.parallelGateway] === node.type || NodeType[NodeType.exclusiveGateway] === node.type)) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ public nameChanged(name: string) {
+ this.sequenceFlow.name = name;
+ this.jsPlumbService.setLabel(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef, name);
+ }
+
+ public delete() {
+ this.show = false;
+ this.modelService.deleteConnection(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef);
+ this.jsPlumbService.deleteConnect(this.sequenceFlow.sourceRef, this.sequenceFlow.targetRef);
+ }
+}