Feature 10911-Vertical scaling of VM instances from OSM
[osm/NG-UI.git] / src / app / utilities / vertical-scaling / VerticalScalingComponent.html
1 <!--
2 Copyright 2020 TATA ELXSI
3
4 Licensed under the Apache License, Version 2.0 (the 'License');
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
17 -->
18 <div class="modal-header">
19 <h4 class="modal-title" id="modal-basic-title"> {{'VERTICALSCALING' | translate}}</h4>
20 <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()">
21 <i class="fas fa-times-circle text-danger"></i>
22 </button>
23 </div>
24 <form [formGroup]="scalingForm" (ngSubmit)="triggerVerticalScaling()" autocomplete="off">
25 <div class="modal-body">
26 <div class="form-group row">
27 <label class="col-sm-12 col-form-label mandatory-label"
28 [ngClass]="{'text-danger': scalingForm.invalid === true && submitted === true}">
29 {{'MANDATORYCHECK' | translate}}
30 </label>
31 <div class="col-sm-6">
32 <label for="memberVnfIndex"> {{'MEMBERVNFINDEX' | translate}} *</label>
33 </div>
34 <div class="col-sm-6">
35 <ng-select (change)="getVdu($event.vnfinstanceId)" formControlName="memberVnfIndex" [clearable]="false"
36 placeholder="{{'SELECTMEMBERVNFINDEX' | translate}}" [items]="memberTypes" bindLabel="id"
37 bindValue="id" [ngClass]="{ 'is-invalid': submitted && f.memberVnfIndex.errors }">
38 </ng-select>
39 <small class="form-text text-muted" *ngIf="selectedvnfId !== ''">vnfd-id : {{ selectedvnfId }}</small>
40 </div>
41 </div>
42 <div class="form-group row">
43 <div class="col-sm-6">
44 <label for="vdu-id"> {{'VDUID' | translate}} *</label>
45 </div>
46 <div class="col-sm-6">
47 <ng-select formControlName="vduId" [clearable]="false"
48 placeholder="{{'SELECT' | translate}} {{'VDUID' | translate}}" [items]="vdu" bindLabel="VDU"
49 bindValue="VDU" [ngClass]="{ 'is-invalid': submitted && f.vduId.errors }">
50 </ng-select>
51 </div>
52 </div>
53 <div class="form-group row">
54 <div class="col-sm-6">
55 <label for="count-index"> {{'COUNTINDEX' | translate}} *</label>
56 </div>
57 <div class="col-sm-6">
58 <ng-select formControlName="countIndex" [clearable]="false"
59 placeholder="{{'SELECT' | translate}} {{'COUNTINDEX' | translate}}" [items]="vdu"
60 bindLabel="count-index" bindValue="count-index"
61 [ngClass]="{ 'is-invalid': submitted && f.countIndex.errors }">
62 </ng-select>
63 </div>
64 </div>
65 <div class="form-group row">
66 <div class="col-sm-6">
67 <label for="memoryMB"> {{'MEMORYMB' | translate}} *</label>
68 </div>
69 <div class="col-sm-6">
70 <input autocomplete="off" class="form-control" placeholder="{{'MEMORYMB' | translate}}" type="text"
71 formControlName="virtualMemory" id="memoryMB"
72 [ngClass]="{ 'is-invalid': submitted && f.virtualMemory.errors }">
73 </div>
74 </div>
75 <div class="form-group row">
76 <div class="col-sm-6">
77 <label for="storageGB"> {{'STORAGEGB' | translate}} *</label>
78 </div>
79 <div class="col-sm-6">
80 <input autocomplete="off" class="form-control" placeholder="{{'STORAGEGB' | translate}}" type="text"
81 formControlName="sizeOfStorage" id="storageGB"
82 [ngClass]="{ 'is-invalid': submitted && f.sizeOfStorage.errors }">
83 </div>
84 </div>
85 <div class="form-group row">
86 <div class="col-sm-6">
87 <label for="vcpucount"> {{'VCPUCOUNT' | translate}} *</label>
88 </div>
89 <div class="col-sm-6">
90 <input autocomplete="off" class="form-control" placeholder="{{'VCPUCOUNT' | translate}}" type="text"
91 formControlName="numVirtualCpu" id="vcpucount"
92 [ngClass]="{ 'is-invalid': submitted && f.numVirtualCpu.errors }">
93 </div>
94 </div>
95 </div>
96 <div class="modal-footer">
97 <button type="button" (click)="activeModal.close()" class="btn btn-danger">{{'CANCEL' | translate}}</button>
98 <button type="submit" class="btn btn-primary">{{'APPLY' | translate }}</button>
99 </div>
100 </form>
101 <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader>