| <!-- |
| 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="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 *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> |
| <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> |