From 1cb88222bc8f79391a8c9d0b887b00e0d290f7e7 Mon Sep 17 00:00:00 2001 From: Viktor Rozaev Date: Tue, 28 Jan 2025 11:13:48 +0100 Subject: [PATCH] revert: "fix(System): fixed typo, now we check correct "maintenance" attribute" This reverts commit c97f9be7cb8db3a8dc1efaeb82252755ad4d5367. --- packages/ui/src/ui/store/actions/system/masters.ts | 12 ++++++------ packages/ui/src/ui/store/reducers/system/masters.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/ui/src/ui/store/actions/system/masters.ts b/packages/ui/src/ui/store/actions/system/masters.ts index 692e13f22..2c7e89b23 100644 --- a/packages/ui/src/ui/store/actions/system/masters.ts +++ b/packages/ui/src/ui/store/actions/system/masters.ts @@ -36,7 +36,7 @@ const toaster = new Toaster(); const {NODE_DOES_NOT_EXIST} = YTErrors; -export function filterOutMaintenanceHosts( +export function filterOutMaintananceHosts( value: Record> | null, ) { if (!value) { @@ -137,10 +137,10 @@ async function loadMastersConfig(): Promise<[MastersConfigResponse, MasterAlert[ const alerts = alertsResult.output ? (alertsResult.output as MasterAlert[]) : []; const [timestamp_path] = Object.keys( - filterOutMaintenanceHosts(ypath.getValue(timestampProvidersResult.output)), + filterOutMaintananceHosts(ypath.getValue(timestampProvidersResult.output)), ); const primaryMasterPaths = Object.keys( - filterOutMaintenanceHosts(ypath.getValue(primaryMasterResult.output)), + filterOutMaintananceHosts(ypath.getValue(primaryMasterResult.output)), ); const timestamp_tag_cell_requests = [ @@ -231,7 +231,7 @@ async function loadMastersConfig(): Promise<[MastersConfigResponse, MasterAlert[ }; const discoveryRequests = map_( - filterOutMaintenanceHosts(ypath.getValue(discoveryServersResult.output)), + filterOutMaintananceHosts(ypath.getValue(discoveryServersResult.output)), (_v, address) => ({ command: 'get' as const, parameters: { @@ -243,7 +243,7 @@ async function loadMastersConfig(): Promise<[MastersConfigResponse, MasterAlert[ ); const queueAgentsStateRequests = map_( - filterOutMaintenanceHosts(ypath.getValue(queueAgentsResult.output)), + filterOutMaintananceHosts(ypath.getValue(queueAgentsResult.output)), (_v, address) => ({ command: 'get' as const, parameters: { @@ -344,7 +344,7 @@ function loadHydra( forEach_( sortBy_(addresses, (address) => address.host), ({host, attributes}) => { - if (!attributes.maintenance) { + if (!attributes.maintanance) { masterInfo.push({host, type, cellTag: cellTag!}); requests.push({ command: 'get', diff --git a/packages/ui/src/ui/store/reducers/system/masters.ts b/packages/ui/src/ui/store/reducers/system/masters.ts index a4f9dc25a..6689b262c 100644 --- a/packages/ui/src/ui/store/reducers/system/masters.ts +++ b/packages/ui/src/ui/store/reducers/system/masters.ts @@ -213,7 +213,7 @@ export interface MasterAddress { attributes: { native_cell_tag: number; annotations: unknown; - maintenance: boolean; + maintanance: boolean; }; state?: 'online' | 'offline' | 'unknown'; }