Advacned Cluster Management Enhancements

	- Added force dleete support in KSU, OKA, Profile and cluster
	- Integrated upgrade api in cluster

Change-Id: Iaa0b342ce5e33b239e2f76622f3f837961e1cd8c
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 28c3fd8..f545606 100644
--- a/src/app/k8s/k8s-action/K8sActionComponent.html
+++ b/src/app/k8s/k8s-action/K8sActionComponent.html
@@ -24,15 +24,15 @@
     placement="top" container="body" ngbTooltip="{{'INFO' | translate}}">
     <i class="fas fa-info icons list" title="info"></i>
   </button>
-  <button *ngIf="(isCluster  || isProfile || isKSU)" type="button" class="btn btn-primary" (click)="deleteK8s()"
+  <button *ngIf="(isCluster  || isProfile || isKSU)" 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="getK8sType === 'repo'" type="button" class="btn btn-primary" (click)="deleteK8s()" placement="top"
+  <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 && getK8sType !== 'repo' " type="button" class="btn btn-primary" (click)="deleteK8s()" placement="top"
+  <button *ngIf="!isCluster && !isKSU && !isProfile && getK8sType !== 'repo' " type="button" class="btn btn-primary" (click)="deleteK8s(false)" placement="top"
     container="body" ngbTooltip="{{'DEREGISTER' | translate}}">
     <i class="fas fa-window-close icons" title="deregister"></i>
   </button>
@@ -40,6 +40,10 @@
     (click)="editProfile(getK8sType)" 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 && !isProfile && getK8sType !== 'repo' " class="btn-group" placement="bottom-right" ngbDropdown
     display="dynamic" container="body">
     <button type="button" class="btn btn-primary" [disabled]="!isCluster || state != 'CREATED'" ngbDropdownToggle placement="top"
@@ -81,21 +85,13 @@
         <i class="fa fa-arrow-up"></i> {{'PAGE.K8S.UPGRADECLUSTER' | translate}}
       </button>
       <button *ngIf="isCluster" type="button" class="btn btn-primary dropdown-item" placement="left"
-        (click)="editCluster('horizontal')" container="body" ngbTooltip="{{'PAGE.K8S.HORIZONTALSCALING' | translate}}">
-        <i class="fas fa-arrows-alt-h"></i> {{'PAGE.K8S.HORIZONTALSCALING' | translate}}
-      </button>
-      <button *ngIf="isCluster" type="button" class="btn btn-primary dropdown-item" placement="left"
-        (click)="editCluster('vertical')" container="body" ngbTooltip="{{'PAGE.K8S.VERTICALSCALING' | translate}}">
-        <i class="fas fa-arrows-alt-v"></i> {{'PAGE.K8S.VERTICALSCALING' | 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>
+    <button type="button" class="btn btn-primary dropdown-toggle action-button" [disabled]="state != 'CREATED'" ngbDropdownToggle>
       {{'ACTION' | translate}}
     </button>
     <div class="dropdown-menu list-action-dropdown" ngbDropdownMenu>
diff --git a/src/app/k8s/k8s-action/K8sActionComponent.ts b/src/app/k8s/k8s-action/K8sActionComponent.ts
index bbd574f..919dda1 100644
--- a/src/app/k8s/k8s-action/K8sActionComponent.ts
+++ b/src/app/k8s/k8s-action/K8sActionComponent.ts
@@ -133,16 +133,19 @@
     }
 
     if (this.getK8sType === 'infra-config' || this.getK8sType === 'infra-controller' || this.getK8sType === 'app-profile' || this.getK8sType === 'resource-profile') {
-    this.isProfile = true;
+      this.isProfile = true;
     } else {
       this.isProfile = false;
     }
   }
 
   /** Delete User Account @public */
-  public deleteK8s(): void {
+  public deleteK8s(forceAction: boolean): void {
     // eslint-disable-next-line security/detect-non-literal-fs-filename
     const modalRef: NgbModalRef = this.modalService.open(DeleteComponent, { backdrop: 'static' });
+    modalRef.componentInstance.params = {
+      forceDeleteType: forceAction
+    };
     modalRef.result.then((result: MODALCLOSERESPONSEDATA) => {
       if (result) {
         this.sharedService.callData();