Skip to content

Commit f64334d

Browse files
authored
fix: show topic data for cdc stream (#3063)
1 parent c93d1d5 commit f64334d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/containers/Tenant/Diagnostics/DiagnosticsPages.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {EPathSubType, EPathType} from '../../../types/api/schema';
1010
import type {ETenantType} from '../../../types/api/tenant';
1111
import type {TenantQuery} from '../TenantPages';
1212
import {TenantTabsGroups} from '../TenantPages';
13-
import {isDatabaseEntityType, isTopicEntityType} from '../utils/schema';
13+
import {isDatabaseEntityType, isEntityWithTopicData} from '../utils/schema';
1414

1515
interface Badge {
1616
text: string;
@@ -166,7 +166,7 @@ const SYSTEM_VIEW_PAGES = [overview, schema, nodes, describe, access];
166166

167167
const DIR_PAGES = [overview, topShards, nodes, describe, access];
168168

169-
const CDC_STREAM_PAGES = [overview, consumers, partitions, nodes, describe, access];
169+
const CDC_STREAM_PAGES = [overview, consumers, partitions, topicData, nodes, describe, access];
170170
const CDC_STREAM_IMPL_PAGES = [overview, nodes, tablets, describe, access];
171171
const TOPIC_PAGES = [overview, consumers, partitions, topicData, nodes, tablets, describe, access];
172172

@@ -231,7 +231,7 @@ function getDatabasePages(databaseType?: ETenantType) {
231231
function applyFilters(pages: Page[], type?: EPathType, options: GetPagesOptions = {}) {
232232
let result = pages;
233233

234-
if (isTopicEntityType(type) && !options.hasTopicData) {
234+
if (isEntityWithTopicData(type) && !options.hasTopicData) {
235235
result = result.filter((p) => p.id !== TENANT_DIAGNOSTICS_TABS_IDS.topicData);
236236
}
237237

src/containers/Tenant/utils/schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ export const isCdcStreamEntityType = (type?: EPathType) => type === EPathType.EP
247247

248248
export const isTopicEntityType = (type?: EPathType) => type === EPathType.EPathTypePersQueueGroup;
249249

250+
export const isEntityWithTopicData = (type?: EPathType) =>
251+
type === EPathType.EPathTypeCdcStream || type === EPathType.EPathTypePersQueueGroup;
252+
250253
// ====================
251254

252255
const pathSubTypeToChildless: Record<EPathSubType, boolean> = {

0 commit comments

Comments
 (0)