feat(opsserver): add health, audit, cluster health, and durable credential management hardening
This commit is contained in:
+8
-2
@@ -40,6 +40,7 @@ export interface IPoliciesState {
|
||||
|
||||
export interface IConfigState {
|
||||
config: interfaces.data.IServerConfig | null;
|
||||
clusterHealth: interfaces.data.IClusterHealth | null;
|
||||
}
|
||||
|
||||
export interface IUiState {
|
||||
@@ -58,7 +59,7 @@ export const loginStatePart = await appState.getStatePart<ILoginState>(
|
||||
identity: null,
|
||||
isLoggedIn: false,
|
||||
},
|
||||
'persistent',
|
||||
'soft',
|
||||
);
|
||||
|
||||
export const serverStatePart = await appState.getStatePart<IServerState>(
|
||||
@@ -108,6 +109,7 @@ export const configStatePart = await appState.getStatePart<IConfigState>(
|
||||
'config',
|
||||
{
|
||||
config: null,
|
||||
clusterHealth: null,
|
||||
},
|
||||
'soft',
|
||||
);
|
||||
@@ -531,7 +533,11 @@ export const fetchConfigAction = configStatePart.createAction(async (statePartAr
|
||||
interfaces.requests.IReq_GetServerConfig
|
||||
>('/typedrequest', 'getServerConfig');
|
||||
const response = await typedRequest.fire({ identity: context.identity! });
|
||||
return { config: response.config };
|
||||
const clusterHealthRequest = new plugins.domtools.plugins.typedrequest.TypedRequest<
|
||||
interfaces.requests.IReq_GetClusterHealth
|
||||
>('/typedrequest', 'getClusterHealth');
|
||||
const clusterHealthResponse = await clusterHealthRequest.fire({ identity: context.identity! });
|
||||
return { config: response.config, clusterHealth: clusterHealthResponse.clusterHealth };
|
||||
} catch (err) {
|
||||
console.error('Failed to fetch config:', err);
|
||||
return statePartArg.getState();
|
||||
|
||||
Reference in New Issue
Block a user