remove upload key file button
[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>
70     </div>
71     <br>
72     <hr>
73     <!--h4>testing{{initialData}}</h4-->
74     <div *ngIf="((undefined !== displayParamObjects && displayParamObjects.length>0)   ) " class="col-md-12 ">
75         <form *ngIf="undefined !== displayParamObjects" class="form-inline" novalidate #paramForm="ngForm" (ngSubmit)="saveChanges('download', paramForm.valid)">
76
77             <div style="height: 210px; overflow: auto;">
78                 <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
79                     <thead>
80                         <tr>
81                             <th class="mdl-data-table__cell--non-numeric">NAME</th>
82                             <th class="mdl-data-table__cell--non-numeric">DESCRIPTION</th>
83                             <th class="mdl-data-table__cell--non-numeric">TYPE</th>
84                             <th class="mdl-data-table__cell--non-numeric">REQUIRED</th>
85                             <th class="mdl-data-table__cell--non-numeric">DEFAULT</th>
86                             <th class="mdl-data-table__cell--non-numeric">SOURCE</th>
87                             <th class="mdl-data-table__cell--non-numeric">RULETYPE</th>
88                             <th class="mdl-data-table__cell--non-numeric">FILTER BY FIELD</th>
89                             <th class="mdl-data-table__cell--non-numeric">FILTER BY VALUE</th>
90                             <th class="mdl-data-table__cell--non-numeric">RESPKEY NAME</th>
91                             <th class="mdl-data-table__cell--non-numeric">RESPKEY VALUE</th>
92                             <th class="mdl-data-table__cell--non-numeric">RESPKEY NAME</th>
93                             <th class="mdl-data-table__cell--non-numeric">RESPKEY VALUE</th>
94                             <th class="mdl-data-table__cell--non-numeric">RESPKEY NAME</th>
95                             <th class="mdl-data-table__cell--non-numeric">RESPKEY VALUE</th>
96                             <th class="mdl-data-table__cell--non-numeric">REQKEY NAME</th>
97                             <th class="mdl-data-table__cell--non-numeric">REQKEY VALUE</th>
98                             <th class="mdl-data-table__cell--non-numeric">REQKEY NAME</th>
99                             <th class="mdl-data-table__cell--non-numeric">REQKEY VALUE</th>
100                             <th class="mdl-data-table__cell--non-numeric">REQKEY NAME</th>
101                             <th class="mdl-data-table__cell--non-numeric">REQKEY VALUE</th>
102                         </tr>
103                     </thead>
104                     <tbody>
105                         <tr *ngFor="let obj of displayParamObjects; let i = index">
106                             <td class="mdl-data-table__cell--non-numeric">
107                                 <input required id="id1" [(ngModel)]="obj.name" #objName="ngModel" name="objName{{i}}" style="width:300px">
108                                 <span class="error-message" [hidden]="objName.valid || (objName.pristine && !paramForm.submitted)">Required Field</span>
109                             </td>
110                             <td class="mdl-data-table__cell--non-numeric"><input [(ngModel)]="obj.description" #objDesc="ngModel" name="objDesc{{i}}">
111                             </td>
112                             <td class="mdl-data-table__cell--non-numeric">
113                                 <select id="id3" [(ngModel)]="obj.type" name="{{'objType'+i}}">
114                                 <option *ngFor="let typ of typeValues"
115                                         [value]="typ"
116                                         [selected]="obj.type === typ"
117                                 >
118                                     {{typ}}
119                                 </option>
120                             </select>
121                             </td>
122                             <td class="mdl-data-table__cell--non-numeric">
123                                 <select [(ngModel)]="obj.required" #objRequired="ngModel" name="{{'objRequired'+i}}">
124                                 <option *ngFor="let req of requiredValues"
125                                         [value]="req"
126                                         [selected]="req === obj.required"
127                                 >
128                                     {{req}}
129                                 </option>
130                             </select>
131                             </td>
132                             <td class="mdl-data-table__cell--non-numeric"><input id="id1" [(ngModel)]="obj.default" #objDefault="ngModel" name="objDefault{{i}}"></td>
133                             <td class="mdl-data-table__cell--non-numeric">
134                                 <select class="form-control" required id="id3" [(ngModel)]="obj.source" #objSource="ngModel" (ngModelChange)="sourceChanged($event,obj)" name="{{'objSource'+i}}">
135                                 <option *ngFor="let src of sourceValues"
136                                         [value]="src"
137                                         [selected]="src === obj.source"
138                                         [disabled]="(obj.name == 'NodeList-DD' && src != 'DataDictionary')||(obj.name == 'vnfName-DD' && src == 'DataDictionary')||(obj.name != 'NodeList-DD' && obj.name != 'vnfName-DD' && src == 'INSTAR')">
139                                     {{src}}
140                                 </option>
141
142                             </select>
143                                 <span class="error-message" [hidden]="objSource.valid || (objSource.pristine && !paramForm.submitted)">Required Field</span>
144                             </td>
145
146                             <td class="mdl-data-table__cell--non-numeric">
147                                 <select (ngModelChange)="ruleTypeChanged($event,obj)" class="form-control" id="id4" [(ngModel)]="obj['rule-type']" #objRuleType="ngModel" name="objRuleType{{i}}" list="ruleTypes">
148                                 <option *ngFor="let rTyp of obj.ruleTypeValues;" [value]="rTyp"
149                                         [selected]="rTyp === obj.rule-type">
150                                     {{rTyp}}
151                                 </option>
152                             </select>
153                             </td>
154
155                             <td>
156                                 <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">
157                                 <option *ngFor="let fTyp of filterByFieldvalues;" [value]="fTyp"
158                                         [selected]="fTyp === obj['response-keys'][3]['key-value']">
159                                     {{fTyp}}
160                                 </option>
161                             </select>
162                             </td>
163                             <td>
164                                 <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}}"
165                                     list="ruleTypes">
166                             </td>
167
168                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][0]['key-name']}}
169
170                             </td>
171                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][0]['key-value']}}
172
173                             </td>
174                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][1]['key-name']}}
175
176                             </td>
177                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][1]['key-value']}}
178
179                             </td>
180                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][2]['key-name']}}
181
182                             </td>
183                             <td class="mdl-data-table__cell--non-numeric">{{obj['response-keys'][2]['key-value']}}
184
185                             </td>
186
187                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][0]['key-name']}}
188
189                             </td>
190                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][0]['key-value']}}
191
192                             </td>
193                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][1]['key-name']}}
194
195                             </td>
196                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][1]['key-value']}}
197
198                             </td>
199                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][2]['key-name']}}
200
201                             </td>
202                             <td class="mdl-data-table__cell--non-numeric">{{obj['request-keys'][2]['key-value']}}
203
204                             </td>
205                         </tr>
206                     </tbody>
207                 </table>
208                 `
209             </div>
210
211         </form>
212     </div>
213 </div>