| 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"> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 20 | <h4 *ngIf="profileType === 'Register'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.REGISTERCLUSTER' | |
| 21 | translate}} |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 22 | </h4> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 23 | <h4 *ngIf="profileType === 'Manage'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.CREATECLUSTER' | |
| 24 | translate}} |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 25 | </h4> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 26 | <h4 *ngIf="profileType === 'upgrade'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.UPGRADECLUSTER' | |
| 27 | translate}} |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 28 | </h4> |
| SANDHYA.JS | a3ff32a | 2025-02-13 16:24:46 +0530 | [diff] [blame] | 29 | <h4 *ngIf="profileType === 'update'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.UPDATECLUSTER' | |
| 30 | translate}} |
| 31 | </h4> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 32 | <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()"> |
| 33 | <i class="fas fa-times-circle text-danger"></i> |
| 34 | </button> |
| 35 | </div> |
| 36 | <div class="modal-body modal-body-custom-height"> |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 37 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage' || profileType === 'Register'"> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 38 | <div class="col-sm-12"> |
| 39 | <label class="form-check-label"> |
| 40 | <input class="quotacheck form-check-input" (click)=getValue($event) type="checkbox" |
| 41 | formControlName="bootstrap" id="quotacheck"> |
| 42 | <label class="form-check-label" for="quotaCheck"> <b>{{ 'PAGE.K8S.BOOTSTRAP' | translate }}</b> </label> |
| 43 | <i class="fas fa-info-circle tooltip-icon"> |
| 44 | <span class="tooltip-text">{{ 'PAGE.K8S.BOOTSTRAPINFO' | translate }}</span> |
| 45 | </i> |
| 46 | </label> |
| 47 | </div> |
| 48 | </div> |
| 49 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage' || profileType === 'Register' || !isChecked"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 50 | <label class="col-sm-12 col-form-label mandatory-label" |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 51 | [ngClass]="{'text-danger': k8sclusterForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' | |
| 52 | translate}}</label> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 53 | <label class="col-sm-4 col-form-label" for="name">{{'PAGE.K8S.NAME' | translate}}*</label> |
| 54 | <div class="col-sm-8"> |
| 55 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NAME' | translate}}" type="text" |
| 56 | formControlName="name" id="name" [ngClass]="{ 'is-invalid': submitted && f.name.errors }" required> |
| 57 | </div> |
| 58 | </div> |
| SANDHYA.JS | a3ff32a | 2025-02-13 16:24:46 +0530 | [diff] [blame] | 59 | <div class="form-group row mb-3" *ngIf="profileType === 'update'"> |
| 60 | <label class="col-sm-4 col-form-label" for="name">{{'PAGE.K8S.NAME' | translate}}</label> |
| 61 | <div class="col-sm-8"> |
| 62 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NAME' | translate}}" type="text" |
| 63 | formControlName="update" id="name" [ngClass]="{ 'is-invalid': submitted && f.update.errors }"> |
| 64 | </div> |
| 65 | </div> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 66 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage'|| !isChecked"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 67 | <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.K8SVERSION' | translate}}*</label> |
| 68 | <div class="col-sm-8"> |
| 69 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.K8SVERSION' | translate}}" type="text" |
| 70 | formControlName="k8s_version" id="k8s_version" [ngClass]="{ 'is-invalid': submitted && f.k8s_version.errors }" |
| 71 | required> |
| 72 | </div> |
| 73 | </div> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 74 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage' || profileType === 'Register' || !isChecked"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 75 | <label class="col-sm-4 col-form-label" for="vim_account">{{'PAGE.K8S.VIMACCOUNT' | translate}}*</label> |
| 76 | <div class="col-sm-8"> |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 77 | <ng-select (change)="getDetailsvim($event)" |
| 78 | placeholder="{{'SELECT' | translate}} {{'PAGE.K8S.VIMACCOUNT' | translate}}" [items]="vimAccountSelect" |
| 79 | bindLabel="name" bindValue="name" formControlName="vim_account" id="vimAccountId" |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 80 | [ngClass]="{ 'is-invalid': submitted && f.vim_account.errors }" required> |
| 81 | </ng-select> |
| 82 | </div> |
| 83 | </div> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 84 | <div class="form-group row mb-3" *ngIf="!isChecked && profileType === 'Register'"> |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 85 | <label class="col-sm-4 col-form-label" for="deployment_methods">{{'PAGE.K8S.DEPLOYMENTMETHODS' | |
| 86 | translate}}*</label> |
| bacigalupo | f633dbf | 2022-03-25 17:24:56 +0000 | [diff] [blame] | 87 | <div class="col-sm-8"> |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 88 | <ng-select placeholder="{{'SELECT' | translate}} {{'PAGE.K8S.DEPLOYMENTMETHODS' | translate}}" multiple="true" |
| 89 | [items]="deploymentMethodsSelect" bindLabel="title" bindValue="value" formControlName="deployment_methods" |
| 90 | id="deploymentMethodsId" [ngClass]="{ 'is-invalid': submitted && f.deployment_methods.errors }" |
| 91 | [(ngModel)]="selectedDeploymentMethods" required> |
| bacigalupo | f633dbf | 2022-03-25 17:24:56 +0000 | [diff] [blame] | 92 | </ng-select> |
| 93 | </div> |
| 94 | </div> |
| SANDHYA.JS | a3ff32a | 2025-02-13 16:24:46 +0530 | [diff] [blame] | 95 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage' || profileType === 'Register' || !isChecked || profileType === 'update'"> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 96 | <label class="col-sm-4 col-form-label" for="description">{{'PAGE.K8S.DESCRIPTION' | translate}}</label> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 97 | <div class="col-sm-8"> |
| 98 | <textarea class="form-control" placeholder="{{'PAGE.K8S.DESCRIPTION' | translate}}" type="text" |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 99 | formControlName="description" id="description" |
| 100 | [ngClass]="{ 'is-invalid': submitted && f.description.errors }"></textarea> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 101 | </div> |
| 102 | </div> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 103 | <div class="form-group row mb-3" *ngIf="!isChecked && profileType === 'Register'"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 104 | <label class="col-sm-4 col-form-label" for="nets">{{'PAGE.K8S.NETS' | translate}}*</label> |
| 105 | <div class="col-sm-8"> |
| 106 | <textarea rows="5" cols="50" class="form-control" placeholder="{{'PAGE.K8S.NETSPLACEHOLDER' | translate}}" |
| 107 | formControlName="nets" id="nets" [ngClass]="{ 'is-invalid': submitted && f.nets.errors }" required></textarea> |
| 108 | <div class="fileupload-text mt-1 mb-1">{{'FILEUPLOADLABEL' | translate}}</div> |
| 109 | <div class="custom-file"> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 110 | <input type="file" #fileInputNets class="fileupload custom-file-input" |
| 111 | (change)="netsFile($event.target.files)" id="customFileNets"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 112 | </div> |
| 113 | </div> |
| 114 | </div> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 115 | <div class="form-group row mb-3" *ngIf="profileType === 'Register'|| (profileType === 'Register' && !isChecked)"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 116 | <label class="col-sm-4 col-form-label" for="credentials">{{'PAGE.K8S.CREDENTIALS' | translate}}*</label> |
| 117 | <div class="col-sm-8"> |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 118 | <textarea rows="5" cols="50" class="form-control" placeholder="{{'YAMLCONFIG' | translate}}" |
| 119 | formControlName="credentials" id="credentials" [ngClass]="{ 'is-invalid': submitted && f.credentials.errors }" |
| 120 | required></textarea> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 121 | <div class="fileupload-text mt-1 mb-1">{{'FILEUPLOADLABEL' | translate}}</div> |
| 122 | <div class="custom-file"> |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 123 | <input type="file" #fileInputCredentials class="fileupload custom-file-input" |
| 124 | (change)="credentialsFile($event.target.files)" id="customFileCredentials"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 125 | </div> |
| 126 | </div> |
| 127 | </div> |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 128 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage'"> |
| 129 | <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.REGIONNAME' | translate}}</label> |
| 130 | <div class="col-sm-8"> |
| 131 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.REGIONNAME' | translate}}" type="text" |
| 132 | formControlName="region_name" id="k8s_version" |
| 133 | [ngClass]="{ 'is-invalid': submitted && f.region_name.errors }"> |
| 134 | </div> |
| 135 | </div> |
| 136 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage'"> |
| 137 | <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.RESOURCEGROUP' | translate}}</label> |
| 138 | <div class="col-sm-8"> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 139 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.RESOURCEGROUP' | translate}}" |
| 140 | type="text" formControlName="resource_group" id="k8s_version" |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 141 | [ngClass]="{ 'is-invalid': submitted && f.resource_group.errors }"> |
| 142 | </div> |
| 143 | </div> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 144 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage'"> |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 145 | <label class="col-sm-4 col-form-label" for="node_count">{{'PAGE.K8S.NODECOUNT' | translate}}*</label> |
| 146 | <div class="col-sm-8"> |
| 147 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NODECOUNT' | translate}}" type="text" |
| 148 | formControlName="node_count" id="node_count" [ngClass]="{ 'is-invalid': submitted && f.node_count.errors }" |
| 149 | required> |
| 150 | </div> |
| 151 | </div> |
| 152 | <div class="form-group row mb-3" *ngIf="profileType === 'Manage'"> |
| 153 | <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.NODESIZE' | translate}}*</label> |
| 154 | <div class="col-sm-8"> |
| 155 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NODESIZE' | translate}}" type="text" |
| 156 | formControlName="node_size" id="k8s_version" [ngClass]="{ 'is-invalid': submitted && f.node_size.errors }" |
| 157 | required> |
| 158 | </div> |
| 159 | </div> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 160 | <div class="form-group row mb-3" *ngIf="profileType === 'upgrade'"> |
| 161 | <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.K8SVERSION' | translate}}</label> |
| 162 | <div class="col-sm-8"> |
| 163 | <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.K8SVERSION' | translate}}" type="text" |
| 164 | formControlName="k8sVersion" id="k8s_version" [ngClass]="{ 'is-invalid': submitted && f.k8sVersion.errors }"> |
| 165 | </div> |
| 166 | </div> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 167 | </div> |
| 168 | <div class="modal-footer"> |
| 169 | <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button> |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 170 | <button *ngIf="profileType === 'Manage'" type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button> |
| 171 | <button *ngIf="profileType === 'Register'" type="submit" class="btn btn-primary">{{'REGISTER' | translate}}</button> |
| SANDHYA.JS | 52af480 | 2025-05-22 17:00:15 +0530 | [diff] [blame] | 172 | <button *ngIf="profileType === 'upgrade'|| profileType === 'update'" |
| SANDHYA.JS | b772de0 | 2024-12-10 15:21:03 +0530 | [diff] [blame] | 173 | type="submit" class="btn btn-primary">{{'APPLY' |
| SANDHYA.JS | 2657011 | 2024-07-05 21:35:46 +0530 | [diff] [blame] | 174 | | translate}}</button> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 175 | </div> |
| 176 | </form> |
| 177 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |