This commit is contained in:
crusader 2018-05-28 18:06:33 +09:00
parent 7f10b3dd8a
commit e980403faf
3 changed files with 94 additions and 65 deletions

View File

@ -1,6 +1,10 @@
<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>
@ -68,6 +72,7 @@
</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>

View File

@ -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>,

View File

@ -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;
}