aboutsummaryrefslogtreecommitdiffstats
path: root/deprecated-workflow-designer/sdc-workflow-designer-ui/src/app/components/parameter/parameter.component.html
blob: 1b91b426973c08a22eaac6c1df44d9dc91d80cce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!--
/**
 * 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 *ngIf="param.show" class="parameter">
    <div *ngIf="currentShowLabel" class="parameter-section">
        <label *ngIf="true === param.required" class="parameter-required">*</label>
        <input *ngIf="currentCanEditName" class="parameter-label plx-input" type="text" [ngModel]="param.name" (ngModelChange)="keyChange($event)">
        <label *ngIf="!currentCanEditName" class="parameter-label">{{param.name}}</label>
    </div>
    <div *ngIf="currentShowValue" class="parameter-section">
        <div *ngIf="showValueValue" class="parameter-item">
            <div [ngSwitch]="param.valueSource" class="parameter-item">
                <input *ngSwitchCase="valueTypeEnum[valueTypeEnum.number]" class="parameter-value plx-input" type="text" [ngModel]="param.value"
                    (ngModelChange)="valueChange($event)" [disabled]="!currentCanEditValue">
                <select *ngSwitchCase="valueTypeEnum[valueTypeEnum.boolean]" class="parameter-value" type="text" [ngModel]="param.value"
                    (ngModelChange)="valueChange($event)" [disabled]="!currentCanEditValue">
                    <option>true</option>
                    <option>false</option>
                </select>
                <tree-select *ngSwitchCase="valueSourceEnum[valueSourceEnum.Plan]" name="simpleSelect" [items]="planOptions" childrenField="children"
                    #simpleSelect="ngModel" class="parameter-value" [ngModel]="planValue" (ngModelChange)="valueChange($event)"
                    [disabled]="!currentCanEditValue"></tree-select>
                <select *ngSwitchCase="valueSourceEnum[valueSourceEnum.Topology]" class="parameter-value" type="text" [ngModel]="param.value"
                    (ngModelChange)="valueChange($event)" [disabled]="!currentCanEditValue">
                    <option *ngFor="let topology of topologyOptions" value="{{topology.value}}">{{topology.name}}
                    </option>
                </select>
                <!--string, Variable-->
                <input *ngSwitchDefault class="parameter-value plx-input" type="text" [ngModel]="param.value" (ngModelChange)="valueChange($event)"
                    [disabled]="!currentCanEditValue">
            </div>
        </div>
        <select *ngIf="showValueSource" class="parameter-item" style="width:auto;" type="text" [ngModel]="param.valueSource" (ngModelChange)="valueSourceChange($event)"
            [disabled]="!currentCanEditValue">
            <option *ngFor="let sourceItem of sourceItems" value="{{sourceItem.value}}">
                {{sourceItem.name}}
            </option>
        </select>
    </div>
    <div *ngIf="currentCanInsert" class="parameter-section">
        <button type="button" class="plx-btn plx-btn-primary" (click)="insertParam()">
            <i class="fa fa-plus"></i>
        </button>
    </div>
    <div *ngIf="currentCanDelete" class="parameter-section">
        <button type="button" class="plx-btn plx-btn-error" (click)="deleteParam()">
            <i class="fa fa-minus"></i>
        </button>
    </div>
</div>