diff --git a/src/app/elements/asset-tree/asset-tree.component.ts b/src/app/elements/asset-tree/asset-tree.component.ts index 84b7e844..7d6cf162 100644 --- a/src/app/elements/asset-tree/asset-tree.component.ts +++ b/src/app/elements/asset-tree/asset-tree.component.ts @@ -220,7 +220,7 @@ export class ElementAssetTreeComponent implements OnInit, OnDestroy { } const cloudNodes = await this._http.getMyGrantedK8SApps().toPromise(); if (cloudNodes.length > 0) { - const _cloudTree = $.fn.zTree.init($('#K8SAppsTree'), setting, remoteNodes); + const _cloudTree = $.fn.zTree.init($('#K8SAppsTree'), setting, cloudNodes); cloudAppRootNode['children'] = _cloudTree.getNodes(); applicationNodes[0].children.push(cloudAppRootNode); _cloudTree.destroy(); diff --git a/src/app/elements/connect/connect.component.ts b/src/app/elements/connect/connect.component.ts index 0b66ff1b..f2065928 100644 --- a/src/app/elements/connect/connect.component.ts +++ b/src/app/elements/connect/connect.component.ts @@ -68,9 +68,9 @@ export class ElementConnectComponent implements OnInit, OnDestroy { case 'remote_app': this._http.getMyGrantedRemoteApps(loginTo).subscribe( nodes => { - if (nodes.length === 1) { + if (nodes.length === 2) { this.hasLoginTo = true; - const node = nodes[0]; + const node = nodes[1]; this.Connect(node); } } @@ -79,9 +79,9 @@ export class ElementConnectComponent implements OnInit, OnDestroy { case 'database_app': this._http.getMyGrantedDBApps(loginTo).subscribe( nodes => { - if (nodes.length === 1) { + if (nodes.length === 2) { this.hasLoginTo = true; - const node = nodes[0]; + const node = nodes[1]; this.Connect(node); } } @@ -90,9 +90,9 @@ export class ElementConnectComponent implements OnInit, OnDestroy { case 'k8s_app': this._http.getMyGrantedK8SApps(loginTo).subscribe( nodes => { - if (nodes.length === 1) { + if (nodes.length === 2) { this.hasLoginTo = true; - const node = nodes[0]; + const node = nodes[1]; this.Connect(node); } }