From 0e7f77f11a04074bfdc5b9f65e3d83810c586026 Mon Sep 17 00:00:00 2001 From: hai-tian Date: Tue, 10 Dec 2024 17:44:33 +0800 Subject: [PATCH] fix: single resource show event tab (#662) ## What type of PR is this? /kind bug --- ui/src/pages/insightDetail/cluster/index.tsx | 2 +- ui/src/pages/insightDetail/group/index.tsx | 4 +++- ui/src/pages/insightDetail/namespace/index.tsx | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ui/src/pages/insightDetail/cluster/index.tsx b/ui/src/pages/insightDetail/cluster/index.tsx index 11bbf509..be7a7405 100644 --- a/ui/src/pages/insightDetail/cluster/index.tsx +++ b/ui/src/pages/insightDetail/cluster/index.tsx @@ -343,7 +343,7 @@ const ClusterDetail = () => {
item?.value !== 'Event')} current={currentTab} onChange={handleTabChange} /> diff --git a/ui/src/pages/insightDetail/group/index.tsx b/ui/src/pages/insightDetail/group/index.tsx index 9ca083a8..204f88bb 100644 --- a/ui/src/pages/insightDetail/group/index.tsx +++ b/ui/src/pages/insightDetail/group/index.tsx @@ -470,7 +470,9 @@ const ClusterDetail = () => {
item?.value !== 'YAML')} + list={insightTabsList?.filter( + item => item?.value !== 'YAML' && item?.value !== 'Event', + )} current={currentTab} onChange={handleTabChange} /> diff --git a/ui/src/pages/insightDetail/namespace/index.tsx b/ui/src/pages/insightDetail/namespace/index.tsx index 92a97f13..fb896f66 100644 --- a/ui/src/pages/insightDetail/namespace/index.tsx +++ b/ui/src/pages/insightDetail/namespace/index.tsx @@ -44,7 +44,9 @@ const ClusterDetail = () => { const [multiTopologyData, setMultiTopologyData] = useState() const [selectedCluster, setSelectedCluster] = useState() const [clusterOptions, setClusterOptions] = useState([]) - const [tabList, setTabList] = useState(insightTabsList) + const [tabList, setTabList] = useState( + insightTabsList?.filter(item => item?.value !== 'Event'), + ) useEffect(() => { if (urlParams?.deleted === 'true') {