probe-list/detail modified

This commit is contained in:
insanity 2018-06-15 12:56:54 +09:00
parent 1aced160a2
commit d3d4ab68a5
7 changed files with 63 additions and 20 deletions

View File

@ -19,20 +19,37 @@
<div *ngIf="infraHost">
<div class="ui-g">
<div class="ui-g-12 ui-md-6 ui-key-value">
<of-key-value [key]="'IPv4'" [value]="infraHost.ipv4"></of-key-value>
<of-key-value [key]="'IP ver'" [value]="infraHost.infraZone.metaIPType.value"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value">
<of-key-value [key]="'IPv6'" [value]="infraHost.ipv6 | uppercase"></of-key-value>
<of-key-value [key]="'CIDR'" [value]="infraHost.infraZone.network"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value">
<of-key-value [key]="'Mac Address'" [value]="infraHost.mac"></of-key-value>
<of-key-value [key]="'Interface'" [value]="infraHost.infraZone.iface"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value">
<of-key-value [key]="'OS'" [value]="infraHost.infraOS.metaInfraVendor.name"></of-key-value>
<of-key-value [key]="'Host Type'" [value]="infraHost.metaTargetHostType.value"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value">
<of-key-value [key]="'Host IP'" [value]="infraHost.infraZone.address"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value">
<of-key-value [key]="'Host Mac'" [value]="infraHost.infraZone.mac"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value">
<of-key-value [key]="'Host OS'" [value]="infraHost.infraHostOS.name"></of-key-value>
</div>
<div class="ui-g-12 ui-md-6 ui-key-value">
<of-host-ips-overlay [infraHostIPs]="infraHost.infraHostIPs"></of-host-ips-overlay>
</div>
</div>
</div>
</p-panel>

View File

@ -8,9 +8,10 @@
<tr>
<th>Probe Name</th>
<th>Uptime</th>
<th style="width:10em">IP</th>
<th style="width:8em">OS</th>
<th style="width:10em">CIDR</th>
<th style="width:10em">Host IP</th>
<th style="width:8em">OS</th>
<th style="width:10em">Iface</th>
<th pResizableColumn>Targets</th>
<th style="width:8em">Authroized at</th>
<th style="width:9em">Authroized by</th>
@ -20,9 +21,10 @@
<tr [pSelectableRow]="probeHost">
<td>{{probeHost.probe.name}}</td>
<td>{{getUptime(probeHost.probe)}}</td>
<td></td>
<td></td>
<td>{{probeHost.probe.cidr}}</td>
<td>{{probeHost.infraHost.infraHostIP[0].address}}</td>
<td>{{probeHost.infraHost.infraHostOS.name}}</td>
<td>{{probeHost.infraHost.infraZone.iface}}</td>
<td>{{probeHost.probe.targetCount}}</td>
<td>{{probeHost.probe.authorizeDate | date: 'dd.MM.yyyy'}}</td>
<td>{{probeHost.probe.authorizeMember.name}}</td>

View File

@ -9,8 +9,8 @@ import { ProbeRPCModule } from './probe-rpc.module';
import { ProbeLoggerModule } from './probe-logger.module';
import { MetaModule } from '@overflow/meta/meta.module';
// import { InfraModule } from '@overflow/infra/infra.module';
import { UIModule } from '@overflow/shared/ui/ui.module';
import { SharedModule } from 'primeng/primeng';
@NgModule({
imports: [
@ -18,9 +18,9 @@ import { UIModule } from '@overflow/shared/ui/ui.module';
FormsModule,
UIModule,
MetaModule,
// InfraModule,
ProbeRPCModule,
ProbeLoggerModule,
SharedModule
],
declarations: [
COMPONENTS,

View File

@ -0,0 +1,7 @@
<p-overlayPanel #op *ngIf="infraHostIPs && infraHostIPs.length > 1">
<div *ngFor="let ip of infraHostIPs">
{{ip.address}}
</div>
</p-overlayPanel>
<a style="cursor: pointer; text-decoration: underline" (click)="op.toggle($event)">{{infraHostIPs[0].address}}</a>

View File

@ -0,0 +1,15 @@
import { Component, Input } from '@angular/core';
import { InfraHostIP } from '@overflow/commons-typescript';
@Component({
selector: 'of-host-ips-overlay',
templateUrl: './host-ips-overlay.component.html'
})
export class HostIPsOverlayComponent {
@Input() infraHostIPs: InfraHostIP[];
constructor(
) { }
}

View File

@ -2,10 +2,12 @@ import { BlockProgressbarComponent } from './block-progressbar.component';
import { KeyValueComponent } from './key-value.component';
import { ErrorMessageComponent } from './error-message.component';
import { MessageComponent } from './message.component';
import { HostIPsOverlayComponent } from './host-ips-overlay.component';
export const COMPONENTS = [
BlockProgressbarComponent,
KeyValueComponent,
MessageComponent,
ErrorMessageComponent,
HostIPsOverlayComponent
];

View File

@ -5,9 +5,9 @@
export const environment = {
production: false,
restBaseURL: 'http://192.168.1.101:19080/webapp',
restBaseURL: 'http://192.168.1.50:19080/webapp',
webappRPCConfig: {
url: 'ws://192.168.1.101:19090/webapp',
url: 'ws://192.168.1.50:19090/webapp',
reconnectInterval: 5000,
reconnectRetry: 10,
},