Unverified Commit bf7ad2e1 authored by liuzheng712's avatar liuzheng712

Merge branch 'dev'

parents 9616698b ce5f4881
......@@ -177,6 +177,27 @@ def asset_groups_assets():
return jsonify(assets)
@app.route('/api/users/v1/profile/')
def user_profile():
assets = {
"id": "4fc67feb-9efa-4e7b-94b0-b73356a87b2e",
"username": "admin",
"name": "Administrator",
"email": "admin@mycomany.com",
"is_active": True,
"is_superuser": True,
"role": "Administrator",
"groups": [
"Default"
],
"wechat": "",
"phone": 13888888888,
"comment": "",
"date_expired": "2087-12-16 07:41:35"
}
return jsonify(assets)
@app.route('/api/terminal/v1/sessions/test/replay/')
def replay():
return redirect("http://jps.ilz.me/media/2017-12-24/ec87a486-0344-4f12-b27a-620321944f7f.gz")
......
{
"/api": {
"target": "http://localhost:5000",
"target": "http://127.0.0.1:5000",
"secure": false
},
"/socket.io/": {
......
......@@ -52,6 +52,7 @@ import {LinuxComponent} from './monitor-page/linux/linux.component';
import {WindowsComponent} from './monitor-page/windows/windows.component';
import {NgProgressModule} from 'ngx-progressbar';
import {TestPageComponent} from './test-page/test-page.component';
import {HttpClientModule} from '@angular/common/http';
// import {NgxLayerModule} from 'ngx-layer';
......@@ -62,6 +63,7 @@ import {TestPageComponent} from './test-page/test-page.component';
AppRoutingModule,
HttpModule,
NgProgressModule,
HttpClientModule
// NgxLayerModule
],
declarations: [
......
......@@ -2,9 +2,9 @@ import {Component, Input, OnInit} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
import {NavList} from '../../ControlPage/control/control.component';
import {User} from '../../globals';
import {LogService} from '../../app.service';
import {HttpService, LogService} from '../../app.service';
import * as Base64 from 'base64-js/base64js.min';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {Headers} from '@angular/http';
@Component({
selector: 'app-element-iframe',
......@@ -18,17 +18,15 @@ export class ElementIframeComponent implements OnInit {
target: string;
constructor(private sanitizer: DomSanitizer,
private _http: HttpClient,
private _http: HttpService,
private _logger: LogService) {
}
ngOnInit() {
// /guacamole/api/tokens will redirect to http://guacamole/api/tokens
const header = new HttpHeaders();
header.append('Content-Type', 'application/x-www-form-urlencoded');
this._http.headers.set('Content-Type', 'application/x-www-form-urlencoded');
this._http.get('/guacamole/api/tokens?username=' + User.name + '&password=zheng&asset_id=' +
this.host.id + '&system_user_id=' + this.userid, {headers: header}
)
this.host.id + '&system_user_id=' + this.userid)
.subscribe(
data => {
const title = this.host.hostname + '[' + this.host.ip + ']';
......
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