diff --git a/src/containers/UserSettings/i18n/en.json b/src/containers/UserSettings/i18n/en.json index 1d04123a7..c170b4ac9 100644 --- a/src/containers/UserSettings/i18n/en.json +++ b/src/containers/UserSettings/i18n/en.json @@ -37,8 +37,8 @@ "settings.usePaginatedTables.title": "Use paginated tables", "settings.usePaginatedTables.description": " Use table with data load on scroll for Nodes and Storage tabs. It will increase performance, but could work unstable", - "settings.useHideDomainDatabase.title": "Use hide domain database", - "settings.useHideDomainDatabase.description": "Hide root domain on database list", + "settings.hideDomainDatabase.title": "Hide root domain", + "settings.hideDomainDatabase.description": "Hide root domain on database list", "settings.useQuerySettings.title": "Use query settings", "settings.useQuerySettings.description": "Use query settings", diff --git a/src/containers/UserSettings/settings.tsx b/src/containers/UserSettings/settings.tsx index f421fb999..4519f93ad 100644 --- a/src/containers/UserSettings/settings.tsx +++ b/src/containers/UserSettings/settings.tsx @@ -6,6 +6,7 @@ import { AUTOCOMPLETE_ON_ENTER, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, + HIDE_DOMAIN_DATABASE_KEY, INVERTED_DISKS_KEY, LANGUAGE_KEY, QUERY_SETTINGS, @@ -13,7 +14,6 @@ import { THEME_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_DIRECTORY_OPERATIONS, - USE_HIDE_DOMAIN_DATABASE_KEY, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, USE_PAGINATED_TABLES_KEY, USE_SEPARATE_DISKS_PAGES_KEY, @@ -110,10 +110,10 @@ export const usePaginatedTables: SettingProps = { description: i18n('settings.usePaginatedTables.description'), }; -export const useHideDomainDatabase: SettingProps = { - settingKey: USE_HIDE_DOMAIN_DATABASE_KEY, - title: i18n('settings.useHideDomainDatabase.title'), - description: i18n('settings.useHideDomainDatabase.description'), +export const hideDomainDatabase: SettingProps = { + settingKey: HIDE_DOMAIN_DATABASE_KEY, + title: i18n('settings.hideDomainDatabase.title'), + description: i18n('settings.hideDomainDatabase.description'), }; export const useQuerySettings: SettingProps = { @@ -174,7 +174,7 @@ export const experimentsSection: SettingsSection = { settings: [ useNodesEndpointSetting, usePaginatedTables, - useHideDomainDatabase, + hideDomainDatabase, queryUseMultiSchemaSetting, useSeparateDisksPagesSetting, useDirectoryActionsSetting, diff --git a/src/services/settings.ts b/src/services/settings.ts index a68e5d037..dbe9d58eb 100644 --- a/src/services/settings.ts +++ b/src/services/settings.ts @@ -5,6 +5,7 @@ import { AUTO_REFRESH_INTERVAL, BINARY_DATA_IN_PLAIN_TEXT_DISPLAY, ENABLE_AUTOCOMPLETE, + HIDE_DOMAIN_DATABASE_KEY, INVERTED_DISKS_KEY, IS_HOTKEYS_HELP_HIDDEN_KEY, LANGUAGE_KEY, @@ -18,7 +19,6 @@ import { THEME_KEY, USE_CLUSTER_BALANCER_AS_BACKEND_KEY, USE_DIRECTORY_OPERATIONS, - USE_HIDE_DOMAIN_DATABASE_KEY, USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY, USE_PAGINATED_TABLES_KEY, USE_SEPARATE_DISKS_PAGES_KEY, @@ -51,7 +51,7 @@ export const DEFAULT_USER_SETTINGS = { [AUTO_REFRESH_INTERVAL]: 0, [USE_DIRECTORY_OPERATIONS]: false, [QUERY_SETTINGS]: false, - [USE_HIDE_DOMAIN_DATABASE_KEY]: true, + [HIDE_DOMAIN_DATABASE_KEY]: true, } as const satisfies SettingsObject; class SettingsManager { diff --git a/src/store/reducers/tenants/selectors.ts b/src/store/reducers/tenants/selectors.ts index c1c86f2be..fd3883776 100644 --- a/src/store/reducers/tenants/selectors.ts +++ b/src/store/reducers/tenants/selectors.ts @@ -2,7 +2,7 @@ import {createSelector} from '@reduxjs/toolkit'; import escapeRegExp from 'lodash/escapeRegExp'; import type {RootState} from '../..'; -import {USE_HIDE_DOMAIN_DATABASE_KEY} from '../../../lib'; +import {HIDE_DOMAIN_DATABASE_KEY} from '../../../lib'; import {EFlag} from '../../../types/api/enums'; import {ProblemFilterValues, getSettingValue, selectProblemFilter} from '../settings/settings'; import type {ProblemFilterValue} from '../settings/types'; @@ -44,7 +44,7 @@ export const selectTenants = createSelector( export const selectTenantsSearchValue = (state: TenantsStateSlice) => state.tenants.searchValue; export const selectUseHideDomainDatabase = (state: RootState) => - getSettingValue(state, USE_HIDE_DOMAIN_DATABASE_KEY); + getSettingValue(state, HIDE_DOMAIN_DATABASE_KEY); // ==== Complex selectors ==== diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 4b7307523..b6314647c 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -131,7 +131,7 @@ export const TENANT_INITIAL_PAGE_KEY = 'saved_tenant_initial_tab'; export const USE_PAGINATED_TABLES_KEY = 'useBackendParamsForTables'; // Setting to hide domain in database list -export const USE_HIDE_DOMAIN_DATABASE_KEY = 'useHideDomainDatabase'; +export const HIDE_DOMAIN_DATABASE_KEY = 'hideDomainDatabase'; // Enable schema that supports multiple resultsets export const QUERY_USE_MULTI_SCHEMA_KEY = 'queryUseMultiSchema';