ydb-embedded-ui 6.11.0 → 6.12.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/DateRange/DateRange.d.ts +4 -4
- package/dist/components/DateRange/DateRange.js +23 -26
- package/dist/components/DateRange/DateRange.scss +14 -13
- package/dist/components/DateRange/__test__/fromDateRangeValues.test.d.ts +1 -0
- package/dist/components/DateRange/__test__/fromDateRangeValues.test.js +80 -0
- package/dist/components/DateRange/__test__/getdatePickerSize.test.d.ts +1 -0
- package/dist/components/DateRange/__test__/getdatePickerSize.test.js +56 -0
- package/dist/components/DateRange/__test__/toDateRangeValues.test.d.ts +1 -0
- package/dist/components/DateRange/__test__/toDateRangeValues.test.js +80 -0
- package/dist/components/DateRange/i18n/en.json +4 -0
- package/dist/components/DateRange/i18n/index.d.ts +2 -0
- package/dist/components/DateRange/i18n/index.js +5 -0
- package/dist/components/DateRange/i18n/ru.json +4 -0
- package/dist/components/DateRange/utils.d.ts +5 -0
- package/dist/components/DateRange/utils.js +41 -0
- package/dist/components/DeveloperUILinkButton/DeveloperUILinkButton.d.ts +8 -0
- package/dist/components/{DeveloperUiLink/DeveloperUiLink.js → DeveloperUILinkButton/DeveloperUILinkButton.js} +3 -3
- package/dist/components/{DeveloperUiLink/DeveloperUiLink.scss → DeveloperUILinkButton/DeveloperUILinkButton.scss} +3 -2
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.d.ts +6 -1
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.js +22 -12
- package/dist/components/DiskStateProgressBar/DiskStateProgressBar.scss +45 -45
- package/dist/components/EntityStatus/EntityStatus.js +1 -1
- package/dist/components/EntityStatus/EntityStatus.scss +6 -2
- package/dist/components/MetricChart/reducer.d.ts +2 -2
- package/dist/components/MonacoEditor/MonacoEditor.js +0 -2
- package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +0 -1
- package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -6
- package/dist/components/PDiskInfo/PDiskInfo.d.ts +7 -4
- package/dist/components/PDiskInfo/PDiskInfo.js +73 -26
- package/dist/components/PDiskInfo/PDiskInfo.scss +15 -1
- package/dist/components/PDiskInfo/i18n/en.json +11 -5
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskPopup/PDiskPopup.js +8 -2
- package/dist/components/VDiskInfo/VDiskInfo.d.ts +3 -2
- package/dist/components/VDiskInfo/VDiskInfo.js +9 -4
- package/dist/components/VDiskInfo/VDiskInfo.scss +7 -1
- package/dist/components/VDiskInfo/i18n/en.json +2 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Cluster/Cluster.scss +1 -4
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +1 -1
- package/dist/containers/Heatmap/Heatmap.d.ts +2 -1
- package/dist/containers/Heatmap/Heatmap.js +2 -2
- package/dist/containers/Node/Node.scss +1 -4
- package/dist/containers/Node/NodeStructure/NodeStructure.scss +0 -20
- package/dist/containers/Node/NodeStructure/Pdisk.js +2 -2
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.d.ts +6 -0
- package/dist/containers/PDiskPage/PDiskGroups/PDiskGroups.js +24 -0
- package/dist/containers/PDiskPage/PDiskPage.js +62 -24
- package/dist/containers/PDiskPage/PDiskPage.scss +8 -5
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.d.ts +7 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +93 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.scss +52 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.d.ts +4 -0
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/utils.js +9 -0
- package/dist/containers/PDiskPage/i18n/en.json +8 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +16 -6
- package/dist/containers/Tablets/Tablets.js +11 -8
- package/dist/containers/Tenant/Acl/Acl.d.ts +2 -1
- package/dist/containers/Tenant/Acl/Acl.js +10 -8
- package/dist/containers/Tenant/Acl/Acl.scss +8 -8
- package/dist/containers/Tenant/Acl/i18n/en.json +6 -0
- package/dist/containers/Tenant/Acl/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Acl/i18n/index.js +4 -0
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Describe/Describe.js +4 -4
- package/dist/containers/Tenant/Diagnostics/DetailedOverview/DetailedOverview.js +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +3 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +5 -5
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +14 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.js +1 -2
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo.js +36 -17
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +8 -5
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.js +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/getSectionTitle.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +3 -2
- package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +2 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +2 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +14 -14
- package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +3 -3
- package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +4 -4
- package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +31 -18
- package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +2 -2
- package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +8 -3
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.d.ts +2 -1
- package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +9 -7
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.d.ts +2 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.js +38 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.scss +63 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.d.ts +15 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.js +14 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.scss +19 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +99 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +109 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json +13 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/index.js +5 -0
- package/dist/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json +13 -0
- package/dist/containers/Tenant/Query/i18n/en.json +14 -0
- package/dist/containers/Tenant/Query/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.d.ts +3 -2
- package/dist/containers/Tenant/Schema/CreateDirectoryDialog/CreateDirectoryDialog.js +2 -2
- package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.js +2 -2
- package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +1 -1
- package/dist/containers/Tenant/Tenant.js +1 -1
- package/dist/containers/Tenant/TenantPages.d.ts +12 -1
- package/dist/containers/Tenant/TenantPages.js +1 -1
- package/dist/containers/Tenant/i18n/en.json +2 -2
- package/dist/containers/Tenant/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/utils/schema.js +1 -1
- package/dist/containers/Tenants/Tenants.js +1 -1
- package/dist/containers/Tenants/Tenants.scss +0 -4
- package/dist/containers/UserSettings/i18n/en.json +2 -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 +6 -1
- package/dist/routes.js +2 -2
- package/dist/services/api.d.ts +39 -21
- package/dist/services/api.js +45 -56
- package/dist/services/settings.d.ts +1 -0
- package/dist/services/settings.js +2 -1
- package/dist/store/configureStore.d.ts +4 -4
- package/dist/store/defaultStore.d.ts +2 -2
- package/dist/store/reducers/api.d.ts +1 -1
- package/dist/store/reducers/api.js +1 -1
- package/dist/store/reducers/cluster/cluster.d.ts +2 -2
- package/dist/store/reducers/clusterNodes/clusterNodes.d.ts +2 -2
- package/dist/store/reducers/clusters/clusters.d.ts +2 -2
- package/dist/store/reducers/describe.d.ts +5 -2
- package/dist/store/reducers/describe.js +2 -2
- package/dist/store/reducers/executeQuery.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +19 -14
- package/dist/store/reducers/executeTopQueries/types.d.ts +2 -2
- package/dist/store/reducers/executeTopQueries/utils.js +11 -7
- package/dist/store/reducers/explainQuery/explainQuery.d.ts +2 -2
- package/dist/store/reducers/explainQuery/explainQuery.js +6 -1
- package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +58 -58
- package/dist/store/reducers/heatmap.d.ts +2 -2
- package/dist/store/reducers/heatmap.js +3 -3
- package/dist/store/reducers/hotKeys/hotKeys.d.ts +3 -2
- package/dist/store/reducers/hotKeys/hotKeys.js +3 -3
- package/dist/store/reducers/index.d.ts +3 -3
- package/dist/store/reducers/network/network.d.ts +2 -2
- package/dist/store/reducers/network/network.js +1 -1
- package/dist/store/reducers/node/node.d.ts +3 -3
- package/dist/store/reducers/node/selectors.d.ts +1 -1
- package/dist/store/reducers/node/selectors.js +2 -2
- package/dist/store/reducers/nodes/nodes.d.ts +3 -3
- package/dist/store/reducers/nodesList.d.ts +3 -3
- package/dist/store/reducers/overview/overview.d.ts +5 -2
- package/dist/store/reducers/overview/overview.js +2 -2
- package/dist/store/reducers/partitions/partitions.d.ts +2 -2
- package/dist/store/reducers/pdisk/pdisk.d.ts +3 -3
- package/dist/store/reducers/pdisk/pdisk.js +15 -2
- package/dist/store/reducers/pdisk/types.d.ts +17 -1
- package/dist/store/reducers/pdisk/utils.d.ts +2 -2
- package/dist/store/reducers/pdisk/utils.js +68 -8
- package/dist/store/reducers/preview.d.ts +2 -2
- package/dist/store/reducers/preview.js +1 -1
- package/dist/store/reducers/queryActions/types.d.ts +1 -1
- package/dist/store/reducers/schema/schema.d.ts +28 -10
- package/dist/store/reducers/schema/schema.js +11 -12
- package/dist/store/reducers/schemaAcl/schemaAcl.d.ts +4 -2
- package/dist/store/reducers/schemaAcl/schemaAcl.js +9 -3
- package/dist/store/reducers/shardsWorkload/shardsWorkload.d.ts +2 -2
- package/dist/store/reducers/shardsWorkload/shardsWorkload.js +22 -6
- package/dist/store/reducers/shardsWorkload/types.d.ts +2 -2
- package/dist/store/reducers/storage/storage.d.ts +3 -3
- package/dist/store/reducers/tablet.d.ts +3 -3
- package/dist/store/reducers/tablets.d.ts +13 -13
- package/dist/store/reducers/tabletsFilters.d.ts +1 -1
- package/dist/store/reducers/tenant/tenant.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +1 -1
- package/dist/store/reducers/tenantOverview/topNodes/topNodes.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.d.ts +2 -2
- package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +1 -1
- package/dist/store/reducers/tenantOverview/topStorageGroups/topStorageGroups.d.ts +2 -2
- package/dist/store/reducers/tenants/selectors.d.ts +27 -27
- package/dist/store/reducers/tenants/tenants.d.ts +2 -2
- package/dist/store/reducers/topic.d.ts +44 -44
- package/dist/store/reducers/vdisk/vdisk.d.ts +2 -2
- package/dist/store/reducers/vdisk/vdisk.js +1 -1
- package/dist/store/reducers/viewSchema/viewSchema.d.ts +2 -2
- package/dist/store/reducers/viewSchema/viewSchema.js +1 -1
- package/dist/store/state-url-mapping.d.ts +70 -0
- package/dist/store/state-url-mapping.js +1 -5
- package/dist/styles/mixins.scss +11 -0
- package/dist/types/api/acl.d.ts +1 -0
- package/dist/types/api/pdisk.d.ts +65 -2
- package/dist/types/api/vdisk.d.ts +33 -2
- package/dist/types/common.d.ts +3 -0
- package/dist/types/store/heatmap.d.ts +1 -0
- package/dist/types/store/query.d.ts +4 -1
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/dist/utils/dataFormatters/dataFormatters.d.ts +0 -4
- package/dist/utils/dataFormatters/dataFormatters.js +2 -8
- package/dist/utils/developerUI/developerUI.d.ts +1 -0
- package/dist/utils/developerUI/developerUI.js +3 -0
- package/dist/utils/disks/getPDiskType.d.ts +3 -3
- package/dist/utils/disks/helpers.d.ts +1 -0
- package/dist/utils/disks/helpers.js +3 -0
- package/dist/utils/disks/prepareDisks.d.ts +2 -2
- package/dist/utils/disks/prepareDisks.js +17 -22
- package/dist/utils/disks/types.d.ts +7 -5
- package/dist/utils/monaco/constats.d.ts +2 -0
- package/dist/utils/monaco/constats.js +2 -0
- package/dist/utils/monaco/yql/constants.d.ts +0 -1
- package/dist/utils/monaco/yql/constants.js +0 -1
- package/dist/utils/monaco/yql/yql.completionItemProvider.js +2 -2
- package/dist/utils/query.d.ts +24 -1
- package/dist/utils/query.js +40 -0
- package/package.json +5 -1
- package/dist/components/DeveloperUiLink/DeveloperUiLink.d.ts +0 -8
- package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +0 -15
- package/dist/containers/Node/NodeStructure/Vdisk.d.ts +0 -6
- package/dist/containers/Node/NodeStructure/Vdisk.js +0 -13
- package/dist/containers/PDiskPage/PDiskGroups.d.ts +0 -9
- package/dist/containers/PDiskPage/PDiskGroups.js +0 -20
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/ru.json +0 -5
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.d.ts +0 -5
- package/dist/store/reducers/tenantOverview/topQueries/tenantOverviewTopQueries.js +0 -38
- package/dist/utils/monaco/index.d.ts +0 -1
- package/dist/utils/monaco/index.js +0 -6
- package/dist/utils/monaco/s-expression/constants.d.ts +0 -1
- package/dist/utils/monaco/s-expression/constants.js +0 -1
- package/dist/utils/monaco/s-expression/registerLanguage.d.ts +0 -1
- package/dist/utils/monaco/s-expression/registerLanguage.js +0 -59
- package/dist/utils/monaco/yql/registerLanguage.d.ts +0 -1
- package/dist/utils/monaco/yql/registerLanguage.js +0 -8
- package/dist/utils/monaco/yql/yql.d.ts +0 -7
- package/dist/utils/monaco/yql/yql.js +0 -180
- package/dist/utils/monaco/yql/yql.keywords.d.ts +0 -3
- package/dist/utils/monaco/yql/yql.keywords.js +0 -3
@@ -28,5 +28,5 @@ export function EntityStatus({ status = EFlag.Grey, name = '', label, path, icon
|
|
28
28
|
};
|
29
29
|
return (_jsxs("div", { className: b(null, className), title: name, children: [iconPath ? renderStatusLink(iconPath) : renderIcon(), label && (_jsx("span", { title: label, className: b('label', { size, state: status.toLowerCase() }), children: label })), _jsx("span", { className: b('link', { 'with-left-trim': withLeftTrim }), children: renderLink() }), hasClipboardButton && (_jsx(ClipboardButton, { text: name, size: "s", className: b('clipboard-button', {
|
30
30
|
visible: clipboardButtonAlwaysVisible,
|
31
|
-
}) })), additionalControls] }));
|
31
|
+
}) })), additionalControls && (_jsx("span", { className: b('additional-controls '), children: additionalControls }))] }));
|
32
32
|
}
|
@@ -10,14 +10,14 @@
|
|
10
10
|
@include body-2-typography();
|
11
11
|
|
12
12
|
&__icon {
|
13
|
-
margin-right:
|
13
|
+
margin-right: var(--g-spacing-2);
|
14
14
|
}
|
15
15
|
|
16
16
|
&__clipboard-button {
|
17
17
|
display: flex;
|
18
18
|
flex-shrink: 0;
|
19
19
|
|
20
|
-
margin-left:
|
20
|
+
margin-left: var(--g-spacing-2);
|
21
21
|
|
22
22
|
opacity: 0;
|
23
23
|
color: var(--g-color-text-secondary);
|
@@ -28,6 +28,10 @@
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
+
&__additional-controls {
|
32
|
+
margin-left: var(--g-spacing-1);
|
33
|
+
}
|
34
|
+
|
31
35
|
&__label {
|
32
36
|
margin-right: 2px;
|
33
37
|
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { GetChartDataParams } from './getChartData';
|
2
2
|
export declare const chartApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, {
|
3
|
-
getChartData: import("@reduxjs/toolkit/query").QueryDefinition<GetChartDataParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All", import("./types").PreparedMetricsData | undefined, "api">;
|
4
|
-
}, "api", "All", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
3
|
+
getChartData: import("@reduxjs/toolkit/query").QueryDefinition<GetChartDataParams, import("@reduxjs/toolkit/query").BaseQueryFn<void, typeof import("../../store/reducers/api")._NEVER, unknown, {}>, "All" | "PDiskData", import("./types").PreparedMetricsData | undefined, "api">;
|
4
|
+
}, "api", "All" | "PDiskData", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import { lazyComponent } from '../../utils/lazyComponent';
|
2
2
|
export const MonacoEditor = lazyComponent(async () => {
|
3
3
|
const Editor = (await import('react-monaco-editor')).default;
|
4
|
-
const { registerLanguages } = await import('../../utils/monaco');
|
5
|
-
registerLanguages();
|
6
4
|
return { Editor };
|
7
5
|
}, 'Editor');
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { NodesPreparedEntity } from '../../store/reducers/nodes/types';
|
2
2
|
import type { NodeAddress } from '../../types/additionalProps';
|
3
|
-
import './NodeHostWrapper.scss';
|
4
3
|
interface NodeHostWrapperProps {
|
5
4
|
node: NodesPreparedEntity;
|
6
5
|
getNodeRef?: (node?: NodeAddress) => string | null;
|
@@ -1,15 +1,12 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import {
|
3
|
-
import { Button, Icon, PopoverBehavior } from '@gravity-ui/uikit';
|
2
|
+
import { PopoverBehavior } from '@gravity-ui/uikit';
|
4
3
|
import { getDefaultNodePath } from '../../containers/Node/NodePages';
|
5
|
-
import { cn } from '../../utils/cn';
|
6
4
|
import { createDeveloperUILinkWithNodeId } from '../../utils/developerUI/developerUI';
|
7
5
|
import { isUnavailableNode } from '../../utils/nodes';
|
8
6
|
import { CellWithPopover } from '../CellWithPopover/CellWithPopover';
|
7
|
+
import { DeveloperUILinkButton } from '../DeveloperUILinkButton/DeveloperUILinkButton';
|
9
8
|
import { EntityStatus } from '../EntityStatus/EntityStatus';
|
10
9
|
import { NodeEndpointsTooltipContent } from '../TooltipsContent';
|
11
|
-
import './NodeHostWrapper.scss';
|
12
|
-
const b = cn('ydb-node-host-wrapper');
|
13
10
|
export const NodeHostWrapper = ({ node, getNodeRef }) => {
|
14
11
|
if (!node.Host) {
|
15
12
|
return _jsx("span", { children: "\u2014" });
|
@@ -27,6 +24,6 @@ export const NodeHostWrapper = ({ node, getNodeRef }) => {
|
|
27
24
|
tenantName: node.TenantName,
|
28
25
|
})
|
29
26
|
: undefined;
|
30
|
-
const additionalControls = nodeHref ?
|
27
|
+
const additionalControls = nodeHref ? _jsx(DeveloperUILinkButton, { href: nodeHref }) : null;
|
31
28
|
return (_jsx(CellWithPopover, { disabled: !isNodeAvailable, content: _jsx(NodeEndpointsTooltipContent, { data: node }), placement: ['top', 'bottom'], behavior: PopoverBehavior.Immediate, children: _jsx(EntityStatus, { name: node.Host, status: node.SystemState, path: nodePath, hasClipboardButton: true, additionalControls: additionalControls }) }));
|
32
29
|
};
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import type { PreparedPDisk } from '../../utils/disks/types';
|
2
|
-
import type { InfoViewerProps } from '../InfoViewer/InfoViewer';
|
3
2
|
import './PDiskInfo.scss';
|
4
|
-
interface
|
5
|
-
pDisk
|
3
|
+
interface GetPDiskInfoOptions<T extends PreparedPDisk> {
|
4
|
+
pDisk?: T;
|
6
5
|
nodeId?: number | string | null;
|
7
6
|
isPDiskPage?: boolean;
|
7
|
+
isUserAllowedToMakeChanges?: boolean;
|
8
8
|
}
|
9
|
-
|
9
|
+
interface PDiskInfoProps<T extends PreparedPDisk> extends GetPDiskInfoOptions<T> {
|
10
|
+
className?: string;
|
11
|
+
}
|
12
|
+
export declare function PDiskInfo<T extends PreparedPDisk>({ pDisk, nodeId, isPDiskPage, className, }: PDiskInfoProps<T>): import("react/jsx-runtime").JSX.Element;
|
10
13
|
export {};
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { getPDiskPagePath } from '../../routes';
|
3
3
|
import { valueIsDefined } from '../../utils';
|
4
|
+
import { formatBytes } from '../../utils/bytesParsers';
|
4
5
|
import { cn } from '../../utils/cn';
|
5
|
-
import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants';
|
6
6
|
import { formatStorageValuesToGb } from '../../utils/dataFormatters/dataFormatters';
|
7
7
|
import { createPDiskDeveloperUILink } from '../../utils/developerUI/developerUI';
|
8
|
+
import { useTypedSelector } from '../../utils/hooks';
|
8
9
|
import { EntityStatus } from '../EntityStatus/EntityStatus';
|
9
10
|
import { InfoViewer } from '../InfoViewer/InfoViewer';
|
10
11
|
import { LinkWithIcon } from '../LinkWithIcon/LinkWithIcon';
|
@@ -12,58 +13,104 @@ import { ProgressViewer } from '../ProgressViewer/ProgressViewer';
|
|
12
13
|
import { pDiskInfoKeyset } from './i18n';
|
13
14
|
import './PDiskInfo.scss';
|
14
15
|
const b = cn('ydb-pdisk-info');
|
15
|
-
|
16
|
-
|
17
|
-
const
|
18
|
-
const
|
19
|
-
|
16
|
+
// eslint-disable-next-line complexity
|
17
|
+
function getPDiskInfo({ pDisk, nodeId, isPDiskPage = false, isUserAllowedToMakeChanges, }) {
|
18
|
+
const { PDiskId, Path, Guid, Category, Type, Device, Realtime, State, SerialNumber, TotalSize, AllocatedSize, DecommitStatus, StatusV2, NumActiveSlots, ExpectedSlotCount, LogUsedSize, LogTotalSize, SystemSize, SharedWithOs, } = pDisk || {};
|
19
|
+
const generalInfo = [];
|
20
|
+
if (valueIsDefined(DecommitStatus)) {
|
21
|
+
generalInfo.push({
|
22
|
+
label: pDiskInfoKeyset('decomission-status'),
|
23
|
+
value: DecommitStatus.replace('DECOMMIT_', ''),
|
24
|
+
});
|
25
|
+
}
|
26
|
+
if (valueIsDefined(Category)) {
|
27
|
+
generalInfo.push({ label: pDiskInfoKeyset('type'), value: Type });
|
28
|
+
}
|
20
29
|
if (valueIsDefined(Path)) {
|
21
|
-
|
30
|
+
generalInfo.push({ label: pDiskInfoKeyset('path'), value: Path });
|
22
31
|
}
|
23
32
|
if (valueIsDefined(Guid)) {
|
24
|
-
|
33
|
+
generalInfo.push({ label: pDiskInfoKeyset('guid'), value: Guid });
|
25
34
|
}
|
26
|
-
|
27
|
-
|
28
|
-
|
35
|
+
// SerialNumber could be an empty string ""
|
36
|
+
if (SerialNumber) {
|
37
|
+
generalInfo.push({
|
38
|
+
label: pDiskInfoKeyset('serial-number'),
|
39
|
+
value: SerialNumber,
|
40
|
+
});
|
29
41
|
}
|
30
|
-
if (
|
31
|
-
|
32
|
-
label: pDiskInfoKeyset('
|
33
|
-
value: (
|
42
|
+
if (valueIsDefined(SharedWithOs)) {
|
43
|
+
generalInfo.push({
|
44
|
+
label: pDiskInfoKeyset('shared-with-os'),
|
45
|
+
value: pDiskInfoKeyset('yes'),
|
34
46
|
});
|
35
47
|
}
|
48
|
+
const statusInfo = [];
|
49
|
+
if (valueIsDefined(StatusV2)) {
|
50
|
+
statusInfo.push({ label: pDiskInfoKeyset('drive-status'), value: StatusV2 });
|
51
|
+
}
|
36
52
|
if (valueIsDefined(State)) {
|
37
|
-
|
53
|
+
statusInfo.push({ label: pDiskInfoKeyset('state'), value: State });
|
38
54
|
}
|
39
55
|
if (valueIsDefined(Device)) {
|
40
|
-
|
56
|
+
statusInfo.push({
|
41
57
|
label: pDiskInfoKeyset('device'),
|
42
58
|
value: _jsx(EntityStatus, { status: Device }),
|
43
59
|
});
|
44
60
|
}
|
45
61
|
if (valueIsDefined(Realtime)) {
|
46
|
-
|
62
|
+
statusInfo.push({
|
47
63
|
label: pDiskInfoKeyset('realtime'),
|
48
64
|
value: _jsx(EntityStatus, { status: Realtime }),
|
49
65
|
});
|
50
66
|
}
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
67
|
+
const spaceInfo = [];
|
68
|
+
spaceInfo.push({
|
69
|
+
label: pDiskInfoKeyset('space'),
|
70
|
+
value: (_jsx(ProgressViewer, { value: AllocatedSize, capacity: TotalSize, formatValues: formatStorageValuesToGb, colorizeProgress: true })),
|
71
|
+
});
|
72
|
+
if (valueIsDefined(NumActiveSlots) && valueIsDefined(ExpectedSlotCount)) {
|
73
|
+
spaceInfo.push({
|
74
|
+
label: pDiskInfoKeyset('slots'),
|
75
|
+
value: _jsx(ProgressViewer, { value: NumActiveSlots, capacity: ExpectedSlotCount }),
|
76
|
+
});
|
77
|
+
}
|
78
|
+
if (valueIsDefined(LogUsedSize) && valueIsDefined(LogTotalSize)) {
|
79
|
+
spaceInfo.push({
|
80
|
+
label: pDiskInfoKeyset('log-size'),
|
81
|
+
value: (_jsx(ProgressViewer, { value: LogUsedSize, capacity: LogTotalSize, formatValues: formatStorageValuesToGb })),
|
55
82
|
});
|
56
83
|
}
|
57
|
-
if (valueIsDefined(
|
84
|
+
if (valueIsDefined(SystemSize)) {
|
85
|
+
spaceInfo.push({
|
86
|
+
label: pDiskInfoKeyset('system-size'),
|
87
|
+
value: formatBytes({ value: SystemSize }),
|
88
|
+
});
|
89
|
+
}
|
90
|
+
const additionalInfo = [];
|
91
|
+
const shouldDisplayLinks = (!isPDiskPage || isUserAllowedToMakeChanges) &&
|
92
|
+
valueIsDefined(PDiskId) &&
|
93
|
+
valueIsDefined(nodeId);
|
94
|
+
if (shouldDisplayLinks) {
|
58
95
|
const pDiskPagePath = getPDiskPagePath(PDiskId, nodeId);
|
59
96
|
const pDiskInternalViewerPath = createPDiskDeveloperUILink({
|
60
97
|
nodeId,
|
61
98
|
pDiskId: PDiskId,
|
62
99
|
});
|
63
|
-
|
100
|
+
additionalInfo.push({
|
64
101
|
label: pDiskInfoKeyset('links'),
|
65
|
-
value: (_jsxs("span", { className: b('links'), children: [!isPDiskPage && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('pdisk-page'), url: pDiskPagePath, external: false })), _jsx(LinkWithIcon, { title: pDiskInfoKeyset('developer-ui'), url: pDiskInternalViewerPath })] })),
|
102
|
+
value: (_jsxs("span", { className: b('links'), children: [!isPDiskPage && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('pdisk-page'), url: pDiskPagePath, external: false })), isUserAllowedToMakeChanges && (_jsx(LinkWithIcon, { title: pDiskInfoKeyset('developer-ui'), url: pDiskInternalViewerPath }))] })),
|
66
103
|
});
|
67
104
|
}
|
68
|
-
return
|
105
|
+
return [generalInfo, statusInfo, spaceInfo, additionalInfo];
|
106
|
+
}
|
107
|
+
export function PDiskInfo({ pDisk, nodeId, isPDiskPage = false, className, }) {
|
108
|
+
const { isUserAllowedToMakeChanges } = useTypedSelector((state) => state.authentication);
|
109
|
+
const [generalInfo, statusInfo, spaceInfo, additionalInfo] = getPDiskInfo({
|
110
|
+
pDisk,
|
111
|
+
nodeId,
|
112
|
+
isPDiskPage,
|
113
|
+
isUserAllowedToMakeChanges,
|
114
|
+
});
|
115
|
+
return (_jsxs("div", { className: b('wrapper', className), children: [_jsxs("div", { className: b('col'), children: [_jsx(InfoViewer, { info: generalInfo, renderEmptyState: () => null }), _jsx(InfoViewer, { info: spaceInfo, renderEmptyState: () => null })] }), _jsxs("div", { className: b('col'), children: [_jsx(InfoViewer, { info: statusInfo, renderEmptyState: () => null }), _jsx(InfoViewer, { info: additionalInfo, renderEmptyState: () => null })] })] }));
|
69
116
|
}
|
@@ -1,7 +1,21 @@
|
|
1
1
|
.ydb-pdisk-info {
|
2
|
+
&__wrapper {
|
3
|
+
display: flex;
|
4
|
+
flex-flow: row wrap;
|
5
|
+
gap: 7px;
|
6
|
+
}
|
7
|
+
|
8
|
+
&__col {
|
9
|
+
display: flex;
|
10
|
+
flex-direction: column;
|
11
|
+
gap: 7px;
|
12
|
+
|
13
|
+
width: 500px;
|
14
|
+
}
|
15
|
+
|
2
16
|
&__links {
|
3
17
|
display: flex;
|
4
18
|
flex-flow: row wrap;
|
5
|
-
gap:
|
19
|
+
gap: var(--g-spacing-2);
|
6
20
|
}
|
7
21
|
}
|
@@ -1,14 +1,20 @@
|
|
1
1
|
{
|
2
|
+
"decomission-status": "Decomission Status",
|
3
|
+
"type": "Type",
|
2
4
|
"path": "Path",
|
3
5
|
"guid": "GUID",
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"
|
6
|
+
"serial-number": "Serial Number",
|
7
|
+
"shared-with-os": "SharedWithOs",
|
8
|
+
"drive-status": "Drive Status",
|
7
9
|
"state": "State",
|
8
10
|
"device": "Device",
|
9
11
|
"realtime": "Realtime",
|
10
|
-
"
|
12
|
+
"space": "Space",
|
13
|
+
"slots": "Slots",
|
14
|
+
"log-size": "Log Size",
|
15
|
+
"system-size": "System Size",
|
11
16
|
"links": "Links",
|
12
17
|
"developer-ui": "Developer UI",
|
13
|
-
"pdisk-page": "PDisk page"
|
18
|
+
"pdisk-page": "PDisk page",
|
19
|
+
"yes": "Yes"
|
14
20
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export declare const pDiskInfoKeyset: (key: "path" | "
|
1
|
+
export declare const pDiskInfoKeyset: (key: "path" | "space" | "type" | "state" | "yes" | "links" | "decomission-status" | "guid" | "serial-number" | "shared-with-os" | "drive-status" | "device" | "realtime" | "slots" | "log-size" | "system-size" | "developer-ui" | "pdisk-page", params?: import("@gravity-ui/i18n").Params) => string;
|
@@ -2,9 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
3
3
|
import { Popup } from '@gravity-ui/uikit';
|
4
4
|
import { EFlag } from '../../types/api/enums';
|
5
|
+
import { valueIsDefined } from '../../utils';
|
5
6
|
import { cn } from '../../utils/cn';
|
6
7
|
import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants';
|
7
|
-
import { getPDiskId } from '../../utils/
|
8
|
+
import { getPDiskId } from '../../utils/disks/helpers';
|
8
9
|
import { bytesToGB } from '../../utils/utils';
|
9
10
|
import { InfoViewer } from '../InfoViewer';
|
10
11
|
import './PDiskPopup.scss';
|
@@ -13,7 +14,12 @@ const errorColors = [EFlag.Orange, EFlag.Red, EFlag.Yellow];
|
|
13
14
|
export const preparePDiskData = (data, nodes) => {
|
14
15
|
const { AvailableSize, TotalSize, State, PDiskId, NodeId, Path, Realtime, Type, Device } = data;
|
15
16
|
const pdiskData = [
|
16
|
-
{
|
17
|
+
{
|
18
|
+
label: 'PDisk',
|
19
|
+
value: valueIsDefined(NodeId) && valueIsDefined(PDiskId)
|
20
|
+
? getPDiskId(NodeId, PDiskId)
|
21
|
+
: EMPTY_DATA_PLACEHOLDER,
|
22
|
+
},
|
17
23
|
{ label: 'State', value: State || 'not available' },
|
18
24
|
{ label: 'Type', value: Type || 'unknown' },
|
19
25
|
];
|
@@ -2,8 +2,9 @@ import type { PreparedVDisk } from '../../utils/disks/types';
|
|
2
2
|
import type { InfoViewerProps } from '../InfoViewer/InfoViewer';
|
3
3
|
import './VDiskInfo.scss';
|
4
4
|
interface VDiskInfoProps<T extends PreparedVDisk> extends Omit<InfoViewerProps, 'info'> {
|
5
|
-
data
|
5
|
+
data?: T;
|
6
6
|
isVDiskPage?: boolean;
|
7
|
+
withTitle?: boolean;
|
7
8
|
}
|
8
|
-
export declare function VDiskInfo<T extends PreparedVDisk>({ data, isVDiskPage, ...infoViewerProps }: VDiskInfoProps<T>): import("react/jsx-runtime").JSX.Element;
|
9
|
+
export declare function VDiskInfo<T extends PreparedVDisk>({ data, isVDiskPage, withTitle, ...infoViewerProps }: VDiskInfoProps<T>): import("react/jsx-runtime").JSX.Element;
|
9
10
|
export {};
|
@@ -2,8 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getVDiskPagePath } from '../../routes';
|
3
3
|
import { valueIsDefined } from '../../utils';
|
4
4
|
import { cn } from '../../utils/cn';
|
5
|
-
import { formatStorageValuesToGb } from '../../utils/dataFormatters/dataFormatters';
|
5
|
+
import { formatStorageValuesToGb, stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
|
6
6
|
import { createVDiskDeveloperUILink } from '../../utils/developerUI/developerUI';
|
7
|
+
import { getSeverityColor } from '../../utils/disks/helpers';
|
7
8
|
import { bytesToSpeed } from '../../utils/utils';
|
8
9
|
import { EntityStatus } from '../EntityStatus/EntityStatus';
|
9
10
|
import { InfoViewer } from '../InfoViewer';
|
@@ -13,9 +14,9 @@ import { vDiskInfoKeyset } from './i18n';
|
|
13
14
|
import './VDiskInfo.scss';
|
14
15
|
const b = cn('ydb-vdisk-info');
|
15
16
|
// eslint-disable-next-line complexity
|
16
|
-
export function VDiskInfo({ data, isVDiskPage
|
17
|
+
export function VDiskInfo({ data, isVDiskPage, withTitle, ...infoViewerProps }) {
|
17
18
|
var _a, _b, _c, _d;
|
18
|
-
const { AllocatedSize, DiskSpace, FrontQueues, Guid, Replicated, VDiskState, VDiskSlotId, Kind, SatisfactionRank, AvailableSize, HasUnreadableBlobs, IncarnationGuid, InstanceGuid, StoragePoolName, ReadThroughput, WriteThroughput, PDiskId, NodeId, } = data;
|
19
|
+
const { AllocatedSize, DiskSpace, FrontQueues, Guid, Replicated, VDiskState, VDiskSlotId, Kind, SatisfactionRank, AvailableSize, HasUnreadableBlobs, IncarnationGuid, InstanceGuid, StoragePoolName, ReadThroughput, WriteThroughput, PDiskId, NodeId, } = data || {};
|
19
20
|
const vdiskInfo = [];
|
20
21
|
if (valueIsDefined(VDiskSlotId)) {
|
21
22
|
vdiskInfo.push({ label: vDiskInfoKeyset('slot-id'), value: VDiskSlotId });
|
@@ -107,5 +108,9 @@ export function VDiskInfo({ data, isVDiskPage = false, ...infoViewerProps }) {
|
|
107
108
|
value: (_jsxs("span", { className: b('links'), children: [!isVDiskPage && (_jsx(LinkWithIcon, { title: vDiskInfoKeyset('vdisk-page'), url: vDiskPagePath, external: false })), _jsx(LinkWithIcon, { title: vDiskInfoKeyset('developer-ui'), url: vDiskInternalViewerPath })] })),
|
108
109
|
});
|
109
110
|
}
|
110
|
-
|
111
|
+
const title = data && withTitle ? _jsx(VDiskTitle, { data: data }) : null;
|
112
|
+
return _jsx(InfoViewer, { info: vdiskInfo, title: title, ...infoViewerProps });
|
113
|
+
}
|
114
|
+
function VDiskTitle({ data }) {
|
115
|
+
return (_jsxs("div", { className: b('title'), children: [vDiskInfoKeyset('vdiks-title'), _jsx(EntityStatus, { status: getSeverityColor(data.Severity), name: stringifyVdiskId(data.VDiskId) })] }));
|
111
116
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export declare const vDiskInfoKeyset: (key: "size" | "kind" | "yes" | "no" | "links" | "pool-name" | "guid" | "developer-ui" | "slot-id" | "incarnation-guid" | "instance-guid" | "replication-status" | "state-status" | "space-status" | "fresh-rank-satisfaction" | "level-rank-satisfaction" | "front-queues" | "has-unreadable-blobs" | "read-throughput" | "write-throughput" | "vdisk-page", params?: import("@gravity-ui/i18n").Params) => string;
|
1
|
+
export declare const vDiskInfoKeyset: (key: "size" | "kind" | "yes" | "no" | "links" | "pool-name" | "guid" | "developer-ui" | "slot-id" | "incarnation-guid" | "instance-guid" | "replication-status" | "state-status" | "space-status" | "fresh-rank-satisfaction" | "level-rank-satisfaction" | "front-queues" | "has-unreadable-blobs" | "read-throughput" | "write-throughput" | "vdisk-page" | "vdiks-title", params?: import("@gravity-ui/i18n").Params) => string;
|
@@ -28,15 +28,12 @@
|
|
28
28
|
}
|
29
29
|
|
30
30
|
&__tabs {
|
31
|
-
--g-tabs-border-width: 0;
|
32
|
-
|
33
31
|
position: sticky;
|
34
32
|
left: 0;
|
35
33
|
|
36
34
|
display: flex;
|
37
35
|
justify-content: space-between;
|
38
36
|
align-items: center;
|
39
|
-
|
40
|
-
box-shadow: inset 0 -1px 0 0 var(--g-color-line-generic);
|
37
|
+
@include tabs-wrapper-styles();
|
41
38
|
}
|
42
39
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import './Heatmap.scss';
|
2
2
|
interface HeatmapProps {
|
3
|
+
database: string;
|
3
4
|
path: string;
|
4
5
|
}
|
5
|
-
export declare const Heatmap: ({ path }: HeatmapProps) => import("react/jsx-runtime").JSX.Element;
|
6
|
+
export declare const Heatmap: ({ path, database }: HeatmapProps) => import("react/jsx-runtime").JSX.Element;
|
6
7
|
export {};
|
@@ -14,11 +14,11 @@ import { COLORS_RANGE_SIZE, getColorIndex, getColorRange, getCurrentMetricLimits
|
|
14
14
|
import './Heatmap.scss';
|
15
15
|
const b = cn('heatmap');
|
16
16
|
const COLORS_RANGE = getColorRange(COLORS_RANGE_SIZE);
|
17
|
-
export const Heatmap = ({ path }) => {
|
17
|
+
export const Heatmap = ({ path, database }) => {
|
18
18
|
const dispatch = useTypedDispatch();
|
19
19
|
const itemsContainer = React.createRef();
|
20
20
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
21
|
-
const { currentData, isFetching, error } = heatmapApi.useGetHeatmapTabletsInfoQuery({ path }, { pollingInterval: autoRefreshInterval });
|
21
|
+
const { currentData, isFetching, error } = heatmapApi.useGetHeatmapTabletsInfoQuery({ path, database }, { pollingInterval: autoRefreshInterval });
|
22
22
|
const loading = isFetching && currentData === undefined;
|
23
23
|
const { tablets = [], metrics } = currentData || {};
|
24
24
|
const { sort, heatmap, currentMetric } = useTypedSelector((state) => state.heatmap);
|
@@ -23,15 +23,12 @@
|
|
23
23
|
}
|
24
24
|
|
25
25
|
&__tabs {
|
26
|
-
--g-tabs-border-width: 0;
|
27
|
-
|
28
26
|
display: flex;
|
29
27
|
justify-content: space-between;
|
30
28
|
align-items: center;
|
31
29
|
|
32
30
|
padding: 0 20px;
|
33
|
-
|
34
|
-
box-shadow: inset 0 -1px 0 0 var(--g-color-line-generic);
|
31
|
+
@include tabs-wrapper-styles();
|
35
32
|
}
|
36
33
|
|
37
34
|
&__tab {
|
@@ -142,26 +142,6 @@
|
|
142
142
|
&__selected-vdisk {
|
143
143
|
animation: onSelectedVdiskAnimation 4s;
|
144
144
|
}
|
145
|
-
|
146
|
-
&__row {
|
147
|
-
display: flex;
|
148
|
-
}
|
149
|
-
|
150
|
-
&__column {
|
151
|
-
display: flex;
|
152
|
-
flex-direction: column;
|
153
|
-
|
154
|
-
margin-bottom: 15px;
|
155
|
-
}
|
156
|
-
|
157
|
-
&__title {
|
158
|
-
margin-right: 16px;
|
159
|
-
|
160
|
-
font-weight: 500;
|
161
|
-
text-transform: uppercase;
|
162
|
-
|
163
|
-
@include body-2-typography();
|
164
|
-
}
|
165
145
|
}
|
166
146
|
|
167
147
|
@keyframes onSelectedVdiskAnimation {
|
@@ -7,6 +7,7 @@ import isEmpty from 'lodash/isEmpty';
|
|
7
7
|
import { EntityStatus } from '../../../components/EntityStatus/EntityStatus';
|
8
8
|
import { PDiskInfo } from '../../../components/PDiskInfo/PDiskInfo';
|
9
9
|
import { ProgressViewer } from '../../../components/ProgressViewer/ProgressViewer';
|
10
|
+
import { VDiskInfo } from '../../../components/VDiskInfo/VDiskInfo';
|
10
11
|
import { EFlag } from '../../../types/api/enums';
|
11
12
|
import { EVDiskState } from '../../../types/api/vdisk';
|
12
13
|
import { valueIsDefined } from '../../../utils';
|
@@ -16,7 +17,6 @@ import { formatStorageValuesToGb } from '../../../utils/dataFormatters/dataForma
|
|
16
17
|
import { createVDiskDeveloperUILink } from '../../../utils/developerUI/developerUI';
|
17
18
|
import i18n from '../i18n';
|
18
19
|
import { PDiskTitleBadge } from './PDiskTitleBadge';
|
19
|
-
import { Vdisk } from './Vdisk';
|
20
20
|
const b = cn('kv-node-structure');
|
21
21
|
var VDiskTableColumnsIds;
|
22
22
|
(function (VDiskTableColumnsIds) {
|
@@ -78,7 +78,7 @@ function getColumns({ pDiskId, selectedVdiskId, nodeId, }) {
|
|
78
78
|
header: vDiskTableColumnsNames[VDiskTableColumnsIds.Info],
|
79
79
|
width: 70,
|
80
80
|
render: ({ row }) => {
|
81
|
-
return (_jsx(Popover, { placement: ['right'], content: _jsx(
|
81
|
+
return (_jsx(Popover, { placement: ['right'], content: _jsx(VDiskInfo, { data: row, withTitle: true }), tooltipContentClassName: b('vdisk-details'), children: _jsx(Button, { view: "flat-secondary", className: b('vdisk-details-button', {
|
82
82
|
selected: row.id === selectedVdiskId,
|
83
83
|
}), children: _jsx(Icon, { data: CircleInfoFill, size: 18 }) }) }));
|
84
84
|
},
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { ResizeableDataTable } from '../../../components/ResizeableDataTable/ResizeableDataTable';
|
4
|
+
import { TableSkeleton } from '../../../components/TableSkeleton/TableSkeleton';
|
5
|
+
import { selectNodesMap } from '../../../store/reducers/nodesList';
|
6
|
+
import { pDiskApi } from '../../../store/reducers/pdisk/pdisk';
|
7
|
+
import { DEFAULT_TABLE_SETTINGS } from '../../../utils/constants';
|
8
|
+
import { useAutoRefreshInterval, useTypedSelector } from '../../../utils/hooks';
|
9
|
+
import { STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, getPDiskStorageColumns, } from '../../Storage/StorageGroups/getStorageGroupsColumns';
|
10
|
+
export function PDiskGroups({ pDiskId, nodeId }) {
|
11
|
+
var _a;
|
12
|
+
const nodesMap = useTypedSelector(selectNodesMap);
|
13
|
+
const [autoRefreshInterval] = useAutoRefreshInterval();
|
14
|
+
const pDiskStorageQuery = pDiskApi.useGetStorageInfoQuery({ pDiskId, nodeId }, { pollingInterval: autoRefreshInterval });
|
15
|
+
const loading = pDiskStorageQuery.isFetching && pDiskStorageQuery.currentData === undefined;
|
16
|
+
const data = (_a = pDiskStorageQuery.currentData) !== null && _a !== void 0 ? _a : [];
|
17
|
+
const pDiskStorageColumns = React.useMemo(() => {
|
18
|
+
return getPDiskStorageColumns(nodesMap);
|
19
|
+
}, [nodesMap]);
|
20
|
+
if (loading) {
|
21
|
+
return _jsx(TableSkeleton, {});
|
22
|
+
}
|
23
|
+
return (_jsx(ResizeableDataTable, { columnsWidthLSKey: STORAGE_GROUPS_COLUMNS_WIDTH_LS_KEY, data: data, columns: pDiskStorageColumns, settings: DEFAULT_TABLE_SETTINGS }));
|
24
|
+
}
|