This commit is contained in:
geek 2018-06-05 18:45:26 +09:00
parent 4443f075d8
commit e5ae41121e
6 changed files with 109 additions and 106 deletions

View File

@ -1,72 +1,72 @@
<div *ngIf="infra">
<div *ngIf="infra.infraType.name == 'HOST'">
<button pButton type="button" label="Traceroute" (click)="onTraceroute()"></button>
</div>
<!--<div *ngIf="infra">-->
<!--<div *ngIf="infra.infraType.name == 'HOST'">-->
<!--<button pButton type="button" label="Traceroute" (click)="onTraceroute()"></button>-->
<!--</div>-->
<div class="ui-g">
<div class="ui-g-12">
<div class="ui-inputgroup">
<span class="md-inputfield">
<input #input type="text" pInputText value="{{infra.target.displayName}}" (keypress)="onDisplayNameChangeKeypress($event, input.value)">
<label></label>
</span>
<button pButton label="Save" type="button" (click)="onDisplayNameChange(input.value)"></button>
</div>
</div>
<div class="ui-g-12">
<p-panel [showHeader]="false">
<div class="ui-key-value">
<span>Status</span>
<span class="ng-star-inserted">
<i class="fa ui-icon-stop ui-status-icon ui-status-success"></i>Up</span>
</div>
<of-key-value [key]="'Description'" [value]="infra.target.description" class="ui-key-value"></of-key-value>
<of-key-value [key]="'Type'" [value]="infra.infraType.name" class="ui-key-value"></of-key-value>
<of-key-value [key]="'Created at'" [value]="infra.createDate | date: 'dd/MM/yyyy'" class="ui-key-value"></of-key-value>
<of-key-value [key]="'Sensors'" [value]="infra.target.sensorCount" class="ui-key-value"></of-key-value>
</p-panel>
</div>
<div class="ui-g-12">
<div class="ui-g">
<div class="ui-g-12 ui-md-5 ui-g-nopad">
<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay" [showHeader]="false" [closeOnEscape]="false">
<of-sensor-setting [visible]="sensorSettingDisplay" [preTarget]="infra.target" (close)="onSensorSettingClose()"></of-sensor-setting>
</p-dialog>
<!--<div class="ui-g">-->
<!--<div class="ui-g-12">-->
<!--<div class="ui-inputgroup">-->
<!--<span class="md-inputfield">-->
<!--<input #input type="text" pInputText value="{{infra.target.displayName}}" (keypress)="onDisplayNameChangeKeypress($event, input.value)">-->
<!--<label></label>-->
<!--</span>-->
<!--<button pButton label="Save" type="button" (click)="onDisplayNameChange(input.value)"></button>-->
<!--</div>-->
<!--</div>-->
<!--<div class="ui-g-12">-->
<!--<p-panel [showHeader]="false">-->
<!--<div class="ui-key-value">-->
<!--<span>Status</span>-->
<!--<span class="ng-star-inserted">-->
<!--<i class="fa ui-icon-stop ui-status-icon ui-status-success"></i>Up</span>-->
<!--</div>-->
<!--<of-key-value [key]="'Description'" [value]="infra.target.description" class="ui-key-value"></of-key-value>-->
<!--<of-key-value [key]="'Type'" [value]="infra.infraType.name" class="ui-key-value"></of-key-value>-->
<!--<of-key-value [key]="'Created at'" [value]="infra.createDate | date: 'dd/MM/yyyy'" class="ui-key-value"></of-key-value>-->
<!--<of-key-value [key]="'Sensors'" [value]="infra.target.sensorCount" class="ui-key-value"></of-key-value>-->
<!--</p-panel>-->
<!--</div>-->
<!--<div class="ui-g-12">-->
<!--<div class="ui-g">-->
<!--<div class="ui-g-12 ui-md-5 ui-g-nopad">-->
<!--<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay" [showHeader]="false" [closeOnEscape]="false">-->
<!--<of-sensor-setting [visible]="sensorSettingDisplay" [preTarget]="infra.target" (close)="onSensorSettingClose()"></of-sensor-setting>-->
<!--</p-dialog>-->
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-button-large ui-button-width-fit" (click)="onAddSensor()"></button>
</div>
<div class="ui-g-12 ui-md-7 ui-g-nopad">
<div style="float: right; margin-top: 30px;">
<i class="fa ui-icon-stop ui-status-icon ui-status-success"></i>Up
<i class="fa ui-icon-stop ui-status-icon ui-status-fatal"></i>Down
<i class="fa ui-icon-stop ui-status-icon ui-status-warn"></i>Warn
<i class="fa ui-icon-stop ui-status-icon ui-status-error"></i>Error
</div>
</div>
</div>
</div>
<div class="ui-g-12">
<p-table [value]="sensors" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true">
<ng-template pTemplate="header">
<tr>
<th>Alias</th>
<th>Status</th>
<th>Crawler</th>
<th>Items</th>
<th>Created at</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-sensor>
<tr [pSelectableRow]="sensor">
<td>{{sensor.displayName}}</td>
<td>{{sensor.status.name}}</td>
<td>{{sensor.crawler.name}}</td>
<td>{{sensor.itemCount}}</td>
<td>{{sensor.createDate | date: 'dd.MM.yyyy'}}</td>
</tr>
</ng-template>
</p-table>
<p-paginator [rows]="pageSize" [totalRecords]="sensorsCount" (onPageChange)="onPaging($event)"></p-paginator>
</div>
</div>
</div>
<!--<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-button-large ui-button-width-fit" (click)="onAddSensor()"></button>-->
<!--</div>-->
<!--<div class="ui-g-12 ui-md-7 ui-g-nopad">-->
<!--<div style="float: right; margin-top: 30px;">-->
<!--<i class="fa ui-icon-stop ui-status-icon ui-status-success"></i>Up-->
<!--<i class="fa ui-icon-stop ui-status-icon ui-status-fatal"></i>Down-->
<!--<i class="fa ui-icon-stop ui-status-icon ui-status-warn"></i>Warn-->
<!--<i class="fa ui-icon-stop ui-status-icon ui-status-error"></i>Error-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="ui-g-12">-->
<!--<p-table [value]="sensors" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true">-->
<!--<ng-template pTemplate="header">-->
<!--<tr>-->
<!--<th>Alias</th>-->
<!--<th>Status</th>-->
<!--<th>Crawler</th>-->
<!--<th>Items</th>-->
<!--<th>Created at</th>-->
<!--</tr>-->
<!--</ng-template>-->
<!--<ng-template pTemplate="body" let-sensor>-->
<!--<tr [pSelectableRow]="sensor">-->
<!--<td>{{sensor.displayName}}</td>-->
<!--<td>{{sensor.status.name}}</td>-->
<!--<td>{{sensor.crawler.name}}</td>-->
<!--<td>{{sensor.itemCount}}</td>-->
<!--<td>{{sensor.createDate | date: 'dd.MM.yyyy'}}</td>-->
<!--</tr>-->
<!--</ng-template>-->
<!--</p-table>-->
<!--<p-paginator [rows]="pageSize" [totalRecords]="sensorsCount" (onPageChange)="onPaging($event)"></p-paginator>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->

