From e9c00511d9877628697b1781181a2d03f8d24923 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 4 Oct 2023 20:48:53 -0700 Subject: [PATCH] lint --- src/components/services/kubernetes-status.jsx | 13 ++++++++----- src/components/services/ping.jsx | 2 +- src/components/services/status.jsx | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/services/kubernetes-status.jsx b/src/components/services/kubernetes-status.jsx index 81509dde..ba64da24 100644 --- a/src/components/services/kubernetes-status.jsx +++ b/src/components/services/kubernetes-status.jsx @@ -1,7 +1,7 @@ import useSWR from "swr"; import { t } from "i18next"; -export default function KubernetesStatus({ service }) { +export default function KubernetesStatus({ service, style }) { const podSelectorString = service.podSelector !== undefined ? `podSelector=${service.podSelector}` : ""; const { data, error } = useSWR(`/api/kubernetes/status/${service.namespace}/${service.app}?${podSelectorString}`); @@ -11,16 +11,19 @@ export default function KubernetesStatus({ service }) { let colorClass = "text-black/20 dark:text-white/40 "; if (error) { - statusLabel = statusTitle = t("docker.error"); + statusTitle = t("docker.error"); + statusLabel = statusTitle; colorClass = "text-rose-500/80"; } else if (data) { if (data.status === "running") { - statusLabel = statusTitle = data.health ?? data.status; + statusTitle = data.health ?? data.status; + statusLabel = statusTitle; colorClass = "text-emerald-500/80"; } if (data.status === "not found" || data.status === "down" || data.status === "partial") { - statusLabel = statusTitle = data.status; + statusTitle = data.status; + statusLabel = statusTitle; colorClass = "text-orange-400/50 dark:text-orange-400/80"; } } @@ -33,7 +36,7 @@ export default function KubernetesStatus({ service }) { return (