add new action configscalein for cdt
[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" *ngIf="vnfcType">
45                             <label>Vnfc Type</label>  <label style="font-size:12px;">(NFC Function)</label>
46                             <input class="form-control" type="text" disabled value="{{vnfcType}}" />
47                     </div>
48                     <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12" *ngIf="!vnfcType">
49                 
50                     </div>
51                     <div class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
52                         <label>Protocol</label><input class="form-control" type="text" disabled value="{{protocol}}" />
53                     </div>
54                     <div *ngIf="(action === 'ConfigScaleOut')" class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
55                         <label>Template Identifier</label><input class="form-control" type="text" [(ngModel)]="identifier" disabled />
56                     </div>
57                     <div *ngIf="(action === 'ConfigScaleIn')" class="col-lg-3 col-sm-6 col-md-3 col-xs-12">
58                         <label>Template Identifier</label><input class="form-control" type="text" [(ngModel)]="identifier" disabled />
59                     </div>
60                 </div>
61             </div>
62         </div>
63
64         <div class="col-12">
65             <div class="input-group">
66                 <input id="inputFile" class="file" #myInput type='file' (change)='fileChange(myInput)'>
67                 <input [(ngModel)]="fileName" type="text" class="input-lg" disabled placeholder="Upload template from PC" style="width:80%">
68                 <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"
69                     type="button">Upload Template File
70                 </button>
71             </div>
72         </div>
73
74         <br>
75         <div class="row" style="margin-bottom: 20px;">
76             <div class="col-md-12 text-right">
77                 <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="syncTemplate(0)">Synchronize Template Parameters
78                 </button>
79                 <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="mergeParams()"> Merge from Param
80                 </button>
81             </div>
82         </div>
83     </div>
84     <hr>
85     <div><label for="textAreaGeneratedTemplate">
86         <div class="mdl-card__title-text">File Editor</div>
87     </label>
88         <!-- <ace-editor [(text)]="configMappingEditorContent" #templateeditor [theme]="'chrome'" [mode]="'velocity'" [options]="{maxLines: 'Infinity', fontSize: '13pt'}"
89             style="min-height: 500px; width: fit-content;scroll-snap-coordinate: 3%"></ace-editor> -->
90         <ace-editor [(text)]="configMappingEditorContent" #templateeditor [theme]="'chrome'" [mode]="'velocity'" [options]="{maxLines: '100', fontSize: '13pt' }"
91             style="min-height: 200px; width: 100%; caret-color: white "></ace-editor>
92     </div>
93
94     <modal #myModal>
95         <modal-header [show-close]="true">
96             <h4 class="modal-title">Enter Name for <b>"{{selectedWord}}"</b></h4>
97         </modal-header>
98         <modal-body>
99             <div class="form-group row">
100                 <label for="example-text-input" class="col-12 col-form-label">Name</label>
101                 <div class="col-12">
102                     <input class="form-control" [(ngModel)]="tempName" name="templateName" type="text" id="tempName">
103                     <span class="error-message" [hidden]="checkNameEntered" style="color: red;">Required Field</span>
104                     <span class="error-message" [hidden]="checkSpace" style="color: red;">Name can't start or end with space(s)</span>
105                 </div>
106             </div>
107         </modal-body>
108         <modal-footer [show-default-buttons]="false">
109             <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent
110                     
111                    " (click)="modal.close();checkNameEntered=true;checkSpace=true;tempName=''">Cancel</button>
112             <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="submitNameValues()">Submit
113             </button>
114
115         </modal-footer>
116     </modal>