Commit 6e71d866 authored by zheng liu's avatar zheng liu

Merged in dev (pull request #88)

Dev
parents bff1f3d4 f452cf6b
......@@ -107,8 +107,6 @@ export class HttpService {
const params = new HttpParams()
.set('asset_token', assetToken)
.set('token', token);
// 原有:/api/session/ext/jumpserver/asset/token/add?asset_token=<asset_token>&token=<token>
// 改为:/api/ext/jumpserver/asset/token/add?asset_token=<asset_token>&token=<token>
return this.http.get(
'/guacamole/api/ext/jumpserver/asset/token/add',
{
......
......@@ -39,6 +39,7 @@ export class ConnectPageComponent implements OnInit {
.subscribe(
data => {
this._localStorage.set('user-' + this.token, data['user']);
this.userid = data['user'];
this.getAuthToken();
}
);
......
import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';
import {CookieService} from 'ngx-cookie-service';
import {HttpService, LocalStorageService, LogService} from '../../app.service';
import {HttpService, LogService} from '../../app.service';
import {DataStore, User} from '../../globals';
import {DomSanitizer} from '@angular/platform-browser';
import {environment} from '../../../environments/environment';
......@@ -22,8 +22,7 @@ export class ElementGuacamoleComponent implements OnInit {
constructor(private sanitizer: DomSanitizer,
private _http: HttpService,
private _cookie: CookieService,
private _logger: LogService,
private _localStorage: LocalStorageService) {
private _logger: LogService) {
}
ngOnInit() {
......@@ -54,7 +53,6 @@ export class ElementGuacamoleComponent implements OnInit {
this._logger.error(error2);
}
);
// '/guacamole/#/client/' + base + '?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