e505b596fa9e41f57033a5f62ad1abb266b81a41
[appc/cdt.git] / src / app / vnfs / build-artifacts / template-holder / param-name-value / param-name-value.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
9 Unless otherwise specified, all software contained herein is licensed
10 under the Apache License, Version 2.0 (the License);
11 you may not use this software except in compliance with the License.
12 You may obtain a copy of the License at
13
14     http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21
22 ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 ============LICENSE_END============================================
24 -->
25
26 <simple-notifications [options]="options"></simple-notifications>
27 <ngx-spinner bdColor="rgba(51,51,51,0.8)"
28   size="large"
29   color="orange"
30   loadingText="Uploading param file..."
31   type="ball-scale-multiple"></ngx-spinner>
32 <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>
33
34 <tabs>
35     <tab [tabTitle]="'Template Configuration'">
36         <div>
37             <app-golden-configuration [(configMappingEditorContent)]="configMappingEditorContent" [isMappingComp]="true" #mappingComponent>
38             </app-golden-configuration>
39         </div>
40     </tab>
41     <tab [tabTitle]="'Param Values'">
42         <div class="form-group">
43             <div [hidden]="true">
44                 <button type="button" id="modalButton" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="modal.open()">Open me!
45                 </button>
46             </div>
47             <div>
48                 <modal #modal>
49                     <modal-header [show-close]="true">
50                         <h4 class="modal-title">{{title}}</h4>
51                     </modal-header>
52                     <modal-body>
53                         {{message}}
54                     </modal-body>
55                     <modal-footer>
56                         <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" data-dismiss="modal">Close
57                         </button>
58                     </modal-footer>
59                 </modal>
60             </div>
61             <div class="card" style="    margin-bottom: 23px;">
62                 <img class="card-img-top" data-src="holder.js/100%x180/" alt="">
63                 <div class="card-block" style="border-top: 5px solid #6ab344;border-top-right-radius: 7px;border-top-left-radius: 7px;">
64                     <div class="row" style="padding: 15px 25px">
65                         <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
66                             <label>Action</label>
67                             <input class="form-control" type="text" disabled value="{{action}}" />
68                         </div>
69                         <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
70                             <label>Vnf Type</label><input class="form-control" type="text" disabled value="{{vnfType}}" />
71                         </div>
72                         <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
73                             <label>Vnfc Type</label><input class="form-control" type="text" disabled value="{{vnfcType}}" />
74                         </div>
75                         <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
76                             <label>Protocol</label><input class="form-control" type="text" disabled value="{{protocol}}" />
77                         </div>
78                         <div *ngIf="(action === 'ConfigScaleOut')" class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
79                             <label>Template Identifier</label><input class="form-control" type="text" disabled value="{{identifier}}" />
80                         </div>
81                     </div>
82                 </div>
83             </div>
84
85             <div class="col-12">
86                 <div class="input-group">
87                     <input id="inputFile2" class="file" #myInput type='file' (change)='fileChange(myInput)'>
88                     <input type="text" class="input-lg" [(ngModel)]="myfileName" disabled placeholder="Upload Param file from PC" style="width:80%">
89                     <button (click)="browseOption($event)" [disabled]="!enableMappingBrowse" class="browse mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary input-lg">
90                         Upload Param file
91                     </button>
92                 </div>
93             </div>
94
95             <input type="file" id="filesparam" style="visibility:hidden;" class="form-control-file" (change)="fileParamChange(myInputParam)" #myInputParam placeholder="Upload file..." />
96             <div class="row" style="margin-bottom: 20px;">
97                 <div class="col-md-12 text-right">
98                     <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="retrieveNameValueFromAppc()">Retrieve Name/Value from APPC
99                 </button>
100                     <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="syncParam()">Synchronize with name values
101                 </button>
102                 </div>
103             </div>
104         </div>
105         <hr>
106       
107         <div class="col-md-12"></div>
108         <div><label for="textAreaGeneratedTemplate">
109             <div class="mdl-card__title-text">Param Name Value List</div>
110             <div><font size="1">(Please click anywhere on the editor to see the synced name value pairs)</font></div>
111         </label>
112             <ace-editor [(text)]="this.artifactRequest.paramsContent" #templateeditor [theme]="'chrome'" [mode]="'velocity'" (textChanged)="onParamChanges($event)" [options]="{maxLines: 'Infinity', fontSize: '13pt' }" style="min-height: 500px; width: 100%"></ace-editor>
113         </div>
114
115     </tab>
116 </tabs>