Skip to content
Snippets Groups Projects
Commit 5511e40a authored by Johanna Szepanski's avatar Johanna Szepanski Committed by EREBUS_DMN\jsz
Browse files

fixed popover id not being correct for Host table

parent c5bbf2d8
No related branches found
No related tags found
2 merge requests!612Release 5.0.0,!567CE-3151: Fixed common warnings
......@@ -48,12 +48,15 @@ export const IOCStatus = ({ id, hideAlerts }) => {
justifyContent="center"
alignItems="center"
>
<Status
state={iocStateStatus}
alert={iocAlert}
hideAlerts={hideAlerts}
getStatusFcn={getIOCStatus}
/>
{iocStateStatus && (
<Status
id={iocStateStatus.id}
state={iocStateStatus}
alert={iocAlert}
hideAlerts={hideAlerts}
getStatusFcn={getIOCStatus}
/>
)}
</Grid>
);
};
......@@ -16,7 +16,7 @@ const propsTypes = {
getStatusFcn: func
};
export function Status({ state, alert, hideAlerts = false, getStatusFcn }) {
export function Status({ id, state, alert, hideAlerts = false, getStatusFcn }) {
const [status, setStatus] = useState(null);
const theme = useTheme();
......@@ -30,7 +30,7 @@ export function Status({ state, alert, hideAlerts = false, getStatusFcn }) {
<>
{status ? (
<Popover
id={`ioc-status-popover-${state?.id ? state.id : ""}`}
id={`ioc-status-popover-${id}`}
renderOwningComponent={({
ariaOwns,
ariaHasPopup,
......
......@@ -40,11 +40,16 @@ export const HostStatus = ({ hostId, hideAlerts }) => {
}, [hideAlerts, callFetchHostAlerts, abortCallFetchHostAlerts]);
return (
<Status
state={hostStateStatus}
alert={hostAlert}
hideAlerts={hideAlerts}
getStatusFcn={getHostStatus}
/>
<>
{hostStateStatus && (
<Status
id={hostStateStatus.hostId}
state={hostStateStatus}
alert={hostAlert}
hideAlerts={hideAlerts}
getStatusFcn={getHostStatus}
/>
)}
</>
);
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment