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.html b/src/app/utilities/delete/DeleteComponent.html
index 81cece0..c7a6c62 100644
--- a/src/app/utilities/delete/DeleteComponent.html
+++ b/src/app/utilities/delete/DeleteComponent.html
@@ -16,7 +16,7 @@
 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="modal-header">
-  <h4 *ngIf="isRegisterPage; else Delete" class="modal-title" id="modal-basic-title">
+  <h4 *ngIf="createdbyosm === 'false'; else Delete" class="modal-title" id="modal-basic-title">
     {{'DEREGISTER' | translate}}
   </h4>
   <ng-template #Delete>
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;
     }
diff --git a/src/app/utilities/show-info/ShowInfoComponent.ts b/src/app/utilities/show-info/ShowInfoComponent.ts
index 015d50c..6c21ac5 100644
--- a/src/app/utilities/show-info/ShowInfoComponent.ts
+++ b/src/app/utilities/show-info/ShowInfoComponent.ts
@@ -98,6 +98,9 @@
   /** Reading the page Name @public */
   public titleName: string;
 
+  /** Contains url @public */
+  public url: string;
+
   /** Check the loading results @public */
   public isLoadingResults: Boolean = false;
 
@@ -193,15 +196,25 @@
           this.isLoadingResults = false;
         });
     } else if (this.params.page === 'k8s-cluster') {
-      this.restService.getResource(environment.K8SCLUSTER_URL + '/' +
-        this.params.id).subscribe((k8sclusterOpn: {}[]) => {
-          this.defaults['text/json'] = JSON.stringify(k8sclusterOpn, null, '\t');
-        }, (error: ERRORDATA) => {
-          this.isLoadingResults = false;
-          this.restService.handleError(error, 'get');
-        }, () => {
-          this.isLoadingResults = false;
-        });
+      if (this.params.createdbyosm === 'true') {
+        this.url = environment.K8SCREATECLUSTER_URL + '/' + this.params.id;
+      } else {
+        if (this.params.bootstrap === true) {
+          this.url = environment.K8SCREATECLUSTER_URL + '/' + this.params.id;
+        } else if (this.params.bootstrap === false && this.params.key === false) {
+          this.url = environment.K8SCREATECLUSTER_URL + '/' + this.params.id;
+        } else if (this.params.bootstrap === false && this.params.key === true) {
+          this.url = environment.K8SCLUSTER_URL + '/' + this.params.id;
+        }
+      }
+      this.restService.getResource(this.url).subscribe((k8sclusterOpn: {}[]) => {
+        this.defaults['text/json'] = JSON.stringify(k8sclusterOpn, null, '\t');
+      }, (error: ERRORDATA) => {
+        this.isLoadingResults = false;
+        this.restService.handleError(error, 'get');
+      }, () => {
+        this.isLoadingResults = false;
+      });
     } else if (this.params.page === 'k8s-repo') {
       this.restService.getResource(environment.K8REPOS_URL + '/' +
         this.params.id).subscribe((k8srepoOpn: {}[]) => {