1
0
mirror of https://github.com/dkmstr/openuds-gui.git synced 2024-10-26 08:55:23 +03:00

moved staff info to a module for clearer

This commit is contained in:
Adolfo Gómez García 2020-05-11 13:59:50 +02:00
parent 32d22a3276
commit 7fe11c1967
6 changed files with 80 additions and 61 deletions

View File

@ -30,6 +30,8 @@ import { FooterComponent } from './gui/footer/footer.component';
import { ServiceComponent } from './gui/components/service/service.component';
import { ServicesGroupComponent } from './gui/components/services-group/services-group.component';
import { StaffInfoComponent } from './gui/components/staff-info/staff-info.component';
import { ModalComponent } from './gui/modal/modal.component';
import { SafeHtmlPipe } from './gui/safe-html.pipe';
import { AboutComponent } from './pages/about/about.component';
@ -54,6 +56,7 @@ import { LauncherComponent } from './pages/launcher/launcher.component';
AboutComponent,
DownloadsComponent,
LauncherComponent,
StaffInfoComponent,
],
imports: [
BrowserModule,

View File

@ -0,0 +1,13 @@
.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

@ -0,0 +1,47 @@
<div *ngIf="api.staffInfo" class="staff-info">
<h1><uds-translate>Information</uds-translate></h1>
<mat-accordion>
<mat-expansion-panel>
<mat-expansion-panel-header class="staff-panel">
<mat-panel-title>
IPs
</mat-panel-title>
<mat-panel-description>
<uds-translate>Client IP</uds-translate>
</mat-panel-description>
</mat-expansion-panel-header>
<ol>
<li><uds-translate>Client IP</uds-translate>: {{ api.staffInfo.ip }}</li>
<li *ngIf="api.staffInfo.ip_proxy !== api.staffInfo.ip"><uds-translate>Detected proxy ip</uds-translate>: {{ api.staffInfo.ip_proxy }}</li>
</ol>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header class="staff-panel">
<mat-panel-title>
<uds-translate>Transports</uds-translate>
</mat-panel-title>
<mat-panel-description>
<uds-translate>UDS transports for this client</uds-translate>
</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>
<uds-translate>Networks</uds-translate>
</mat-panel-title>
<mat-panel-description>
<uds-translate>UDS networks for this IP</uds-translate>
</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

@ -0,0 +1,16 @@
import { Component, OnInit } from '@angular/core';
import { UDSApiService } from '../../../uds-api.service';
@Component({
selector: 'uds-staff-info',
templateUrl: './staff-info.component.html',
styleUrls: ['./staff-info.component.css']
})
export class StaffInfoComponent implements OnInit {
constructor(public api: UDSApiService) { }
ngOnInit(): void {
}
}

View File

@ -1,17 +1,3 @@
.services-groups {
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

@ -4,50 +4,4 @@
</mat-accordion>
</div>
<div *ngIf="api.staffInfo" class="staff-info">
<h1><uds-translate>Information</uds-translate></h1>
<mat-accordion>
<mat-expansion-panel>
<mat-expansion-panel-header class="staff-panel">
<mat-panel-title>
IPs
</mat-panel-title>
<mat-panel-description>
<uds-translate>Client IP</uds-translate>
</mat-panel-description>
</mat-expansion-panel-header>
<ol>
<li><uds-translate>Client IP</uds-translate>: {{ api.staffInfo.ip }}</li>
<li *ngIf="api.staffInfo.ip_proxy !== api.staffInfo.ip"><uds-translate>Detected proxy ip</uds-translate>: {{ api.staffInfo.ip_proxy }}</li>
</ol>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header class="staff-panel">
<mat-panel-title>
<uds-translate>Transports</uds-translate>
</mat-panel-title>
<mat-panel-description>
<uds-translate>UDS transports for this client</uds-translate>
</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>
<uds-translate>Networks</uds-translate>
</mat-panel-title>
<mat-panel-description>
<uds-translate>UDS networks for this IP</uds-translate>
</mat-panel-description>
</mat-expansion-panel-header>
<span *ngFor="let n of api.staffInfo.networks">{{ n }}</span>&nbsp;
</mat-expansion-panel>
</mat-accordion>
</div>
<uds-staff-info></uds-staff-info>