72 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			72 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<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>
 | 
						|
 | 
						|
                    <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> |