diff --git a/src/frontend/src/components/render/StatusRenderer.tsx b/src/frontend/src/components/render/StatusRenderer.tsx index 73c9a527a2..4b2ff24827 100644 --- a/src/frontend/src/components/render/StatusRenderer.tsx +++ b/src/frontend/src/components/render/StatusRenderer.tsx @@ -69,7 +69,7 @@ export const StatusRenderer = ({ options }: { status: string; - type: ModelType; + type: ModelType | string; options?: renderStatusLabelOptionsInterface; }) => { const statusCodeList = useServerApiState.getState().status; diff --git a/src/frontend/src/states/ApiState.tsx b/src/frontend/src/states/ApiState.tsx index 6713f9e23d..a5020965a0 100644 --- a/src/frontend/src/states/ApiState.tsx +++ b/src/frontend/src/states/ApiState.tsx @@ -9,7 +9,7 @@ import { ApiPaths } from '../enums/ApiEndpoints'; import { ModelType } from '../enums/ModelType'; import { ServerAPIProps } from './states'; -type StatusLookup = Record; +type StatusLookup = Record; interface ServerApiStateProps { server: ServerAPIProps; @@ -35,7 +35,8 @@ export const useServerApiState = create()( await api.get(apiUrl(ApiPaths.global_status)).then((response) => { const newStatusLookup: StatusLookup = {} as StatusLookup; for (const key in response.data) { - newStatusLookup[statusCodeList[key]] = response.data[key].values; + newStatusLookup[statusCodeList[key] || key] = + response.data[key].values; } set({ status: newStatusLookup }); });