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

View File

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

View File

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

View File

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

View File

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