From e6841c8db7ef1a8774d610b6c3503d307523942e Mon Sep 17 00:00:00 2001 From: Aleix Casanovas Date: Thu, 31 Oct 2024 14:58:16 +0100 Subject: [PATCH 1/3] fix: Change catalog retrieve incidents --- catalog/ui/src/app/Catalog/Catalog.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/catalog/ui/src/app/Catalog/Catalog.tsx b/catalog/ui/src/app/Catalog/Catalog.tsx index 71d970260..d9753e152 100644 --- a/catalog/ui/src/app/Catalog/Catalog.tsx +++ b/catalog/ui/src/app/Catalog/Catalog.tsx @@ -64,9 +64,9 @@ import CatalogNamespaceSelect from './CatalogNamespaceSelect'; import CatalogContent from './CatalogContent'; import IncidentsBanner from '@app/components/IncidentsBanner'; import useInterfaceConfig from '@app/utils/useInterfaceConfig'; +import LoadingSection from '@app/components/LoadingSection'; import './catalog.css'; -import LoadingSection from '@app/components/LoadingSection'; function handleExportCsv(catalogItems: CatalogItem[]) { const annotations = []; @@ -334,7 +334,7 @@ const Catalog: React.FC<{ userHasRequiredPropertiesToAccess: boolean }> = ({ use ); const { data: activeIncidents, isLoading } = useSWRImmutable( - apiPaths.CATALOG_ITEMS_ACTIVE_INCIDENTS({ stage: catalogNamespaceName ? catalogNamespaceName : null }), + apiPaths.CATALOG_ITEMS_ACTIVE_INCIDENTS({ stage: catalogNamespaceName ? catalogNamespaceName : 'all' }), fetcher, { suspense: false, @@ -342,7 +342,9 @@ const Catalog: React.FC<{ userHasRequiredPropertiesToAccess: boolean }> = ({ use } ); const { data: catalogItemsArr } = useSWRImmutable( - apiPaths.CATALOG_ITEMS({ namespace: catalogNamespaceName ? catalogNamespaceName : 'all-catalogs' }), + apiPaths.CATALOG_ITEMS({ + namespace: catalogNamespaceName ? catalogNamespaceName.split('-').slice(-1) : 'all-catalogs', + }), () => fetchCatalog(catalogNamespaceName ? [catalogNamespaceName] : catalogNamespaceNames) ); From f9eec6371ce93274753ce25abea066757c60a2b5 Mon Sep 17 00:00:00 2001 From: Aleix Casanovas Date: Thu, 31 Oct 2024 15:02:00 +0100 Subject: [PATCH 2/3] fixup! fix: Change catalog retrieve incidents --- .../ui/src/app/components/UptimeDisplay.tsx | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/catalog/ui/src/app/components/UptimeDisplay.tsx b/catalog/ui/src/app/components/UptimeDisplay.tsx index d30c4f516..135ca1901 100644 --- a/catalog/ui/src/app/components/UptimeDisplay.tsx +++ b/catalog/ui/src/app/components/UptimeDisplay.tsx @@ -1,3 +1,4 @@ +import { Tooltip } from '@patternfly/react-core'; import React from 'react'; interface UptimeDisplayProps { @@ -13,16 +14,18 @@ const UptimeDisplay: React.FC = ({ uptime }) => { }; return ( -
-
-

{Math.round(uptime)}%

-
+ Last 90 days
}> +
+
+

{Math.round(uptime)}%

+
+ ); }; From d0525a4fa05ae8a17962338d5e62de8684e12dde Mon Sep 17 00:00:00 2001 From: Aleix Casanovas Date: Thu, 31 Oct 2024 15:08:13 +0100 Subject: [PATCH 3/3] fixup! fixup! fix: Change catalog retrieve incidents --- catalog/ui/src/app/Catalog/Catalog.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/catalog/ui/src/app/Catalog/Catalog.tsx b/catalog/ui/src/app/Catalog/Catalog.tsx index d9753e152..1710a5a51 100644 --- a/catalog/ui/src/app/Catalog/Catalog.tsx +++ b/catalog/ui/src/app/Catalog/Catalog.tsx @@ -334,7 +334,9 @@ const Catalog: React.FC<{ userHasRequiredPropertiesToAccess: boolean }> = ({ use ); const { data: activeIncidents, isLoading } = useSWRImmutable( - apiPaths.CATALOG_ITEMS_ACTIVE_INCIDENTS({ stage: catalogNamespaceName ? catalogNamespaceName : 'all' }), + apiPaths.CATALOG_ITEMS_ACTIVE_INCIDENTS({ + stage: catalogNamespaceName ? catalogNamespaceName.split('-').slice(-1) : 'all', + }), fetcher, { suspense: false, @@ -343,7 +345,7 @@ const Catalog: React.FC<{ userHasRequiredPropertiesToAccess: boolean }> = ({ use ); const { data: catalogItemsArr } = useSWRImmutable( apiPaths.CATALOG_ITEMS({ - namespace: catalogNamespaceName ? catalogNamespaceName.split('-').slice(-1) : 'all-catalogs', + namespace: catalogNamespaceName ? catalogNamespaceName : 'all-catalogs', }), () => fetchCatalog(catalogNamespaceName ? [catalogNamespaceName] : catalogNamespaceNames) );