View File

@ -1,34 +1,34 @@
<h1>Targets</h1>
<!--<h1>Targets</h1>-->
<p-table [value]="infras" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true" >
<ng-template pTemplate="header">
<tr>
<th style="width: 4em">No.</th>
<th style="width: 8em">Status</th>
<th style="width: 8em">Type</th>
<th>Name</th>
<th style="width: 15em">Sensors</th>
<th style="width: 8em">Created at</th>
<th style="width: 10em"></th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-infra let-rowIndex="rowIndex">
<tr [pSelectableRow]="infra">
<td>{{rowIndex + 1}}</td>
<td>??</td>
<td>{{infra.infraType.name}}</td>
<td>{{infra.target.displayName}}</td>
<td>{{infra.target.sensorCount}}</td>
<td>{{infra.createDate | date: 'dd.MM.yyyy'}}</td>
<td>
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-s-button" (click)="onAddSensor(infra.target)"></button>
</td>
</tr>
</ng-template>
</p-table>
<p-paginator [rows]="pageSize" [totalRecords]="totalLength" (onPageChange)="onPaging($event)"></p-paginator>
<!--<p-table [value]="infras" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true" >-->
<!--<ng-template pTemplate="header">-->
<!--<tr>-->
<!--<th style="width: 4em">No.</th>-->
<!--<th style="width: 8em">Status</th>-->
<!--<th style="width: 8em">Type</th>-->
<!--<th>Name</th>-->
<!--<th style="width: 15em">Sensors</th>-->
<!--<th style="width: 8em">Created at</th>-->
<!--<th style="width: 10em"></th>-->
<!--</tr>-->
<!--</ng-template>-->
<!--<ng-template pTemplate="body" let-infra let-rowIndex="rowIndex">-->
<!--<tr [pSelectableRow]="infra">-->
<!--<td>{{rowIndex + 1}}</td>-->
<!--<td>??</td>-->
<!--<td>{{infra.infraType.name}}</td>-->
<!--<td>{{infra.target.displayName}}</td>-->
<!--<td>{{infra.target.sensorCount}}</td>-->
<!--<td>{{infra.createDate | date: 'dd.MM.yyyy'}}</td>-->
<!--<td>-->
<!--<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-s-button" (click)="onAddSensor(infra.target)"></button>-->
<!--</td>-->
<!--</tr>-->
<!--</ng-template>-->
<!--</p-table>-->
<!--<p-paginator [rows]="pageSize" [totalRecords]="totalLength" (onPageChange)="onPaging($event)"></p-paginator>-->
<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay" [showHeader]="false" [closeOnEscape]="false">
<of-sensor-setting [visible]="sensorSettingDisplay" [preTarget]="target" (close)="onSensorSettingClose()"></of-sensor-setting>
</p-dialog>
<!--<p-dialog [modal]="true" [width]="800" [(visible)]="sensorSettingDisplay" [showHeader]="false" [closeOnEscape]="false">-->
<!--<of-sensor-setting [visible]="sensorSettingDisplay" [preTarget]="target" (close)="onSensorSettingClose()"></of-sensor-setting>-->
<!--</p-dialog>-->

View File

@ -13,7 +13,6 @@ const routes: Routes = [
{ path: 'discovery', loadChildren: './discovery/discovery-page.module#DiscoveryPageModule' },
{ path: 'map', loadChildren: './infra/infra-page.module#InfraPageModule' },
{ path: 'sensor', loadChildren: './sensors/sensor-tab-page.module#SensorTabPageModule' },
{ path: 'target', loadChildren: './target/target-page.module#TargetPageModule'},
// { path: 'target', loadChildren: './target/target-page.module#TargetPageModule' },
// { path: 'overview', loadChildren: './overview/overview-page.module#OverviewPageModule' },
// { path: 'dashboard', loadChildren: './dashboard/dashboard-page.module#DashboardPageModule' },

View File

@ -17,6 +17,7 @@ const routes: Routes = [
{ path: 'download/:idx', component: ProbeDownloadPageComponent },
{ path: ':id/info', component: ProbeDetailPageComponent },
{ path: ':id/history', component: null },
{ path: 'target', loadChildren: '../pages/target/target-page.module#TargetPageModule'},
]
},
];

View File

@ -2,8 +2,9 @@
<div class="ui-g">
<div class="ui-g-12">
<div class="card no-margin">
<of-discovery [probeHostID]="probeHostID"></of-discovery>
<!--<of-discovery [probeHostID]="probeHostID"></of-discovery>-->
sdfsdf
</div>
</div>
</div>
</div>
</div>

View File

@ -2,21 +2,23 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { UIModule } from '@overflow/shared/ui/ui.module';
import { TargetModule } from '@overflow/target/target.module';
// import { TargetModule } from '@overflow/target/target.module';
import { TargetListPageComponent } from './target-list-page.component';
import { TargetDetailPageComponent } from './target-detail-page.component';
import { TargetPageRoutingModule } from './target-page-routing.module';
import { TargetPageComponent } from './target-page.component';
@NgModule({
imports: [
CommonModule,
UIModule,
TargetPageRoutingModule,
TargetModule,
// TargetModule,
// TabbarModule
],
declarations: [
TargetPageComponent,
TargetListPageComponent,
TargetDetailPageComponent,
]