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

@ -4,35 +4,52 @@
<p-panel #content [showHeader]="false" class="block-panel"> <p-panel #content [showHeader]="false" class="block-panel">
<div class="ui-g"> <div class="ui-g">
<div class="ui-g-6 ui-nopad"> <div class="ui-g-6 ui-nopad">
<h3>Host</h3> <h3>Host</h3>
</div>
<div class="ui-g-6 nopad" dir="rtl" style="padding-top: 15px">
</div>
</div> </div>
<!-- Host info --> <div class="ui-g-6 nopad" dir="rtl" style="padding-top: 15px">
</div>
</div>
<!-- Host info -->
<div class="ui-g ui-bottom-space-10"> <div class="ui-g ui-bottom-space-10">
<div class="ui-g-12 ui-nopad"> <div class="ui-g-12 ui-nopad">
<p-panel [showHeader]="false"> <p-panel [showHeader]="false">
<div *ngIf="infraHost"> <div *ngIf="infraHost">
<div class="ui-g"> <div class="ui-g">
<div class="ui-g-12 ui-md-6 ui-key-value"> <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>
<div class="ui-g-12 ui-md-6 ui-key-value"> <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>
<div class="ui-g-12 ui-md-6 ui-key-value"> <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>
<div class="ui-g-12 ui-md-6 ui-key-value"> <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>
<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>
</div> </div>
</p-panel> </p-panel>

View File

@ -8,9 +8,10 @@
<tr> <tr>
<th>Probe Name</th> <th>Probe Name</th>
<th>Uptime</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">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 pResizableColumn>Targets</th>
<th style="width:8em">Authroized at</th> <th style="width:8em">Authroized at</th>
<th style="width:9em">Authroized by</th> <th style="width:9em">Authroized by</th>
@ -20,9 +21,10 @@
<tr [pSelectableRow]="probeHost"> <tr [pSelectableRow]="probeHost">
<td>{{probeHost.probe.name}}</td> <td>{{probeHost.probe.name}}</td>
<td>{{getUptime(probeHost.probe)}}</td> <td>{{getUptime(probeHost.probe)}}</td>
<td></td>
<td></td>
<td>{{probeHost.probe.cidr}}</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.targetCount}}</td>
<td>{{probeHost.probe.authorizeDate | date: 'dd.MM.yyyy'}}</td> <td>{{probeHost.probe.authorizeDate | date: 'dd.MM.yyyy'}}</td>
<td>{{probeHost.probe.authorizeMember.name}}</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 { ProbeLoggerModule } from './probe-logger.module';
import { MetaModule } from '@overflow/meta/meta.module'; import { MetaModule } from '@overflow/meta/meta.module';
// import { InfraModule } from '@overflow/infra/infra.module';
import { UIModule } from '@overflow/shared/ui/ui.module'; import { UIModule } from '@overflow/shared/ui/ui.module';
import { SharedModule } from 'primeng/primeng';
@NgModule({ @NgModule({
imports: [ imports: [
@ -18,9 +18,9 @@ import { UIModule } from '@overflow/shared/ui/ui.module';
FormsModule, FormsModule,
UIModule, UIModule,
MetaModule, MetaModule,
// InfraModule,
ProbeRPCModule, ProbeRPCModule,
ProbeLoggerModule, ProbeLoggerModule,
SharedModule
], ],
declarations: [ declarations: [
COMPONENTS, 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 { KeyValueComponent } from './key-value.component';
import { ErrorMessageComponent } from './error-message.component'; import { ErrorMessageComponent } from './error-message.component';
import { MessageComponent } from './message.component'; import { MessageComponent } from './message.component';
import { HostIPsOverlayComponent } from './host-ips-overlay.component';
export const COMPONENTS = [ export const COMPONENTS = [
BlockProgressbarComponent, BlockProgressbarComponent,
KeyValueComponent, KeyValueComponent,
MessageComponent, MessageComponent,
ErrorMessageComponent, ErrorMessageComponent,
HostIPsOverlayComponent
]; ];

View File

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