Skip to content

Commit 3cc847f

Browse files
committed
ui: fix duplicate drop unused index tags
"Drop unused index" tags were being duplicated in the table index details page for every drop index recommendation that existed for said table. Now, only 1 tag is shown per row Epic: CC-30965 Fixes: CC-31183 Release note (bug fix): Fixed ui bug where "Drop unused index" tag was being shown more than once in the table index details page
1 parent 647a27c commit 3cc847f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/ui/workspaces/cluster-ui/src/api/databases/tableIndexesApi.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ export const useTableIndexStats = ({
8888
stat?.statistics?.stats?.total_rows_read?.toNumber() ?? 0,
8989
indexRecs:
9090
data?.index_recommendations
91-
?.filter(rec => rec?.type != null)
91+
?.filter(
92+
rec =>
93+
rec?.type != null &&
94+
rec.index_id === stat.statistics?.key?.index_id,
95+
)
9296
.map(formatIndexRecsProto) ?? [],
9397
};
9498
});

0 commit comments

Comments
 (0)