ydb-embedded-ui 22.3.0 → 22.4.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/DiskCapacityInfo/DiskCapacityInfo.d.ts +10 -1
- package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js +75 -13
- package/dist/components/DiskCapacityInfo/DiskCapacityInfo.js.map +1 -1
- package/dist/components/DiskCapacityInfo/i18n/index.d.ts +1 -1
- package/dist/components/DiskPopup/DiskPopup.d.ts +25 -0
- package/dist/components/DiskPopup/DiskPopup.js +44 -0
- package/dist/components/DiskPopup/DiskPopup.js.map +1 -0
- package/dist/components/DiskPopup/DiskPopup.scss +203 -0
- package/dist/components/DiskPopup/i18n/en.json +3 -0
- package/dist/components/DiskPopup/i18n/index.d.ts +2 -0
- package/dist/components/DiskPopup/i18n/index.js +4 -0
- package/dist/components/DiskPopup/i18n/index.js.map +1 -0
- package/dist/components/DiskStatus/DiskStatus.d.ts +31 -0
- package/dist/components/DiskStatus/DiskStatus.js +61 -0
- package/dist/components/DiskStatus/DiskStatus.js.map +1 -0
- package/dist/components/DiskStatus/DiskStatus.scss +59 -0
- package/dist/components/DiskStatus/i18n/en.json +6 -0
- package/dist/components/DiskStatus/i18n/index.d.ts +2 -0
- package/dist/components/DiskStatus/i18n/index.js +4 -0
- package/dist/components/DiskStatus/i18n/index.js.map +1 -0
- package/dist/components/EntityStatus/EntityStatus.d.ts +1 -0
- package/dist/components/EntityStatus/EntityStatus.js +1 -1
- package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
- package/dist/components/EvictVDiskButton/i18n/en.json +1 -1
- package/dist/components/FullNodeViewer/i18n/index.d.ts +1 -1
- package/dist/components/HoverPopup/HoverPopup.d.ts +2 -1
- package/dist/components/HoverPopup/HoverPopup.js +49 -17
- package/dist/components/HoverPopup/HoverPopup.js.map +1 -1
- package/dist/components/HoverPopup/usePopupPriority.d.ts +4 -0
- package/dist/components/HoverPopup/usePopupPriority.js +30 -0
- package/dist/components/HoverPopup/usePopupPriority.js.map +1 -0
- package/dist/components/PDiskInfo/PDiskLogSize.d.ts +5 -0
- package/dist/components/PDiskInfo/PDiskLogSize.js +20 -0
- package/dist/components/PDiskInfo/PDiskLogSize.js.map +1 -0
- package/dist/components/PDiskInfo/PDiskLogSize.scss +12 -0
- package/dist/components/PDiskInfo/getPDiskDetails.d.ts +4 -0
- package/dist/components/PDiskInfo/getPDiskDetails.js +33 -0
- package/dist/components/PDiskInfo/getPDiskDetails.js.map +1 -0
- package/dist/components/PDiskInfo/i18n/en.json +64 -2
- package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/PDiskInfo/statuses.d.ts +7 -0
- package/dist/components/PDiskInfo/statuses.js +185 -0
- package/dist/components/PDiskInfo/statuses.js.map +1 -0
- package/dist/components/PDiskPopup/PDiskPopup.d.ts +4 -7
- package/dist/components/PDiskPopup/PDiskPopup.js +28 -99
- package/dist/components/PDiskPopup/PDiskPopup.js.map +1 -1
- package/dist/components/PDiskPopup/i18n/en.json +2 -12
- package/dist/components/PDiskPopup/i18n/index.d.ts +1 -1
- package/dist/components/StorageGroupInfo/StorageGroupInfo.d.ts +3 -3
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js +78 -218
- package/dist/components/StorageGroupInfo/StorageGroupInfo.js.map +1 -1
- package/dist/components/StorageGroupInfo/StorageGroupInfo.scss +21 -0
- package/dist/components/StorageGroupInfo/i18n/en.json +1 -9
- package/dist/components/StorageGroupInfo/i18n/index.d.ts +1 -1
- package/dist/components/VDisk/VDisk.d.ts +2 -1
- package/dist/components/VDisk/VDisk.js +23 -32
- package/dist/components/VDisk/VDisk.js.map +1 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.d.ts +1 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.js +2 -1
- package/dist/components/VDisk/VDiskWithDonorsStack.js.map +1 -1
- package/dist/components/VDisk/getFlagStatusText.d.ts +2 -0
- package/dist/components/VDisk/getFlagStatusText.js +18 -0
- package/dist/components/VDisk/getFlagStatusText.js.map +1 -0
- package/dist/components/VDisk/i18n/en.json +1 -1
- package/dist/components/VDisk/i18n/index.d.ts +1 -1
- package/dist/components/VDiskInfo/getVDiskDetails.d.ts +5 -0
- package/dist/components/VDiskInfo/getVDiskDetails.js +29 -0
- package/dist/components/VDiskInfo/getVDiskDetails.js.map +1 -0
- package/dist/components/VDiskInfo/i18n/en.json +3 -1
- package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.d.ts +6 -8
- package/dist/components/VDiskPopup/VDiskPopup.js +106 -240
- package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
- package/dist/components/VDiskPopup/VDiskPopup.scss +3 -10
- package/dist/components/VDiskPopup/i18n/en.json +6 -22
- package/dist/components/VDiskPopup/i18n/index.d.ts +1 -1
- package/dist/components/VDiskStatus/VDiskReplicationStatus.d.ts +8 -0
- package/dist/components/VDiskStatus/VDiskReplicationStatus.js +32 -0
- package/dist/components/VDiskStatus/VDiskReplicationStatus.js.map +1 -0
- package/dist/components/VDiskStatus/VDiskStatus.d.ts +16 -0
- package/dist/components/VDiskStatus/VDiskStatus.js +20 -0
- package/dist/components/VDiskStatus/VDiskStatus.js.map +1 -0
- package/dist/components/VDiskStatus/VDiskStatus.scss +32 -0
- package/dist/components/VDiskStatus/i18n/en.json +33 -0
- package/dist/components/VDiskStatus/i18n/index.d.ts +1 -0
- package/dist/components/VDiskStatus/i18n/index.js +5 -0
- package/dist/components/VDiskStatus/i18n/index.js.map +1 -0
- package/dist/components/VDiskStatus/index.d.ts +2 -0
- package/dist/components/VDiskStatus/index.js +3 -0
- package/dist/components/VDiskStatus/index.js.map +1 -0
- package/dist/components/VDiskStatus/statuses.d.ts +4 -0
- package/dist/components/VDiskStatus/statuses.js +120 -0
- package/dist/components/VDiskStatus/statuses.js.map +1 -0
- package/dist/components/capacityMetricsColumns/i18n/en.json +4 -4
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js +6 -1
- package/dist/containers/Cluster/ClusterDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Clusters/ClusterDrawerHealthcheck.js +1 -1
- package/dist/containers/Clusters/ClusterDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Header/Header.js +8 -2
- package/dist/containers/Header/Header.js.map +1 -1
- package/dist/containers/Header/StorageGroupLeftControls.d.ts +1 -0
- package/dist/containers/Header/StorageGroupLeftControls.js +23 -0
- package/dist/containers/Header/StorageGroupLeftControls.js.map +1 -0
- package/dist/containers/Header/i18n/en.json +3 -1
- package/dist/containers/Header/i18n/index.d.ts +1 -1
- package/dist/containers/Operations/constants.d.ts +1 -1
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js +4 -4
- package/dist/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.js.map +1 -1
- package/dist/containers/PDiskPage/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/Disks/Disks.js +36 -9
- package/dist/containers/Storage/Disks/Disks.js.map +1 -1
- package/dist/containers/Storage/PDisk/PDisk.d.ts +2 -1
- package/dist/containers/Storage/PDisk/PDisk.js +2 -2
- package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
- package/dist/containers/Storage/PDisk/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js +7 -2
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/columns.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageGroupsTable/columns/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageExpertModePanel/components/SpaceLegend.scss +14 -82
- package/dist/containers/Storage/StorageExpertModePanel/i18n/index.d.ts +1 -1
- package/dist/containers/Storage/StorageGroupStateLabel.d.ts +4 -0
- package/dist/containers/Storage/StorageGroupStateLabel.js +9 -0
- package/dist/containers/Storage/StorageGroupStateLabel.js.map +1 -0
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.d.ts +2 -0
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.js +35 -0
- package/dist/containers/Storage/utils/getStorageGroupStateLabel.js.map +1 -0
- package/dist/containers/StorageGroupPage/StorageGroupPage.js +17 -12
- package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
- package/dist/containers/StorageGroupPage/StorageGroupPage.scss +9 -13
- package/dist/containers/StorageGroupPage/i18n/en.json +3 -1
- package/dist/containers/StorageGroupPage/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +4 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.js +11 -2
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.js +9 -8
- package/dist/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.d.ts +16 -1
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.js +56 -19
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/en.json +5 -1
- package/dist/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.d.ts +3 -1
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js +3 -3
- package/dist/containers/Tenant/Healthcheck/components/HealthcheckDrawer.js.map +1 -1
- package/dist/containers/Tenant/TenantDrawerHealthcheck.js +8 -1
- package/dist/containers/Tenant/TenantDrawerHealthcheck.js.map +1 -1
- package/dist/containers/Tenants/DatabaseDrawerHealthcheck.js +8 -1
- package/dist/containers/Tenants/DatabaseDrawerHealthcheck.js.map +1 -1
- package/dist/containers/VDiskPage/i18n/index.d.ts +1 -1
- package/dist/lib.d.ts +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/store/configureStore.d.ts +2 -2
- package/dist/store/defaultStore.d.ts +1 -1
- package/dist/store/reducers/header/types.d.ts +1 -1
- package/dist/store/reducers/index.d.ts +2 -2
- package/dist/store/reducers/pdisk/types.d.ts +1 -0
- package/dist/store/reducers/pdisk/utils.js +6 -1
- package/dist/store/reducers/pdisk/utils.js.map +1 -1
- package/dist/store/reducers/storage/prepareGroupsDisks.d.ts +1 -0
- package/dist/store/reducers/storage/prepareGroupsDisks.js +7 -18
- package/dist/store/reducers/storage/prepareGroupsDisks.js.map +1 -1
- package/dist/store/reducers/storage/utils.js +4 -0
- package/dist/store/reducers/storage/utils.js.map +1 -1
- package/dist/store/reducers/streamingQuery/streamingQuery.js +2 -4
- package/dist/store/reducers/streamingQuery/streamingQuery.js.map +1 -1
- package/dist/styles/mixins.scss +22 -0
- package/dist/types/api/pdisk.d.ts +4 -0
- package/dist/types/api/pdisk.js.map +1 -1
- package/dist/types/api/vdisk.d.ts +8 -0
- package/dist/types/api/vdisk.js +7 -0
- package/dist/types/api/vdisk.js.map +1 -1
- package/dist/types/store/nodesList.d.ts +4 -2
- package/dist/uiFactory/types.d.ts +5 -2
- package/dist/utils/bytesParsers/formatBytes.d.ts +3 -1
- package/dist/utils/bytesParsers/formatBytes.js +12 -3
- package/dist/utils/bytesParsers/formatBytes.js.map +1 -1
- package/dist/utils/disks/constants.d.ts +1 -0
- package/dist/utils/disks/constants.js +4 -0
- package/dist/utils/disks/constants.js.map +1 -1
- package/dist/utils/disks/diskInfo/getDiskLocationItems.d.ts +16 -0
- package/dist/utils/disks/diskInfo/getDiskLocationItems.js +30 -0
- package/dist/utils/disks/diskInfo/getDiskLocationItems.js.map +1 -0
- package/dist/utils/disks/diskInfo/i18n/en.json +9 -0
- package/dist/utils/disks/diskInfo/i18n/index.d.ts +2 -0
- package/dist/utils/disks/diskInfo/i18n/index.js +4 -0
- package/dist/utils/disks/diskInfo/i18n/index.js.map +1 -0
- package/dist/utils/disks/iconCalculators.d.ts +5 -0
- package/dist/utils/disks/iconCalculators.js +1 -1
- package/dist/utils/disks/iconCalculators.js.map +1 -1
- package/dist/utils/disks/prepareDisks.d.ts +6 -2
- package/dist/utils/disks/prepareDisks.js +22 -35
- package/dist/utils/disks/prepareDisks.js.map +1 -1
- package/dist/utils/disks/types.d.ts +9 -2
- package/dist/utils/hooks/useNodeMetadata.d.ts +2 -0
- package/dist/utils/hooks/useNodeMetadata.js +15 -0
- package/dist/utils/hooks/useNodeMetadata.js.map +1 -0
- package/dist/utils/nodes.js +6 -2
- package/dist/utils/nodes.js.map +1 -1
- package/dist/utils/storageMetrics.d.ts +2 -2
- package/dist/utils/storageMetrics.js +22 -10
- package/dist/utils/storageMetrics.js.map +1 -1
- package/dist/utils/timeParsers/formatDuration.d.ts +4 -1
- package/dist/utils/timeParsers/formatDuration.js +16 -1
- package/dist/utils/timeParsers/formatDuration.js.map +1 -1
- package/dist/utils/timeParsers/i18n/en.json +5 -1
- package/dist/utils/timeParsers/i18n/index.d.ts +1 -1
- package/dist/utils/timeParsers/i18n/ru.json +5 -1
- package/package.json +2 -2
- package/src/components/DiskCapacityInfo/DiskCapacityInfo.tsx +106 -15
- package/src/components/DiskPopup/DiskPopup.scss +203 -0
- package/src/components/DiskPopup/DiskPopup.tsx +123 -0
- package/src/components/DiskPopup/i18n/en.json +3 -0
- package/src/components/DiskPopup/i18n/index.ts +5 -0
- package/src/components/DiskStatus/DiskStatus.scss +59 -0
- package/src/components/DiskStatus/DiskStatus.tsx +149 -0
- package/src/components/DiskStatus/i18n/en.json +6 -0
- package/src/components/DiskStatus/i18n/index.ts +5 -0
- package/src/components/EntityStatus/EntityStatus.tsx +1 -1
- package/src/components/EvictVDiskButton/i18n/en.json +1 -1
- package/src/components/HoverPopup/HoverPopup.tsx +67 -20
- package/src/components/HoverPopup/usePopupPriority.ts +39 -0
- package/src/components/PDiskInfo/PDiskLogSize.scss +12 -0
- package/src/components/PDiskInfo/PDiskLogSize.tsx +37 -0
- package/src/components/PDiskInfo/getPDiskDetails.tsx +37 -0
- package/src/components/PDiskInfo/i18n/en.json +64 -8
- package/src/components/PDiskInfo/statuses.ts +209 -0
- package/src/components/PDiskPopup/PDiskPopup.tsx +62 -147
- package/src/components/PDiskPopup/i18n/en.json +2 -12
- package/src/components/StorageGroupInfo/StorageGroupInfo.scss +21 -0
- package/src/components/StorageGroupInfo/StorageGroupInfo.tsx +121 -260
- package/src/components/StorageGroupInfo/i18n/en.json +1 -9
- package/src/components/VDisk/VDisk.tsx +31 -34
- package/src/components/VDisk/VDiskWithDonorsStack.tsx +2 -0
- package/src/components/VDisk/getFlagStatusText.ts +19 -0
- package/src/components/VDisk/i18n/en.json +1 -1
- package/src/components/VDiskInfo/getVDiskDetails.tsx +41 -0
- package/src/components/VDiskInfo/i18n/en.json +3 -10
- package/src/components/VDiskPopup/VDiskPopup.scss +3 -10
- package/src/components/VDiskPopup/VDiskPopup.tsx +197 -421
- package/src/components/VDiskPopup/i18n/en.json +6 -22
- package/src/components/VDiskStatus/VDiskReplicationStatus.tsx +77 -0
- package/src/components/VDiskStatus/VDiskStatus.scss +32 -0
- package/src/components/VDiskStatus/VDiskStatus.tsx +38 -0
- package/src/components/VDiskStatus/i18n/en.json +33 -0
- package/src/components/VDiskStatus/i18n/index.ts +7 -0
- package/src/components/VDiskStatus/index.ts +7 -0
- package/src/components/VDiskStatus/statuses.ts +139 -0
- package/src/components/capacityMetricsColumns/i18n/en.json +4 -4
- package/src/containers/Cluster/ClusterDrawerHealthcheck.tsx +6 -0
- package/src/containers/Clusters/ClusterDrawerHealthcheck.tsx +1 -0
- package/src/containers/Header/Header.tsx +11 -3
- package/src/containers/Header/StorageGroupLeftControls.tsx +38 -0
- package/src/containers/Header/i18n/en.json +3 -1
- package/src/containers/PDiskPage/PDiskSpaceDistribution/PDiskSpaceDistribution.tsx +13 -2
- package/src/containers/Storage/Disks/Disks.tsx +66 -12
- package/src/containers/Storage/PDisk/PDisk.tsx +3 -0
- package/src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx +24 -3
- package/src/containers/Storage/StorageExpertModePanel/components/SpaceLegend.scss +14 -82
- package/src/containers/Storage/StorageGroupStateLabel.tsx +22 -0
- package/src/containers/Storage/utils/getStorageGroupStateLabel.ts +49 -0
- package/src/containers/StorageGroupPage/StorageGroupPage.scss +9 -13
- package/src/containers/StorageGroupPage/StorageGroupPage.tsx +53 -25
- package/src/containers/StorageGroupPage/i18n/en.json +3 -1
- package/src/containers/Tenant/Diagnostics/Overview/Overview.tsx +5 -1
- package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.tsx +12 -1
- package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.tsx +11 -10
- package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.tsx +83 -20
- package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/en.json +5 -1
- package/src/containers/Tenant/Healthcheck/components/HealthcheckDrawer.tsx +5 -2
- package/src/containers/Tenant/TenantDrawerHealthcheck.tsx +10 -0
- package/src/containers/Tenants/DatabaseDrawerHealthcheck.tsx +10 -0
- package/src/lib.ts +1 -0
- package/src/store/reducers/header/types.ts +3 -1
- package/src/store/reducers/pdisk/types.ts +1 -0
- package/src/store/reducers/pdisk/utils.ts +6 -3
- package/src/store/reducers/storage/prepareGroupsDisks.ts +7 -22
- package/src/store/reducers/storage/utils.ts +4 -0
- package/src/store/reducers/streamingQuery/streamingQuery.ts +2 -4
- package/src/styles/mixins.scss +22 -0
- package/src/types/api/pdisk.ts +4 -0
- package/src/types/api/vdisk.ts +9 -0
- package/src/types/store/nodesList.ts +7 -7
- package/src/uiFactory/types.ts +9 -2
- package/src/utils/bytesParsers/formatBytes.ts +23 -4
- package/src/utils/disks/constants.ts +5 -0
- package/src/utils/disks/diskInfo/getDiskLocationItems.ts +50 -0
- package/src/utils/disks/diskInfo/i18n/en.json +9 -0
- package/src/utils/disks/diskInfo/i18n/index.ts +5 -0
- package/src/utils/disks/iconCalculators.ts +1 -1
- package/src/utils/disks/prepareDisks.ts +21 -47
- package/src/utils/disks/types.ts +10 -2
- package/src/utils/hooks/useNodeMetadata.ts +21 -0
- package/src/utils/nodes.ts +6 -1
- package/src/utils/storageMetrics.ts +27 -14
- package/src/utils/timeParsers/formatDuration.ts +22 -1
- package/src/utils/timeParsers/i18n/en.json +5 -1
- package/src/utils/timeParsers/i18n/ru.json +5 -1
|
@@ -7,5 +7,9 @@
|
|
|
7
7
|
"hours": "{{hours}}\u00a0ч",
|
|
8
8
|
"min": "{{minutes}}\u00a0м",
|
|
9
9
|
"sec": "{{seconds}}\u00a0с",
|
|
10
|
-
"ms": "{{ms}}\u00a0мс"
|
|
10
|
+
"ms": "{{ms}}\u00a0мс",
|
|
11
|
+
"value_compact-days": "{{days}}д",
|
|
12
|
+
"value_compact-hours": "{{hours}}ч",
|
|
13
|
+
"value_compact-minutes": "{{minutes}}мин",
|
|
14
|
+
"value_compact-seconds": "{{seconds}}с"
|
|
11
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydb-embedded-ui",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.4.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@reduxjs/toolkit": "^2.8.2",
|
|
39
39
|
"@tanstack/react-table": "^8.20.6",
|
|
40
40
|
"@ydb-platform/monaco-ghost": "^0.6.1",
|
|
41
|
-
"axios": "^1.
|
|
41
|
+
"axios": "^1.20.0",
|
|
42
42
|
"axios-retry": "^4.5.0",
|
|
43
43
|
"colord": "^2.10.0",
|
|
44
44
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -6,6 +6,7 @@ import type {PreparedStorageGroup} from '../../store/reducers/storage/types';
|
|
|
6
6
|
import {isCapacityAlert} from '../../types/api/enums';
|
|
7
7
|
import {getCapacityAlertTheme, normalizeCapacityAlert} from '../../utils/capacityAlerts';
|
|
8
8
|
import {EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
|
|
9
|
+
import type {DiskDetailItem} from '../../utils/disks/diskInfo/getDiskLocationItems';
|
|
9
10
|
import type {PreparedPDisk, PreparedVDisk} from '../../utils/disks/types';
|
|
10
11
|
import {
|
|
11
12
|
formatMetricCountPair,
|
|
@@ -13,8 +14,11 @@ import {
|
|
|
13
14
|
formatNormalizedMetricPercent,
|
|
14
15
|
formatStorageMetricPair,
|
|
15
16
|
} from '../../utils/storageMetrics';
|
|
17
|
+
import {DiskCapacityAlertLabel} from '../DiskStatus/DiskStatus';
|
|
16
18
|
import type {InfoViewerItem} from '../InfoViewer';
|
|
19
|
+
import {pDiskInfoKeyset} from '../PDiskInfo/i18n';
|
|
17
20
|
import {TitleWithHelpMark} from '../TitleWithHelpmark/TitleWithHelpmark';
|
|
21
|
+
import {vDiskInfoKeyset} from '../VDiskInfo/i18n';
|
|
18
22
|
import type {YDBDefinitionListItem} from '../YDBDefinitionList/YDBDefinitionList';
|
|
19
23
|
import {
|
|
20
24
|
CAPACITY_CONFIGURATION_HELP_TEXT,
|
|
@@ -51,7 +55,7 @@ export function getVDiskCapacityInfoItems(
|
|
|
51
55
|
data: PreparedVDisk | undefined,
|
|
52
56
|
{withRawUsage}: {withRawUsage: boolean},
|
|
53
57
|
): DiskCapacityInfoItem[] {
|
|
54
|
-
const sizeData = data?.WhiteboardSize ?? data;
|
|
58
|
+
const sizeData = data?.WhiteboardSize ?? data?.DisplaySize ?? data;
|
|
55
59
|
const items: DiskCapacityInfoItem[] = [
|
|
56
60
|
{
|
|
57
61
|
id: 'size',
|
|
@@ -98,14 +102,28 @@ export function getVDiskCapacityInfoItems(
|
|
|
98
102
|
|
|
99
103
|
export function getPDiskCapacityInfoItems(
|
|
100
104
|
data: PreparedPDisk | undefined,
|
|
101
|
-
{
|
|
105
|
+
{
|
|
106
|
+
withUsage,
|
|
107
|
+
withCapacityAlert,
|
|
108
|
+
fixedDecimalPlaces,
|
|
109
|
+
useWhiteboardSize = true,
|
|
110
|
+
}: {
|
|
111
|
+
withUsage: boolean;
|
|
112
|
+
withCapacityAlert: boolean;
|
|
113
|
+
fixedDecimalPlaces?: number;
|
|
114
|
+
useWhiteboardSize?: boolean;
|
|
115
|
+
},
|
|
102
116
|
): DiskCapacityInfoItem[] {
|
|
103
|
-
const sizeData = data?.WhiteboardSize ?? data;
|
|
117
|
+
const sizeData = useWhiteboardSize ? (data?.WhiteboardSize ?? data) : data;
|
|
104
118
|
const items: DiskCapacityInfoItem[] = [
|
|
105
119
|
{
|
|
106
120
|
id: 'space',
|
|
107
121
|
title: i18n('field_space'),
|
|
108
|
-
value: formatStorageMetricPair(
|
|
122
|
+
value: formatStorageMetricPair(
|
|
123
|
+
sizeData?.AllocatedSize,
|
|
124
|
+
sizeData?.TotalSize,
|
|
125
|
+
fixedDecimalPlaces,
|
|
126
|
+
),
|
|
109
127
|
},
|
|
110
128
|
];
|
|
111
129
|
|
|
@@ -113,7 +131,7 @@ export function getPDiskCapacityInfoItems(
|
|
|
113
131
|
items.push({
|
|
114
132
|
id: 'pdisk-usage',
|
|
115
133
|
title: CAPACITY_METRICS_COLUMN_TITLES.MaxPDiskUsage,
|
|
116
|
-
value: formatMetricPercent(data?.PDiskUsage),
|
|
134
|
+
value: formatMetricPercent(data?.PDiskUsage, fixedDecimalPlaces),
|
|
117
135
|
note: CAPACITY_METRICS_HELP_TEXT.MaxPDiskUsage,
|
|
118
136
|
});
|
|
119
137
|
}
|
|
@@ -144,17 +162,96 @@ export function getPDiskCapacityInfoItems(
|
|
|
144
162
|
return items;
|
|
145
163
|
}
|
|
146
164
|
|
|
165
|
+
export function getVDiskCapacityItems(
|
|
166
|
+
data: PreparedVDisk,
|
|
167
|
+
{capacityMetricsEnabled}: {capacityMetricsEnabled: boolean},
|
|
168
|
+
): DiskDetailItem[] {
|
|
169
|
+
const size =
|
|
170
|
+
(capacityMetricsEnabled ? data.WhiteboardSize : undefined) ?? data.DisplaySize ?? data;
|
|
171
|
+
const items: DiskDetailItem[] = [
|
|
172
|
+
{
|
|
173
|
+
id: 'group-size-in-units',
|
|
174
|
+
name: vDiskInfoKeyset('field_group-size-in-units'),
|
|
175
|
+
content: formatCapacityUnitCount(data.GroupSizeInUnits),
|
|
176
|
+
note: CAPACITY_CONFIGURATION_HELP_TEXT.GroupSizeInUnits,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 'size',
|
|
180
|
+
name: vDiskInfoKeyset('size'),
|
|
181
|
+
content: formatStorageMetricPair(size.AllocatedSize, size.SizeLimit, 2),
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: 'capacity-alert',
|
|
185
|
+
name: vDiskInfoKeyset('field_capacity-alert'),
|
|
186
|
+
content: <DiskCapacityAlertLabel value={data.CapacityAlert} />,
|
|
187
|
+
note: CAPACITY_METRICS_HELP_TEXT.CapacityAlert,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: 'vdisk-slot-usage',
|
|
191
|
+
name: CAPACITY_METRICS_COLUMN_TITLES.MaxVDiskSlotUsage,
|
|
192
|
+
content: formatMetricPercent(data.VDiskSlotUsage, 2),
|
|
193
|
+
note: CAPACITY_METRICS_HELP_TEXT.MaxVDiskSlotUsage,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: 'vdisk-raw-usage',
|
|
197
|
+
name: CAPACITY_METRICS_COLUMN_TITLES.MaxVDiskRawUsage,
|
|
198
|
+
content: formatMetricPercent(data.VDiskRawUsage, 2),
|
|
199
|
+
note: CAPACITY_METRICS_HELP_TEXT.MaxVDiskRawUsage,
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
return items.filter(({id}) => capacityMetricsEnabled || id === 'size');
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export function getPDiskCapacityItems(
|
|
206
|
+
data: PreparedPDisk,
|
|
207
|
+
{useWhiteboardSize = true}: {useWhiteboardSize?: boolean} = {},
|
|
208
|
+
): DiskDetailItem[] {
|
|
209
|
+
const fieldOrder = ['slot-size-in-units', 'space', 'capacity-alert', 'pdisk-usage', 'slots'];
|
|
210
|
+
const capacityItems = getPDiskCapacityInfoItems(data, {
|
|
211
|
+
withUsage: true,
|
|
212
|
+
withCapacityAlert: true,
|
|
213
|
+
fixedDecimalPlaces: 2,
|
|
214
|
+
useWhiteboardSize,
|
|
215
|
+
});
|
|
216
|
+
const items: DiskDetailItem[] = [];
|
|
217
|
+
for (const id of fieldOrder) {
|
|
218
|
+
const field = capacityItems.find((item) => item.id === id);
|
|
219
|
+
if (field) {
|
|
220
|
+
items.push({
|
|
221
|
+
id,
|
|
222
|
+
name: field.title,
|
|
223
|
+
content:
|
|
224
|
+
id === 'capacity-alert' ? (
|
|
225
|
+
<DiskCapacityAlertLabel value={data.PDiskCapacityAlert} />
|
|
226
|
+
) : (
|
|
227
|
+
field.value
|
|
228
|
+
),
|
|
229
|
+
note: id === 'slots' ? pDiskInfoKeyset('context_slots') : field.note,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return items;
|
|
234
|
+
}
|
|
235
|
+
|
|
147
236
|
export function getStorageGroupCapacityInfoItems(
|
|
148
237
|
data: PreparedStorageGroup | undefined,
|
|
149
238
|
): DiskCapacityInfoItem[] {
|
|
239
|
+
const capacityAlert = normalizeCapacityAlert(data?.CapacityAlert);
|
|
150
240
|
return [
|
|
241
|
+
{
|
|
242
|
+
id: 'capacity-alert',
|
|
243
|
+
title: CAPACITY_METRICS_COLUMN_TITLES.CapacityAlert,
|
|
244
|
+
value: capacityAlert ? (
|
|
245
|
+
<DiskCapacityAlertLabel value={capacityAlert} />
|
|
246
|
+
) : (
|
|
247
|
+
EMPTY_DATA_PLACEHOLDER
|
|
248
|
+
),
|
|
249
|
+
note: CAPACITY_METRICS_HELP_TEXT.CapacityAlert,
|
|
250
|
+
},
|
|
151
251
|
{
|
|
152
252
|
id: 'vdisk-slot-usage',
|
|
153
253
|
title: CAPACITY_METRICS_COLUMN_TITLES.MaxVDiskSlotUsage,
|
|
154
|
-
value:
|
|
155
|
-
formatNormalizedMetricPercent(data?.MaxVDiskSlotUsage),
|
|
156
|
-
data?.CapacityAlert,
|
|
157
|
-
),
|
|
254
|
+
value: formatNormalizedMetricPercent(data?.MaxVDiskSlotUsage),
|
|
158
255
|
note: CAPACITY_METRICS_HELP_TEXT.MaxVDiskSlotUsage,
|
|
159
256
|
},
|
|
160
257
|
{
|
|
@@ -163,12 +260,6 @@ export function getStorageGroupCapacityInfoItems(
|
|
|
163
260
|
value: formatNormalizedMetricPercent(data?.MaxVDiskRawUsage),
|
|
164
261
|
note: CAPACITY_METRICS_HELP_TEXT.MaxVDiskRawUsage,
|
|
165
262
|
},
|
|
166
|
-
{
|
|
167
|
-
id: 'capacity-alert',
|
|
168
|
-
title: CAPACITY_METRICS_COLUMN_TITLES.CapacityAlert,
|
|
169
|
-
value: getCapacityAlertValue(data?.CapacityAlert),
|
|
170
|
-
note: CAPACITY_METRICS_HELP_TEXT.CapacityAlert,
|
|
171
|
-
},
|
|
172
263
|
];
|
|
173
264
|
}
|
|
174
265
|
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
.ydb-disk-popup {
|
|
2
|
+
--ydb-disk-popup-base-width: 368px;
|
|
3
|
+
--ydb-disk-popup-width-growth: 50px;
|
|
4
|
+
|
|
5
|
+
width: max-content;
|
|
6
|
+
min-width: min(var(--ydb-disk-popup-base-width), calc(100vw - 64px));
|
|
7
|
+
max-width: min(
|
|
8
|
+
calc(var(--ydb-disk-popup-base-width) + var(--ydb-disk-popup-width-growth)),
|
|
9
|
+
calc(100vw - 64px)
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
font-size: var(--g-text-body-1-font-size);
|
|
13
|
+
line-height: var(--g-text-body-1-line-height);
|
|
14
|
+
overflow-wrap: anywhere;
|
|
15
|
+
|
|
16
|
+
&_combined {
|
|
17
|
+
--ydb-disk-popup-base-width: 593px;
|
|
18
|
+
--ydb-disk-popup-width-growth: 120px;
|
|
19
|
+
--ydb-pdisk-log-size-progress-width: 50px;
|
|
20
|
+
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__panel {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex: 1;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: var(--g-spacing-2);
|
|
30
|
+
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&_combined &__panel:first-child {
|
|
35
|
+
padding-right: var(--g-spacing-3);
|
|
36
|
+
|
|
37
|
+
border-right: 1px solid var(--g-color-line-generic);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&_combined &__panel + &__panel {
|
|
41
|
+
padding-left: var(--g-spacing-3);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__body,
|
|
45
|
+
&__footer {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
gap: var(--g-spacing-2);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Only Compaction contributes to the intrinsic width; other sections fit the card.
|
|
52
|
+
&__body > :not(:has(.ydb-vdisk-popup__compaction)),
|
|
53
|
+
&__footer,
|
|
54
|
+
.g-definition-list__item:not(:has(.ydb-vdisk-popup__compaction)) {
|
|
55
|
+
contain: inline-size;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ydb-vdisk-popup__compaction {
|
|
59
|
+
width: max-content;
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.g-definition-list__item:has(.ydb-vdisk-popup__compaction) {
|
|
64
|
+
.g-definition-list__term-container {
|
|
65
|
+
flex-shrink: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.g-definition-list__definition {
|
|
69
|
+
flex-shrink: 0;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&__footer {
|
|
74
|
+
margin-top: auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__id {
|
|
78
|
+
min-width: 0;
|
|
79
|
+
overflow-wrap: anywhere;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.g-definition-list {
|
|
83
|
+
--g-definition-list-item-gap: var(--g-spacing-1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.g-definition-list__definition {
|
|
87
|
+
min-width: 0;
|
|
88
|
+
overflow-wrap: anywhere;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.g-definition-list__copy-container {
|
|
92
|
+
min-width: 0;
|
|
93
|
+
max-width: 100%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.g-definition-list__dots {
|
|
97
|
+
flex-basis: 0;
|
|
98
|
+
|
|
99
|
+
min-width: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ydb-disk-status__tooltip {
|
|
103
|
+
min-width: 0;
|
|
104
|
+
max-width: 100%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ydb-disk-status__label {
|
|
108
|
+
min-width: 0;
|
|
109
|
+
max-width: 100%;
|
|
110
|
+
height: auto;
|
|
111
|
+
min-height: var(--_--height);
|
|
112
|
+
|
|
113
|
+
.g-label__text {
|
|
114
|
+
display: block;
|
|
115
|
+
overflow: visible;
|
|
116
|
+
|
|
117
|
+
min-width: 0;
|
|
118
|
+
|
|
119
|
+
text-align: start;
|
|
120
|
+
white-space: nowrap;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.g-label__content,
|
|
124
|
+
.g-label__value,
|
|
125
|
+
.g-label__key,
|
|
126
|
+
.g-label__separator {
|
|
127
|
+
display: inline;
|
|
128
|
+
overflow: visible;
|
|
129
|
+
|
|
130
|
+
text-overflow: clip;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ydb-pdisk-log-size,
|
|
135
|
+
.ydb-vdisk-status__replication-progress {
|
|
136
|
+
flex-wrap: wrap;
|
|
137
|
+
|
|
138
|
+
max-width: 100%;
|
|
139
|
+
|
|
140
|
+
white-space: normal;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&__location {
|
|
144
|
+
contain: inline-size;
|
|
145
|
+
|
|
146
|
+
padding: var(--g-spacing-1) var(--g-spacing-2);
|
|
147
|
+
|
|
148
|
+
border-radius: var(--g-border-radius-m);
|
|
149
|
+
background-color: var(--g-color-base-generic);
|
|
150
|
+
|
|
151
|
+
.g-definition-list__dots {
|
|
152
|
+
display: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.g-definition-list__definition {
|
|
156
|
+
flex: 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&__text {
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
|
|
163
|
+
min-width: 0;
|
|
164
|
+
|
|
165
|
+
cursor: default;
|
|
166
|
+
white-space: nowrap;
|
|
167
|
+
text-overflow: ellipsis;
|
|
168
|
+
|
|
169
|
+
&_with-left-trim {
|
|
170
|
+
text-align: end;
|
|
171
|
+
direction: rtl;
|
|
172
|
+
|
|
173
|
+
> span {
|
|
174
|
+
unicode-bidi: plaintext;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&__text-tooltip {
|
|
180
|
+
overflow-wrap: anywhere;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@media (max-width: 700px) {
|
|
184
|
+
&_combined {
|
|
185
|
+
--ydb-disk-popup-base-width: 368px;
|
|
186
|
+
|
|
187
|
+
grid-template-columns: minmax(0, 1fr);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&_combined &__panel:first-child {
|
|
191
|
+
padding-right: 0;
|
|
192
|
+
padding-bottom: var(--g-spacing-3);
|
|
193
|
+
|
|
194
|
+
border-right: none;
|
|
195
|
+
border-bottom: 1px solid var(--g-color-line-generic);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&_combined &__panel + &__panel {
|
|
199
|
+
padding-top: var(--g-spacing-3);
|
|
200
|
+
padding-left: 0;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {ClipboardButton, Flex, Text, Tooltip} from '@gravity-ui/uikit';
|
|
4
|
+
import {isNil} from 'lodash';
|
|
5
|
+
|
|
6
|
+
import {cn} from '../../utils/cn';
|
|
7
|
+
import {EMPTY_DATA_PLACEHOLDER} from '../../utils/constants';
|
|
8
|
+
import type {DiskDetailItem} from '../../utils/disks/diskInfo/getDiskLocationItems';
|
|
9
|
+
import {DiskTypeLabel} from '../DiskStatus/DiskStatus';
|
|
10
|
+
import {YDBDefinitionList} from '../YDBDefinitionList/YDBDefinitionList';
|
|
11
|
+
|
|
12
|
+
import i18n from './i18n';
|
|
13
|
+
|
|
14
|
+
import './DiskPopup.scss';
|
|
15
|
+
|
|
16
|
+
const b = cn('ydb-disk-popup');
|
|
17
|
+
|
|
18
|
+
export function DiskPopup({
|
|
19
|
+
children,
|
|
20
|
+
combined = false,
|
|
21
|
+
className,
|
|
22
|
+
}: {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
combined?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
}) {
|
|
27
|
+
return <div className={b({combined}, className)}>{children}</div>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function DiskPopupPanel({
|
|
31
|
+
children,
|
|
32
|
+
footer,
|
|
33
|
+
}: {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
footer?: React.ReactNode;
|
|
36
|
+
}) {
|
|
37
|
+
return (
|
|
38
|
+
<div className={b('panel')}>
|
|
39
|
+
<div className={b('body')}>{children}</div>
|
|
40
|
+
{footer && <div className={b('footer')}>{footer}</div>}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function DiskPopupHeader({
|
|
46
|
+
title,
|
|
47
|
+
id,
|
|
48
|
+
type,
|
|
49
|
+
statuses,
|
|
50
|
+
}: {
|
|
51
|
+
title: string;
|
|
52
|
+
id?: string;
|
|
53
|
+
type?: string;
|
|
54
|
+
statuses: React.ReactNode;
|
|
55
|
+
}) {
|
|
56
|
+
return (
|
|
57
|
+
<React.Fragment>
|
|
58
|
+
<Flex gap={1} alignItems="center" wrap="wrap">
|
|
59
|
+
<Text variant="subheader-2">{title}</Text>
|
|
60
|
+
<Text color="secondary">•</Text>
|
|
61
|
+
<Text variant="body-2" color="secondary" className={b('id')}>
|
|
62
|
+
{id || EMPTY_DATA_PLACEHOLDER}
|
|
63
|
+
</Text>
|
|
64
|
+
{id && (
|
|
65
|
+
<ClipboardButton
|
|
66
|
+
text={id}
|
|
67
|
+
size="s"
|
|
68
|
+
view="flat-secondary"
|
|
69
|
+
aria-label={i18n('action_copy-field', {field: title})}
|
|
70
|
+
/>
|
|
71
|
+
)}
|
|
72
|
+
<DiskTypeLabel type={type} size="xs" />
|
|
73
|
+
</Flex>
|
|
74
|
+
<Flex gap={1} wrap="wrap" alignItems="center">
|
|
75
|
+
{statuses}
|
|
76
|
+
</Flex>
|
|
77
|
+
</React.Fragment>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function DiskPopupText({
|
|
82
|
+
value,
|
|
83
|
+
withLeftTrim = false,
|
|
84
|
+
}: {
|
|
85
|
+
value?: string | number;
|
|
86
|
+
withLeftTrim?: boolean;
|
|
87
|
+
}) {
|
|
88
|
+
const hasValue = !isNil(value) && value !== '';
|
|
89
|
+
const text = hasValue ? value : EMPTY_DATA_PLACEHOLDER;
|
|
90
|
+
return (
|
|
91
|
+
<Tooltip content={text} disabled={!hasValue} className={b('text-tooltip')}>
|
|
92
|
+
<span
|
|
93
|
+
className={b('text', {'with-left-trim': withLeftTrim})}
|
|
94
|
+
tabIndex={hasValue ? 0 : undefined}
|
|
95
|
+
>
|
|
96
|
+
{withLeftTrim ? <span>{text}</span> : text}
|
|
97
|
+
</span>
|
|
98
|
+
</Tooltip>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function DiskPopupLocation({items}: {items: DiskDetailItem[]}) {
|
|
103
|
+
if (!items.length) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
const locationItems = items.map((item) => {
|
|
107
|
+
if (['fqdn', 'rack', 'datacenter'].includes(item.id)) {
|
|
108
|
+
return {...item, content: <DiskPopupText value={item.copyText} />};
|
|
109
|
+
}
|
|
110
|
+
if (item.id === 'pdisk-path' && typeof item.copyText === 'string') {
|
|
111
|
+
return {
|
|
112
|
+
...item,
|
|
113
|
+
content: <DiskPopupText value={item.copyText} withLeftTrim />,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return item;
|
|
117
|
+
});
|
|
118
|
+
return (
|
|
119
|
+
<div className={b('location')}>
|
|
120
|
+
<YDBDefinitionList items={locationItems} nameMaxWidth={100} />
|
|
121
|
+
</div>
|
|
122
|
+
);
|
|
123
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@use '../../styles/mixins';
|
|
2
|
+
|
|
3
|
+
.ydb-disk-status {
|
|
4
|
+
&__type_hdd {
|
|
5
|
+
color: var(--g-color-text-utility);
|
|
6
|
+
background-color: var(--g-color-base-utility-light);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&__type_ssd {
|
|
10
|
+
color: var(--g-color-text-misc);
|
|
11
|
+
background-color: var(--g-color-base-misc-medium);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__type_nvme {
|
|
15
|
+
color: var(--g-color-text-info);
|
|
16
|
+
background-color: var(--g-color-base-info-light);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__capacity-alert {
|
|
20
|
+
$space-colors: (
|
|
21
|
+
'green': 'green',
|
|
22
|
+
'yellow': 'yellow',
|
|
23
|
+
'red': 'red',
|
|
24
|
+
'spacecyan': 'cyan',
|
|
25
|
+
'spacelightyellow': 'light-yellow',
|
|
26
|
+
'spacelightorange': 'light-orange',
|
|
27
|
+
'spacepreorange': 'pre-orange',
|
|
28
|
+
'spaceorange': 'orange',
|
|
29
|
+
'spaceblack': 'black',
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
@each $color, $token in $space-colors {
|
|
33
|
+
&_color_#{$color} {
|
|
34
|
+
@include mixins.capacity-alert-label-colors($token);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__label,
|
|
40
|
+
&__tooltip {
|
|
41
|
+
cursor: default;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__label_danger-heavy {
|
|
45
|
+
color: var(--g-color-text-light-primary);
|
|
46
|
+
background-color: var(--g-color-base-danger-heavy);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__tooltip {
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
|
|
52
|
+
border-radius: var(--g-border-radius-s);
|
|
53
|
+
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
56
|
+
outline-offset: 2px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|