1
0
mirror of https://github.com/dkmstr/openuds-gui.git synced 2025-01-18 10:03:33 +03:00

Added staff info

This commit is contained in:
Adolfo Gómez García 2020-05-11 13:34:57 +02:00
parent 3c8864cefc
commit 68b30f4abe
4 changed files with 71 additions and 2 deletions

View File

@ -1,3 +1,17 @@
.services-groups { .services-groups {
padding-top: 1rem; padding-top: 1rem;
} }
.staff-info {
margin-top: 1rem;
padding: 1rem;
background-color: rgb(235, 235, 235);
}
.staff-info h1 {
text-align: center;
}
.staff-panel {
background-color:rgb(212, 212, 212);
}

View File

@ -3,3 +3,51 @@
<uds-services-group *ngFor="let g of group; let i = index" [services]="g.services" [group]="g.group" [expanded]="i==0"></uds-services-group> <uds-services-group *ngFor="let g of group; let i = index" [services]="g.services" [group]="g.group" [expanded]="i==0"></uds-services-group>
</mat-accordion> </mat-accordion>
</div> </div>
<div *ngIf="api.staffInfo" class="staff-info">
<h1>Staff Information</h1>
<mat-accordion>
<mat-expansion-panel>
<mat-expansion-panel-header class="staff-panel">
<mat-panel-title>
IPs
</mat-panel-title>
<mat-panel-description>
Detected clients ips
</mat-panel-description>
</mat-expansion-panel-header>
<ol>
<li>Detecetd client Ip: {{ api.staffInfo.ip }}</li>
<li *ngIf="api.staffInfo.ip_proxy !== api.staffInfo.ip"><b>Detected proxy ip</b>: {{ api.staffInfo.ip_proxy }}</li>
</ol>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header class="staff-panel">
<mat-panel-title>
Transports
</mat-panel-title>
<mat-panel-description>
Known UDS Transfors for this client
</mat-panel-description>
</mat-expansion-panel-header>
<ol>
<li *ngFor="let n of api.staffInfo.transports">{{ n }}</li>
</ol>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header class="staff-panel">
<mat-panel-title>
Networks
</mat-panel-title>
<mat-panel-description>
Known UDS networks for this IP
</mat-panel-description>
</mat-expansion-panel-header>
<span *ngFor="let n of api.staffInfo.networks">{{ n }}</span>&nbsp;
</mat-expansion-panel>
</mat-accordion>
</div>

View File

@ -21,7 +21,7 @@ export class ServicesComponent implements OnInit {
servicesInformation: JSONServicesInformation; servicesInformation: JSONServicesInformation;
group: GroupedServices[]; group: GroupedServices[];
constructor(private api: UDSApiService) { constructor(public api: UDSApiService) {
} }
/** /**

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { User, UDSConfig, Downloadable } from './types/config'; import { User, UDSConfig, Downloadable, Info } from './types/config';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { JSONServicesInformation, JSONEnabledService, JSONService } from './types/services'; import { JSONServicesInformation, JSONEnabledService, JSONService } from './types/services';
import { UDSGuiService } from './gui/uds-gui.service'; import { UDSGuiService } from './gui/uds-gui.service';
@ -33,6 +33,13 @@ export class UDSApiService implements UDSApiServiceType {
return udsData.config; return udsData.config;
} }
/**
* Gets staff information
*/
get staffInfo(): Info | undefined {
return udsData.info;
}
/** /**
* Gets plugins list * Gets plugins list
*/ */