ydb-embedded-ui 22.7.0 → 22.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Datacenter/DatacenterLabel.d.ts +9 -0
- package/dist/components/Datacenter/DatacenterLabel.js +23 -0
- package/dist/components/Datacenter/DatacenterLabel.js.map +1 -0
- package/dist/components/Datacenter/DatacenterLabel.scss +8 -0
- package/dist/components/Datacenter/datacenterColors.scss +27 -0
- package/dist/components/Datacenter/i18n/en.json +5 -0
- package/dist/components/Datacenter/i18n/index.d.ts +2 -0
- package/dist/components/Datacenter/i18n/index.js +4 -0
- package/dist/components/Datacenter/i18n/index.js.map +1 -0
- package/dist/components/DiskPopup/DiskPopup.d.ts +4 -2
- package/dist/components/DiskPopup/DiskPopup.js +12 -4
- package/dist/components/DiskPopup/DiskPopup.js.map +1 -1
- package/dist/components/DiskPopup/DiskPopup.scss +6 -0
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +5 -3
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +17 -3
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js.map +1 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +29 -0
- package/dist/components/PDiskPopup/PDiskPopup.js +1 -1
- package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
- package/dist/components/TooltipsContent/NodeEndpointsTooltipContent/i18n/index.d.ts +1 -1
- package/dist/components/VDisk/VDisk.js +8 -2
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.js +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
- package/dist/components/nodesColumns/columns.d.ts +4 -0
- package/dist/components/nodesColumns/columns.js +18 -1
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/components/nodesColumns/constants.d.ts +2 -0
- package/dist/components/nodesColumns/constants.js +6 -0
- package/dist/components/nodesColumns/constants.js.map +1 -1
- package/dist/components/nodesColumns/i18n/en.json +1 -0
- package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
- package/dist/containers/App/Content.js +7 -3
- package/dist/containers/App/Content.js.map +1 -1
- package/dist/containers/Cluster/Cluster.js +3 -2
- package/dist/containers/Cluster/Cluster.js.map +1 -1
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js +18 -2
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.js +10 -5
- package/dist/containers/Cluster/ClusterOverview/components/BridgeInfoTable.js.map +1 -1
- package/dist/containers/Clusters/Clusters.js +7 -3
- package/dist/containers/Clusters/Clusters.js.map +1 -1
- package/dist/containers/Clusters/columns.d.ts +1 -0
- package/dist/containers/Clusters/columns.js +4 -1
- package/dist/containers/Clusters/columns.js.map +1 -1
- package/dist/containers/Header/StorageGroupLeftControls.js +2 -2
- package/dist/containers/Header/StorageGroupLeftControls.js.map +1 -1
- package/dist/containers/Node/NodePages.d.ts +1 -1
- package/dist/containers/Nodes/NodesTable.js +3 -1
- package/dist/containers/Nodes/NodesTable.js.map +1 -1
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js +8 -1
- package/dist/containers/Nodes/PaginatedNodes/GroupedNodesComponent.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +6 -1
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js.map +1 -1
- package/dist/containers/PDiskPage/PDiskStorageDetails.js +2 -1
- package/dist/containers/PDiskPage/PDiskStorageDetails.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.js +13 -2
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js +3 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/columns.js +2 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/columns.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/hooks.js +15 -8
- package/dist/containers/Storage/PaginatedStorageNodesTable/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/StorageExpertModePanel.scss +6 -0
- package/dist/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.js +6 -2
- package/dist/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.d.ts +4 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.js +38 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.js.map +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.scss +54 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.js +5 -0
- package/dist/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/constants.d.ts +3 -0
- package/dist/containers/Storage/StorageExpertModePanel/constants.js +1 -0
- package/dist/containers/Storage/StorageExpertModePanel/constants.js.map +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/i18n/en.json +6 -0
- package/dist/containers/Storage/StorageExpertModePanel/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageGroupStateLabel.d.ts +4 -2
- package/dist/containers/Storage/StorageGroupStateLabel.js +4 -3
- package/dist/containers/Storage/StorageGroupStateLabel.js.map +1 -1
- package/dist/containers/Storage/useStorageDatacenter.d.ts +2 -0
- package/dist/containers/Storage/useStorageDatacenter.js +28 -0
- package/dist/containers/Storage/useStorageDatacenter.js.map +1 -0
- package/dist/containers/Storage/useStoragePDiskDisplayStateGetter.js +6 -1
- package/dist/containers/Storage/useStoragePDiskDisplayStateGetter.js.map +1 -1
- package/dist/containers/Storage/useStorageQueryParams.d.ts +4 -4
- package/dist/containers/Storage/useStorageVDiskDisplayStateGetter.js +6 -1
- package/dist/containers/Storage/useStorageVDiskDisplayStateGetter.js.map +1 -1
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.d.ts +2 -1
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.js +47 -11
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.js.map +1 -1
- package/dist/containers/Storage/utils/index.js +2 -5
- package/dist/containers/Storage/utils/index.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +1 -2
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +18 -11
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseDatacenters.d.ts +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseDatacenters.js +11 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseDatacenters.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseInfo.d.ts +1 -2
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseInfo.js +20 -2
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/i18n/en.json +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/utils.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/utils.js +23 -0
- package/dist/containers/Tenant/Diagnostics/Overview/DatabaseInfo/utils.js.map +1 -1
- package/dist/containers/Tenant/Query/QueryEditor/hooks/useEditorOptions.js +3 -1
- package/dist/containers/Tenant/Query/QueryEditor/hooks/useEditorOptions.js.map +1 -1
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js +1 -6
- package/dist/containers/Tenant/utils/schemaQueryTemplates.js.map +1 -1
- package/dist/containers/UserSettings/i18n/en.json +3 -0
- package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
- package/dist/containers/UserSettings/settings.d.ts +1 -0
- package/dist/containers/UserSettings/settings.js +15 -1
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/containers/VDiskPage/VDiskStorageDetails.js +4 -3
- package/dist/containers/VDiskPage/VDiskStorageDetails.js.map +1 -1
- package/dist/lib.d.ts +1 -0
- package/dist/services/api/viewer.d.ts +2 -1
- package/dist/services/api/viewer.js +2 -1
- package/dist/services/api/viewer.js.map +1 -1
- package/dist/store/configureStore.d.ts +4 -0
- package/dist/store/datacenterQueryContext.d.ts +7 -0
- package/dist/store/datacenterQueryContext.js +10 -0
- package/dist/store/datacenterQueryContext.js.map +1 -0
- package/dist/store/defaultStore.d.ts +2 -0
- package/dist/store/reducers/capabilities/capabilities.d.ts +28 -0
- package/dist/store/reducers/cluster/cluster.d.ts +2 -0
- package/dist/store/reducers/cluster/cluster.js +8 -4
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/datacenters.d.ts +13 -0
- package/dist/store/reducers/datacenters.js +82 -0
- package/dist/store/reducers/datacenters.js.map +1 -0
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +36 -0
- package/dist/store/reducers/index.d.ts +3 -0
- package/dist/store/reducers/index.js +2 -0
- package/dist/store/reducers/index.js.map +1 -1
- package/dist/store/reducers/nodes/nodes.js +4 -2
- package/dist/store/reducers/nodes/nodes.js.map +1 -1
- package/dist/store/reducers/nodesList.d.ts +8 -3
- package/dist/store/reducers/nodesList.js +10 -5
- package/dist/store/reducers/nodesList.js.map +1 -1
- package/dist/store/reducers/pdisk/pdisk.js +3 -1
- package/dist/store/reducers/pdisk/pdisk.js.map +1 -1
- package/dist/store/reducers/pdisk/types.d.ts +1 -0
- package/dist/store/reducers/pdisk/utils.js +1 -0
- package/dist/store/reducers/pdisk/utils.js.map +1 -1
- package/dist/store/reducers/schema/schema.d.ts +4 -0
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +12 -0
- package/dist/store/reducers/settings/constants.d.ts +2 -0
- package/dist/store/reducers/settings/constants.js +2 -0
- package/dist/store/reducers/settings/constants.js.map +1 -1
- package/dist/store/reducers/settings/settings.d.ts +1 -0
- package/dist/store/reducers/settings/utils.d.ts +1 -1
- package/dist/store/reducers/storage/storage.js +4 -2
- package/dist/store/reducers/storage/storage.js.map +1 -1
- package/dist/store/reducers/storage/types.d.ts +2 -1
- package/dist/store/reducers/storage/utils.js +2 -0
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/tablets.d.ts +1 -0
- package/dist/store/reducers/topic/topic.d.ts +19 -0
- package/dist/store/reducers/vdisk/types.d.ts +1 -0
- package/dist/store/reducers/vdisk/utils.js +2 -0
- package/dist/store/reducers/vdisk/utils.js.map +1 -1
- package/dist/store/reducers/vdisk/vdisk.js +4 -2
- package/dist/store/reducers/vdisk/vdisk.js.map +1 -1
- package/dist/styles/datacenters.scss +247 -0
- package/dist/types/api/storage.d.ts +20 -0
- package/dist/types/api/storage.js.map +1 -1
- package/dist/types/store/nodesList.d.ts +2 -0
- package/dist/uiFactory/types.d.ts +8 -0
- package/dist/utils/datacenters.d.ts +15 -0
- package/dist/utils/datacenters.js +70 -0
- package/dist/utils/datacenters.js.map +1 -0
- package/dist/utils/disks/diskInfo/getDiskLocationItems.js +3 -0
- package/dist/utils/disks/diskInfo/getDiskLocationItems.js.map +1 -1
- package/dist/utils/disks/diskInfo/i18n/en.json +1 -0
- package/dist/utils/disks/diskInfo/i18n/index.d.ts +1 -1
- package/dist/utils/disks/displayState.d.ts +7 -1
- package/dist/utils/disks/displayState.js.map +1 -1
- package/dist/utils/disks/groupBy.d.ts +1 -0
- package/dist/utils/disks/groupBy.js +1 -0
- package/dist/utils/disks/groupBy.js.map +1 -1
- package/dist/utils/hooks/useDatacenterColorIndexes.d.ts +3 -0
- package/dist/utils/hooks/useDatacenterColorIndexes.js +9 -0
- package/dist/utils/hooks/useDatacenterColorIndexes.js.map +1 -0
- package/dist/utils/hooks/useDatacenterNodesFetcher.d.ts +6 -0
- package/dist/utils/hooks/useDatacenterNodesFetcher.js +14 -0
- package/dist/utils/hooks/useDatacenterNodesFetcher.js.map +1 -0
- package/dist/utils/hooks/useNodeMetadata.js +4 -5
- package/dist/utils/hooks/useNodeMetadata.js.map +1 -1
- package/dist/utils/hooks/useNodesListQueryArgs.d.ts +3 -0
- package/dist/utils/hooks/useNodesListQueryArgs.js +62 -0
- package/dist/utils/hooks/useNodesListQueryArgs.js.map +1 -0
- package/dist/utils/hooks/useNodesMap.d.ts +1 -0
- package/dist/utils/hooks/useNodesMap.js +8 -0
- package/dist/utils/hooks/useNodesMap.js.map +1 -0
- package/dist/utils/nodes.d.ts +1 -0
- package/dist/utils/nodes.js +9 -0
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/query.d.ts +6 -6
- package/dist/utils/zod/zodParsers.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/Datacenter/DatacenterLabel.scss +8 -0
- package/src/components/Datacenter/DatacenterLabel.tsx +54 -0
- package/src/components/Datacenter/datacenterColors.scss +27 -0
- package/src/components/Datacenter/i18n/en.json +5 -0
- package/src/components/Datacenter/i18n/index.ts +5 -0
- package/src/components/DiskPopup/DiskPopup.scss +6 -0
- package/src/components/DiskPopup/DiskPopup.tsx +25 -3
- package/src/components/DiskStateProgressBar/DiskStateProgressBar.scss +29 -0
- package/src/components/DiskStateProgressBar/DiskStateProgressBar.tsx +41 -4
- package/src/components/PDiskPopup/PDiskPopup.tsx +1 -1
- package/src/components/VDisk/VDisk.tsx +8 -1
- package/src/components/VDiskPopup/VDiskPopup.tsx +1 -1
- package/src/components/nodesColumns/columns.tsx +18 -2
- package/src/components/nodesColumns/constants.ts +6 -0
- package/src/components/nodesColumns/i18n/en.json +1 -0
- package/src/containers/App/Content.tsx +7 -3
- package/src/containers/Cluster/Cluster.tsx +8 -2
- package/src/containers/Cluster/ClusterDrawerHealthcheck.tsx +30 -3
- package/src/containers/Cluster/ClusterOverview/components/BridgeInfoTable.tsx +33 -24
- package/src/containers/Clusters/Clusters.tsx +7 -3
- package/src/containers/Clusters/columns.tsx +6 -0
- package/src/containers/Header/StorageGroupLeftControls.tsx +5 -1
- package/src/containers/Nodes/NodesTable.tsx +3 -1
- package/src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx +18 -2
- package/src/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.tsx +6 -1
- package/src/containers/PDiskPage/PDiskStorageDetails.tsx +12 -1
- package/src/containers/Storage/PDisk/PDisk.tsx +19 -4
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx +1 -1
- package/src/containers/Storage/PaginatedStorageNodesTable/PaginatedStorageNodesTable.tsx +3 -1
- package/src/containers/Storage/PaginatedStorageNodesTable/columns/columns.tsx +2 -0
- package/src/containers/Storage/PaginatedStorageNodesTable/columns/hooks.ts +16 -8
- package/src/containers/Storage/StorageExpertModePanel/StorageExpertModePanel.scss +6 -0
- package/src/containers/Storage/StorageExpertModePanel/StorageGroupsExpertModePanel.tsx +9 -2
- package/src/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.scss +54 -0
- package/src/containers/Storage/StorageExpertModePanel/components/DatacenterLegend.tsx +102 -0
- package/src/containers/Storage/StorageExpertModePanel/components/renderExpertModeLegend.tsx +5 -0
- package/src/containers/Storage/StorageExpertModePanel/constants.ts +1 -0
- package/src/containers/Storage/StorageExpertModePanel/i18n/en.json +6 -0
- package/src/containers/Storage/StorageGroupStateLabel.tsx +8 -3
- package/src/containers/Storage/useStorageDatacenter.ts +38 -0
- package/src/containers/Storage/useStoragePDiskDisplayStateGetter.ts +7 -1
- package/src/containers/Storage/useStorageVDiskDisplayStateGetter.ts +7 -1
- package/src/containers/Storage/utils/getStorageGroupStateLabel.ts +67 -12
- package/src/containers/Storage/utils/index.ts +2 -5
- package/src/containers/StorageGroupPage/StorageGroupPage.tsx +4 -2
- package/src/containers/Tenant/Diagnostics/Describe/Describe.tsx +39 -24
- package/src/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseDatacenters.tsx +19 -0
- package/src/containers/Tenant/Diagnostics/Overview/DatabaseInfo/DatabaseInfo.tsx +19 -4
- package/src/containers/Tenant/Diagnostics/Overview/DatabaseInfo/i18n/en.json +1 -0
- package/src/containers/Tenant/Diagnostics/Overview/DatabaseInfo/utils.ts +28 -0
- package/src/containers/Tenant/Query/QueryEditor/hooks/useEditorOptions.ts +3 -1
- package/src/containers/Tenant/utils/schemaQueryTemplates.ts +1 -6
- package/src/containers/UserSettings/i18n/en.json +4 -0
- package/src/containers/UserSettings/settings.tsx +16 -1
- package/src/containers/VDiskPage/VDiskStorageDetails.tsx +22 -3
- package/src/lib.ts +2 -0
- package/src/services/api/viewer.ts +5 -1
- package/src/store/datacenterQueryContext.ts +16 -0
- package/src/store/reducers/cluster/cluster.ts +8 -4
- package/src/store/reducers/datacenters.ts +139 -0
- package/src/store/reducers/index.ts +2 -0
- package/src/store/reducers/nodes/nodes.ts +4 -2
- package/src/store/reducers/nodesList.ts +25 -6
- package/src/store/reducers/pdisk/pdisk.ts +3 -1
- package/src/store/reducers/pdisk/types.ts +1 -0
- package/src/store/reducers/pdisk/utils.ts +1 -0
- package/src/store/reducers/settings/constants.ts +2 -0
- package/src/store/reducers/storage/storage.ts +4 -2
- package/src/store/reducers/storage/types.ts +2 -1
- package/src/store/reducers/storage/utils.ts +2 -0
- package/src/store/reducers/vdisk/types.ts +1 -0
- package/src/store/reducers/vdisk/utils.ts +2 -0
- package/src/store/reducers/vdisk/vdisk.ts +4 -2
- package/src/styles/datacenters.scss +247 -0
- package/src/types/api/storage.ts +14 -0
- package/src/types/store/nodesList.ts +2 -0
- package/src/uiFactory/types.ts +9 -0
- package/src/utils/datacenters.ts +99 -0
- package/src/utils/disks/diskInfo/getDiskLocationItems.ts +3 -0
- package/src/utils/disks/diskInfo/i18n/en.json +1 -0
- package/src/utils/disks/displayState.ts +4 -0
- package/src/utils/disks/groupBy.ts +1 -0
- package/src/utils/hooks/useDatacenterColorIndexes.ts +11 -0
- package/src/utils/hooks/useDatacenterNodesFetcher.ts +22 -0
- package/src/utils/hooks/useNodeMetadata.ts +4 -5
- package/src/utils/hooks/useNodesListQueryArgs.ts +78 -0
- package/src/utils/hooks/useNodesMap.ts +9 -0
- package/src/utils/nodes.ts +10 -0
|
@@ -20,9 +20,11 @@ import {
|
|
|
20
20
|
useMetaCapabilitiesQuery,
|
|
21
21
|
} from '../../store/reducers/capabilities/hooks';
|
|
22
22
|
import {nodesListApi} from '../../store/reducers/nodesList';
|
|
23
|
+
import {SETTING_KEYS} from '../../store/reducers/settings/constants';
|
|
23
24
|
import {cn} from '../../utils/cn';
|
|
24
|
-
import {useDatabaseFromQuery} from '../../utils/hooks/useDatabaseFromQuery';
|
|
25
25
|
import {useMetaAuthUnavailable} from '../../utils/hooks/useMetaAuth';
|
|
26
|
+
import {useNodesListQueryArgs} from '../../utils/hooks/useNodesListQueryArgs';
|
|
27
|
+
import {useSetting} from '../../utils/hooks/useSetting';
|
|
26
28
|
import {lazyComponent} from '../../utils/lazyComponent';
|
|
27
29
|
import {isForbiddenError, isRedirectToAuth, isUnauthenticatedError} from '../../utils/response';
|
|
28
30
|
import Authentication from '../Authentication/Authentication';
|
|
@@ -225,8 +227,10 @@ function HomePageDataWrapper({children}: {children: React.ReactNode}) {
|
|
|
225
227
|
}
|
|
226
228
|
|
|
227
229
|
function GetNodesList() {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
+
// Load the remote setting here; cache readers only use its value from the store.
|
|
231
|
+
useSetting(SETTING_KEYS.TENANT_INITIAL_PAGE);
|
|
232
|
+
const args = useNodesListQueryArgs();
|
|
233
|
+
nodesListApi.useGetNodesListQuery(args);
|
|
230
234
|
return null;
|
|
231
235
|
}
|
|
232
236
|
|
|
@@ -32,7 +32,10 @@ import {cn} from '../../utils/cn';
|
|
|
32
32
|
import {DEFAULT_CLUSTER_TAB_KEY} from '../../utils/constants';
|
|
33
33
|
import {isModifiedClickEvent} from '../../utils/events';
|
|
34
34
|
import {useAutoRefreshInterval, useTypedDispatch, useTypedSelector} from '../../utils/hooks';
|
|
35
|
-
import {
|
|
35
|
+
import {
|
|
36
|
+
useIsUserAllowedToMakeChanges,
|
|
37
|
+
useIsViewerUser,
|
|
38
|
+
} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
36
39
|
import {useSetting} from '../../utils/hooks/useSetting';
|
|
37
40
|
import {useAppTitle} from '../App/AppTitleContext';
|
|
38
41
|
import {Configs} from '../Configs/Configs';
|
|
@@ -66,6 +69,7 @@ export function Cluster({additionalClusterProps, additionalTenantsProps}: Cluste
|
|
|
66
69
|
const shouldShowNetworkTable = useNodesHandlerHasWorkingClusterNetworkStats();
|
|
67
70
|
const shouldShowEventsTab = useShouldShowEventsTab();
|
|
68
71
|
const isViewerUser = useIsViewerUser();
|
|
72
|
+
const healthcheckAvailable = useIsUserAllowedToMakeChanges();
|
|
69
73
|
const isConfigsAvailable = useConfigAvailable();
|
|
70
74
|
|
|
71
75
|
const showConfigs = isViewerUser && isConfigsAvailable;
|
|
@@ -137,7 +141,9 @@ export function Cluster({additionalClusterProps, additionalTenantsProps}: Cluste
|
|
|
137
141
|
return (
|
|
138
142
|
<EntityStatus className={b('title')}>
|
|
139
143
|
{clusterTitle}
|
|
140
|
-
|
|
144
|
+
{healthcheckAvailable && (
|
|
145
|
+
<EntityStatus.Label status={clusterStatus} onClick={handleStatusClick} />
|
|
146
|
+
)}
|
|
141
147
|
</EntityStatus>
|
|
142
148
|
);
|
|
143
149
|
};
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
selectCheckStatus,
|
|
8
8
|
} from '../../store/reducers/healthcheckInfo/healthcheckInfo';
|
|
9
9
|
import {useTypedSelector} from '../../utils/hooks';
|
|
10
|
+
import {useIsUserAllowedToMakeChanges} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
10
11
|
import {Healthcheck} from '../Tenant/Healthcheck/Healthcheck';
|
|
11
12
|
import {HealthcheckDrawer} from '../Tenant/Healthcheck/components/HealthcheckDrawer';
|
|
12
13
|
import {getDatabaseHealthcheckAssistantTarget} from '../Tenant/Healthcheck/utils';
|
|
@@ -100,8 +101,15 @@ export function ClusterDrawerHealthcheck({
|
|
|
100
101
|
database,
|
|
101
102
|
clusterName,
|
|
102
103
|
}: ClusterDrawerHealthcheckProps) {
|
|
103
|
-
const
|
|
104
|
-
|
|
104
|
+
const healthcheckAvailable = useIsUserAllowedToMakeChanges();
|
|
105
|
+
const {
|
|
106
|
+
showHealthcheck,
|
|
107
|
+
healthcheckIssue,
|
|
108
|
+
healthcheckLeaf,
|
|
109
|
+
issuesFilter,
|
|
110
|
+
view,
|
|
111
|
+
handleCloseHealthcheck,
|
|
112
|
+
} = useClusterHealthcheckQueryParams();
|
|
105
113
|
|
|
106
114
|
const healthcheckStatus = useTypedSelector((state) =>
|
|
107
115
|
selectCheckStatus(state, database, clusterName),
|
|
@@ -170,6 +178,25 @@ export function ClusterDrawerHealthcheck({
|
|
|
170
178
|
handleCloseHealthcheck();
|
|
171
179
|
}, [handleCloseHealthcheck]);
|
|
172
180
|
|
|
181
|
+
React.useEffect(() => {
|
|
182
|
+
if (
|
|
183
|
+
healthcheckAvailable === false &&
|
|
184
|
+
[showHealthcheck, healthcheckIssue, healthcheckLeaf, issuesFilter, view].some(
|
|
185
|
+
(value) => value !== undefined,
|
|
186
|
+
)
|
|
187
|
+
) {
|
|
188
|
+
handleCloseDrawer();
|
|
189
|
+
}
|
|
190
|
+
}, [
|
|
191
|
+
healthcheckAvailable,
|
|
192
|
+
showHealthcheck,
|
|
193
|
+
healthcheckIssue,
|
|
194
|
+
healthcheckLeaf,
|
|
195
|
+
issuesFilter,
|
|
196
|
+
view,
|
|
197
|
+
handleCloseDrawer,
|
|
198
|
+
]);
|
|
199
|
+
|
|
173
200
|
const renderDrawerContent = React.useCallback(() => {
|
|
174
201
|
return (
|
|
175
202
|
<Healthcheck
|
|
@@ -190,7 +217,7 @@ export function ClusterDrawerHealthcheck({
|
|
|
190
217
|
clusterName,
|
|
191
218
|
scope: 'cluster',
|
|
192
219
|
})}
|
|
193
|
-
isDrawerVisible={Boolean(showHealthcheck
|
|
220
|
+
isDrawerVisible={Boolean(healthcheckAvailable && showHealthcheck && database)}
|
|
194
221
|
onCloseDrawer={handleCloseDrawer}
|
|
195
222
|
onTransitionInComplete={
|
|
196
223
|
healthcheckIssue && healthcheckLeaf ? handleTransitionInComplete : undefined
|
|
@@ -25,6 +25,7 @@ import {cn} from '../../../../utils/cn';
|
|
|
25
25
|
import {EMPTY_DATA_PLACEHOLDER} from '../../../../utils/constants';
|
|
26
26
|
import {formatNumber} from '../../../../utils/dataFormatters/dataFormatters';
|
|
27
27
|
import {useAutoRefreshInterval, useTypedSelector} from '../../../../utils/hooks';
|
|
28
|
+
import {useIsUserAllowedToMakeChanges} from '../../../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
28
29
|
import {useClusterHealthcheckQueryParams} from '../../ClusterDrawerHealthcheck';
|
|
29
30
|
import i18n from '../../i18n';
|
|
30
31
|
|
|
@@ -106,6 +107,7 @@ interface BridgeInfoTableProps {
|
|
|
106
107
|
interface BridgePileCardProps {
|
|
107
108
|
pile: TBridgePile;
|
|
108
109
|
current: boolean;
|
|
110
|
+
healthcheckAllowed: boolean;
|
|
109
111
|
healthcheckAvailable: boolean;
|
|
110
112
|
healthcheckSupportsPiles: boolean;
|
|
111
113
|
healthcheckLoading: boolean;
|
|
@@ -116,6 +118,7 @@ interface BridgePileCardProps {
|
|
|
116
118
|
const BridgePileCard = React.memo(function BridgePileCard({
|
|
117
119
|
pile,
|
|
118
120
|
current,
|
|
121
|
+
healthcheckAllowed,
|
|
119
122
|
healthcheckAvailable,
|
|
120
123
|
healthcheckSupportsPiles,
|
|
121
124
|
healthcheckLoading,
|
|
@@ -187,28 +190,29 @@ const BridgePileCard = React.memo(function BridgePileCard({
|
|
|
187
190
|
</Flex>
|
|
188
191
|
<Flex gap={2} alignItems="center" wrap>
|
|
189
192
|
{stateStatus}
|
|
190
|
-
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
193
|
+
{healthcheckAllowed &&
|
|
194
|
+
(healthcheckLoading ? (
|
|
195
|
+
<Skeleton className={b('healthcheck-skeleton')} />
|
|
196
|
+
) : (
|
|
197
|
+
<EntityStatus.Label
|
|
198
|
+
status={pileHealthcheck.status}
|
|
199
|
+
size="xs"
|
|
200
|
+
className={b('healthcheck-status')}
|
|
201
|
+
onClick={pileHealthcheck.target ? handleHealthcheckClick : undefined}
|
|
202
|
+
endContent={
|
|
203
|
+
pileHealthcheck.target ? (
|
|
204
|
+
<Icon data={ChevronRight} size={12} />
|
|
205
|
+
) : undefined
|
|
206
|
+
}
|
|
207
|
+
qa="bridge-pile-healthcheck"
|
|
208
|
+
>
|
|
209
|
+
{pileHealthcheck.target ? (
|
|
210
|
+
<span className={b('healthcheck-accessible-prefix')}>
|
|
211
|
+
{i18n('label_bridge-pile-health-status-prefix', {pileName})}
|
|
212
|
+
</span>
|
|
213
|
+
) : null}
|
|
214
|
+
</EntityStatus.Label>
|
|
215
|
+
))}
|
|
212
216
|
</Flex>
|
|
213
217
|
<Flex gap={1} alignItems="center" className={b('nodes')}>
|
|
214
218
|
<Icon data={Archive} size={14} />
|
|
@@ -226,6 +230,7 @@ export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
|
226
230
|
clusterName,
|
|
227
231
|
}: BridgeInfoTableProps) {
|
|
228
232
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
233
|
+
const isMonitoringAllowed = useIsUserAllowedToMakeChanges();
|
|
229
234
|
const {handleOpenHealthcheckIssue} = useClusterHealthcheckQueryParams();
|
|
230
235
|
const {
|
|
231
236
|
currentData: healthcheckData,
|
|
@@ -235,14 +240,17 @@ export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
|
235
240
|
{database: database ?? '', clusterName},
|
|
236
241
|
{
|
|
237
242
|
pollingInterval: autoRefreshInterval,
|
|
238
|
-
skip: !database,
|
|
243
|
+
skip: !database || !isMonitoringAllowed,
|
|
239
244
|
},
|
|
240
245
|
);
|
|
241
246
|
const leavesIssues = useTypedSelector((state) =>
|
|
242
247
|
selectLeavesIssues(state, database ?? '', clusterName),
|
|
243
248
|
);
|
|
244
249
|
|
|
245
|
-
const healthcheckAvailable =
|
|
250
|
+
const healthcheckAvailable =
|
|
251
|
+
Boolean(isMonitoringAllowed) &&
|
|
252
|
+
healthcheckData !== undefined &&
|
|
253
|
+
healthcheckError === undefined;
|
|
246
254
|
const healthcheckLoading = healthcheckData === undefined && healthcheckFetching;
|
|
247
255
|
const currentPileName = healthcheckData?.location?.pile?.name;
|
|
248
256
|
const healthcheckSupportsPiles = healthcheckData?.location?.pile !== undefined;
|
|
@@ -267,6 +275,7 @@ export const BridgeInfoTable = React.memo(function BridgeInfoTable({
|
|
|
267
275
|
key={pile.PileId ?? pile.Name ?? index}
|
|
268
276
|
pile={pile}
|
|
269
277
|
current={Boolean(currentPileName?.trim() && pile.Name === currentPileName)}
|
|
278
|
+
healthcheckAllowed={Boolean(isMonitoringAllowed)}
|
|
270
279
|
healthcheckAvailable={healthcheckAvailable}
|
|
271
280
|
healthcheckSupportsPiles={healthcheckSupportsPiles}
|
|
272
281
|
healthcheckLoading={healthcheckLoading}
|
|
@@ -24,6 +24,7 @@ import type {ClusterAvailability, PreparedCluster} from '../../store/reducers/cl
|
|
|
24
24
|
import {uiFactory} from '../../uiFactory/uiFactory';
|
|
25
25
|
import {DEFAULT_TABLE_SETTINGS, EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
|
|
26
26
|
import {useAutoRefreshInterval, useTypedDispatch, useTypedSelector} from '../../utils/hooks';
|
|
27
|
+
import {useIsUserAllowedToMakeChanges} from '../../utils/hooks/useIsUserAllowedToMakeChanges';
|
|
27
28
|
import {useSelectedColumns} from '../../utils/hooks/useSelectedColumns';
|
|
28
29
|
import {getMinorVersion} from '../../utils/versions';
|
|
29
30
|
|
|
@@ -54,6 +55,8 @@ export function Clusters({scrollContainerRef}: ClustersProps) {
|
|
|
54
55
|
const dispatch = useTypedDispatch();
|
|
55
56
|
|
|
56
57
|
const emMetaAvailable = useEmMetaAvailable();
|
|
58
|
+
const isMonitoringAllowed = useIsUserAllowedToMakeChanges();
|
|
59
|
+
const healthcheckAvailable = !emMetaAvailable || isMonitoringAllowed;
|
|
57
60
|
const isEditClusterAvailable = emMetaAvailable && uiFactory.onEditCluster !== undefined;
|
|
58
61
|
const isDeleteClusterAvailable = emMetaAvailable && uiFactory.onDeleteCluster !== undefined;
|
|
59
62
|
|
|
@@ -106,11 +109,12 @@ export function Clusters({scrollContainerRef}: ClustersProps) {
|
|
|
106
109
|
}, []);
|
|
107
110
|
const rawColumns = React.useMemo(() => {
|
|
108
111
|
return getClustersColumns({
|
|
112
|
+
healthcheckAvailable: Boolean(healthcheckAvailable),
|
|
109
113
|
isEditClusterAvailable,
|
|
110
114
|
isDeleteClusterAvailable,
|
|
111
|
-
onStatusClick: handleStatusClick,
|
|
115
|
+
onStatusClick: healthcheckAvailable ? handleStatusClick : undefined,
|
|
112
116
|
});
|
|
113
|
-
}, [isDeleteClusterAvailable, isEditClusterAvailable, handleStatusClick]);
|
|
117
|
+
}, [isDeleteClusterAvailable, isEditClusterAvailable, handleStatusClick, healthcheckAvailable]);
|
|
114
118
|
|
|
115
119
|
const clusters = query.data;
|
|
116
120
|
const hasUnavailableClusters = clusters?.some(
|
|
@@ -376,7 +380,7 @@ export function Clusters({scrollContainerRef}: ClustersProps) {
|
|
|
376
380
|
return (
|
|
377
381
|
<ClusterDrawerHealthcheck
|
|
378
382
|
clusterName={healthcheckClusterName}
|
|
379
|
-
isVisible={Boolean(healthcheckClusterName)}
|
|
383
|
+
isVisible={Boolean(healthcheckAvailable && healthcheckClusterName)}
|
|
380
384
|
onClose={handleDrawerClose}
|
|
381
385
|
>
|
|
382
386
|
<div>
|
|
@@ -81,12 +81,14 @@ export function getFirstVersion(preparedVersions: PreparedVersion[]): string | u
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
interface ClustersColumnsParams {
|
|
84
|
+
healthcheckAvailable?: boolean;
|
|
84
85
|
isEditClusterAvailable?: boolean;
|
|
85
86
|
isDeleteClusterAvailable?: boolean;
|
|
86
87
|
onStatusClick?: (row: PreparedCluster) => void;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
function getTitleColumn({
|
|
91
|
+
healthcheckAvailable = true,
|
|
90
92
|
isEditClusterAvailable,
|
|
91
93
|
isDeleteClusterAvailable,
|
|
92
94
|
onStatusClick,
|
|
@@ -190,6 +192,10 @@ function getTitleColumn({
|
|
|
190
192
|
};
|
|
191
193
|
|
|
192
194
|
const renderStatus = () => {
|
|
195
|
+
if (!healthcheckAvailable) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
|
|
193
199
|
const statusLabel = clusterStatus ? (
|
|
194
200
|
<EntityStatus.Label status={clusterStatus} size="xs" />
|
|
195
201
|
) : (
|
|
@@ -32,7 +32,11 @@ export function StorageGroupLeftControls() {
|
|
|
32
32
|
aria-label={headerKeyset('action_copy-group-id-from-breadcrumb')}
|
|
33
33
|
tooltipInitialText={headerKeyset('action_copy-group-id')}
|
|
34
34
|
/>
|
|
35
|
-
<StorageGroupStateLabel
|
|
35
|
+
<StorageGroupStateLabel
|
|
36
|
+
state={currentData?.groups?.[0]?.State}
|
|
37
|
+
stateInfo={currentData?.groups?.[0]?.StateInfo}
|
|
38
|
+
size="xs"
|
|
39
|
+
/>
|
|
36
40
|
</Flex>
|
|
37
41
|
);
|
|
38
42
|
}
|
|
@@ -14,6 +14,7 @@ import {useClusterWithProxy} from '../../store/reducers/cluster/cluster';
|
|
|
14
14
|
import type {NodesFilters} from '../../store/reducers/nodes/types';
|
|
15
15
|
import type {PreparedStorageNode} from '../../store/reducers/storage/types';
|
|
16
16
|
import type {NodesGroupByField, NodesPeerRole} from '../../types/api/nodes';
|
|
17
|
+
import {useDatacenterNodesFetcher} from '../../utils/hooks/useDatacenterNodesFetcher';
|
|
17
18
|
import {useHideUnavailableNodes} from '../../utils/hooks/useHideUnavailableNodes';
|
|
18
19
|
import {getIllustration} from '../../utils/illustrations';
|
|
19
20
|
import {NodesUptimeFilterValues} from '../../utils/nodes';
|
|
@@ -62,6 +63,7 @@ export function NodesTable({
|
|
|
62
63
|
onDataFetched,
|
|
63
64
|
}: NodesTableProps) {
|
|
64
65
|
const history = useHistory();
|
|
66
|
+
const fetchNodes = useDatacenterNodesFetcher(getNodes);
|
|
65
67
|
const {hideUnavailable} = useHideUnavailableNodes();
|
|
66
68
|
const SuccessImage = getIllustration('SuccessOperation');
|
|
67
69
|
|
|
@@ -120,7 +122,7 @@ export function NodesTable({
|
|
|
120
122
|
? ROW_HEIGHT_WITH_PDISKS
|
|
121
123
|
: undefined
|
|
122
124
|
}
|
|
123
|
-
fetchData={
|
|
125
|
+
fetchData={fetchNodes}
|
|
124
126
|
initialEntitiesCount={initialEntitiesCount}
|
|
125
127
|
renderErrorMessage={renderPaginatedTableErrorMessage}
|
|
126
128
|
renderEmptyDataMessage={renderEmptyDataMessage}
|
|
@@ -6,17 +6,21 @@ import {ResponseError} from '../../../components/Errors/ResponseError';
|
|
|
6
6
|
import type {PaginatedTableData} from '../../../components/PaginatedTable';
|
|
7
7
|
import {PaginatedTableWithLayout} from '../../../components/PaginatedTable/PaginatedTableWithLayout';
|
|
8
8
|
import {TableColumnSetup} from '../../../components/TableColumnSetup/TableColumnSetup';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
NODES_COLUMNS_TITLES,
|
|
11
|
+
NODES_COLUMNS_TO_DATA_FIELDS,
|
|
12
|
+
} from '../../../components/nodesColumns/constants';
|
|
10
13
|
import type {NodesColumnId} from '../../../components/nodesColumns/constants';
|
|
11
14
|
import type {NodesColumn} from '../../../components/nodesColumns/types';
|
|
12
15
|
import {useClusterWithProxy} from '../../../store/reducers/cluster/cluster';
|
|
13
16
|
import {nodesApi} from '../../../store/reducers/nodes/nodes';
|
|
14
17
|
import type {PreparedStorageNode} from '../../../store/reducers/storage/types';
|
|
15
|
-
import type {NodesGroupByField, NodesPeerRole} from '../../../types/api/nodes';
|
|
18
|
+
import type {NodesGroupByField, NodesPeerRole, NodesRequiredField} from '../../../types/api/nodes';
|
|
16
19
|
import {useAutoRefreshInterval} from '../../../utils/hooks';
|
|
17
20
|
import {useHideUnavailableNodes} from '../../../utils/hooks/useHideUnavailableNodes';
|
|
18
21
|
import {useSelectedColumns} from '../../../utils/hooks/useSelectedColumns';
|
|
19
22
|
import {NodesUptimeFilterValues} from '../../../utils/nodes';
|
|
23
|
+
import {getRequiredDataFields} from '../../../utils/tableUtils/getRequiredDataFields';
|
|
20
24
|
import {TableGroup} from '../../Storage/TableGroup/TableGroup';
|
|
21
25
|
import {useExpandedGroups} from '../../Storage/TableGroup/useExpandedTableGroups';
|
|
22
26
|
import {NodesControls} from '../NodesControls/NodesControls';
|
|
@@ -25,6 +29,8 @@ import i18n from '../i18n';
|
|
|
25
29
|
import {b} from '../shared';
|
|
26
30
|
import {useNodesPageQueryParams} from '../useNodesPageQueryParams';
|
|
27
31
|
|
|
32
|
+
const NODE_SEARCH_FIELDS_REQUIRED = new Set<NodesRequiredField>(['Host', 'NodeName']);
|
|
33
|
+
|
|
28
34
|
interface NodeGroupProps {
|
|
29
35
|
name: string;
|
|
30
36
|
count: number;
|
|
@@ -136,6 +142,15 @@ export function GroupedNodesComponent({
|
|
|
136
142
|
requiredColumnsIds,
|
|
137
143
|
);
|
|
138
144
|
|
|
145
|
+
const searchFieldsRequired = React.useMemo(() => {
|
|
146
|
+
const activeFieldsRequired = getRequiredDataFields(
|
|
147
|
+
columnsToShow.map(({name}) => name),
|
|
148
|
+
NODES_COLUMNS_TO_DATA_FIELDS,
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
return activeFieldsRequired.filter((field) => NODE_SEARCH_FIELDS_REQUIRED.has(field));
|
|
152
|
+
}, [columnsToShow]);
|
|
153
|
+
|
|
139
154
|
const schemaPathParam = React.useMemo(() => {
|
|
140
155
|
if (!isNil(path) && !isNil(databaseFullPath)) {
|
|
141
156
|
return {path, databaseFullPath, useMetaProxy};
|
|
@@ -151,6 +166,7 @@ export function GroupedNodesComponent({
|
|
|
151
166
|
filter: searchValue.trim(),
|
|
152
167
|
filter_peer_role: peerRoleFilter,
|
|
153
168
|
group: groupByParam,
|
|
169
|
+
fieldsRequired: searchValue.trim() ? searchFieldsRequired : undefined,
|
|
154
170
|
limit: 0,
|
|
155
171
|
},
|
|
156
172
|
{
|
|
@@ -81,7 +81,12 @@ export function PDiskSpaceDistribution({data}: PDiskSpaceDistributionProps) {
|
|
|
81
81
|
minNonLogTotal={minNonLogTotal}
|
|
82
82
|
pDiskId={PDiskId}
|
|
83
83
|
nodeId={NodeId}
|
|
84
|
-
nodeData={{
|
|
84
|
+
nodeData={{
|
|
85
|
+
Host: data.NodeHost,
|
|
86
|
+
DC: data.NodeDC,
|
|
87
|
+
DCKey: data.NodeDCKey,
|
|
88
|
+
Rack: data.NodeRack,
|
|
89
|
+
}}
|
|
85
90
|
getVDiskPagePath={getVDiskPagePath}
|
|
86
91
|
key={index}
|
|
87
92
|
/>
|
|
@@ -2,6 +2,7 @@ import {DefinitionList} from '@gravity-ui/uikit';
|
|
|
2
2
|
|
|
3
3
|
import {CellWithPopover} from '../../components/CellWithPopover/CellWithPopover';
|
|
4
4
|
import {CopyableValue} from '../../components/CopyableValue/CopyableValue';
|
|
5
|
+
import {DatacenterLabel} from '../../components/Datacenter/DatacenterLabel';
|
|
5
6
|
import type {PDiskData} from '../../store/reducers/pdisk/types';
|
|
6
7
|
import {cn} from '../../utils/cn';
|
|
7
8
|
import {getDiskLocationItems} from '../../utils/disks/diskInfo/getDiskLocationItems';
|
|
@@ -52,7 +53,17 @@ export function PDiskStorageDetails({
|
|
|
52
53
|
'with-left-trim': id === 'pdisk-path',
|
|
53
54
|
})}
|
|
54
55
|
>
|
|
55
|
-
<span tabIndex={copyText ? 0 : undefined}>
|
|
56
|
+
<span tabIndex={copyText ? 0 : undefined}>
|
|
57
|
+
{id === 'datacenter' && copyText ? (
|
|
58
|
+
<DatacenterLabel
|
|
59
|
+
name={copyText}
|
|
60
|
+
colorKey={data.NodeDCKey}
|
|
61
|
+
size="xxs"
|
|
62
|
+
/>
|
|
63
|
+
) : (
|
|
64
|
+
item.content
|
|
65
|
+
)}
|
|
66
|
+
</span>
|
|
56
67
|
</CellWithPopover>
|
|
57
68
|
</CopyableValue>
|
|
58
69
|
</DefinitionList.Item>
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {isNil} from 'lodash';
|
|
4
4
|
|
|
5
|
+
import datacenterI18n from '../../../components/Datacenter/i18n';
|
|
5
6
|
import {DiskBarLabel} from '../../../components/DiskStateProgressBar/DiskBarLabel';
|
|
6
7
|
import {DiskIndicator} from '../../../components/DiskStateProgressBar/DiskIndicator';
|
|
7
8
|
import {DiskStateProgressBar} from '../../../components/DiskStateProgressBar/DiskStateProgressBar';
|
|
@@ -192,10 +193,8 @@ function getAllModeAccessibleName(
|
|
|
192
193
|
});
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
function getAccessibleName(
|
|
196
|
-
|
|
197
|
-
{mode, allMode, isNoData, allocatedPercent, driveType}: PDiskDisplayState,
|
|
198
|
-
) {
|
|
196
|
+
function getAccessibleName(data: PreparedPDisk, displayState: PDiskDisplayState) {
|
|
197
|
+
const {mode, allMode, isNoData, allocatedPercent} = displayState;
|
|
199
198
|
if (!mode) {
|
|
200
199
|
return undefined;
|
|
201
200
|
}
|
|
@@ -208,9 +207,24 @@ function getAccessibleName(
|
|
|
208
207
|
if (isNoData) {
|
|
209
208
|
diskName = i18n('context_pdisk-no-whiteboard', {disk: diskName, noData});
|
|
210
209
|
}
|
|
210
|
+
|
|
211
|
+
return getModeAccessibleName(data, displayState, diskName);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function getModeAccessibleName(
|
|
215
|
+
data: PreparedPDisk,
|
|
216
|
+
{mode, isNoData, allocatedPercent, driveType, datacenter}: PDiskDisplayState,
|
|
217
|
+
diskName: string,
|
|
218
|
+
) {
|
|
219
|
+
const noData = i18n('context_no-data');
|
|
211
220
|
const {State, Device, Realtime} = isNoData ? {} : data;
|
|
212
221
|
|
|
213
222
|
switch (mode) {
|
|
223
|
+
case 'datacenter':
|
|
224
|
+
return datacenterI18n('context_disk-datacenter', {
|
|
225
|
+
disk: diskName,
|
|
226
|
+
datacenter: datacenter?.name || datacenterI18n('value_unknown'),
|
|
227
|
+
});
|
|
214
228
|
case 'driveType':
|
|
215
229
|
return i18n('context_drive-type-accessible-name', {
|
|
216
230
|
disk: diskName,
|
|
@@ -370,6 +384,7 @@ export const PDisk = ({
|
|
|
370
384
|
<DiskStateProgressBar
|
|
371
385
|
allocation={allocatedPercent}
|
|
372
386
|
tone={tone}
|
|
387
|
+
datacenter={displayState.datacenter}
|
|
373
388
|
mode={displayState.mode}
|
|
374
389
|
leading={leading}
|
|
375
390
|
content={content}
|
|
@@ -141,7 +141,7 @@ const stateColumn: StorageGroupsColumn = {
|
|
|
141
141
|
header: STORAGE_GROUPS_COLUMNS_TITLES.State,
|
|
142
142
|
width: 150,
|
|
143
143
|
render: ({row}) => {
|
|
144
|
-
const state = getStorageGroupStateLabel(row.State);
|
|
144
|
+
const state = getStorageGroupStateLabel(row.State, row.StateInfo);
|
|
145
145
|
|
|
146
146
|
return state ? (
|
|
147
147
|
<DiskStatusLabel
|
|
@@ -14,6 +14,7 @@ import {VISIBLE_ENTITIES} from '../../../store/reducers/storage/constants';
|
|
|
14
14
|
import type {PreparedStorageNode, VisibleEntities} from '../../../store/reducers/storage/types';
|
|
15
15
|
import type {NodesGroupByField} from '../../../types/api/nodes';
|
|
16
16
|
import {cn} from '../../../utils/cn';
|
|
17
|
+
import {useDatacenterNodesFetcher} from '../../../utils/hooks/useDatacenterNodesFetcher';
|
|
17
18
|
import {useHideUnavailableNodes} from '../../../utils/hooks/useHideUnavailableNodes';
|
|
18
19
|
import {NodesUptimeFilterValues, isUnavailableNode} from '../../../utils/nodes';
|
|
19
20
|
import {STORAGE_NODES_DEFAULT_ROW_HEIGHT} from '../PaginatedStorageNodes/nodeExpertModeLayout';
|
|
@@ -70,6 +71,7 @@ export const PaginatedStorageNodesTable = ({
|
|
|
70
71
|
onDataFetched,
|
|
71
72
|
}: PaginatedStorageNodesTableProps) => {
|
|
72
73
|
const history = useHistory();
|
|
74
|
+
const fetchNodes = useDatacenterNodesFetcher(getStorageNodes);
|
|
73
75
|
const {hideUnavailable} = useHideUnavailableNodes();
|
|
74
76
|
const tableFilters = React.useMemo(() => {
|
|
75
77
|
return {
|
|
@@ -125,7 +127,7 @@ export const PaginatedStorageNodesTable = ({
|
|
|
125
127
|
columnsWidthLSKey={STORAGE_NODES_COLUMNS_WIDTH_LS_KEY}
|
|
126
128
|
scrollContainerRef={scrollContainerRef}
|
|
127
129
|
columns={columns}
|
|
128
|
-
fetchData={
|
|
130
|
+
fetchData={fetchNodes}
|
|
129
131
|
rowHeight={
|
|
130
132
|
columns.some((column) => column.name === NODES_COLUMNS_IDS.PDisks)
|
|
131
133
|
? rowHeight
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
getPoolsColumn,
|
|
20
20
|
getRAMColumn,
|
|
21
21
|
getRackColumn,
|
|
22
|
+
getRolesColumn,
|
|
22
23
|
getTabletsColumn,
|
|
23
24
|
getUptimeColumn,
|
|
24
25
|
getVersionColumn,
|
|
@@ -84,6 +85,7 @@ export const getStorageNodesColumns = ({
|
|
|
84
85
|
getMemoryColumn(),
|
|
85
86
|
getDiskSpaceUsageColumn(),
|
|
86
87
|
getVersionColumn(),
|
|
88
|
+
getRolesColumn(),
|
|
87
89
|
getMissingDisksColumn(),
|
|
88
90
|
getPDisksColumn({viewContext, columnsSettings}),
|
|
89
91
|
getTabletsColumn({database}),
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
import type {GetStorageNodesColumnsParams} from './types';
|
|
26
26
|
|
|
27
27
|
const LEGACY_CAPACITY_COLUMN_IDS: NodesColumnId[] = [NODES_COLUMNS_IDS.DiskSpaceUsage];
|
|
28
|
+
const EXPERT_MODE_ONLY_COLUMN_IDS: NodesColumnId[] = [NODES_COLUMNS_IDS.Roles];
|
|
28
29
|
|
|
29
30
|
export function useStorageNodesSelectedColumns({
|
|
30
31
|
visibleEntities,
|
|
@@ -82,32 +83,39 @@ export function useStorageNodesSelectedColumns({
|
|
|
82
83
|
stickyColumns,
|
|
83
84
|
);
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
// Hidden columns stay in saved settings, so their selection and position survive mode switches
|
|
87
|
+
const hiddenColumnIds = React.useMemo(() => {
|
|
88
|
+
const hiddenCapacityColumnIds = blobMetricsEnabled
|
|
89
|
+
? LEGACY_CAPACITY_COLUMN_IDS
|
|
90
|
+
: CAPACITY_METRICS_USER_SETTINGS_COLUMNS_IDS;
|
|
91
|
+
|
|
92
|
+
return columnsSettings?.expertMode
|
|
93
|
+
? hiddenCapacityColumnIds
|
|
94
|
+
: [...hiddenCapacityColumnIds, ...EXPERT_MODE_ONLY_COLUMN_IDS];
|
|
95
|
+
}, [blobMetricsEnabled, columnsSettings?.expertMode]);
|
|
88
96
|
const setColumns: typeof selectedColumns.setColumns = React.useCallback(
|
|
89
97
|
(value) => {
|
|
90
98
|
selectedColumns.setColumns(
|
|
91
99
|
mergeColumnsPreservingHiddenPositions(
|
|
92
100
|
value,
|
|
93
101
|
selectedColumns.columnsToSelect,
|
|
94
|
-
|
|
102
|
+
hiddenColumnIds,
|
|
95
103
|
),
|
|
96
104
|
);
|
|
97
105
|
},
|
|
98
|
-
[
|
|
106
|
+
[hiddenColumnIds, selectedColumns],
|
|
99
107
|
);
|
|
100
108
|
|
|
101
109
|
return React.useMemo(() => {
|
|
102
110
|
return {
|
|
103
111
|
...selectedColumns,
|
|
104
112
|
columnsToShow: selectedColumns.columnsToShow.filter(
|
|
105
|
-
({name}) => !
|
|
113
|
+
({name}) => !hiddenColumnIds.some((columnId) => columnId === name),
|
|
106
114
|
),
|
|
107
115
|
columnsToSelect: selectedColumns.columnsToSelect.filter(
|
|
108
|
-
({id}) => !
|
|
116
|
+
({id}) => !hiddenColumnIds.some((columnId) => columnId === id),
|
|
109
117
|
),
|
|
110
118
|
setColumns,
|
|
111
119
|
};
|
|
112
|
-
}, [
|
|
120
|
+
}, [hiddenColumnIds, selectedColumns, setColumns]);
|
|
113
121
|
}
|