Skip to content

Commit

Permalink
fix: single resource show event tab (#662)
Browse files Browse the repository at this point in the history
## What type of PR is this?
/kind bug
  • Loading branch information
hai-tian authored Dec 10, 2024
1 parent a53b82c commit 0e7f77f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ui/src/pages/insightDetail/cluster/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ const ClusterDetail = () => {
<div className={styles.tab_content}>
<div className={styles.tab_header}>
<KarporTabs
list={insightTabsList}
list={insightTabsList?.filter(item => item?.value !== 'Event')}
current={currentTab}
onChange={handleTabChange}
/>
Expand Down
4 changes: 3 additions & 1 deletion ui/src/pages/insightDetail/group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ const ClusterDetail = () => {
<div className={styles.tab_content}>
<div className={styles.tab_header}>
<KarporTabs
list={insightTabsList?.filter(item => item?.value !== 'YAML')}
list={insightTabsList?.filter(
item => item?.value !== 'YAML' && item?.value !== 'Event',
)}
current={currentTab}
onChange={handleTabChange}
/>
Expand Down
4 changes: 3 additions & 1 deletion ui/src/pages/insightDetail/namespace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ const ClusterDetail = () => {
const [multiTopologyData, setMultiTopologyData] = useState<any>()
const [selectedCluster, setSelectedCluster] = useState<any>()
const [clusterOptions, setClusterOptions] = useState<string[]>([])
const [tabList, setTabList] = useState<InsightTab[]>(insightTabsList)
const [tabList, setTabList] = useState<InsightTab[]>(
insightTabsList?.filter(item => item?.value !== 'Event'),
)

useEffect(() => {
if (urlParams?.deleted === 'true') {
Expand Down

0 comments on commit 0e7f77f

Please sign in to comment.