| SANDHYA.JS | 219fe61 | 2024-01-23 15:52:43 +0530 | [diff] [blame] | 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">{{ 'HEALING' | 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]="healingForm" (ngSubmit)="manualHealingTrigger()" 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': healingForm.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="memberIndex" [clearable]="false" |
| 36 | placeholder="{{'SELECTMEMBERVNFINDEX' | translate}} *" [items]="memberTypes" bindLabel="id" bindValue="id" |
| 37 | [ngClass]="{ 'is-invalid': submitted && f.memberIndex.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="memberVnfIndex"> {{'DAY1OPERATION' | translate}}</label> |
| 45 | </div> |
| 46 | <div class="col-sm-6"> |
| 47 | <ng-select formControlName="run_day1" [clearable]="false" placeholder="{{'DAY1OPERATION' | translate}}" |
| 48 | [items]="day1Operation" bindLabel="name" bindValue="id"> |
| 49 | </ng-select> |
| 50 | </div> |
| 51 | </div> |
| 52 | <div class="form-group row p-2 bg-light text-white justify-content-end"> |
| 53 | <div class="col-5"> |
| 54 | <button class="button-xs" type="button" class="btn btn-primary" (click)="addVdu()"> |
| 55 | <i class="fas fa-plus-circle"></i>{{'SELECTVDU' | translate}}</button> |
| 56 | </div> |
| 57 | </div> |
| 58 | <ng-container> |
| 59 | <div formArrayName="vdu" *ngFor="let params of getControls(); let i = index;"> |
| 60 | <div class="form-group row" [formGroupName]="i"> |
| 61 | <div class="card bg-light"> |
| 62 | <div class="card-body"> |
| 63 | <div class="form-group row"> |
| 64 | <label class="col-sm-3 col-md-3 col-form-label" for="vduId_{{i}}">{{'VDUID' | |
| 65 | translate}}</label> |
| 66 | <div class="col-sm-8 col-md-8"> |
| 67 | <ng-select (change)="getCountIndex($event.VDU)" |
| 68 | placeholder="{{'SELECT' | translate}}" [items]="vduId" bindLabel="VDU" |
| 69 | bindValue="VDU" formControlName="vduId" id="vduId_{{i}}" |
| 70 | [ngClass]="{ 'is-invalid': submitted && params.controls.vduId.errors }"> |
| 71 | </ng-select> |
| 72 | </div> |
| 73 | <label class="col-sm-3 col-md-3 col-form-label" for="countIndex_{{i}}">{{'COUNTINDEX' | |
| 74 | translate}}</label> |
| 75 | <div class="col-sm-8 col-md-8"> |
| 76 | <ng-select placeholder="{{'SELECT' | translate}}" [items]="countIndex" |
| 77 | bindLabel="count-index" bindValue="count-index" formControlName="countIndex" |
| 78 | id="countIndex_{{i}}" |
| 79 | [ngClass]="{ 'is-invalid': submitted && params.controls.countIndex.errors }"> |
| 80 | </ng-select> |
| 81 | </div> |
| 82 | <label class="col-sm-3 col-md-3 col-form-label" for="runDay1_{{i}}">{{'DAY1OPERATION' | |
| 83 | translate}}</label> |
| 84 | <div class="col-sm-8 col-md-8"> |
| 85 | <ng-select formControlName="runDay1" [clearable]="false" placeholder="{{'DAY1OPERATION' | |
| 86 | translate}}" [items]="day1Operation" bindLabel="name" bindValue="id"> |
| 87 | </ng-select> |
| 88 | </div> |
| 89 | <div class="col-sm-1"> |
| 90 | <button class="button-xs" type="button" class="close" (click)="removeMapping(i)" |
| 91 | placement="right" ngbTooltip="{{ 'CANCEL' | translate }}"> |
| 92 | <i class="fas fa-minus-circle text-danger"></i> |
| 93 | </button> |
| 94 | </div> |
| 95 | </div> |
| 96 | </div> |
| 97 | </div> |
| 98 | </div> |
| 99 | </div> |
| 100 | </ng-container> |
| 101 | </div> |
| 102 | <div class="modal-footer"> |
| 103 | <button type="button" (click)="activeModal.close()" class="btn btn-danger">{{'CANCEL' | translate}}</button> |
| 104 | <button type="submit" class="btn btn-primary">{{'APPLY' | translate }}</button> |
| 105 | </div> |
| 106 | </form> |
| 107 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |