Skip to content

Commit 563ab2f

Browse files
CopilotRaubzeug
andauthored
refactor(healthcheck): consolidate STORAGE prefix into STORAGE_TAB_PREFIXES
Agent-Logs-Url: https://github.com/ydb-platform/ydb-embedded-ui/sessions/9163baf1-ec8e-401f-bd34-00b13fe0d190 Co-authored-by: Raubzeug <42094364+Raubzeug@users.noreply.github.com>
1 parent d07df02 commit 563ab2f

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

  • src/store/reducers/healthcheckInfo

src/store/reducers/healthcheckInfo/utils.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export const selfCheckResultToHcStatus: Record<SelfCheckResult, StatusFlag> = {
2323
};
2424

2525
// Issue type prefixes that should be routed to the "storage" tab in the UI,
26-
// covering ring/board/state-storage issues alongside regular disk issues.
26+
// covering regular disk issues alongside ring/board/state-storage issues.
2727
// 'BOARD_' (with underscore) is intentionally narrow to match only BOARD_RING /
2828
// BOARD_NODE and avoid silently capturing any unrelated future BOARD* types.
29-
const STORAGE_TAB_PREFIXES = ['SCHEME_BOARD', 'BOARD_', 'STATE_STORAGE'];
29+
const STORAGE_TAB_PREFIXES = ['STORAGE', 'SCHEME_BOARD', 'BOARD_', 'STATE_STORAGE'];
3030

3131
// Root issue types that should be included in the breadcrumb chain.
3232
// For these roots, the leaf preserves a parent link to the root so that the
@@ -38,9 +38,6 @@ export function isStorageRelatedType(type?: string): boolean {
3838
if (!type) {
3939
return false;
4040
}
41-
if (type.startsWith('STORAGE')) {
42-
return true;
43-
}
4441
return STORAGE_TAB_PREFIXES.some((prefix) => type.startsWith(prefix));
4542
}
4643

0 commit comments

Comments
 (0)