From a52d50e788792a63e97a9176ab319d53db7a2853 Mon Sep 17 00:00:00 2001 From: vempo Date: Tue, 24 Jul 2018 17:34:04 +0300 Subject: 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 --- .../toolbar-node/toolbar-node.component.html | 28 ----- .../toolbar/toolbar-node/toolbar-node.component.ts | 128 ------------------- .../app/components/toolbar/toolbar.component.css | 69 ----------- .../app/components/toolbar/toolbar.component.html | 135 --------------------- .../app/components/toolbar/toolbar.component.ts | 30 ----- 5 files changed, 390 deletions(-) delete mode 100644 sdc-workflow-designer-ui/src/app/components/toolbar/toolbar-node/toolbar-node.component.html delete mode 100644 sdc-workflow-designer-ui/src/app/components/toolbar/toolbar-node/toolbar-node.component.ts delete mode 100644 sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.css delete mode 100644 sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html delete mode 100644 sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts (limited to 'sdc-workflow-designer-ui/src/app/components/toolbar') diff --git a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar-node/toolbar-node.component.html b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar-node/toolbar-node.component.html deleted file mode 100644 index 790273d7..00000000 --- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar-node/toolbar-node.component.html +++ /dev/null @@ -1,28 +0,0 @@ - - -
- - - {{ getDisplayName(category) }} -
-
-
- - {{ getDisplayName(nodeType) }} -
-
-
\ No newline at end of file diff --git a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar-node/toolbar-node.component.ts b/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar-node/toolbar-node.component.ts deleted file mode 100644 index 3e82687e..00000000 --- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar-node/toolbar-node.component.ts +++ /dev/null @@ -1,128 +0,0 @@ -/** - * 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, OnInit } from "@angular/core"; -import { TranslateService } from "@ngx-translate/core"; -import { NodeTypeService } from "../../../services/node-type.service"; -import { DisplayInfoService } from "../../../services/display-info.service"; -import { NodeDataType } from "../../../model/node-data-type/node-data-type"; -import { NodeType } from "../../../model/workflow/node-type.enum"; -import { JsPlumbService } from "../../../services/jsplumb.service"; -import { SettingService } from "../../../services/setting.service"; -import { WorkflowUtil } from "../../../util/workflow-util"; - -@Component({ - selector: 'wfm-toolbar-node', - templateUrl: 'toolbar-node.component.html', - styleUrls: ['../toolbar.component.css'] -}) -export class ToolbarNodeComponent implements OnInit { - public nodeCategories: any[] = []; - public nodeTypeEnum = NodeType; - public supportRest: boolean; - - private needInitButton = false; - - constructor(private nodeTypeService: NodeTypeService, - private displayInfoService: DisplayInfoService, - private jsPlumbService: JsPlumbService, - private settingService: SettingService, - public translate: TranslateService) { - - } - - public ngOnInit(): void { - this.settingService.getSetting().subscribe(setting => { - this.initSetting(setting); - this.displayInfoService.getDisplayInfo().subscribe(resp => { - this.initNodeCategories(resp); - this.needInitButton = true; - }); - }); - } - - public ngAfterViewChecked(): void { - if (this.needInitButton) { - console.log('initJsPlumb'); - this.initJsPlumb(); - this.needInitButton = false; - } - } - - private initSetting(setting: any): void { - this.supportRest = setting.supportRestNode; - } - - private initJsPlumb(): void { - this.jsPlumbService.buttonDraggable(); - this.jsPlumbService.buttonDroppable(); - } - - private initNodeCategories(displayInfo: any): void { - const defaultCategory = this.insertDefaultCategory(); - - const categoryData = displayInfo['categoryData'] || {}; - for (let key in categoryData) { - const group = { - id: key, - displayName: categoryData[key].displayName, - collapse: categoryData[key].collapse || false, - nodes: [] - }; - this.nodeCategories.push(group); - } - - const defaultNodes = displayInfo['nodes'] || {}; - for (let nodeId in defaultNodes) { - const nodeType = this.nodeTypeService.getNodeDataTypeById(nodeId); - const node = defaultNodes[nodeId]; - if (node && node.category) { - const nodeCategory = this.nodeCategories.find(category => category.id === node.category); - if (nodeCategory) { - nodeCategory.nodes.push(nodeType); - } else { - defaultCategory.nodes.push(nodeType); - } - } else { - defaultCategory.nodes.push(nodeType); - } - } - } - - private insertDefaultCategory(): any { - this.nodeCategories = []; - const defaultCategory = { - id: 'default', - displayName: { - zh_CN: '任务', - en_US: 'Task' - }, - collapse: true, - nodes: [] - }; - this.nodeCategories.push(defaultCategory); - - return defaultCategory; - } - - public getDisplayName(data: any): string { - let language = 'zh_CN'; - if (this.translate.currentLang.indexOf('en') > -1) { - language = 'en_US'; - } - return data.displayName ? data.displayName[language] : data.id; - } - - public getImageUrl(nodeType: NodeDataType): string { - const name = nodeType && nodeType.icon ? nodeType.icon.name : ''; - return WorkflowUtil.GetIconFullPath(name); - } -} \ 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 deleted file mode 100644 index 6b0d5436..00000000 --- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.css +++ /dev/null @@ -1,69 +0,0 @@ -/** - * 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 img { - width: 24px; - height: 24px; - margin: 4px 13px; - display: block; -} - -.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 deleted file mode 100644 index b8e0ae7a..00000000 --- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.html +++ /dev/null @@ -1,135 +0,0 @@ - - - -
- - - {{ 'WORKFLOW.BPMN_EVENT' | translate }} -
-
- - - - - - {{ 'WORKFLOW.START_EVENT' | translate }} -
-
- - - - - - {{ 'WORKFLOW.END_EVENT' | translate }} -
-
- - - - - - - {{ 'WORKFLOW.TIMER_EVENT' | translate }} -
- -
- -
- - - {{ 'WORKFLOW.BPMN_GETWAY' | translate }} -
-
- - - - - - - {{ 'WORKFLOW.EXCLUSIVE_GATEWAY' | translate }} -
-
- - - - - - - {{ 'WORKFLOW.PARALLEL_GATEWAY' | translate }} -
-
- - -
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 deleted file mode 100644 index bfc45094..00000000 --- a/sdc-workflow-designer-ui/src/app/components/toolbar/toolbar.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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 { SettingService } from '../../services/setting.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: 'wfm-toolbar', - templateUrl: 'toolbar.component.html', - styleUrls: ['./toolbar.component.css'] -}) -export class ToolbarComponent { - -} -- cgit