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/node-add/NodeAddComponent.html b/src/app/k8s/node-add/NodeAddComponent.html
new file mode 100644
index 0000000..5c44524
--- /dev/null
+++ b/src/app/k8s/node-add/NodeAddComponent.html
@@ -0,0 +1,126 @@
+<!--
+Copyright 2020 TATA ELXSI
+
+Licensed under the Apache License, Version 2.0 (the 'License');
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
+-->
+<form [formGroup]="nodeForm" (ngSubmit)="nodeSubmit();" (keydown.enter)="$event.preventDefault()">
+ <div class="modal-header">
+ <h4 *ngIf="profileType === 'card_node'" class="modal-title" id="modal-basic-title">
+ {{'PAGE.K8S.CREATENODEGROUP' |
+ translate}}
+ </h4>
+ <h4 *ngIf="profileType === 'edit-node'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.EDITNODE' |
+ translate}}
+ </h4>
+ <h4 *ngIf="profileType === 'k8s-scale'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.K8SSCALING' |
+ translate}}
+ </h4>
+ <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()">
+ <i class="fas fa-times-circle text-danger"></i>
+ </button>
+ </div>
+ <div class="modal-body modal-body-custom-height">
+ <div class="form-group row mb-3" *ngIf="profileType === 'card_node'">
+ <label class="col-sm-12 col-form-label mandatory-label"
+ [ngClass]="{'text-danger': nodeForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' |
+ translate}}</label>
+ <label class="col-sm-4 col-form-label" for="name">{{'PAGE.K8S.NAME' | translate}}*</label>
+ <div class="col-sm-8">
+ <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NAME' | translate}}" type="text"
+ formControlName="name" id="name" [ngClass]="{ 'is-invalid': submitted && f.name.errors }" required>
+ </div>
+ </div>
+ <div class="form-group row mb-3" *ngIf="profileType === 'edit-node'">
+ <label class="col-sm-4 col-form-label" for="name">{{'PAGE.K8S.NAME' | translate}}</label>
+ <div class="col-sm-8">
+ <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NAME' | translate}}" type="text"
+ formControlName="edit_name" id="name" [ngClass]="{ 'is-invalid': submitted && f.edit_name.errors }">
+ </div>
+ </div>
+ <div class="form-group row mb-3" *ngIf="profileType === 'card_node' || profileType === 'edit-node'">
+ <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 === 'card_node'">
+ <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="node_size" [ngClass]="{ 'is-invalid': submitted && f.node_size.errors }"
+ required>
+ </div>
+ </div>
+ <div class="form-group row mb-3" *ngIf="profileType === 'card_node'">
+ <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="{{'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 === 'k8s-scale'">
+ <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="{{'PAGE.K8S.NODECOUNT' | translate}}" type="text"
+ formControlName="nodeCount" id="node_count" [ngClass]="{ 'is-invalid': submitted && f.node_count.errors }">
+ </div>
+ </div>
+ <div class="form-group row mb-3" *ngIf="profileType === 'card_node'">
+ <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.NODEROLE' | 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="role" id="role" [ngClass]="{ 'is-invalid': submitted && f.role.errors }">
+ </div>
+ </div>
+ <div class="card bg-light" *ngIf="profileType === 'card_node'">
+ <div class="card-body">
+ <div class="form-group row mb-3">
+ <label class="col-sm-4 col-form-label fw-semibold" for="k8s_version">{{'PAGE.K8S.SUBNET' | translate}}*</label>
+ </div>
+ <div class="form-group row mb-3">
+ <label class="col-sm-4 col-form-label" for="subnets_id">{{ 'PAGE.K8S.PRIVATESUBNET' | translate }}</label>
+ <div class="col-sm-8">
+ <ng-select placeholder="{{'SELECT' | translate}} {{'PAGE.K8S.PRIVATESUBNET' | translate}}"
+ [items]="privatesubnetItems" bindLabel="id" bindValue="id" [multiple]="true" id="private_subnet"
+ formControlName="private_subnet" [ngClass]="{ 'is-invalid': submitted && f.private_subnet.errors }"
+ [(ngModel)]="privateItems">
+ </ng-select>
+ </div>
+ </div>
+ <div class="form-group row mb-3">
+ <label class="col-sm-4 col-form-label" for="subnets_id">{{ 'PAGE.K8S.PUBLICSUBNET' | translate }}</label>
+ <div class="col-sm-8">
+ <ng-select placeholder="{{'SELECT' | translate}} {{'PAGE.K8S.PUBLICSUBNET' | translate}}"
+ [items]="publicsubnetItems" bindLabel="id" bindValue="id" [multiple]="true" id="public_subnet"
+ formControlName="public_subnet" [ngClass]="{ 'is-invalid': submitted && f.public_subnet.errors }"
+ [(ngModel)]="publicItems">
+ </ng-select>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button>
+ <button *ngIf="profileType === 'card_node'" type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button>
+ <button *ngIf="profileType === 'k8s-scale' || profileType === 'edit-node'" 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