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