| 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]="k8sclusterForm" (ngSubmit)="k8sAddClusterSubmit();"> |
| 19 | <div class="modal-header"> |
| 20 | <h4 class="modal-title" id="modal-basic-title">{{'PAGE.K8S.NEWK8SCLUSTER' | translate}}</h4> |
| 21 | <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()"> |
| 22 | <i class="fas fa-times-circle text-danger"></i> |
| 23 | </button> |
| 24 | </div> |
| 25 | <div class="modal-body modal-body-custom-height"> |
| 26 | <div class="form-group row"> |
| 27 | <label class="col-sm-12 col-form-label mandatory-label" |
| 28 | [ngClass]="{'text-danger': k8sclusterForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' | translate}}</label> |
| 29 | <label class="col-sm-4 col-form-label" for="name">{{'PAGE.K8S.NAME' | translate}}*</label> |
| 30 | <div class="col-sm-8"> |
| 31 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NAME' | translate}}" type="text" |
| 32 | formControlName="name" id="name" [ngClass]="{ 'is-invalid': submitted && f.name.errors }" required> |
| 33 | </div> |
| 34 | </div> |
| 35 | <div class="form-group row"> |
| 36 | <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.K8SVERSION' | translate}}*</label> |
| 37 | <div class="col-sm-8"> |
| 38 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.K8SVERSION' | translate}}" type="text" |
| 39 | formControlName="k8s_version" id="k8s_version" [ngClass]="{ 'is-invalid': submitted && f.k8s_version.errors }" |
| 40 | required> |
| 41 | </div> |
| 42 | </div> |
| 43 | <div class="form-group row"> |
| 44 | <label class="col-sm-4 col-form-label" for="vim_account">{{'PAGE.K8S.VIMACCOUNT' | translate}}*</label> |
| 45 | <div class="col-sm-8"> |
| 46 | <ng-select placeholder="{{'SELECT' | translate}} {{'PAGE.K8S.VIMACCOUNT' | translate}}" |
| 47 | [items]="vimAccountSelect" bindLabel="name" bindValue="_id" formControlName="vim_account" id="vimAccountId" |
| 48 | [ngClass]="{ 'is-invalid': submitted && f.vim_account.errors }" required> |
| 49 | </ng-select> |
| 50 | </div> |
| 51 | </div> |
| 52 | <div class="form-group row"> |
| bacigalupo | f633dbf | 2022-03-25 17:24:56 +0000 | [diff] [blame] | 53 | <label class="col-sm-4 col-form-label" for="deployment_methods">{{'PAGE.K8S.DEPLOYMENTMETHODS' | translate}}*</label> |
| 54 | <div class="col-sm-8"> |
| 55 | <ng-select placeholder="{{'SELECT' | translate}} {{'PAGE.K8S.DEPLOYMENTMETHODS' | translate}}" |
| 56 | multiple="true" |
| 57 | [items]="deploymentMethodsSelect" bindLabel="title" bindValue="value" formControlName="deployment_methods" id="deploymentMethodsId" |
| 58 | [ngClass]="{ 'is-invalid': submitted && f.deployment_methods.errors }" |
| 59 | [(ngModel)]="selectedDeploymentMethods" |
| 60 | required> |
| 61 | </ng-select> |
| 62 | </div> |
| 63 | </div> |
| 64 | <div class="form-group row"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 65 | <label class="col-sm-4 col-form-label" for="description">{{'PAGE.K8S.DESCRIPTION' | translate}}*</label> |
| 66 | <div class="col-sm-8"> |
| 67 | <textarea class="form-control" placeholder="{{'PAGE.K8S.DESCRIPTION' | translate}}" type="text" |
| 68 | formControlName="description" id="description" [ngClass]="{ 'is-invalid': submitted && f.description.errors }" |
| 69 | required></textarea> |
| 70 | </div> |
| 71 | </div> |
| 72 | <div class="form-group row"> |
| 73 | <label class="col-sm-4 col-form-label" for="nets">{{'PAGE.K8S.NETS' | translate}}*</label> |
| 74 | <div class="col-sm-8"> |
| 75 | <textarea rows="5" cols="50" class="form-control" placeholder="{{'PAGE.K8S.NETSPLACEHOLDER' | translate}}" |
| 76 | formControlName="nets" id="nets" [ngClass]="{ 'is-invalid': submitted && f.nets.errors }" required></textarea> |
| 77 | <div class="fileupload-text mt-1 mb-1">{{'FILEUPLOADLABEL' | translate}}</div> |
| 78 | <div class="custom-file"> |
| 79 | <input type="file" #fileInputNets class="custom-file-input" (change)="netsFile($event.target.files)" |
| 80 | id="customFileNets"> |
| 81 | <label class="custom-file-label" #fileInputNetsLabel for="customFileNets">{{'CHOOSEFILE' | translate}}</label> |
| 82 | </div> |
| 83 | </div> |
| 84 | </div> |
| 85 | <div class="form-group row"> |
| 86 | <label class="col-sm-4 col-form-label" for="credentials">{{'PAGE.K8S.CREDENTIALS' | translate}}*</label> |
| 87 | <div class="col-sm-8"> |
| 88 | <textarea rows="5" cols="50" class="form-control" placeholder="{{'YAMLCONFIG' | translate}}" formControlName="credentials" |
| 89 | id="credentials" [ngClass]="{ 'is-invalid': submitted && f.credentials.errors }" required></textarea> |
| 90 | <div class="fileupload-text mt-1 mb-1">{{'FILEUPLOADLABEL' | translate}}</div> |
| 91 | <div class="custom-file"> |
| 92 | <input type="file" #fileInputCredentials class="custom-file-input" (change)="credentialsFile($event.target.files)" |
| 93 | id="customFileCredentials"> |
| 94 | <label class="custom-file-label" #fileInputCredentialsLabel for="customFileCredentials">{{'CHOOSEFILE' | translate}}</label> |
| 95 | </div> |
| 96 | </div> |
| 97 | </div> |
| 98 | </div> |
| 99 | <div class="modal-footer"> |
| 100 | <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button> |
| 101 | <button type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button> |
| 102 | </div> |
| 103 | </form> |
| 104 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |