| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +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: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | --> |
| 18 | <form [formGroup]="packagesForm" (ngSubmit)="createPackages()" autocomplete="off"> |
| 19 | <div class="modal-header"> |
| SANDHYA.JS | 07decc0 | 2024-07-01 21:50:48 +0530 | [diff] [blame^] | 20 | <h4 class="modal-title" *ngIf="!template" id="modal-basic-title">{{'CREATEPACKAGE' | translate}}</h4> |
| 21 | <h4 class="modal-title" *ngIf="params.page === 'ns-config-template'" id="modal-basic-title"> |
| 22 | {{'PAGE.NSCONFIGTEMPLATE.CREATENSCONFIGTEMPLATE' | translate}}</h4> |
| 23 | <h4 class="modal-title" *ngIf="params.page === 'ns-config-template-edit'" id="modal-basic-title"> |
| 24 | {{'PAGE.NSCONFIGTEMPLATE.EDITNSCONFIGTEMPLATE' | translate}}</h4> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 25 | <button class="button-xs" type="button" class="close" (click)="activeModal.close()"> |
| 26 | <i class="fas fa-times-circle text-danger"></i> |
| 27 | </button> |
| 28 | </div> |
| 29 | <div class="modal-body"> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 30 | <div class="form-group row mb-3"> |
| SANDHYA.JS | 07decc0 | 2024-07-01 21:50:48 +0530 | [diff] [blame^] | 31 | <label class="col-sm-12 col-form-label mandatory-label" |
| 32 | [ngClass]="{'text-danger': packagesForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' | |
| 33 | translate}}</label> |
| 34 | <label class="col-sm-6 col-form-label" *ngIf="!template else configtemplate">{{'PACKAGE' | translate}} {{'NAME' | translate}}*</label> |
| 35 | <ng-template #configtemplate> |
| 36 | <label class="col-sm-6 col-form-label">{{'NAME' | translate}}*</label> |
| 37 | </ng-template> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 38 | <div class="col-sm-6"> |
| SANDHYA.JS | 07decc0 | 2024-07-01 21:50:48 +0530 | [diff] [blame^] | 39 | <input type="text" class="form-control" placeholder="{{'NAME' | translate}}" formControlName="name" id="name" |
| 40 | [ngClass]="{ 'is-invalid': submitted && f.name.errors }" required> |
| 41 | </div> |
| 42 | </div> |
| 43 | <div class="form-group row mb-3" *ngIf="template"> |
| 44 | <label class="col-sm-6 col-form-label">{{'NSD' | translate}} {{'NAME' | translate}}*</label> |
| 45 | <div class="col-sm-6"> |
| 46 | <ng-select formControlName="nsdId" id="nsd" [items]="nsdDetails" |
| 47 | placeholder="{{'SELECT' | translate}} {{'NSDNAME' | translate}}" bindLabel="nsName" bindValue="nsName" |
| 48 | [ngClass]="{ 'is-invalid': submitted && f.nsdId.errors }"> |
| 49 | </ng-select> |
| 50 | </div> |
| 51 | </div> |
| 52 | <div class="form-group row mb-3" *ngIf="template"> |
| 53 | <label class="col-sm-6 col-form-label">{{'CONFIG' | translate}}*</label> |
| 54 | <div class="col-sm-6"> |
| 55 | <textarea rows="10" cols="50" class="form-control" placeholder="{{'YAMLCONFIG' | translate}}" |
| 56 | formControlName="config" id="config"></textarea> |
| 57 | <div class="fileupload-text mt-1 mb-1">{{'FILEUPLOADLABEL' | translate}}</div> |
| 58 | <div class="custom-file"> |
| 59 | <input type="file" #fileInputConfig class="fileupload custom-file-input" |
| 60 | (change)="configFile($event.target.files)" id="customConfigFile"> |
| 61 | </div> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 62 | </div> |
| 63 | </div> |
| 64 | </div> |
| 65 | <div class="modal-footer"> |
| 66 | <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button> |
| 67 | <button type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button> |
| SANDHYA.JS | 07decc0 | 2024-07-01 21:50:48 +0530 | [diff] [blame^] | 68 | <button *ngIf="params.page === 'ns-config-template-edit'" type="submit" class="btn btn-primary">{{'EDIT' | |
| 69 | translate}}</button> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 70 | </div> |
| 71 | </form> |
| 72 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |