Fix: handle some status cases with non-existent k8s pods (#3489)

pull/3509/head
shamoon 6 months ago
parent 6ab6d6fd3a
commit 97d7ae21e4

@ -18,10 +18,13 @@ export default function Component({ service }) {
);
if (statsError || statusError) {
return <Container service={service} error={statsError ?? statusError} />;
return <Container service={service} error={statsError ?? statusError ?? statusData} />;
}
if (statusData && !(statusData.status.includes("running") || statusData.status.includes("partial"))) {
if (
statusData &&
(!statusData.status || !(statusData.status.includes("running") || statusData.status.includes("partial")))
) {
return (
<Container>
<Block label={t("widget.status")} value={t("docker.offline")} />

Loading…
Cancel
Save