65f3b6a0e0a859aa0d54fa49def965fa79322995
[appc/cdt.git] / src / app / vnfs / build-artifacts / template-holder / template-configuration / template-configuration.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 ============LICENSE_END============================================
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 template 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>
32     <div>
33         <div class="card" style="margin-bottom: 23px;">
34             <img class="card-img-top" data-src="holder.js/100%x180/" alt="">
35             <div class="card-block" style="border-top: 5px solid #6ab344;border-top-right-radius: 7px;border-top-left-radius: 7px;">
36                 <div class="row" style="padding: 15px 25px">
37                     <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
38                         <label>Action</label>
39                         <input class="form-control" type="text" disabled value="{{action}}" />
40                     </div>
41                     <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
42                         <label>Vnf Type</label><input class="form-control" type="text" disabled value="{{vnfType}}" />
43                     </div>
44                     <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
45                         <label>Vnfc Type</label><input class="form-control" type="text" disabled value="{{vnfcType}}" />
46                     </div>
47                     <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
48                         <label>Protocol</label><input class="form-control" type="text" disabled value="{{protocol}}" />
49                     </div>
50                     <div *ngIf="(action === 'ConfigScaleOut')" class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
51                         <label>Template Identifier</label><input class="form-control" type="text" [(ngModel)]="identifier" disabled />
52
53                     </div>
54                 </div>
55             </div>
56         </div>
57
58         <div class="col-12">
59             <div class="input-group">
60                 <input id="inputFile" class="file" #myInput type='file' (change)='fileChange(myInput)'>
61                 <input [(ngModel)]="fileName" type="text" class="input-lg" disabled placeholder="Upload template from PC" style="width:80%">
62                 <button (click)="browseOption($event)" [disabled]="!enableBrowse" class="browse mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary input-lg" type="button">Upload Template File
63                 </button>
64             </div>
65         </div>
66
67         <br>
68         <div class="row" style="margin-bottom: 20px;">
69             <div class="col-md-12 text-right">
70                 <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="syncTemplate()">Synchronize Template Parameters
71                 </button>
72                 <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="mergeParams()"> Merge from Param
73                 </button>
74             </div>
75         </div>
76     </div>
77     <hr>
78     <div><label for="textAreaGeneratedTemplate">
79         <div class="mdl-card__title-text">File Editor</div>
80     </label>
81         <ace-editor [(text)]="configMappingEditorContent" #templateeditor [theme]="'chrome'" [mode]="'velocity'" [options]="{maxLines: 'Infinity', fontSize: '13pt' }" style="min-height: 500px; width: 100%"></ace-editor>
82     </div>
83     <app-modal [title]="'Confirmation'" [isShow]="false" [message]="'Template is saved and ready for creating parameter definition'" #modalComponent>
84     </app-modal>
85     <modal #myModal>
86         <modal-header style="height:65px">
87             <h4 class="modal-title" style="position:absolute;">Enter Name for <b>"{{selectedWord}}"</b></h4>
88             <button type="button" class="close" aria-label="Close" (click)="modal.close()" style="margin-left:auto">
89                 <span aria-hidden="true">&times;</span>
90             </button>
91             
92         </modal-header>
93         <modal-body>
94             <div class="form-group row">
95                 <label for="example-text-input" class="col-12 col-form-label">Name</label>
96                 <div class="col-12">
97                     <input class="form-control" [(ngModel)]="tempName" name="templateName" type="text" id="tempName">
98                     <span class="error-message" [hidden]="checkNameEntered" style="color: red;">Required Field</span>
99                 </div>
100             </div>
101         </modal-body>
102         <modal-footer [show-default-buttons]="false">
103             <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="submitNameValues()">Submit
104             </button>
105             <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent
106     
107     " (click)="modal.close()">Cancel</button>
108         </modal-footer>
109     </modal>