Feature: 11055 Support of several node groups in clusters created by OSM
- Added control plane support in managed post
- When aws vim account is selected paylaod will get differed
- Added details page in clusters to view node and ksu for
specified cluster
- Fixed Bug 2402 - Unable to create Ns Config template from Ui
bug by chnaging api
Change-Id: I4eb327fd86b0c4a706b05a8ed10524e4d2c5bc95
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.html b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.html
index e9ac743..73f1038 100644
--- a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.html
+++ b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.html
@@ -15,7 +15,7 @@
Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
-->
-<form [formGroup]="k8sclusterForm" (ngSubmit)="k8sAddClusterSubmit();">
+<form [formGroup]="k8sclusterForm" (ngSubmit)="k8sAddClusterSubmit();" (keydown.enter)="$event.preventDefault()">
<div class="modal-header">
<h4 *ngIf="profileType === 'Register'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.REGISTERCLUSTER' |
translate}}
@@ -23,7 +23,7 @@
<h4 *ngIf="profileType === 'Manage'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.CREATECLUSTER' |
translate}}
</h4>
- <h4 *ngIf="profileType === 'upgrade'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.UPGRADECLUSTER' |
+ <h4 *ngIf="profileType === 'upgrade'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.VERSIONUPGRADE' |
translate}}
</h4>
<h4 *ngIf="profileType === 'update'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.UPDATECLUSTER' |
@@ -33,7 +33,8 @@
<i class="fas fa-times-circle text-danger"></i>
</button>
</div>
- <div class="modal-body modal-body-custom-height">
+ <div class="modal-body modal-body-custom-height"
+ *ngIf="profileType === 'Manage' || profileType === 'Register' || isChecked || profileType === 'upgrade'">
<div class="form-group row mb-3" *ngIf="profileType === 'Manage' || profileType === 'Register'">
<div class="col-sm-12">
<label class="form-check-label">
@@ -71,6 +72,15 @@
required>
</div>
</div>
+ <div class="form-group row mb-3"
+ *ngIf="profileType === 'Manage' || profileType === 'Register' || !isChecked || profileType === 'update'">
+ <label class="col-sm-4 col-form-label" for="description">{{'PAGE.K8S.DESCRIPTION' | translate}}</label>
+ <div class="col-sm-8">
+ <textarea class="form-control" placeholder="{{'PAGE.K8S.DESCRIPTION' | translate}}" type="text"
+ formControlName="description" id="description"
+ [ngClass]="{ 'is-invalid': submitted && f.description.errors }"></textarea>
+ </div>
+ </div>
<div class="form-group row mb-3" *ngIf="profileType === 'Manage' || profileType === 'Register' || !isChecked">
<label class="col-sm-4 col-form-label" for="vim_account">{{'PAGE.K8S.VIMACCOUNT' | translate}}*</label>
<div class="col-sm-8">
@@ -81,6 +91,45 @@
</ng-select>
</div>
</div>
+ <div class="form-group row mb-3" *ngIf=" vimType === 'aws' && profileType === 'Manage'">
+ <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.ROLENAME' | translate}}</label>
+ <div class="col-sm-8">
+ <input autocomplete="off" class="form-control" placeholder="{{'arn:aws:iam::[account-id]:role/[role-name]' | translate}}" type="text"
+ formControlName="iam_role" id="iam_role" [ngClass]="{ 'is-invalid': submitted && f.iam_role.errors }">
+ </div>
+ </div>
+ <div class="form-group row mb-3" *ngIf=" vimType === 'aws' && profileType === 'Manage'">
+ <label class="col-sm-4 col-form-label" for="private_subnet">{{ 'PAGE.K8S.PRIVATESUBNET' | translate }}</label>
+ <div class="col-sm-8">
+ <div class="chip-input-container">
+ <div formArrayName="private_subnet" class="chips-wrapper">
+ <span class="chip" *ngFor="let chip of chipsprivateArray.controls; let i = index">
+ {{ chip.value }}
+ <button type="button" (click)="removeprivateChip(i)">x</button>
+ </span>
+ <input #inputField autocomplete="off" class="form-control chip-input" id="private_subnet"
+ (keyup.enter)="addprivateChips()" (keydown.backspace)="removeprivateLastChip($event)"
+ placeholder="Type and press Enter">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-group row mb-3" *ngIf=" vimType === 'aws' && profileType === 'Manage'">
+ <label class="col-sm-4 col-form-label" for="public_subnet">{{ 'PAGE.K8S.PUBLICSUBNET' | translate }}</label>
+ <div class="col-sm-8">
+ <div class="chip-input-container">
+ <div formArrayName="public_subnet" class="chips-wrapper">
+ <span class="chip" *ngFor="let chip of chipspublicArray.controls; let i = index">
+ {{ chip.value }}
+ <button type="button" (click)="removepublicChip(i)">x</button>
+ </span>
+ <input #inputField autocomplete="off" class="form-control chip-input" id="public_subnet"
+ (keyup.enter)="addpublicChips()" (keydown.backspace)="removepublicLastChip($event)"
+ placeholder="Type and press Enter">
+ </div>
+ </div>
+ </div>
+ </div>
<div class="form-group row mb-3" *ngIf="!isChecked && profileType === 'Register'">
<label class="col-sm-4 col-form-label" for="deployment_methods">{{'PAGE.K8S.DEPLOYMENTMETHODS' |
translate}}*</label>
@@ -92,14 +141,6 @@
</ng-select>
</div>
</div>
- <div class="form-group row mb-3" *ngIf="profileType === 'Manage' || profileType === 'Register' || !isChecked || profileType === 'update'">
- <label class="col-sm-4 col-form-label" for="description">{{'PAGE.K8S.DESCRIPTION' | translate}}</label>
- <div class="col-sm-8">
- <textarea class="form-control" placeholder="{{'PAGE.K8S.DESCRIPTION' | translate}}" type="text"
- formControlName="description" id="description"
- [ngClass]="{ 'is-invalid': submitted && f.description.errors }"></textarea>
- </div>
- </div>
<div class="form-group row mb-3" *ngIf="!isChecked && profileType === 'Register'">
<label class="col-sm-4 col-form-label" for="nets">{{'PAGE.K8S.NETS' | translate}}*</label>
<div class="col-sm-8">
@@ -125,7 +166,7 @@
</div>
</div>
</div>
- <div class="form-group row mb-3" *ngIf="profileType === 'Manage'">
+ <div class="form-group row mb-3" *ngIf="vimType === 'aws' && profileType === 'Manage'">
<label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.REGIONNAME' | translate}}</label>
<div class="col-sm-8">
<input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.REGIONNAME' | translate}}" type="text"
@@ -133,7 +174,7 @@
[ngClass]="{ 'is-invalid': submitted && f.region_name.errors }">
</div>
</div>
- <div class="form-group row mb-3" *ngIf="profileType === 'Manage'">
+ <div class="form-group row mb-3" *ngIf="profileType === 'Manage' && vimType !== 'aws' ">
<label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.RESOURCEGROUP' | translate}}</label>
<div class="col-sm-8">
<input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.RESOURCEGROUP' | translate}}"
@@ -141,20 +182,18 @@
[ngClass]="{ 'is-invalid': submitted && f.resource_group.errors }">
</div>
</div>
- <div class="form-group row mb-3" *ngIf="profileType === 'Manage'">
- <label class="col-sm-4 col-form-label" for="node_count">{{'PAGE.K8S.NODECOUNT' | translate}}*</label>
- <div class="col-sm-8">
- <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NODECOUNT' | translate}}" type="text"
- formControlName="node_count" id="node_count" [ngClass]="{ 'is-invalid': submitted && f.node_count.errors }"
- required>
- </div>
- </div>
- <div class="form-group row mb-3" *ngIf="profileType === 'Manage'">
+ <div class="form-group row mb-3" *ngIf="profileType === 'Manage' && vimType !== 'aws' ">
<label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.NODESIZE' | translate}}*</label>
<div class="col-sm-8">
- <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NODESIZE' | translate}}" type="text"
- formControlName="node_size" id="k8s_version" [ngClass]="{ 'is-invalid': submitted && f.node_size.errors }"
- required>
+ <input autocomplete="off" class="form-control" placeholder="{{'Node Size' | translate}}" type="text"
+ formControlName="node_size" id="node_size" [ngClass]="{ 'is-invalid': submitted && f.node_size.errors }">
+ </div>
+ </div>
+ <div class="form-group row mb-3" *ngIf="profileType === 'Manage' && vimType !== 'aws'">
+ <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.NODECOUNT' | translate}}*</label>
+ <div class="col-sm-8">
+ <input autocomplete="off" class="form-control" placeholder="{{'Node Count' | translate}}" type="text"
+ formControlName="node_count" id="node_count" [ngClass]="{ 'is-invalid': submitted && f.node_count.errors }">
</div>
</div>
<div class="form-group row mb-3" *ngIf="profileType === 'upgrade'">
@@ -169,9 +208,7 @@
<button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button>
<button *ngIf="profileType === 'Manage'" type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button>
<button *ngIf="profileType === 'Register'" type="submit" class="btn btn-primary">{{'REGISTER' | translate}}</button>
- <button *ngIf="profileType === 'upgrade'|| profileType === 'update'"
- type="submit" class="btn btn-primary">{{'APPLY'
- | translate}}</button>
+ <button *ngIf="profileType === 'upgrade' || profileType === 'update'" type="submit" class="btn btn-primary">{{'APPLY'| translate}}</button>
</div>
</form>
<app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader>
\ No newline at end of file