Advanced Cluster Management - NGUI
- Added new OKA packages module under packages
- Added Profiless, KSU under k8s section
- Feature 11020. 11022, 11023, 11024, 11025, 11026
Change-Id: Ibddeb4d5693ce24d80e378277693405c810f6e04
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/k8s/k8s-action/K8sActionComponent.html b/src/app/k8s/k8s-action/K8sActionComponent.html
index c35bb19..ddce99c 100644
--- a/src/app/k8s/k8s-action/K8sActionComponent.html
+++ b/src/app/k8s/k8s-action/K8sActionComponent.html
@@ -16,12 +16,78 @@
Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
-->
<div class="btn-group list action" role="group">
- <button type="button" class="btn btn-primary" (click)="infoK8s(getK8sType)" placement="top" container="body"
- ngbTooltip="{{'INFO' | translate}}">
+ <button *ngIf="getK8sType === 'repo'" type="button" class="btn btn-primary" (click)="infoK8s(getK8sType)"
+ placement="top" container="body" ngbTooltip="{{'INFO' | translate}}">
<i class="fas fa-info icons list" title="info"></i>
</button>
- <button type="button" class="btn btn-primary" (click)="deleteK8s(getK8sType)" placement="top"
- container="body" ngbTooltip="{{'DELETE' | translate}}">
+ <button *ngIf="(isCluster || isProfile || isKSU) && getK8sType !== 'repo' && !checkRegister" [disabled]="state != 'CREATED'"
+ type="button" class="btn btn-primary" (click)="deleteK8s()" placement="top" container="body"
+ ngbTooltip="{{'DELETE' | translate}}">
<i class="far fa-trash-alt icons" title="delete"></i>
</button>
-</div>
\ No newline at end of file
+ <button *ngIf="(!isCluster || !isProfile || !isKSU) && getK8sType === 'repo'" type="button" class="btn btn-primary"
+ (click)="deleteK8s()" placement="top" container="body" ngbTooltip="{{'DELETE' | translate}}">
+ <i class="far fa-trash-alt icons" title="delete"></i>
+ </button>
+ <button *ngIf="checkRegister && !isCluster && !isProfile && !isKSU && getK8sType !== 'repo'"
+ [disabled]="state != 'CREATED'" type="button" class="btn btn-primary" (click)="deleteK8s()" placement="top"
+ container="body" ngbTooltip="{{'DEREGISTER' | translate}}">
+ <i class="fas fa-window-close icons" title="deregister"></i>
+ </button>
+ <div *ngIf="isCluster && !isProfile && !isKSU && getK8sType !== 'repo'" class="btn-group" placement="bottom-right" ngbDropdown
+ display="dynamic" container="body">
+ <button type="button" class="btn btn-primary" [disabled]="state != 'CREATED'" ngbDropdownToggle placement="top" container="body"
+ ngbTooltip="{{'Attach Profile' | translate}}">
+ <i class="fas fa-link"></i>
+ </button>
+ <div class="dropdown-menu list-action-dropdown" ngbDropdownMenu>
+ <button type="button" class="btn btn-primary dropdown-item" placement="left" container="body"
+ (click)="editClusterProfile('infra-config')" ngbTooltip="{{'PAGE.K8S.ATTACHINFRACONFIG' | translate}}">
+ <i class="fa fa-link"></i> {{'PAGE.K8S.ATTACHINFRACONFIG' | translate}}
+ </button>
+ <button type="button" class="btn btn-primary dropdown-item" (click)="editClusterProfile('infra-controller')"
+ placement="left" container="body" ngbTooltip="{{'PAGE.K8S.ATTACHINFRACONTROLLER' | translate}}">
+ <i class="fas fa-link"></i> {{'PAGE.K8S.ATTACHINFRACONTROLLER' | translate}}
+ </button>
+ <button type="button" class="btn btn-primary dropdown-item" placement="left"
+ (click)="editClusterProfile('app-profile')" container="body" ngbTooltip="{{'PAGE.K8S.ATTACHAPP' | translate}}">
+ <i class="fas fa-link"></i> {{'PAGE.K8S.ATTACHAPP' | translate}}
+ </button>
+ <button type="button" class="btn btn-primary dropdown-item" placement="left"
+ (click)="editClusterProfile('resource-profile')" container="body"
+ ngbTooltip="{{'PAGE.K8S.ATTACHRESOURCE' | translate}}">
+ <i class="fas fa-link"></i> {{'PAGE.K8S.ATTACHRESOURCE' | translate}}
+ </button>
+ </div>
+ </div>
+ <div *ngIf="(isProfile || isKSU || isCluster && getK8sType !== 'repo')" class="btn-group" ngbDropdown display="dynamic" container="body">
+ <button type="button" [disabled]="state != 'CREATED'" class="btn btn-primary dropdown-toggle action-button" ngbDropdownToggle>
+ {{'ACTION' | translate}}
+ </button>
+ <div class="dropdown-menu list-action-dropdown" ngbDropdownMenu>
+ <button *ngIf="isProfile && !KSU && !isCluster" type="button" class="btn btn-primary dropdown-item"
+ placement="left" container="body" (click)="editProfile(getK8sType)" ngbTooltip="{{'PAGE.K8S.EDITPROFILE' | translate}}">
+ <i class="fa fa-edit icons"></i> {{'PAGE.K8S.EDITPROFILE' | translate}}
+ </button>
+ <button *ngIf="isKSU && !isProfile && !isCluster" type="button" class="btn btn-primary dropdown-item"
+ placement="left" (click)="moveKsu()" container="body" ngbTooltip="{{'PAGE.K8S.MOVE' | translate}}">
+ <i class="fas fa-truck-moving"></i> {{'PAGE.K8S.MOVE' | translate}}
+ </button>
+ <button *ngIf="isKSU && !isProfile && !isCluster" type="button" class="btn btn-primary dropdown-item"
+ placement="left" (click)="cloneKsu()" container="body" ngbTooltip="{{'PAGE.K8S.CLONE' | translate}}">
+ <i class="fa fa-clone icons"></i> {{'PAGE.K8S.CLONE' | translate}}
+ </button>
+ <button *ngIf="isKSU && !isProfile && !isCluster" type="button" class="btn btn-primary dropdown-item"
+ placement="left" (click)="editKsu()" container="body" ngbTooltip="{{'EDIT' | translate}}">
+ <i class="fa fa-edit icons"></i> {{'EDIT' | translate}}
+ </button>
+ <button *ngIf="!isKSU && !isProfile && isCluster" type="button" class="btn btn-primary dropdown-item"
+ placement="left" (click)="editCluster('upgrade')" container="body" ngbTooltip="{{'PAGE.K8S.UPGRADE' | translate}}">
+ <i class="fa fa-arrow-up"></i> {{'PAGE.K8S.UPGRADE' | translate}}
+ </button>
+ <button *ngIf="!isKSU && !isProfile && isCluster" type="button" class="btn btn-primary dropdown-item"
+ placement="left" (click)="editCluster('scale')" container="body" ngbTooltip="{{'PAGE.K8S.SCALE' | translate}}">
+ <i class="fas fa-compress-alt"></i> {{'PAGE.K8S.SCALE' | translate}}
+ </button>
+ </div>
+ </div>
\ No newline at end of file