ing
This commit is contained in:
parent
7f10b3dd8a
commit
e980403faf
|
@ -1,73 +1,78 @@
|
|||
<h1>Unauthorized</h1>
|
||||
<p-blockUI [target]="content" [blocked]="pending">
|
||||
<i class="fa ui-icon-lock block-icon"></i>
|
||||
</p-blockUI>
|
||||
|
||||
<p-table #dt [value]="noauthProbes" selectionMode="single" dataKey="id">
|
||||
<p-panel #content [showHeader]="false" class="block-panel">
|
||||
<h1>Unauthorized</h1>
|
||||
<p-table #dt [value]="noauthProbes" selectionMode="single" dataKey="id">
|
||||
<ng-template pTemplate="header">
|
||||
<tr>
|
||||
<th style="width: 3.25em" pResizableColumn></th>
|
||||
<th style="width: 20em">Probe Key</th>
|
||||
<th>Host Name</th>
|
||||
<th>OS</th>
|
||||
<th style="width: 7em">Created at</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 3.25em" pResizableColumn></th>
|
||||
<th style="width: 20em">Probe Key</th>
|
||||
<th>Host Name</th>
|
||||
<th>OS</th>
|
||||
<th style="width: 7em">Created at</th>
|
||||
</tr>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="body" let-rowData let-expanded="expanded" let-columns="columns">
|
||||
<tr [pSelectableRow]="rowData" [pRowToggler]="rowData">
|
||||
<td>
|
||||
<a href="#">
|
||||
<i [ngClass]="expanded ? 'fa fa-fw fa-chevron-circle-down' : 'fa fa-fw fa-chevron-circle-right'"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{rowData.tempProbeKey}}</td>
|
||||
<td>{{rowData.descriptions.host.name}}</td>
|
||||
<td>{{rowData.descriptions.host.os}}</td>
|
||||
<td>{{rowData.createDate | date: 'dd/MM/yyyy'}}</td>
|
||||
</tr>
|
||||
<tr [pSelectableRow]="rowData" [pRowToggler]="rowData">
|
||||
<td>
|
||||
<a href="#">
|
||||
<i [ngClass]="expanded ? 'fa fa-fw fa-chevron-circle-down' : 'fa fa-fw fa-chevron-circle-right'"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{rowData.tempProbeKey}}</td>
|
||||
<td>{{rowData.descriptions.host.name}}</td>
|
||||
<td>{{rowData.descriptions.host.os}}</td>
|
||||
<td>{{rowData.createDate | date: 'dd/MM/yyyy'}}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="rowexpansion" let-rowData let-columns="columns">
|
||||
<tr>
|
||||
<td [attr.colspan]="5">
|
||||
<div class="ui-g ui-g-12">
|
||||
<tr>
|
||||
<td [attr.colspan]="5">
|
||||
<div class="ui-g ui-g-12">
|
||||
|
||||
<div class="ui-g-12 ui-md-6">
|
||||
<div class="ui-g-12">
|
||||
<b>Platform:</b> {{rowData.descriptions.host.platform}}
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-6">
|
||||
<div class="ui-g-12">
|
||||
<b>Platform:</b> {{rowData.descriptions.host.platform}}
|
||||
</div>
|
||||
|
||||
<div class="ui-g-12">
|
||||
<b>Platform family:</b> {{rowData.descriptions.host.platformFamily}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Kernel:</b> {{rowData.descriptions.host.kernelVersion}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>HostID:</b> {{rowData.descriptions.host.hostID}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Platform family:</b> {{rowData.descriptions.host.platformFamily}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Kernel:</b> {{rowData.descriptions.host.kernelVersion}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>HostID:</b> {{rowData.descriptions.host.hostID}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-g-12 ui-md-6">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<b>NIC:</b> {{rowData.descriptions.network.name}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Network Address:</b> {{rowData.descriptions.network.address}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Gateway:</b> {{rowData.descriptions.network.gateway}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Mac Address:</b> {{rowData.descriptions.network.macAddress}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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-width-fit" type="button" label="Accept" icon="fa-check" pButton (click)="onAcceptOrDeny(true, rowData)"></button>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-6">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<b>NIC:</b> {{rowData.descriptions.network.name}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="ui-g-12">
|
||||
<b>Network Address:</b> {{rowData.descriptions.network.address}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Gateway:</b> {{rowData.descriptions.network.gateway}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Mac Address:</b> {{rowData.descriptions.network.macAddress}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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-width-fit" type="button" label="Accept" icon="fa-check" pButton (click)="onAcceptOrDeny(true, rowData)"></button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
</p-table>
|
||||
<p-confirmDialog header="Confirmation" icon="fa ui-icon-warning" width="425"></p-confirmDialog>
|
||||
<p-growl [(value)]="msgs"></p-growl>
|
||||
</p-table>
|
||||
<p-confirmDialog header="Confirmation" icon="fa ui-icon-warning" width="425"></p-confirmDialog>
|
||||
<p-growl [(value)]="msgs"></p-growl>
|
||||
</p-panel>
|
|
@ -20,7 +20,7 @@ import { RPCClientError } from '@loafer/ng-rpc';
|
|||
export class NoAuthProbeListContainerComponent implements OnInit {
|
||||
noauthProbes$: Observable<NoAuthProbe[]>;
|
||||
pending$: Observable<boolean>;
|
||||
error$: Observable<RPCClientError>;
|
||||
error$: Observable<any>;
|
||||
|
||||
constructor(
|
||||
private store: Store<any>,
|
||||
|
|
|
@ -15,15 +15,39 @@ export function reducer(state = initialState, action: Actions): State {
|
|||
pending: true,
|
||||
};
|
||||
}
|
||||
|
||||
case ActionType.ReadAllByDomainIDSuccess: {
|
||||
return noAuthProbeListContainerAdapter.setAll(action.payload, {...state, pending: false});
|
||||
}
|
||||
|
||||
case ActionType.ReadAllByDomainIDFailure: {
|
||||
return noAuthProbeListContainerAdapter.setError(action.payload, {...state, pending: false});
|
||||
}
|
||||
|
||||
case ActionType.Accept: {
|
||||
return {
|
||||
...state,
|
||||
pending: true,
|
||||
};
|
||||
}
|
||||
case ActionType.AcceptSuccess: {
|
||||
return noAuthProbeListContainerAdapter.setAll(action.payload, {...state, pending: false});
|
||||
}
|
||||
case ActionType.AcceptFailure: {
|
||||
return noAuthProbeListContainerAdapter.setError(action.payload, {...state, pending: false});
|
||||
}
|
||||
|
||||
case ActionType.Deny: {
|
||||
return {
|
||||
...state,
|
||||
pending: true,
|
||||
};
|
||||
}
|
||||
case ActionType.DenySuccess: {
|
||||
return noAuthProbeListContainerAdapter.setAll(action.payload, {...state, pending: false});
|
||||
}
|
||||
case ActionType.DenyFailure: {
|
||||
return noAuthProbeListContainerAdapter.setError(action.payload, {...state, pending: false});
|
||||
}
|
||||
|
||||
default: {
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user