added ansible server functionality
[appc/cdt.git] / src / app / vnfs / build-artifacts / parameter-definitions / parameter.component.html
1 <!--
2 ============LICENSE_START==========================================
3 ===================================================================
4 Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
5 ===================================================================
6 Copyright (C) 2018 IBM.
7 ===================================================================
8 Unless otherwise specified, all software contained herein is licensed
9 under the Apache License, Version 2.0 (the License);
10 you may not use this software except in compliance with the License.
11 You may obtain a copy of the License at
12
13     http://www.apache.org/licenses/LICENSE-2.0
14
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20
21 ============LICENSE_END============================================
22 -->
23
24 <simple-notifications [options]="options"></simple-notifications>
25 <ngx-spinner bdColor="rgba(51,51,51,0.8)"
26   size="large"
27   color="orange"
28   loadingText="Uploading PD file..."
29   type="ball-scale-multiple"></ngx-spinner>
30 <ng-progress [positionUsing]="'marginLeft'" [minimum]="0.15" [maximum]="1" [speed]="200" [showSpinner]="false" [direction]="'leftToRightIncreased'" [color]="'#6ab344'" [trickleSpeed]="250" [thick]="true" [ease]="'linear'"></ng-progress>
31 <div class="card" style="    margin-bottom: 23px;">
32     <img class="card-img-top" data-src="holder.js/100%x180/" alt="">
33     <div class="card-block" style="border-top: 5px solid #6ab344;border-top-right-radius: 7px;border-top-left-radius: 7px;">
34         <div class="row" style="padding: 15px 25px">
35             <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
36                 <label>Action</label>
37                 <input class="form-control" type="text" disabled value="{{action}}" />
38             </div>
39             <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
40                 <label>Vnf Type</label><input class="form-control" type="text" disabled value="{{vnfType}}" />
41             </div>
42             <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12" *ngIf="vnfcType">
43                     <label>Vnfc Type</label>  <label style="font-size:12px;">(NFC Function)</label>
44                     <input class="form-control" type="text" disabled value="{{vnfcType}}" />
45             </div>
46             <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12" *ngIf="!vnfcType">
47                 
48             </div>
49             <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
50                 <label>Protocol</label><input class="form-control" type="text" disabled value="{{protocol}}" />
51             </div>
52             <div *ngIf="(action === 'ConfigScaleOut')" class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
53                 <label>Template Identifier</label><input class="form-control" type="text" disabled value="{{template_id}}" />
54             </div>
55         </div>
56     </div>
57 </div>
58 <div class="row create-wrapper">
59     <div class="col-md-12">
60         <div class="row" style="padding: 5px 5px">
61             <div class="col-12 mb-3">
62                 <div class="input-group">
63                     <input id="inputFile1" class="file" hidden #myInput1 type='file' (change)="fileChange(myInput1, 'pdfile')">
64                     <input [(ngModel)]="myPdFileName" type="text" class="input-lg" disabled placeholder="Upload parameters from PC" style="width:85%;">
65                     <button [disabled]="(undefined == mappingEditorService.latestAction)" (click)="browsePdFile($event)" class="browse mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary input-lg" type="button"> UPLOAD PD FILE
66                     </button>
67                 </div>
68             </div>
69             <div class="col-12">
70                 <div class="input-group">
71                     <input id="inputFile2" class="file" hidden #myInput2 type='file' (change)="fileChange(myInput2, 'keyfile')">
72                     <input [(ngModel)]="myKeyFileName" type="text" class="input-lg" disabled placeholder="Upload key file from PC. You can upload a key file only if you have some parameters." style="width:85%;">
73                     <button [disabled]="(!(undefined !== displayParamObjects && displayParamObjects.length>0))" (click)="browseKeyFile($event)" class="browse mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary input-lg" type="button">UPLOAD KEY FILE
74                     </button>
75                 </div>
76             </div>
77         </div>
78     </div>
79     <br>
80     <hr>
81     <!--h4>testing{{initialData}}</h4-->
82     <div *ngIf="((undefined !== displayParamObjects && displayParamObjects.length>0)   ) " class="col-md-12 ">
83         <form *ngIf="undefined !== displayParamObjects" class="form-inline" novalidate #paramForm="ngForm" (ngSubmit)="saveChanges('download', paramForm.valid)">
84
85             <div style="height: 210px; overflow: auto;">
86                 <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
87                     <thead>
88                         <tr>
89                             <th class="mdl-data-table__cell--non-numeric">NAME</th>
90                             <th class="mdl-data-table__cell--non-numeric">DESCRIPTION</th>
91                             <th class="mdl-data-table__cell--non-numeric">TYPE</th>
92                             <th class="mdl-data-table__cell--non-numeric">REQUIRED</th>
93                             <th class="mdl-data-table__cell--non-numeric">DEFAULT</th>
94                             <th class="mdl-data-table__cell--non-numeric">SOURCE</th>
95                             <th class="mdl-data-table__cell--non-numeric">RULETYPE</th>
96                             <th class="mdl-data-table__cell--non-numeric">FILTER BY FIELD</th>
97                             <th class="mdl-data-table__cell--non-numeric">FILTER BY VALUE</th>
98                             <th class="mdl-data-table__cell--non-numeric">RESPKEY NAME</th>
99                             <th class="mdl-data-table__cell--non-numeric">RESPKEY VALUE</th>
100                             <th class="mdl-data-table__cell--non-numeric">RESPKEY NAME</th>
101                             <th class="mdl-data-table__cell--non-numeric">RESPKEY VALUE</th>
102                             <th class="mdl-data-table__cell--non-numeric">RESPKEY NAME</th>
103                             <th class="mdl-data-table__cell--non-numeric">RESPKEY VALUE</th>
104                             <th class="mdl-data-table__cell--non-numeric">REQKEY NAME</th>
105                             <th class="mdl-data-table__cell--non-numeric">REQKEY VALUE</th>
106                             <th class="mdl-data-table__cell--non-numeric">REQKEY NAME</th>
107                             <th class="mdl-data-table__cell--non-numeric">REQKEY VALUE</th>
108                             <th class="mdl-data-table__cell--non-numeric">REQKEY NAME</th>
109                             <th class="mdl-data-table__cell--non-numeric">REQKEY VALUE</th>
110                         </tr>
111                     </thead>
112                     <tbody>
113                         <tr *ngFor="let obj of displayParamObjects; let i = index">
114                             <td class="mdl-data-table__cell--non-numeric">
115                                 <input required id="id1" [(ngModel)]="obj.name" #objName="ngModel" name="objName{{i}}" style="width:300px">
116                                 <span class="error-message" [hidden]="objName.valid || (objName.pristine && !paramForm.submitted)">Required Field</span>
117                             </td>
118                             <td class="mdl-data-table__cell--non-numeric"><input [(ngModel)]="obj.description" #objDesc="ngModel" name="objDesc{{i}}">
119                             </td>
120                             <td class="mdl-data-table__cell--non-numeric">
121                                 <select id="id3" [(ngModel)]="obj.type" name="{{'objType'+i}}">
122                                 <option *ngFor="let typ of typeValues"
123                                         [value]="typ"
124                                         [selected]="obj.type === typ"
125                                 >
126                                     {{typ}}
127                                 </option>
128                             </select>
129                             </td>
130                             <td class="mdl-data-table__cell--non-numeric">
131                                 <select [(ngModel)]="obj.required" #objRequired="ngModel" name="{{'objRequired'+i}}">
132                                 <option *ngFor="let req of requiredValues"
133                                         [value]="req"
134                                         [selected]="req === obj.required"
135                                 >
136                                     {{req}}
137                                 </option>
138                             </select>
139                             </td>
140                             <td class="mdl-data-table__cell--non-numeric"><input id="id1" [(ngModel)]="obj.default" #objDefault="ngModel" name="objDefault{{i}}"></td>
141                             <td class="mdl-data-table__cell--non-numeric">
142                                 <select class="form-control" required id="id3" [(ngModel)]="obj.source" #objSource="ngModel" (ngModelChange)="sourceChanged($event,obj)" name="{{'objSource'+i}}">
143                                 <option *ngFor="let src of sourceValues"
144                                         [value]="src"
145                                         [selected]="src === obj.source"
146                                         [disabled]="(obj.name == 'NodeList-DD' && src != 'DataDictionary')||(obj.name == 'vnfName-DD' && src == 'DataDictionary')||(obj.name != 'NodeList-DD' && obj.name != 'vnfName-DD' && src == 'INSTAR')">
147                                     {{src}}
148                                 </option>
149
150                             </select>
151                                 <span class="error-message" [hidden]="objSource.valid || (objSource.pristine && !paramForm.submitted)">Required Field</span>
152                             </td>
153
154                             <td class="mdl-data-table__cell--non-numeric">
155                                 <select (ngModelChange)="ruleTypeChanged($event,obj)" class="form-control" id="id4" [(ngModel)]="obj['rule-type']" #objRuleType="ngModel" name="objRuleType{{i}}" list="ruleTypes">
156                                 <option *ngFor="let rTyp of obj.ruleTypeValues;" [value]="rTyp"
157                                         [selected]="rTyp === obj.rule-type">
158                                     {{rTyp}}
159                                 </option>
160                             </select>
161                             </td>
162
163                             <td>
164                                 <select *ngIf="obj.showFilterFields" (ngModelChange)="filetrByFieldChanged($event,obj)" class="form-control" id="id4" [(ngModel)]="obj['response-keys'][3]['key-value']" #objfilterByField="ngModel" name="filterByField{{i}}" list="ruleTypes">
165                                 <option *ngFor="let fTyp of filterByFieldvalues;" [value]="fTyp"
166                                         [selected]="fTyp === obj['response-keys'][3]['key-value']">
167                                     {{fTyp}}
168                                 </option>
169                             </select>
170                             </td>
171                             <td>
172                                 <input *ngIf="obj.showFilterFields" [disabled]="!(obj.enableFilterByValue)" type="text" [value]="obj['response-keys'][4]['key-value']" class="form-control" id="id4" [(ngModel)]="obj['response-keys'][4]['key-value']" #objfilterByValue="ngModel" name="objfilterByValue{{i}}"
173                                     list="ruleTypes">
174                             </td>
175
176                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][0]['key-name']}}
177
178                             </td>
179                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][0]['key-value']}}
180
181                             </td>
182                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][1]['key-name']}}
183
184                             </td>
185                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][1]['key-value']}}
186
187                             </td>
188                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][2]['key-name']}}
189
190                             </td>
191                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][2]['key-value']}}
192
193                             </td>
194
195                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][0]['key-name']}}
196
197                             </td>
198                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][0]['key-value']}}
199
200                             </td>
201                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][1]['key-name']}}
202
203                             </td>
204                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][1]['key-value']}}
205
206                             </td>
207                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][2]['key-name']}}
208
209                             </td>
210                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][2]['key-value']}}
211
212                             </td>
213                         </tr>
214                     </tbody>
215                 </table>
216                 `
217             </div>
218
219         </form>
220     </div>
221 </div>