ydb-embedded-ui 22.2.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/Graph/GravityGraph.js +9 -2
- package/dist/components/Graph/GravityGraph.js.map +1 -1
- package/dist/components/Graph/utils.d.ts +2 -1
- package/dist/components/Graph/utils.js +7 -0
- package/dist/components/Graph/utils.js.map +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/PaginatedTable/rowLookup.js +30 -9
- package/dist/components/PaginatedTable/rowLookup.js.map +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/TableKeyboardNavigation/TableKeyboardNavigation.js +5 -1
- package/dist/components/TableKeyboardNavigation/TableKeyboardNavigation.js.map +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/Authentication/Authentication.js +29 -30
- package/dist/containers/Authentication/Authentication.js.map +1 -1
- package/dist/containers/Authentication/utils.d.ts +2 -2
- package/dist/containers/Authentication/utils.js +1 -1
- package/dist/containers/Authentication/utils.js.map +1 -1
- 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/DiagnosticsPages.js +5 -1
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.d.ts +2 -1
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js +11 -2
- package/dist/containers/Tenant/Diagnostics/Overview/Overview.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolInfo.scss +24 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolUsage.d.ts +8 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolUsage.js +34 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolUsage.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/en.json +4 -1
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.js +1 -0
- package/dist/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.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 +12 -3
- 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 +55 -33
- 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/Overview/TableInfo/i18n/en.json +4 -0
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareColumnTableInfo.js +4 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareColumnTableInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareRowTableInfo.js +4 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareRowTableInfo.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareTTL.js +41 -3
- package/dist/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareTTL.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.js +38 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.scss +18 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/en.json +5 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/index.js +5 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/index.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/index.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/index.js +2 -0
- package/dist/containers/Tenant/Diagnostics/StreamingQueryGraph/index.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/i18n/en.json +1 -0
- package/dist/containers/Tenant/Diagnostics/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/tabsContent.js +2 -0
- package/dist/containers/Tenant/Diagnostics/tabsContent.js.map +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/Query/QueryEditor/YqlEditor/YqlEditor.js +8 -1
- package/dist/containers/Tenant/Query/QueryEditor/YqlEditor/YqlEditor.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/executeTopQueries/executeTopQueries.d.ts +7 -0
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +38 -0
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js.map +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/query/parsers/prepareStreamingQueryPlan.d.ts +8 -0
- package/dist/store/reducers/query/parsers/prepareStreamingQueryPlan.js +53 -0
- package/dist/store/reducers/query/parsers/prepareStreamingQueryPlan.js.map +1 -0
- 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.d.ts +5 -1
- package/dist/store/reducers/streamingQuery/streamingQuery.js +36 -13
- package/dist/store/reducers/streamingQuery/streamingQuery.js.map +1 -1
- package/dist/store/reducers/tenant/constants.d.ts +1 -0
- package/dist/store/reducers/tenant/constants.js +1 -0
- package/dist/store/reducers/tenant/constants.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/schema/columnEntity.d.ts +2 -1
- package/dist/types/api/schema/sysView.d.ts +59 -2
- package/dist/types/api/schema/sysView.js +53 -1
- package/dist/types/api/schema/sysView.js.map +1 -1
- package/dist/types/api/schema/table.d.ts +8 -0
- package/dist/types/api/schema/table.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/query.d.ts +1 -0
- package/dist/utils/query.js +40 -0
- package/dist/utils/query.js.map +1 -1
- package/dist/utils/schema.d.ts +6 -2
- package/dist/utils/schema.js +14 -4
- package/dist/utils/schema.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/Graph/GravityGraph.tsx +9 -2
- package/src/components/Graph/utils.ts +9 -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/PaginatedTable/rowLookup.ts +35 -10
- 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/TableKeyboardNavigation/TableKeyboardNavigation.tsx +5 -1
- 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/Authentication/Authentication.tsx +29 -34
- package/src/containers/Authentication/utils.ts +3 -3
- 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/DiagnosticsPages.ts +6 -1
- package/src/containers/Tenant/Diagnostics/Overview/Overview.tsx +22 -2
- package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolInfo.scss +24 -0
- package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/ResourcePoolUsage.tsx +53 -0
- package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/i18n/en.json +4 -1
- package/src/containers/Tenant/Diagnostics/Overview/ResourcePoolInfo/index.ts +1 -0
- package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/SchemaObjectInfo.tsx +19 -2
- package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.tsx +11 -10
- package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.tsx +79 -34
- package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/i18n/en.json +5 -1
- package/src/containers/Tenant/Diagnostics/Overview/TableInfo/i18n/en.json +4 -0
- package/src/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareColumnTableInfo.tsx +11 -1
- package/src/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareRowTableInfo.tsx +11 -1
- package/src/containers/Tenant/Diagnostics/Overview/TableInfo/prepareTableInfo/prepareTTL.ts +45 -3
- package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.scss +18 -0
- package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/StreamingQueryGraph.tsx +79 -0
- package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/en.json +5 -0
- package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/i18n/index.ts +7 -0
- package/src/containers/Tenant/Diagnostics/StreamingQueryGraph/index.ts +1 -0
- package/src/containers/Tenant/Diagnostics/i18n/en.json +1 -0
- package/src/containers/Tenant/Diagnostics/tabsContent.tsx +4 -0
- package/src/containers/Tenant/Healthcheck/components/HealthcheckDrawer.tsx +5 -2
- package/src/containers/Tenant/Query/QueryEditor/YqlEditor/YqlEditor.tsx +8 -1
- 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/executeTopQueries/executeTopQueries.ts +46 -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/query/parsers/prepareStreamingQueryPlan.ts +74 -0
- 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 +44 -19
- package/src/store/reducers/tenant/constants.ts +1 -0
- package/src/styles/mixins.scss +22 -0
- package/src/types/api/pdisk.ts +4 -0
- package/src/types/api/schema/columnEntity.ts +2 -1
- package/src/types/api/schema/sysView.ts +60 -37
- package/src/types/api/schema/table.ts +7 -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/query.ts +55 -0
- package/src/utils/schema.ts +22 -5
- 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
|
@@ -115,6 +115,11 @@ const graph = {
|
|
|
115
115
|
title: i18n('title_graph'),
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
+
const computationGraph = {
|
|
119
|
+
id: TENANT_DIAGNOSTICS_TABS_IDS.computationGraph,
|
|
120
|
+
title: i18n('title_computation-graph'),
|
|
121
|
+
};
|
|
122
|
+
|
|
118
123
|
const consumers = {
|
|
119
124
|
id: TENANT_DIAGNOSTICS_TABS_IDS.consumers,
|
|
120
125
|
title: i18n('title_consumers'),
|
|
@@ -241,7 +246,7 @@ const EXTERNAL_TABLE_PAGES = [overview, schema, describe, access];
|
|
|
241
246
|
|
|
242
247
|
const VIEW_PAGES = [overview, schema, describe, access];
|
|
243
248
|
|
|
244
|
-
const STREAMING_QUERY_PAGES = [overview, describe, access];
|
|
249
|
+
const STREAMING_QUERY_PAGES = [overview, computationGraph, describe, access];
|
|
245
250
|
const SECRET_PAGES = [overview, describe, access];
|
|
246
251
|
|
|
247
252
|
// verbose mapping to guarantee correct tabs for new path types
|
|
@@ -6,6 +6,7 @@ import {Loader} from '../../../../components/Loader';
|
|
|
6
6
|
import {useClusterWithProxy} from '../../../../store/reducers/cluster/cluster';
|
|
7
7
|
import {overviewApi} from '../../../../store/reducers/overview/overview';
|
|
8
8
|
import {EPathType} from '../../../../types/api/schema';
|
|
9
|
+
import {cn} from '../../../../utils/cn';
|
|
9
10
|
import {useAutoRefreshInterval} from '../../../../utils/hooks';
|
|
10
11
|
import {ViewInfo} from '../../Info/View/View';
|
|
11
12
|
import {isDomain} from '../../ObjectSummary/transformPath';
|
|
@@ -16,6 +17,7 @@ import {ChangefeedInfo} from './ChangefeedInfo';
|
|
|
16
17
|
import {DatabaseInfo} from './DatabaseInfo/DatabaseInfo';
|
|
17
18
|
import {DefaultEntityInfo} from './DefaultEntityInfo';
|
|
18
19
|
import {ResourcePoolInfo} from './ResourcePoolInfo';
|
|
20
|
+
import {ResourcePoolUsage} from './ResourcePoolInfo/ResourcePoolUsage';
|
|
19
21
|
import {SchemaObjectInfoContainer} from './SchemaObjectInfo/SchemaObjectInfoContainer';
|
|
20
22
|
import {StreamingQueryInfo} from './StreamingQueryInfo';
|
|
21
23
|
import {TableInfo} from './TableInfo';
|
|
@@ -29,6 +31,8 @@ interface OverviewProps {
|
|
|
29
31
|
databaseFullPath: string;
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
const b = cn('ydb-diagnostics-resource-pool-info');
|
|
35
|
+
|
|
32
36
|
function Overview({type, path, database, databaseFullPath}: OverviewProps) {
|
|
33
37
|
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
34
38
|
const useMetaProxy = useClusterWithProxy();
|
|
@@ -56,7 +60,19 @@ function Overview({type, path, database, databaseFullPath}: OverviewProps) {
|
|
|
56
60
|
const pathTypeToComponent: Record<EPathType, (() => React.ReactNode) | undefined> = {
|
|
57
61
|
[EPathType.EPathTypeInvalid]: undefined,
|
|
58
62
|
[EPathType.EPathTypeDir]: undefined,
|
|
59
|
-
[EPathType.EPathTypeResourcePool]: () =>
|
|
63
|
+
[EPathType.EPathTypeResourcePool]: () => (
|
|
64
|
+
<div className={b('row')}>
|
|
65
|
+
<div className={b('col')}>
|
|
66
|
+
<ResourcePoolInfo data={data} />
|
|
67
|
+
</div>
|
|
68
|
+
<div className={b('col')}>
|
|
69
|
+
<ResourcePoolUsage
|
|
70
|
+
database={database}
|
|
71
|
+
poolName={data?.PathDescription?.ResourcePoolDescription?.Name || ''}
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
),
|
|
60
76
|
[EPathType.EPathTypeSecret]: undefined,
|
|
61
77
|
[EPathType.EPathTypeTable]: renderTableInfo,
|
|
62
78
|
[EPathType.EPathTypeSysView]: undefined,
|
|
@@ -94,7 +110,7 @@ function Overview({type, path, database, databaseFullPath}: OverviewProps) {
|
|
|
94
110
|
/>
|
|
95
111
|
),
|
|
96
112
|
[EPathType.EPathTypeStreamingQuery]: () => (
|
|
97
|
-
<StreamingQueryInfo path={path} database={database} />
|
|
113
|
+
<StreamingQueryInfo path={path} database={database} data={data} />
|
|
98
114
|
),
|
|
99
115
|
};
|
|
100
116
|
|
|
@@ -113,6 +129,10 @@ function Overview({type, path, database, databaseFullPath}: OverviewProps) {
|
|
|
113
129
|
|
|
114
130
|
const content = pathTypeToComponent[type]?.();
|
|
115
131
|
|
|
132
|
+
if (isStreamingQuery) {
|
|
133
|
+
return content;
|
|
134
|
+
}
|
|
135
|
+
|
|
116
136
|
const commonInfo = (
|
|
117
137
|
<SchemaObjectInfoContainer data={currentData ?? undefined} type={type} path={path} />
|
|
118
138
|
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.ydb-diagnostics-resource-pool-info {
|
|
2
|
+
$column-width: 310px;
|
|
3
|
+
|
|
4
|
+
&__row {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
justify-content: flex-start;
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
gap: var(--g-spacing-9);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__col {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
justify-content: flex-start;
|
|
16
|
+
align-items: stretch;
|
|
17
|
+
|
|
18
|
+
width: $column-width;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__loader {
|
|
22
|
+
margin-top: 50px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {Loader} from '../../../../../components/Loader';
|
|
2
|
+
import {YDBDefinitionList} from '../../../../../components/YDBDefinitionList/YDBDefinitionList';
|
|
3
|
+
import {topQueriesApi} from '../../../../../store/reducers/executeTopQueries/executeTopQueries';
|
|
4
|
+
import {cn} from '../../../../../utils/cn';
|
|
5
|
+
import {EMPTY_DATA_PLACEHOLDER} from '../../../../../utils/constants';
|
|
6
|
+
import {useAutoRefreshInterval} from '../../../../../utils/hooks';
|
|
7
|
+
|
|
8
|
+
import i18n from './i18n';
|
|
9
|
+
|
|
10
|
+
import './ResourcePoolInfo.scss';
|
|
11
|
+
|
|
12
|
+
const b = cn('ydb-diagnostics-resource-pool-info');
|
|
13
|
+
|
|
14
|
+
interface ResourcePoolUsageProps {
|
|
15
|
+
database: string;
|
|
16
|
+
poolName: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Displays running/queued query counts for a resource pool */
|
|
20
|
+
export function ResourcePoolUsage({database, poolName}: ResourcePoolUsageProps) {
|
|
21
|
+
const [autoRefreshInterval] = useAutoRefreshInterval();
|
|
22
|
+
const {currentData, isFetching, error} = topQueriesApi.useGetRunningQueriesByPoolQuery(
|
|
23
|
+
{database, poolName},
|
|
24
|
+
{skip: !poolName, pollingInterval: autoRefreshInterval, refetchOnMountOrArgChange: true},
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const loading = isFetching && currentData === undefined;
|
|
28
|
+
|
|
29
|
+
if (loading) {
|
|
30
|
+
return <Loader size="s" className={b('loader')} />;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (error || !poolName) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<YDBDefinitionList
|
|
39
|
+
items={[
|
|
40
|
+
{
|
|
41
|
+
name: i18n('field_running-queries'),
|
|
42
|
+
content: currentData?.runningQueriesCount ?? EMPTY_DATA_PLACEHOLDER,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: i18n('field_queued-queries'),
|
|
46
|
+
content: currentData?.queuedQueriesCount ?? EMPTY_DATA_PLACEHOLDER,
|
|
47
|
+
},
|
|
48
|
+
]}
|
|
49
|
+
title={i18n('title_usage')}
|
|
50
|
+
responsive
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title_pool-settings": "Pool Settings",
|
|
3
|
+
"title_usage": "Usage",
|
|
3
4
|
"group_queue": "Queue & Concurrency",
|
|
4
5
|
"group_cpu": "CPU",
|
|
5
6
|
"field_concurrent-query-limit": "Concurrent query limit",
|
|
6
7
|
"field_queue-size": "Queue size",
|
|
7
8
|
"field_database-load-cpu-threshold": "Database load CPU threshold",
|
|
8
|
-
"field_total-cpu-limit-percent-per-node": "Total CPU limit % per node"
|
|
9
|
+
"field_total-cpu-limit-percent-per-node": "Total CPU limit % per node",
|
|
10
|
+
"field_running-queries": "Running queries",
|
|
11
|
+
"field_queued-queries": "Queued queries"
|
|
9
12
|
}
|
|
@@ -18,6 +18,7 @@ export interface SchemaObjectInfoProps {
|
|
|
18
18
|
path: string;
|
|
19
19
|
itemsAfterType?: YDBDefinitionListItem[];
|
|
20
20
|
additionalItems?: YDBDefinitionListItem[];
|
|
21
|
+
createdContent?: YDBDefinitionListItem['content'];
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export function SchemaObjectInfo({
|
|
@@ -26,6 +27,7 @@ export function SchemaObjectInfo({
|
|
|
26
27
|
path,
|
|
27
28
|
itemsAfterType,
|
|
28
29
|
additionalItems,
|
|
30
|
+
createdContent,
|
|
29
31
|
}: SchemaObjectInfoProps) {
|
|
30
32
|
const showAdministrativeFields = useUserPermissions()?.IsAdministrationAllowed === true;
|
|
31
33
|
const items = React.useMemo(
|
|
@@ -37,11 +39,26 @@ export function SchemaObjectInfo({
|
|
|
37
39
|
itemsAfterType,
|
|
38
40
|
additionalItems,
|
|
39
41
|
showAdministrativeFields,
|
|
42
|
+
createdContent,
|
|
40
43
|
}),
|
|
41
|
-
[
|
|
44
|
+
[
|
|
45
|
+
additionalItems,
|
|
46
|
+
createdContent,
|
|
47
|
+
data,
|
|
48
|
+
fallbackType,
|
|
49
|
+
itemsAfterType,
|
|
50
|
+
path,
|
|
51
|
+
showAdministrativeFields,
|
|
52
|
+
],
|
|
42
53
|
);
|
|
43
54
|
|
|
44
55
|
return (
|
|
45
|
-
<YDBDefinitionList
|
|
56
|
+
<YDBDefinitionList
|
|
57
|
+
items={items}
|
|
58
|
+
responsive
|
|
59
|
+
className={b('list')}
|
|
60
|
+
wrapperClassName={b()}
|
|
61
|
+
dataQa="schema-object-info"
|
|
62
|
+
/>
|
|
46
63
|
);
|
|
47
64
|
}
|
package/src/containers/Tenant/Diagnostics/Overview/SchemaObjectInfo/prepareSchemaObjectInfo.tsx
CHANGED
|
@@ -40,6 +40,7 @@ interface PrepareSchemaObjectInfoItemsParams {
|
|
|
40
40
|
itemsAfterType?: YDBDefinitionListItem[];
|
|
41
41
|
additionalItems?: YDBDefinitionListItem[];
|
|
42
42
|
showAdministrativeFields?: boolean;
|
|
43
|
+
createdContent?: YDBDefinitionListItem['content'];
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
function isPresent(value: string | number | undefined): value is string | number {
|
|
@@ -83,6 +84,7 @@ export function prepareSchemaObjectInfoItems({
|
|
|
83
84
|
itemsAfterType = [],
|
|
84
85
|
additionalItems = [],
|
|
85
86
|
showAdministrativeFields = false,
|
|
87
|
+
createdContent,
|
|
86
88
|
}: PrepareSchemaObjectInfoItemsParams): YDBDefinitionListItem[] {
|
|
87
89
|
const self = data?.PathDescription?.Self;
|
|
88
90
|
let pathId = self?.PathId;
|
|
@@ -116,21 +118,20 @@ export function prepareSchemaObjectInfoItems({
|
|
|
116
118
|
);
|
|
117
119
|
}
|
|
118
120
|
|
|
119
|
-
|
|
121
|
+
items.push({
|
|
122
|
+
name: schemaObjectInfoKeyset('field_full-path'),
|
|
123
|
+
content: isPresent(fullPath) ? fullPath : EMPTY_DATA_PLACEHOLDER,
|
|
124
|
+
copyText: isPresent(fullPath) ? fullPath : undefined,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
if (createdContent || Number(createStep)) {
|
|
120
128
|
items.push({
|
|
121
129
|
name: tenantKeyset('field_created'),
|
|
122
|
-
content: formatDateTime(createStep),
|
|
130
|
+
content: createdContent || formatDateTime(createStep),
|
|
123
131
|
});
|
|
124
132
|
}
|
|
125
133
|
|
|
126
|
-
items.push(
|
|
127
|
-
{
|
|
128
|
-
name: schemaObjectInfoKeyset('field_full-path'),
|
|
129
|
-
content: isPresent(fullPath) ? fullPath : EMPTY_DATA_PLACEHOLDER,
|
|
130
|
-
copyText: isPresent(fullPath) ? fullPath : undefined,
|
|
131
|
-
},
|
|
132
|
-
...additionalItems,
|
|
133
|
-
);
|
|
134
|
+
items.push(...additionalItems);
|
|
134
135
|
|
|
135
136
|
return items.filter(({content}) => content !== undefined && content !== null && content !== '');
|
|
136
137
|
}
|
package/src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import {dateTimeParse} from '@gravity-ui/date-utils';
|
|
3
4
|
import {Label} from '@gravity-ui/uikit';
|
|
4
5
|
|
|
5
6
|
import {Loader} from '../../../../../components/Loader';
|
|
@@ -7,16 +8,19 @@ import type {YDBDefinitionListItem} from '../../../../../components/YDBDefinitio
|
|
|
7
8
|
import {YDBDefinitionList} from '../../../../../components/YDBDefinitionList/YDBDefinitionList';
|
|
8
9
|
import {YQLCodePreview} from '../../../../../components/YQLCodePreview/YQLCodePreview';
|
|
9
10
|
import {streamingQueriesApi} from '../../../../../store/reducers/streamingQuery/streamingQuery';
|
|
10
|
-
import type {
|
|
11
|
+
import type {TEvDescribeSchemeResult} from '../../../../../types/api/schema';
|
|
12
|
+
import {EPathType} from '../../../../../types/api/schema';
|
|
11
13
|
import type {IQueryResult} from '../../../../../types/store/query';
|
|
12
14
|
import {cn} from '../../../../../utils/cn';
|
|
15
|
+
import {EMPTY_DATA_PLACEHOLDER} from '../../../../../utils/constants';
|
|
13
16
|
import {
|
|
14
17
|
getStringifiedData,
|
|
15
18
|
stripIndentByFirstLine,
|
|
16
19
|
trimOuterEmptyLines,
|
|
17
20
|
} from '../../../../../utils/dataFormatters/dataFormatters';
|
|
18
|
-
import {
|
|
21
|
+
import {parseIssuesData} from '../../../../../utils/query';
|
|
19
22
|
import {ResultIssuesModal} from '../../../Query/Issues/Issues';
|
|
23
|
+
import {SchemaObjectInfo} from '../SchemaObjectInfo/SchemaObjectInfo';
|
|
20
24
|
|
|
21
25
|
import i18n from './i18n';
|
|
22
26
|
|
|
@@ -25,26 +29,37 @@ import './StreamingQueryInfo.scss';
|
|
|
25
29
|
interface StreamingQueryProps {
|
|
26
30
|
database: string;
|
|
27
31
|
path: string;
|
|
32
|
+
data?: TEvDescribeSchemeResult;
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
const b = cn('ydb-streaming-query-info');
|
|
31
36
|
|
|
32
|
-
export function StreamingQueryInfo({database, path}: StreamingQueryProps) {
|
|
33
|
-
const {
|
|
37
|
+
export function StreamingQueryInfo({database, path, data}: StreamingQueryProps) {
|
|
38
|
+
const {currentData: sysData, isFetching} = streamingQueriesApi.useGetStreamingQueryInfoQuery(
|
|
34
39
|
{database, path},
|
|
35
40
|
{skip: !database || !path},
|
|
36
41
|
);
|
|
37
42
|
const loading = isFetching && sysData === undefined;
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const {items, queryText} = prepareStreamingQueryItems(sysData);
|
|
44
|
+
const {items, queryText, createdContent, stateItems} = prepareStreamingQueryInfo(
|
|
45
|
+
sysData,
|
|
46
|
+
data?.PathDescription?.Self?.CreateStep,
|
|
47
|
+
);
|
|
44
48
|
|
|
45
49
|
return (
|
|
46
50
|
<React.Fragment>
|
|
47
|
-
<
|
|
51
|
+
<SchemaObjectInfo
|
|
52
|
+
data={data}
|
|
53
|
+
fallbackType={EPathType.EPathTypeStreamingQuery}
|
|
54
|
+
path={path}
|
|
55
|
+
createdContent={createdContent}
|
|
56
|
+
itemsAfterType={stateItems}
|
|
57
|
+
/>
|
|
58
|
+
{loading ? (
|
|
59
|
+
<Loader size="s" className={b('loader')} />
|
|
60
|
+
) : items.length ? (
|
|
61
|
+
<YDBDefinitionList items={items} />
|
|
62
|
+
) : null}
|
|
48
63
|
{queryText ? (
|
|
49
64
|
<YQLCodePreview title={i18n('field_query-text')} text={queryText} />
|
|
50
65
|
) : null}
|
|
@@ -74,27 +89,40 @@ function StateLabel({state}: {state?: string}) {
|
|
|
74
89
|
return <Label theme={theme}>{state}</Label>;
|
|
75
90
|
}
|
|
76
91
|
|
|
77
|
-
function
|
|
92
|
+
export function prepareStreamingQueryInfo(sysData?: IQueryResult, createStep?: string | number) {
|
|
78
93
|
if (!sysData) {
|
|
79
|
-
return {items: [], queryText: undefined};
|
|
94
|
+
return {items: [], queryText: undefined, createdContent: undefined, stateItems: []};
|
|
80
95
|
}
|
|
81
96
|
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
const row = sysData.resultSets?.[0]?.result?.[0];
|
|
98
|
+
const createdContent =
|
|
99
|
+
formatLifecycleValue(row?.CreatedAt, row?.CreatedBy, createStep) ??
|
|
100
|
+
(row && 'CreatedAt' in row ? EMPTY_DATA_PLACEHOLDER : undefined);
|
|
101
|
+
const lifecycleFields = [
|
|
102
|
+
{name: i18n('field_started'), timestamp: 'StartedAt', user: 'StartedBy'},
|
|
103
|
+
{name: i18n('field_modified'), timestamp: 'ModifiedAt', user: 'ModifiedBy'},
|
|
104
|
+
{name: i18n('field_stopped'), timestamp: 'FinishedAt', user: 'StoppedBy'},
|
|
105
|
+
];
|
|
106
|
+
const info: YDBDefinitionListItem[] = lifecycleFields
|
|
107
|
+
.filter(({timestamp}) => row && timestamp in row)
|
|
108
|
+
.map(({name, timestamp, user}) => ({
|
|
109
|
+
name,
|
|
110
|
+
content: formatLifecycleValue(row?.[timestamp], row?.[user]) ?? EMPTY_DATA_PLACEHOLDER,
|
|
111
|
+
}));
|
|
112
|
+
const state = getStringifiedData(row?.Status);
|
|
113
|
+
|
|
114
|
+
const queryText = getStringifiedData(row?.Text);
|
|
86
115
|
let normalizedQueryText = trimOuterEmptyLines(queryText);
|
|
87
116
|
normalizedQueryText = stripIndentByFirstLine(normalizedQueryText);
|
|
88
117
|
|
|
89
|
-
const errorRaw =
|
|
118
|
+
const errorRaw = row?.Issues;
|
|
90
119
|
|
|
91
120
|
// We use custom error check, because error type can be non-standard
|
|
92
|
-
const errorData =
|
|
121
|
+
const errorData = parseIssuesData(errorRaw);
|
|
93
122
|
|
|
94
|
-
|
|
95
|
-
name: i18n('field_query-state'),
|
|
96
|
-
|
|
97
|
-
});
|
|
123
|
+
const stateItems: YDBDefinitionListItem[] = [
|
|
124
|
+
{name: i18n('field_query-state'), content: <StateLabel state={state} />},
|
|
125
|
+
];
|
|
98
126
|
|
|
99
127
|
if (errorData) {
|
|
100
128
|
info.push({
|
|
@@ -103,22 +131,39 @@ function prepareStreamingQueryItems(sysData?: IQueryResult) {
|
|
|
103
131
|
});
|
|
104
132
|
}
|
|
105
133
|
|
|
106
|
-
return {items: info, queryText: normalizedQueryText};
|
|
134
|
+
return {items: info, queryText: normalizedQueryText, createdContent, stateItems};
|
|
107
135
|
}
|
|
108
136
|
|
|
109
|
-
function
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
137
|
+
function formatLifecycleValue(
|
|
138
|
+
timestamp: string | number | null | undefined,
|
|
139
|
+
user: string | number | null | undefined,
|
|
140
|
+
fallback?: string | number,
|
|
141
|
+
) {
|
|
142
|
+
let milliseconds = NaN;
|
|
143
|
+
if (typeof timestamp === 'number') {
|
|
144
|
+
milliseconds = timestamp;
|
|
145
|
+
} else if (typeof timestamp === 'string') {
|
|
146
|
+
milliseconds = Date.parse(timestamp);
|
|
147
|
+
}
|
|
148
|
+
const dateMilliseconds =
|
|
149
|
+
Number.isFinite(milliseconds) && milliseconds > 0 ? milliseconds : Number(fallback);
|
|
150
|
+
const date =
|
|
151
|
+
Number.isFinite(dateMilliseconds) && dateMilliseconds > 0
|
|
152
|
+
? dateTimeParse(dateMilliseconds)?.format('YYYY-MM-DD HH:mm:ss')
|
|
153
|
+
: undefined;
|
|
154
|
+
|
|
155
|
+
if (!date && !user) {
|
|
156
|
+
return undefined;
|
|
117
157
|
}
|
|
118
158
|
|
|
119
|
-
if (
|
|
120
|
-
return
|
|
159
|
+
if (!user) {
|
|
160
|
+
return date;
|
|
121
161
|
}
|
|
122
162
|
|
|
123
|
-
return
|
|
163
|
+
return (
|
|
164
|
+
<React.Fragment>
|
|
165
|
+
{i18n('value_date-by-user', {date: date || EMPTY_DATA_PLACEHOLDER})}{' '}
|
|
166
|
+
<Label theme="normal">{String(user)}</Label>
|
|
167
|
+
</React.Fragment>
|
|
168
|
+
);
|
|
124
169
|
}
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"field_compression-groups": "Compression & families",
|
|
27
27
|
|
|
28
28
|
"value_ttl-config": "column: '{{columnName}}', expire after: {{expireTime}}",
|
|
29
|
+
"value_ttl-tiered-config": "column: '{{columnName}}'\n{{tiers}}",
|
|
30
|
+
"value_ttl-evict": "evict to: '{{storageName}}', after: {{expireTime}}",
|
|
31
|
+
"value_ttl-delete": "delete after: {{expireTime}}",
|
|
32
|
+
"value_ttl-unknown-action": "unknown action, after: {{expireTime}}",
|
|
29
33
|
"value_partitioning-by-size-enabled": "Enabled, split size: {{size}}",
|
|
30
34
|
"value_enabled": "Enabled",
|
|
31
35
|
"value_disabled": "Disabled",
|
|
@@ -42,7 +42,17 @@ export function prepareColumnTableGeneralInfo(columnTable: TColumnTableDescripti
|
|
|
42
42
|
if (columnTable.TtlSettings) {
|
|
43
43
|
const ttlInfo = prepareTTL(columnTable?.TtlSettings);
|
|
44
44
|
if (ttlInfo) {
|
|
45
|
-
left.push(
|
|
45
|
+
left.push({
|
|
46
|
+
...ttlInfo,
|
|
47
|
+
content: (
|
|
48
|
+
<span
|
|
49
|
+
style={{whiteSpace: 'break-spaces', wordBreak: 'break-word'}}
|
|
50
|
+
data-qa="table-ttl"
|
|
51
|
+
>
|
|
52
|
+
{ttlInfo.content}
|
|
53
|
+
</span>
|
|
54
|
+
),
|
|
55
|
+
});
|
|
46
56
|
}
|
|
47
57
|
}
|
|
48
58
|
|
|
@@ -66,7 +66,17 @@ export function prepareRowTableGeneralInfo(
|
|
|
66
66
|
if (TTLSettings) {
|
|
67
67
|
const ttlInfo = prepareTTL(TTLSettings);
|
|
68
68
|
if (ttlInfo) {
|
|
69
|
-
left.push(
|
|
69
|
+
left.push({
|
|
70
|
+
...ttlInfo,
|
|
71
|
+
content: (
|
|
72
|
+
<span
|
|
73
|
+
style={{whiteSpace: 'break-spaces', wordBreak: 'break-word'}}
|
|
74
|
+
data-qa="table-ttl"
|
|
75
|
+
>
|
|
76
|
+
{ttlInfo.content}
|
|
77
|
+
</span>
|
|
78
|
+
),
|
|
79
|
+
});
|
|
70
80
|
}
|
|
71
81
|
}
|
|
72
82
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {TColumnDataLifeCycle, TTTLSettings} from '../../../../../../types/api/schema';
|
|
2
|
+
import {EMPTY_DATA_PLACEHOLDER} from '../../../../../../utils/constants';
|
|
2
3
|
import {formatDurationToShortTimeFormat} from '../../../../../../utils/timeParsers';
|
|
3
4
|
import i18n from '../i18n';
|
|
4
5
|
|
|
@@ -8,11 +9,52 @@ import i18n from '../i18n';
|
|
|
8
9
|
* @returns Definition list item with TTL info, or undefined if TTL is not configured
|
|
9
10
|
*/
|
|
10
11
|
export function prepareTTL(ttl: TTTLSettings | TColumnDataLifeCycle) {
|
|
12
|
+
const enabled = ttl.Enabled;
|
|
13
|
+
if (!enabled?.ColumnName) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (enabled.Tiers?.length) {
|
|
18
|
+
const tiers = enabled.Tiers.flatMap((tier) => {
|
|
19
|
+
const seconds = tier.ApplyAfterSeconds;
|
|
20
|
+
if (seconds === undefined || !Number.isFinite(seconds) || seconds < 0) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const expireTime = formatDurationToShortTimeFormat(seconds * 1000, 1);
|
|
25
|
+
if (tier.EvictToExternalStorage) {
|
|
26
|
+
return [
|
|
27
|
+
i18n('value_ttl-evict', {
|
|
28
|
+
storageName: tier.EvictToExternalStorage.Storage || EMPTY_DATA_PLACEHOLDER,
|
|
29
|
+
expireTime,
|
|
30
|
+
}),
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
if (tier.Delete) {
|
|
34
|
+
return [i18n('value_ttl-delete', {expireTime})];
|
|
35
|
+
}
|
|
36
|
+
return [i18n('value_ttl-unknown-action', {expireTime})];
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Nonempty tiers supersede the legacy expiry, even if all delays are invalid.
|
|
40
|
+
if (!tiers.length) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
name: i18n('field_ttl-for-rows'),
|
|
46
|
+
content: i18n('value_ttl-tiered-config', {
|
|
47
|
+
columnName: enabled.ColumnName,
|
|
48
|
+
tiers: tiers.join('\n'),
|
|
49
|
+
}),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
11
53
|
// ExpireAfterSeconds could be 0
|
|
12
|
-
if (
|
|
54
|
+
if (enabled.ExpireAfterSeconds !== undefined) {
|
|
13
55
|
const value = i18n('value_ttl-config', {
|
|
14
|
-
columnName:
|
|
15
|
-
expireTime: formatDurationToShortTimeFormat(
|
|
56
|
+
columnName: enabled.ColumnName,
|
|
57
|
+
expireTime: formatDurationToShortTimeFormat(enabled.ExpireAfterSeconds * 1000, 1),
|
|
16
58
|
});
|
|
17
59
|
|
|
18
60
|
return {name: i18n('field_ttl-for-rows'), content: value};
|