Advanced Cluster Management Enhancements

	- Chnaged cluster page design from switch to single page
	- Added bootstrap option in creation and registration
	- Added horizontal scaling, vertical scaling and upgrade in
	  cluster action
	- In cluster page, for list combined two apis to show list done
	  temporary fix from UI

Change-Id: Ie4d30f5db28025ec92398cc60fc50ab7030f8f9b
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/utilities/delete/DeleteComponent.ts b/src/app/utilities/delete/DeleteComponent.ts
index c709672..9a8a0d8 100644
--- a/src/app/utilities/delete/DeleteComponent.ts
+++ b/src/app/utilities/delete/DeleteComponent.ts
@@ -66,7 +66,7 @@
 
   /** Number of instances @public */
   // eslint-disable-next-line @typescript-eslint/no-magic-numbers
-  public noOfInstances: Number = 25;
+  public noOfInstances: number = 10;
 
   /** Give the message for the loading @public */
   public notifyMessage: string = 'DELETELOADERMESSAGE';
@@ -74,6 +74,9 @@
   /** Give the message for the loading @public */
   public message: string = 'PLEASEWAIT';
 
+  /** Check whether cluster is credated or registered @public */
+  public createdbyosm: string;
+
   /** DataService to pass the data from one component to another @private */
   private dataService: DataService;
 
@@ -83,6 +86,12 @@
   /** Instance of the modal service @private */
   private id: string;
 
+  /** contsians bootstrap value @private */
+  private bootstrap: boolean;
+
+  /** Check whether cluster is registered or not @private */
+  private key: boolean;
+
   /** Variables holds url to be delete @private */
   private deleteURL: string;
 
@@ -123,6 +132,9 @@
       if (sessionStorage.getItem('clusterType') === 'Registered') {
         this.isRegisterPage = true;
       }
+      this.createdbyosm = data.createdbyosm;
+      this.bootstrap = data.bootstrap;
+      this.key = data.key;
       if (!isNullOrUndefined(this.params)) {
         if (this.params.page === 'instantiateNS') {
           this.isPage = true;
@@ -230,9 +242,6 @@
       this.deleteURL = environment.KSU_URL;
     } else if (data.page === 'k8-cluster') {
       this.page = data.page;
-      if (sessionStorage.getItem('clusterType') === 'Managed' || sessionStorage.getItem('clusterType') === 'Registered') {
-        this.deleteURL = environment.K8SCREATECLUSTER_URL;
-      }
     }
   }
   /** Generate Data function @public */
@@ -245,8 +254,23 @@
     if (this.forceDelete) {
       deletingURl = this.deleteURL + '/' + this.id + '?FORCE=true';
       this.notifyMessage = 'DELETEDSUCCESSFULLY';
-    } else if (this.page === 'k8-cluster' && sessionStorage.getItem('clusterType') === 'Registered') {
-      deletingURl = this.deleteURL + '/' + this.id + '/deregister';
+    } else if (this.page === 'k8-cluster') {
+      if (this.createdbyosm === 'true') {
+        this.deleteURL = environment.K8SCREATECLUSTER_URL;
+        deletingURl = this.deleteURL + '/' + this.id;
+      } else {
+        if (this.bootstrap === false && this.key === true) {
+          this.deleteURL = environment.K8SCLUSTER_URL;
+          deletingURl = this.deleteURL + '/' + this.id;
+        } else if (this.bootstrap === false && this.key === false) {
+          this.deleteURL = environment.K8SCREATECLUSTER_URL;
+          deletingURl = this.deleteURL + '/' + this.id + '/deregister';
+        }
+        else if (this.bootstrap === true) {
+          this.deleteURL = environment.K8SCREATECLUSTER_URL;
+          deletingURl = this.deleteURL + '/' + this.id + '/deregister';
+        }
+      }
     } else {
       deletingURl = this.deleteURL + '/' + this.id;
     }