Commit a62a9c76 authored by ibuler's avatar ibuler

[Update] 修改直接连接

parent d0732590
......@@ -41,17 +41,24 @@ export class ElementConnectComponent implements OnInit, OnDestroy {
}
});
const loginTo = this._appSvc.getQueryString('login_to');
if (loginTo && !this.hasLoginTo) {
this._http.filterMyGrantedAssetsById(loginTo).subscribe(
nodes => {
if (nodes.length === 1) {
this.hasLoginTo = true;
const node = nodes[0];
this.Connect(node);
const tp = this._appSvc.getQueryString('type') || 'asset';
if (this.hasLoginTo || !loginTo) {
return;
}
switch (tp) {
case 'asset':
this._http.filterMyGrantedAssetsById(loginTo).subscribe(
nodes => {
if (nodes.length === 1) {
this.hasLoginTo = true;
const node = nodes[0];
this.Connect(node);
}
}
}
);
this._http.getMyGrantedRemoteApps(loginTo).subscribe(
);
break;
case 'remote_app':
this._http.getMyGrantedRemoteApps(loginTo).subscribe(
nodes => {
if (nodes.length === 1) {
this.hasLoginTo = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment