Skip to content
Snippets Groups Projects

CE-3061: Update ioc alerts and status separately

Merged Johanna Szepanski requested to merge CE-3061-update-IOC-alerts-async into develop
2 files
+ 62
63
Compare changes
  • Side-by-side
  • Inline
Files
2
import { useContext, useMemo, useEffect } from "react";
import { Grid, Skeleton } from "@mui/material";
import { Grid } from "@mui/material";
import { Status } from "../../common/Status";
import { apiContext } from "../../../api/DeployApi";
import { useAPIMethod } from "@ess-ics/ce-ui-common";
@@ -25,11 +25,7 @@ export const IOCStatus = ({ id, hideAlerts }) => {
call: false
});
const {
value: iocStateStatus,
loading: fetchIocStatusLoading,
dataReady: iocStatusReady
} = useAPIMethod({
const { value: iocStateStatus } = useAPIMethod({
fcn: client.apis.IOCs.fetchIocStatus,
params
});
@@ -51,19 +47,11 @@ export const IOCStatus = ({ id, hideAlerts }) => {
justifyContent="center"
alignItems="center"
>
{fetchIocStatusLoading || !iocStatusReady ? (
<Skeleton
variant="circular"
height={20}
width={20}
/>
) : (
<Status
state={iocStateStatus}
alert={iocAlert}
hideAlerts={hideAlerts}
/>
)}
<Status
state={iocStateStatus}
alert={iocAlert}
hideAlerts={hideAlerts}
/>
</Grid>
);
};
Loading