From e58f97f71e98265126452af98f3a76c31c53131c Mon Sep 17 00:00:00 2001 From: Br0wnHammer Date: Mon, 12 May 2025 14:46:32 +0530 Subject: [PATCH 1/2] Fix: Infra Monitors Filters --- .../Monitors/Components/MonitorsTable/index.jsx | 13 +++++++++++-- client/src/Pages/Infrastructure/Monitors/index.jsx | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTable/index.jsx b/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTable/index.jsx index 817e414b6..25847b1be 100644 --- a/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTable/index.jsx +++ b/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTable/index.jsx @@ -68,8 +68,16 @@ const MonitorsTable = ({ shouldRender, monitors, isAdmin, handleActionMenuDelete ), }, { id: "cpu", content: t("cpu"), render: (row) => }, - { id: "memory", content: t("memory"), render: (row) => }, - { id: "disk", content: t("disk"), render: (row) => }, + { + id: "memory", + content: t("memory"), + render: (row) => , + }, + { + id: "disk", + content: t("disk"), + render: (row) => , + }, { id: "actions", content: t("actions"), @@ -129,6 +137,7 @@ const MonitorsTable = ({ shouldRender, monitors, isAdmin, handleActionMenuDelete }, }, onRowClick: (row) => openDetails(row.id), + emptyView: "No monitors found", }} /> ); diff --git a/client/src/Pages/Infrastructure/Monitors/index.jsx b/client/src/Pages/Infrastructure/Monitors/index.jsx index cc2a03138..71abdad4c 100644 --- a/client/src/Pages/Infrastructure/Monitors/index.jsx +++ b/client/src/Pages/Infrastructure/Monitors/index.jsx @@ -73,7 +73,7 @@ const InfrastructureMonitors = () => { ); } - if (!isLoading && monitors?.length === 0) { + if (!isLoading && summary?.totalMonitors === undefined) { return ( Date: Mon, 12 May 2025 21:50:19 +0530 Subject: [PATCH 2/2] Fix: Infra Montior Filters --- client/src/Pages/Infrastructure/Monitors/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/Pages/Infrastructure/Monitors/index.jsx b/client/src/Pages/Infrastructure/Monitors/index.jsx index 71abdad4c..0d22e98b5 100644 --- a/client/src/Pages/Infrastructure/Monitors/index.jsx +++ b/client/src/Pages/Infrastructure/Monitors/index.jsx @@ -73,7 +73,7 @@ const InfrastructureMonitors = () => { ); } - if (!isLoading && summary?.totalMonitors === undefined) { + if (!isLoading && typeof summary?.totalMonitors === "undefined" ) { return (