This commit is contained in:
insanity 2018-06-14 13:12:20 +09:00
parent 8797b4fa60
commit 33a66ce300
3 changed files with 1854 additions and 1833 deletions

View File

@ -22,8 +22,8 @@
</a> </a>
</td> </td>
<td>{{rowData.tempProbeKey}}</td> <td>{{rowData.tempProbeKey}}</td>
<td>{{rowData.infraHost.host.name}}</td> <td>{{rowData.infraHost.infraHostOS.name}}</td>
<td>{{rowData.infraHost.host.os}}</td> <td>{{rowData.infraHost.infraHostOS.os}}</td>
<td>{{rowData.createDate | date: 'dd/MM/yyyy'}}</td> <td>{{rowData.createDate | date: 'dd/MM/yyyy'}}</td>
</tr> </tr>
</ng-template> </ng-template>
@ -34,17 +34,17 @@
<div class="ui-g-12 ui-md-6"> <div class="ui-g-12 ui-md-6">
<div class="ui-g-12"> <div class="ui-g-12">
<b>Platform:</b> {{rowData.infraHost.host.platform}} <b>Platform:</b> {{rowData.infraHost.infraHostOS.platform}}
</div> </div>
<div class="ui-g-12"> <div class="ui-g-12">
<b>Platform family:</b> {{rowData.infraHost.host.platformFamily}} <b>Platform family:</b> {{rowData.infraHost.infraHostOS.platformFamily}}
</div> </div>
<div class="ui-g-12"> <div class="ui-g-12">
<b>Kernel:</b> {{rowData.infraHost.host.kernelVersion}} <b>Kernel:</b> {{rowData.infraHost.infraHostOS.kernelVersion}}
</div> </div>
<div class="ui-g-12"> <div class="ui-g-12">
<b>HostID:</b> {{rowData.infraHost.host.hostID}} <b>HostID:</b> {{rowData.infraHost.infraHostOS.hostID}}
</div> </div>
<div class="ui-g-12"> <div class="ui-g-12">
<b>Connected:</b> <b>Connected:</b>
@ -58,30 +58,40 @@
<div class="ui-g-12 ui-md-6"> <div class="ui-g-12 ui-md-6">
<div class="ui-g"> <div class="ui-g">
<div class="ui-g-12"> <div class="ui-g-12">
<b>NIC:</b> {{rowData.infraHost.network.name}} <b>NIC:</b> {{rowData.infraHost.infraHostIPs[0].iface}}
</div> </div>
<div class="ui-g-12"> <div class="ui-g-12">
<b>Network Address:</b> {{rowData.infraHost.network.address}} <b>Network Address:</b> {{rowData.infraHost.infraHostIPs[0].address}}
</div> </div>
<div class="ui-g-12"> <div class="ui-g-12">
<b>Gateway:</b> {{rowData.infraHost.network.gateway}} <b>Gateway:</b> {{rowData.infraHost.infraHostIPs[0].gateway}}
</div> </div>
<div class="ui-g-12"> <div class="ui-g-12">
<b>Mac Address:</b> {{rowData.infraHost.network.macAddress}} <b>Mac Address:</b> {{rowData.infraHost.infraHostIPs[0].mac}}
</div> </div>
<div class="ui-g-12"> <div class="ui-g-12">
</div> </div>
</div> </div>
</div> </div>
<div class="ui-g-12" dir="rtl"> <div class="ui-g-12" dir="rtl">
<button class="ui-button-danger ui-button-width-fit" type="button" label="Deny" icon="ui-icon-close" pButton (click)="onAcceptOrDeny(false, rowData)"></button> <button class="ui-button-danger ui-button-width-fit" type="button" label="Deny" icon="ui-icon-close" pButton (click)="onAcceptOrDeny(false, rowData.infraHost.infraHostIPs)"></button>
<button class=" ui-button-width-fit" type="button" label="Accept" icon="fa-check" pButton (click)="onAcceptOrDeny(true, rowData)"></button> <button class=" ui-button-width-fit" type="button" label="Accept" icon="fa-check" pButton (click)="onAccept(rowData.infraHost)"></button>
</div> </div>
</div> </div>
</td> </td>
</tr> </tr>
</ng-template> </ng-template>
</p-table> </p-table>
<p-dialog *ngIf="selectedInfraHost" [(visible)]="visibleNICs" [contentStyle]="{'max-height':'400px'}">
<ul>
<li *ngFor="let infraHostIP of selectedInfraHost.infraHostIPs">
<a style="cursor: pointer" (click)="onNICSelected(infraHostIP)">
{{infraHostIP.iface}} {{infraHostIP.address}} {{infraHostIP.gateway}} {{infraHostIP.mac}}
</a>
<li>
</ul>
</p-dialog>
<p-confirmDialog header="Confirmation" icon="fa ui-icon-warning" width="425"></p-confirmDialog> <p-confirmDialog header="Confirmation" icon="fa ui-icon-warning" width="425"></p-confirmDialog>
<!-- <p-growl [(value)]="msgs"></p-growl> -->
</p-panel> </p-panel>

View File

@ -10,6 +10,7 @@ import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { NoAuthProbeService } from '../service/noauth-probe.service'; import { NoAuthProbeService } from '../service/noauth-probe.service';
import { NoAuthProbeSubscriber, NoAuthProbeNotify } from '../subscriber/noauth-probe.subscriber'; import { NoAuthProbeSubscriber, NoAuthProbeNotify } from '../subscriber/noauth-probe.subscriber';
import { InfraHostIP, InfraHost } from '@overflow/commons-typescript';
@Component({ @Component({
selector: 'of-noauth-probe-list', selector: 'of-noauth-probe-list',
@ -23,6 +24,9 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
noauthProbes: NoAuthProbe[]; noauthProbes: NoAuthProbe[];
noauthProbeSubscription: Subscription; noauthProbeSubscription: Subscription;
selectedInfraHost: InfraHost;
visibleNICs: boolean;
constructor( constructor(
private confirmationService: ConfirmationService, private confirmationService: ConfirmationService,
private store: Store<any>, private store: Store<any>,
@ -81,6 +85,11 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
} }
} }
onAccept(infraHost: InfraHost) {
this.selectedInfraHost = infraHost;
this.visibleNICs = true;
}
onAcceptOrDeny(isAccept: boolean, selected: NoAuthProbe) { onAcceptOrDeny(isAccept: boolean, selected: NoAuthProbe) {
const title = isAccept ? const title = isAccept ?
'Are you sure to accept this Probe?' : 'Are you sure to deny this Probe'; 'Are you sure to accept this Probe?' : 'Are you sure to deny this Probe';
@ -149,5 +158,7 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
this.error$ = of(error); this.error$ = of(error);
} }
onNICSelected(infraHostIP: InfraHostIP) {
console.log(infraHostIP);
}
} }

3638
package-lock.json generated

File diff suppressed because it is too large Load Diff