member_webapp/src/packages/target/component/detail/detail.component.html

65 lines
3.3 KiB
HTML
Raw Normal View History

2018-04-30 08:12:31 +00:00
<h1>Sensors</h1>
<div *ngIf="infra">
<div class="ui-g">
<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]="'Alias'" [value]="infra.target.displayName" 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]="'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>
<div class="ui-g">
<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>
<p-table [value]="sensors" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true">
<ng-template pTemplate="header">
<tr>
<th>No.</th>
<th>Description</th>
<th>Status</th>
<th>Crawler</th>
<th>Items</th>
<th>Created at</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-sensor let-rowIndex="rowIndex">
<tr [pSelectableRow]="sensor">
<td>{{rowIndex + 1}}</td>
<td>{{sensor.Description}}</td>
<td>{{sensor.status.name}}</td>
<td>{{sensor.crawler.name}}</td>
<td>???</td>
<td>{{sensor.createDate | date: 'dd.MM.yyyy'}}</td>
</tr>
</ng-template>
</p-table>
</div>
</div>
</div>