feat: plantform

parent 86328574
...@@ -108,7 +108,7 @@ def asset_groups_assets(): ...@@ -108,7 +108,7 @@ def asset_groups_assets():
"hostname": "192.168.1.6", "hostname": "192.168.1.6",
"ip": "192.168.2.6", "ip": "192.168.2.6",
"port": 22, "port": 22,
"system": "linux", "plantform": "Linux",
"system_users_granted": [ "system_users_granted": [
{ {
"id": 1, "id": 1,
...@@ -125,7 +125,7 @@ def asset_groups_assets(): ...@@ -125,7 +125,7 @@ def asset_groups_assets():
"hostname": "windows server", "hostname": "windows server",
"ip": "123.57.183.135", "ip": "123.57.183.135",
"port": 3389, "port": 3389,
"system": "windows", "plantform": "Windows",
"assets_granted": [ "assets_granted": [
{ {
"id": 1, "id": 1,
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<label for="hostgroup-{{i}}">{{hostGroup.name}}</label> <label for="hostgroup-{{i}}">{{hostGroup.name}}</label>
<ul [ngClass]="{'insearch': q }"> <ul [ngClass]="{'insearch': q }">
<li *ngFor="let host of hostGroup.assets_granted | SearchFilter: q" (click)="Connect(host)"> <li *ngFor="let host of hostGroup.assets_granted | SearchFilter: q" (click)="Connect(host)">
<i class="fa" [ngClass]="'fa-'+host.system" id="fa-{{i}}"></i> <i class="fa" [ngClass]="'fa-'+host.plantform" id="fa-{{i}}"></i>
{{host.hostname}} {{host.hostname}}
</li> </li>
</ul> </ul>
......
...@@ -127,11 +127,11 @@ export class CleftbarComponent implements OnInit { ...@@ -127,11 +127,11 @@ export class CleftbarComponent implements OnInit {
if (userid === '') { if (userid === '') {
return; return;
} }
if (host.system === 'linux') { if (host.plantform === 'Linux') {
jQuery('app-ssh').show(); jQuery('app-ssh').show();
jQuery('app-rdp').hide(); jQuery('app-rdp').hide();
this._term.TerminalConnect(host, userid); this._term.TerminalConnect(host, userid);
} else if (host.system === 'windows') { } else if (host.plantform === 'Windows') {
jQuery('app-ssh').hide(); jQuery('app-ssh').hide();
jQuery('app-rdp').show(); jQuery('app-rdp').show();
this._rdp.Connect(host, userid); this._rdp.Connect(host, userid);
......
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