aboutsummaryrefslogtreecommitdiffstats
path: root/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event
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/property/start-event
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/property/start-event')
-rw-r--r--deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.css44
-rw-r--r--deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html40
-rw-r--r--deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts68
3 files changed, 152 insertions, 0 deletions
diff --git a/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.css b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.css
new file mode 100644
index 00000000..ac88051d
--- /dev/null
+++ b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.css
@@ -0,0 +1,44 @@
+/**
+ * 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
+ */
+table{
+ border: 1px solid #eceeef;
+ width: 100%;
+}
+
+.table-body{
+ background-color: #fff;
+}
+
+th{
+ background-color: #f5f5f5;
+}
+
+td input{
+ width: 100%;
+}
+
+td span{
+ color: #ff5b55;
+}
+
+.delete-icon{
+ color: #ff5b55;
+ font-size: 16px;
+}
+
+.delete-icon:hover{
+ cursor: pointer;
+}
+
+.plx-btn{
+ margin-top: 10px;
+} \ No newline at end of file
diff --git a/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html
new file mode 100644
index 00000000..f48a725b
--- /dev/null
+++ b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.html
@@ -0,0 +1,40 @@
+<!--
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+-->
+<table cellpadding="10px">
+ <tr>
+ <th style="width:35%;" class="plx-table-th">{{ 'WORKFLOW.PROCESS_VARIABLE' | translate }}</th>
+ <th style="width:45%;" class="plx-table-th">{{ 'WORKFLOW.PROCESS_VARIABLE_DEFAULT' | translate }}</th>
+ <th style="width:20%;" class="plx-table-th">{{ 'WORKFLOW.PROCESS_VARIABLE_OPERATION' | translate }}</th>
+ </tr>
+ <tr *ngFor="let param of node.parameters; let i = index;" class="table-body">
+ <td>
+ <input [ngModel]="param.name" (ngModelChange)="checkKey($event, i)" class="plx-input"/>
+ <span *ngIf="param.errorMsg">{{param.errorMsg}}</span>
+ </td>
+ <td>
+ <input [(ngModel)]="param.value" class="plx-input" />
+ <span *ngIf="param.errorMsg">&nbsp;</span>
+ </td>
+ <td>
+ <i class="plx-ico-delete-16 delete-icon" (click)="delete(i)"></i>
+ <span *ngIf="param.errorMsg">&nbsp;</span>
+ </td>
+ </tr>
+</table>
+
+<button (click)="create();" type="button" class="plx-btn">
+ <i class="plx-ico-new-16"></i>{{ 'WORKFLOW.PROCESS_VARIABLE_CREATE' | translate }}
+</button>
+<!-- <wfm-parameter *ngFor="let param of node.parameters; let i = index;" [param]="param" [canEditName]="true"
+ [valueSource]="sources" [canDelete]="true" (delete)="delete(i)"></wfm-parameter> --> \ No newline at end of file
diff --git a/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts
new file mode 100644
index 00000000..0f721242
--- /dev/null
+++ b/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/property/start-event/start-event.component.ts
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * 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, OnInit } 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';
+import { TranslateService } from '@ngx-translate/core';
+
+@Component({
+ selector: 'wfm-start-event',
+ styleUrls: ['./start-event.component.css'],
+ templateUrl: 'start-event.component.html',
+})
+export class StartEventComponent implements OnInit {
+ @Input() public node: StartEvent;
+ public sources: ValueSource[] = [ValueSource.string];
+
+ constructor(private translate: TranslateService) { }
+
+ ngOnInit() { }
+
+ public create(): void {
+ let parameter = new Parameter('', '', ValueSource[ValueSource.string]);
+ this.node.parameters.push(parameter);
+ }
+
+ public delete(index: number): void {
+ this.node.parameters.splice(index, 1);
+ }
+
+ public checkKey(newName: string, index: number): void {
+ this.node.parameters[index].name = newName;
+ this.node.parameters.forEach(parameter => {
+ parameter.errorMsg = '';
+ });
+ if (!newName) {
+ this.translate.get('WORKFLOW.MSG.VARIABLE_EMPTY').subscribe((res: string) => {
+ this.node.parameters[index].errorMsg = res;
+ });
+ }
+ this.node.parameters.forEach((parameter, i) => {
+ if (i + 1 < this.node.parameters.length) {
+ for (let j = i + 1; j < this.node.parameters.length; j++) {
+ let element = this.node.parameters[j];
+ if (element.name && parameter.name === element.name) {
+ this.translate.get('WORKFLOW.MSG.VARIABLE_SAME').subscribe((res: string) => {
+ parameter.errorMsg = res;
+ element.errorMsg = res;
+ });
+ }
+ }
+ }
+ });
+ }
+}