fix: update

parent 0ead13eb
......@@ -278,7 +278,6 @@ export class AppService implements OnInit {
} else if (document.location.pathname === '/luna/connect') {
User.logined = true;
} else {
// this.browser();
this._http.get_user_profile()
.subscribe(
data => {
......@@ -303,7 +302,8 @@ export class AppService implements OnInit {
err => {
// this._logger.error(err);
User.logined = false;
window.location.href = document.location.origin + '/users/login?next=' + document.location.pathname + document.location.search;
window.location.href = document.location.origin + '/users/login?next=' +
document.location.pathname + document.location.search;
// this._router.navigate(['login']);
},
// () => {
......@@ -321,35 +321,24 @@ export class AppService implements OnInit {
);
}
}
} else {
this._router.navigate(['FOF']);
// jQuery('angular2').show();
}
}
else {
this;
.
_router;
.
navigate(['FOF']);
// jQuery('angular2').show();
}
}
browser();
{
browser() {
this._http.report_browser();
}
}
getQueryString(name);
{
getQueryString(name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
const r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
}
}
//
//
......
......@@ -38,7 +38,8 @@ export class ElementGuacamoleComponent implements OnInit {
this._http.guacamole_token_add_asset(this.token, data['authToken']).subscribe(
data2 => {
this._logger.debug(data);
this.target = document.location.origin + '/guacamole/#/client/' + data2['result'] + '?asset_token=jumpserver&token=' + data['authToken'];
this.target = document.location.origin + '/guacamole/#/client/' + data2['result'] +
'?asset_token=jumpserver&token=' + data['authToken'];
},
error2 => {
this._logger.error(error2);
......
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