aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/components/property/script-task
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/property/script-task')
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.html30
-rw-r--r--sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.ts51
2 files changed, 0 insertions, 81 deletions
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
deleted file mode 100644
index 26183210..00000000
--- a/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.html
+++ /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
- *******************************************************************************/
--->
-
-<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">
- <input *ngIf='!canChangeFormat' disabled class="form-control" [(ngModel)]="node.scriptFormat" />
- <select *ngIf='canChangeFormat' 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> \ No newline at end of file
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
deleted file mode 100644
index a0f5fd93..00000000
--- a/sdc-workflow-designer-ui/src/app/components/property/script-task/script-task.component.ts
+++ /dev/null
@@ -1,51 +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, Input, OnInit } from '@angular/core';
-
-import { ScriptTask } from "../../../model/workflow/script-task";
-import { NodeTypeService } from '../../../services/node-type.service';
-
-@Component({
- selector: 'wfm-script-task',
- templateUrl: 'script-task.component.html',
-})
-export class ScriptTaskComponent implements OnInit {
- @Input() public node: ScriptTask;
-
- public canChangeFormat = true;
- public scriptOperations = ['JavaScript', 'Groovy'];
-
- constructor(private nodeTypeService: NodeTypeService) { }
-
- public ngOnInit() {
- const nodeDataType = this.nodeTypeService.getNodeDataTypeById(this.node.typeId);
- let scriptFormat = nodeDataType.content.scriptFormat;
- // scriptFormat is not support, reset it as null;
- if (undefined === this.scriptOperations.find(format => format == scriptFormat)) {
- scriptFormat = null;
- }
- // Defined scriptFormat value, use it as default and can not change.
- if (scriptFormat && '' != scriptFormat) {
- this.canChangeFormat = false;
- if (!this.node.scriptFormat || '' == this.node.scriptFormat) {
- this.node.scriptFormat = scriptFormat;
- this.node.script = nodeDataType.content.script;
- }
- } else {
- // Default scriptFormat value should be 'JavaScript'
- if (!this.node.scriptFormat || '' == this.node.scriptFormat) {
- this.node.scriptFormat = 'JavaScript';
- this.node.script = '';
- }
- }
- }
-}