{NotificationContextHolder}
@@ -70,6 +65,7 @@ const Dashboard = () => {
}
label={t("dashboard.statistics.all_certificates")}
+ loading={loading}
value={statistics?.certificateTotal ?? "-"}
suffix={t("dashboard.statistics.unit")}
onClick={() => navigate("/certificates")}
@@ -79,6 +75,7 @@ const Dashboard = () => {
}
label={t("dashboard.statistics.expire_soon_certificates")}
+ loading={loading}
value={statistics?.certificateExpireSoon ?? "-"}
suffix={t("dashboard.statistics.unit")}
onClick={() => navigate("/certificates?state=expireSoon")}
@@ -88,6 +85,7 @@ const Dashboard = () => {
}
label={t("dashboard.statistics.expired_certificates")}
+ loading={loading}
value={statistics?.certificateExpired ?? "-"}
suffix={t("dashboard.statistics.unit")}
onClick={() => navigate("/certificates?state=expired")}
@@ -97,6 +95,7 @@ const Dashboard = () => {
}
label={t("dashboard.statistics.all_workflows")}
+ loading={loading}
value={statistics?.workflowTotal ?? "-"}
suffix={t("dashboard.statistics.unit")}
onClick={() => navigate("/workflows")}
@@ -106,6 +105,7 @@ const Dashboard = () => {
}
label={t("dashboard.statistics.enabled_workflows")}
+ loading={loading}
value={statistics?.workflowEnabled ?? "-"}
suffix={t("dashboard.statistics.unit")}
onClick={() => navigate("/workflows?state=enabled")}
@@ -116,25 +116,27 @@ const Dashboard = () => {
TODO: {t("dashboard.latest_workflow_run")}
- >
+
);
};
const StatisticCard = ({
label,
+ loading,
icon,
value,
suffix,
onClick,
}: {
label: React.ReactNode;
+ loading?: boolean;
icon: React.ReactNode;
value?: string | number | React.ReactNode;
suffix?: React.ReactNode;
onClick?: () => void;
}) => {
return (
-