Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/utils/disks/calculateVDiskSeverity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {EFlag} from '../../types/api/enums';
import {EFlag} from '../../types/api/enums';
import type {EVDiskState} from '../../types/api/vdisk';

import {
Expand Down Expand Up @@ -52,5 +52,10 @@ function getColorSeverity(color?: EFlag) {
return NOT_AVAILABLE_SEVERITY;
}

// Blue is reserved for not replicated VDisks
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getColorSeverity is used to convert DiskSpace and FrontQueues flags to severity

if (color === EFlag.Blue) {
return DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Green;
}

return DISK_COLOR_STATE_TO_NUMERIC_SEVERITY[color] ?? NOT_AVAILABLE_SEVERITY;
}
Loading