feat: update

parent 58fba0d2
app-element-term, div { div, app-element-term, app-element-guacamole {
height: 100%; height: 100%;
display: none; display: none;
} }
......
...@@ -10,4 +10,11 @@ ...@@ -10,4 +10,11 @@
[ngClass]="{'active':i==NavList.Active}" [ngClass]="{'active':i==NavList.Active}"
*ngIf="m.type=='ssh'"> *ngIf="m.type=='ssh'">
</app-element-term> </app-element-term>
<app-element-guacamole [host]="m.host"
[userid]="m.user.id"
[index]="i"
[ngClass]="{'active':i==NavList.Active}"
*ngIf="m.type=='rdp'">
</app-element-guacamole>
</div> </div>
...@@ -81,3 +81,19 @@ ...@@ -81,3 +81,19 @@
padding: 5px 20px 4px 15px; padding: 5px 20px 4px 15px;
height: 18px; height: 18px;
} }
/*
* scrollbar
*/
.tabs::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #F5F5F5;
}
.tabs::-webkit-scrollbar {
height: 1px;
}
.tabs::-webkit-scrollbar-thumb {
background-color: #19aa8d;
}
<div> <iframe [src]="trust(target)"></iframe>
<iframe src="{{target}}"></iframe>
</div>
iframe {
width: 100%;
height: 100%;
border: none;
background-color: white;
}
import {Component, Input, OnInit} from '@angular/core'; import {Component, Input, OnInit} from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
import {NavList} from '../../ControlPage/control/control.component';
@Component({ @Component({
selector: 'app-element-guacamole', selector: 'app-element-guacamole',
...@@ -6,13 +8,24 @@ import {Component, Input, OnInit} from '@angular/core'; ...@@ -6,13 +8,24 @@ import {Component, Input, OnInit} from '@angular/core';
styleUrls: ['./guacamole.component.scss'] styleUrls: ['./guacamole.component.scss']
}) })
export class ElementGuacamoleComponent implements OnInit { export class ElementGuacamoleComponent implements OnInit {
@Input() target: string; @Input() host: any;
@Input() userid: any;
@Input() index: number;
target: string;
constructor() { constructor(private sanitizer: DomSanitizer) {
} }
ngOnInit() { ngOnInit() {
this.target = '/guacamole/?asset_id=' + '&system_user_id=' + ''; // this.target = '/guacamole/?asset_id=' + '&system_user_id=' + '';
this.target = 'https://www.baidu.com';
} }
trust(url) {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
Disconnect() {
NavList.List[this.index].connected = false;
}
} }
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