1b91b426973c08a22eaac6c1df44d9dc91d80cce
[sdc/sdc-workflow-designer.git] /
1 <!--
2 /**
3  * Copyright (c) 2017 ZTE Corporation.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * and the Apache License 2.0 which both accompany this distribution,
7  * and are available at http://www.eclipse.org/legal/epl-v10.html
8  * and http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Contributors:
11  *     ZTE - initial API and implementation and/or initial documentation
12  */
13 -->
14
15 <div *ngIf="param.show" class="parameter">
16     <div *ngIf="currentShowLabel" class="parameter-section">
17         <label *ngIf="true === param.required" class="parameter-required">*</label>
18         <input *ngIf="currentCanEditName" class="parameter-label plx-input" type="text" [ngModel]="param.name" (ngModelChange)="keyChange($event)">
19         <label *ngIf="!currentCanEditName" class="parameter-label">{{param.name}}</label>
20     </div>
21     <div *ngIf="currentShowValue" class="parameter-section">
22         <div *ngIf="showValueValue" class="parameter-item">
23             <div [ngSwitch]="param.valueSource" class="parameter-item">
24                 <input *ngSwitchCase="valueTypeEnum[valueTypeEnum.number]" class="parameter-value plx-input" type="text" [ngModel]="param.value"
25                     (ngModelChange)="valueChange($event)" [disabled]="!currentCanEditValue">
26                 <select *ngSwitchCase="valueTypeEnum[valueTypeEnum.boolean]" class="parameter-value" type="text" [ngModel]="param.value"
27                     (ngModelChange)="valueChange($event)" [disabled]="!currentCanEditValue">
28                     <option>true</option>
29                     <option>false</option>
30                 </select>
31                 <tree-select *ngSwitchCase="valueSourceEnum[valueSourceEnum.Plan]" name="simpleSelect" [items]="planOptions" childrenField="children"
32                     #simpleSelect="ngModel" class="parameter-value" [ngModel]="planValue" (ngModelChange)="valueChange($event)"
33                     [disabled]="!currentCanEditValue"></tree-select>
34                 <select *ngSwitchCase="valueSourceEnum[valueSourceEnum.Topology]" class="parameter-value" type="text" [ngModel]="param.value"
35                     (ngModelChange)="valueChange($event)" [disabled]="!currentCanEditValue">
36                     <option *ngFor="let topology of topologyOptions" value="{{topology.value}}">{{topology.name}}
37                     </option>
38                 </select>
39                 <!--string, Variable-->
40                 <input *ngSwitchDefault class="parameter-value plx-input" type="text" [ngModel]="param.value" (ngModelChange)="valueChange($event)"
41                     [disabled]="!currentCanEditValue">
42             </div>
43         </div>
44         <select *ngIf="showValueSource" class="parameter-item" style="width:auto;" type="text" [ngModel]="param.valueSource" (ngModelChange)="valueSourceChange($event)"
45             [disabled]="!currentCanEditValue">
46             <option *ngFor="let sourceItem of sourceItems" value="{{sourceItem.value}}">
47                 {{sourceItem.name}}
48             </option>
49         </select>
50     </div>
51     <div *ngIf="currentCanInsert" class="parameter-section">
52         <button type="button" class="plx-btn plx-btn-primary" (click)="insertParam()">
53             <i class="fa fa-plus"></i>
54         </button>
55     </div>
56     <div *ngIf="currentCanDelete" class="parameter-section">
57         <button type="button" class="plx-btn plx-btn-error" (click)="deleteParam()">
58             <i class="fa fa-minus"></i>
59         </button>
60     </div>
61 </div>