diff --git a/src/utils/disks/__test__/calculateVDiskSeverity.test.ts b/src/utils/disks/__test__/calculateVDiskSeverity.test.ts index aae7ddb18b..33a887d1d8 100644 --- a/src/utils/disks/__test__/calculateVDiskSeverity.test.ts +++ b/src/utils/disks/__test__/calculateVDiskSeverity.test.ts @@ -111,6 +111,20 @@ describe('VDisk state', () => { expect(severity).not.toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Blue); }); + test('Should not display VDisk as replicating if DiskSpace or FrontQueues are blue', () => { + const severity1 = calculateVDiskSeverity({ + VDiskState: EVDiskState.OK, + FrontQueues: EFlag.Blue, + }); + const severity2 = calculateVDiskSeverity({ + VDiskState: EVDiskState.OK, + DiskSpace: EFlag.Blue, + }); + + expect(severity1).not.toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Blue); + expect(severity2).not.toEqual(DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Blue); + }); + test('Should display replicating VDisks in a not-OK state with a regular color', () => { const severity1 = calculateVDiskSeverity({ VDiskState: EVDiskState.Initial, // severity 3, yellow diff --git a/src/utils/disks/calculateVDiskSeverity.ts b/src/utils/disks/calculateVDiskSeverity.ts index 033a8b47fa..cdfa5cd33c 100644 --- a/src/utils/disks/calculateVDiskSeverity.ts +++ b/src/utils/disks/calculateVDiskSeverity.ts @@ -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 { @@ -52,5 +52,10 @@ function getColorSeverity(color?: EFlag) { return NOT_AVAILABLE_SEVERITY; } + // Blue is reserved for not replicated VDisks + if (color === EFlag.Blue) { + return DISK_COLOR_STATE_TO_NUMERIC_SEVERITY.Green; + } + return DISK_COLOR_STATE_TO_NUMERIC_SEVERITY[color] ?? NOT_AVAILABLE_SEVERITY; }