| <!-- |
| 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: 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 *ngIf="(isCluster || !isCluster) && !isKSU && !isNode && !isProfile && getK8sType !== 'repo'" type="button" |
| class="btn btn-primary" (click)="nodeK8s()" placement="top" container="body" |
| ngbTooltip="{{'PAGE.K8S.DETAILS' | translate}}" [disabled]="value.state !== 'READY' || !isCluster "> |
| <i class="fa fa-server" title="details"></i> |
| </button> |
| <button *ngIf="!isProfile" 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 *ngIf="(isCluster || isProfile || isKSU || isNode)" type="button" class="btn btn-primary" |
| (click)="deleteK8s()" placement="top" container="body" ngbTooltip="{{'DELETE' | translate}}" |
| [disabled]="value.state !== 'READY' && value.state !== 'ERROR'"> |
| <i class="far fa-trash-alt icons" title="delete"></i> |
| </button> |
| <button *ngIf="getK8sType === 'repo'" type="button" class="btn btn-primary" (click)="deleteK8s(false)" placement="top" |
| container="body" ngbTooltip="{{'DELETE' | translate}}"> |
| <i class="far fa-trash-alt icons" title="delete"></i> |
| </button> |
| <button *ngIf="!isCluster && !isKSU && !isProfile && !isNode && getK8sType !== 'repo' " type="button" |
| class="btn btn-primary" (click)="deleteK8s()" placement="top" container="body" |
| [disabled]="value.state !== 'READY' && value.state !== 'ERROR' && value.state !== 'ENABLED' && value.state !== 'DEGRADED'" |
| ngbTooltip="{{'DEREGISTER' | translate}}"> |
| <i class="fas fa-window-close icons" title="deregister"></i> |
| </button> |
| <button *ngIf="isProfile" type="button" class="btn btn-primary" placement="top" container="body" |
| (click)="editProfile(getK8sType)" [disabled]="value.state !== 'READY'" |
| ngbTooltip="{{'PAGE.K8S.EDITPROFILE' | translate}}"> |
| <i class="fa fa-edit icons"></i> |
| </button> |
| <button *ngIf="(isCluster || isProfile || isKSU || !isCluster && getK8sType !== 'repo')" type="button" |
| class="btn btn-primary" (click)="deleteK8s(true)" placement="top" container="body" |
| [disabled]="!isCluster && !isProfile && !isKSU" ngbTooltip="{{'FORCEDELETE' | translate}}"> |
| <i class="fas fa-trash-alt icons text-danger" title="delete"></i> |
| </button> |
| <div *ngIf="(isCluster || !isCluster) && !isKSU && !isNode && !isProfile && getK8sType !== 'repo'" class="btn-group" |
| placement="bottom-right" ngbDropdown display="dynamic" container="body"> |
| <button type="button" class="btn btn-primary" [disabled]="value.state !== 'READY' || !isCluster" 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="(isCluster || !isCluster) && !isKSU && !isNode && !isProfile && getK8sType !== 'repo'" class="btn-group" |
| ngbDropdown display="dynamic" container="body"> |
| <button type="button" [disabled]="(value.state !== 'READY' || !isCluster)" |
| class="btn btn-primary dropdown-toggle action-button" ngbDropdownToggle> |
| {{'ACTION' | translate}} |
| </button> |
| <div class="dropdown-menu list-action-dropdown" ngbDropdownMenu> |
| <button *ngIf="isCluster" type="button" class="btn btn-primary dropdown-item" placement="left" |
| (click)="editCluster('upgrade')" container="body" ngbTooltip="{{'Version Upgrade' | translate}}"> |
| <i class="fa fa-arrow-up"></i> {{'PAGE.K8S.VERSIONUPGRADE' | translate}} |
| </button> |
| <button *ngIf="isCluster" type="button" class="btn btn-primary dropdown-item" placement="left" |
| (click)="editCluster('update')" container="body" ngbTooltip="{{'Update Cluster' | translate}}"> |
| <i class="fas fa-arrows-alt-h"></i> {{'PAGE.K8S.UPDATECLUSTER' | translate}} |
| </button> |
| <button *ngIf="isCluster" type="button" class="btn btn-primary dropdown-item" placement="left" |
| (click)="getCredentials()" container="body" ngbTooltip="{{'PAGE.K8S.GETCREDENTIALS' | translate}}"> |
| <i class="fas fa-download icons"></i> {{'PAGE.K8S.GETCREDENTIALS' | translate}} |
| </button> |
| </div> |
| </div> |
| <div *ngIf="isKSU" class="btn-group" ngbDropdown display="dynamic" container="body"> |
| <button type="button" class="btn btn-primary dropdown-toggle action-button" ngbDropdownToggle |
| [disabled]="value.state !== 'READY'"> |
| {{'ACTION' | translate}} |
| </button> |
| <div class="dropdown-menu list-action-dropdown" ngbDropdownMenu> |
| <button *ngIf="isKSU" 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" 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" 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> |
| </div> |
| </div> |
| <div *ngIf="isNode" class="btn-group" ngbDropdown display="dynamic" container="body"> |
| <button type="button" class="btn btn-primary dropdown-toggle action-button" ngbDropdownToggle |
| [disabled]="value.state !== 'READY'"> |
| {{'ACTION' | translate}} |
| </button> |
| <div class="dropdown-menu list-action-dropdown" ngbDropdownMenu> |
| <button type="button" class="btn btn-primary dropdown-item" placement="left" (click)="scaling('k8s-scale')" |
| container="body" ngbTooltip="{{'PAGE.K8S.K8SSCALING' | translate}}"> |
| <i class="fas fa-arrows-alt-v"></i> {{'PAGE.K8S.K8SSCALING' | translate}} |
| </button> |
| <button type="button" class="btn btn-primary dropdown-item" placement="left" (click)="scaling('edit-node')" |
| container="body" ngbTooltip="{{'EDIT' | translate}}"> |
| <i class="fa fa-arrow-up"></i> {{'EDIT' | translate}} |
| </button> |
| </div> |
| </div> |
| <app-loader [waitingMessage]="message" *ngIf="isLoadingDownloadResult"></app-loader> |