ydb-embedded-ui 8.25.0 → 8.26.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/assets/icons/overview.svg +1 -0
- package/dist/components/CopyLinkButton/CopyLinkButton.d.ts +6 -0
- package/dist/components/CopyLinkButton/CopyLinkButton.js +33 -0
- package/dist/components/CopyLinkButton/CopyLinkButton.js.map +1 -0
- package/dist/components/CopyLinkButton/CopyLinkButton.scss +6 -0
- package/dist/components/CopyLinkButton/i18n/en.json +4 -0
- package/dist/components/CopyLinkButton/i18n/index.d.ts +2 -0
- package/dist/components/CopyLinkButton/i18n/index.js +5 -0
- package/dist/components/CopyLinkButton/i18n/index.js.map +1 -0
- package/dist/components/DebouncedInput/DebouncedTextInput.d.ts +6 -0
- package/dist/components/DebouncedInput/DebouncedTextInput.js +8 -0
- package/dist/components/DebouncedInput/DebouncedTextInput.js.map +1 -0
- package/dist/components/DoughnutMetrics/DoughnutMetrics.d.ts +3 -1
- package/dist/components/DoughnutMetrics/DoughnutMetrics.js +13 -12
- package/dist/components/DoughnutMetrics/DoughnutMetrics.js.map +1 -1
- package/dist/components/DoughnutMetrics/DoughnutMetrics.scss +14 -7
- package/dist/components/Drawer/Drawer.d.ts +30 -0
- package/dist/components/Drawer/Drawer.js +83 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/Drawer/Drawer.scss +38 -0
- package/dist/components/Drawer/DrawerContext.d.ts +13 -0
- package/dist/components/Drawer/DrawerContext.js +47 -0
- package/dist/components/Drawer/DrawerContext.js.map +1 -0
- package/dist/components/Drawer/index.d.ts +3 -0
- package/dist/components/Drawer/index.js +3 -0
- package/dist/components/Drawer/index.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.scss +3 -0
- package/dist/components/EntityStatusNew/EntityStatus.d.ts +23 -0
- package/dist/components/EntityStatusNew/EntityStatus.js +47 -0
- package/dist/components/EntityStatusNew/EntityStatus.js.map +1 -0
- package/dist/components/EntityStatusNew/EntityStatus.scss +10 -0
- package/dist/components/EntityStatusNew/i18n/en.json +14 -0
- package/dist/components/EntityStatusNew/i18n/index.d.ts +2 -0
- package/dist/components/EntityStatusNew/i18n/index.js +5 -0
- package/dist/components/EntityStatusNew/i18n/index.js.map +1 -0
- package/dist/components/EntityStatusNew/utils.d.ts +2 -0
- package/dist/components/EntityStatusNew/utils.js +23 -0
- package/dist/components/EntityStatusNew/utils.js.map +1 -0
- package/dist/components/JsonViewer/JsonViewer.d.ts +7 -3
- package/dist/components/JsonViewer/JsonViewer.js +11 -1
- package/dist/components/JsonViewer/JsonViewer.js.map +1 -1
- package/dist/components/JsonViewer/unipika/unipika.js +9 -1
- package/dist/components/JsonViewer/unipika/unipika.js.map +1 -1
- package/dist/components/MetricChart/getDefaultDataFormatter.js +4 -11
- package/dist/components/MetricChart/getDefaultDataFormatter.js.map +1 -1
- package/dist/components/MultilineTableHeader/MultilineTableHeader.d.ts +6 -0
- package/dist/components/MultilineTableHeader/MultilineTableHeader.js +11 -0
- package/dist/components/MultilineTableHeader/MultilineTableHeader.js.map +1 -0
- package/dist/components/MultilineTableHeader/MultilineTableHeader.scss +3 -0
- package/dist/components/PaginatedTable/PaginatedTable.d.ts +4 -2
- package/dist/components/PaginatedTable/PaginatedTable.js +16 -8
- package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
- package/dist/components/PaginatedTable/PaginatedTable.scss +32 -13
- package/dist/components/PaginatedTable/TableChunk.d.ts +4 -3
- package/dist/components/PaginatedTable/TableChunk.js +8 -3
- package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
- package/dist/components/PaginatedTable/TableHead.js +7 -1
- package/dist/components/PaginatedTable/TableHead.js.map +1 -1
- package/dist/components/PaginatedTable/types.d.ts +1 -0
- package/dist/components/PaginatedTable/useScrollBasedChunks.js +7 -0
- package/dist/components/PaginatedTable/useScrollBasedChunks.js.map +1 -1
- package/dist/components/Search/Search.d.ts +2 -1
- package/dist/components/Search/Search.js +3 -21
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/StatusIcon/StatusIcon.js +3 -1
- package/dist/components/StatusIcon/StatusIcon.js.map +1 -1
- package/dist/components/StatusIcon/StatusIcon.scss +6 -0
- package/dist/components/StatusIconNew/StatusIcon.d.ts +7 -0
- package/dist/components/StatusIconNew/StatusIcon.js +19 -0
- package/dist/components/StatusIconNew/StatusIcon.js.map +1 -0
- package/dist/components/SyntaxHighlighter/YDBSyntaxHighlighter.js +12 -1
- package/dist/components/SyntaxHighlighter/YDBSyntaxHighlighter.js.map +1 -1
- package/dist/components/Tags/Tags.d.ts +1 -3
- package/dist/components/Tags/Tags.js +3 -5
- package/dist/components/Tags/Tags.js.map +1 -1
- package/dist/components/nodesColumns/columns.js +1 -0
- package/dist/components/nodesColumns/columns.js.map +1 -1
- package/dist/containers/Cluster/Cluster.js +8 -6
- package/dist/containers/Cluster/Cluster.js.map +1 -1
- package/dist/containers/Cluster/Cluster.scss +7 -8
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.d.ts +4 -2
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js +27 -17
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.js.map +1 -1
- package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +2 -8
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.d.ts +8 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js +41 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.js.map +1 -0
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStats.scss +14 -0
- package/dist/containers/Cluster/ClusterInfo/utils/utils.d.ts +3 -0
- package/dist/containers/Cluster/ClusterInfo/utils/utils.js +21 -11
- package/dist/containers/Cluster/ClusterInfo/utils/utils.js.map +1 -1
- package/dist/containers/Cluster/{ClusterDashboard/ClusterDashboard.d.ts → ClusterOverview/ClusterOverview.d.ts} +6 -3
- package/dist/containers/Cluster/ClusterOverview/ClusterOverview.js +63 -0
- package/dist/containers/Cluster/ClusterOverview/ClusterOverview.js.map +1 -0
- package/dist/containers/Cluster/ClusterOverview/ClusterOverview.scss +70 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.d.ts +21 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.js +32 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCard.js.map +1 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCores.d.ts +5 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCores.js +30 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsCores.js.map +1 -0
- package/dist/containers/Cluster/{ClusterDashboard → ClusterOverview}/components/ClusterMetricsMemory.d.ts +1 -1
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsMemory.js +24 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsMemory.js.map +1 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsNetwork.d.ts +7 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsNetwork.js +28 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsNetwork.js.map +1 -0
- package/dist/containers/Cluster/{ClusterDashboard → ClusterOverview}/components/ClusterMetricsStorage.d.ts +2 -1
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsStorage.js +24 -0
- package/dist/containers/Cluster/ClusterOverview/components/ClusterMetricsStorage.js.map +1 -0
- package/dist/containers/Cluster/{ClusterDashboard → ClusterOverview}/shared.d.ts +6 -3
- package/dist/containers/Cluster/ClusterOverview/shared.js.map +1 -0
- package/dist/containers/Cluster/ClusterOverview/utils.d.ts +19 -0
- package/dist/containers/Cluster/ClusterOverview/utils.js +32 -0
- package/dist/containers/Cluster/ClusterOverview/utils.js.map +1 -0
- package/dist/containers/Cluster/i18n/en.json +19 -9
- package/dist/containers/Cluster/i18n/index.d.ts +1 -1
- package/dist/containers/Cluster/utils.d.ts +2 -4
- package/dist/containers/Cluster/utils.js +9 -6
- package/dist/containers/Cluster/utils.js.map +1 -1
- package/dist/containers/Header/breadcrumbs.js +1 -4
- package/dist/containers/Header/breadcrumbs.js.map +1 -1
- package/dist/containers/Nodes/NodesTable.js +2 -1
- package/dist/containers/Nodes/NodesTable.js.map +1 -1
- package/dist/containers/Nodes/shared.d.ts +1 -2
- package/dist/containers/Nodes/shared.js +0 -9
- package/dist/containers/Nodes/shared.js.map +1 -1
- package/dist/containers/Storage/EmptyFilter/EmptyFilter.d.ts +2 -1
- package/dist/containers/Storage/EmptyFilter/EmptyFilter.js +1 -1
- package/dist/containers/Storage/EmptyFilter/EmptyFilter.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/PDisk.scss +5 -1
- package/dist/containers/Storage/PaginatedStorageGroups.js +2 -1
- package/dist/containers/Storage/PaginatedStorageGroups.js.map +1 -1
- package/dist/containers/Storage/PaginatedStorageNodes.js +19 -5
- package/dist/containers/Storage/PaginatedStorageNodes.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.d.ts +4 -3
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js +2 -2
- package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/StorageNodesColumns.scss +1 -4
- package/dist/containers/Storage/StorageNodes/columns/columns.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/columns/columns.js +6 -11
- package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/hooks.d.ts +1 -1
- package/dist/containers/Storage/StorageNodes/columns/hooks.js +8 -3
- package/dist/containers/Storage/StorageNodes/columns/hooks.js.map +1 -1
- package/dist/containers/Storage/StorageNodes/columns/types.d.ts +5 -0
- package/dist/containers/Storage/StorageNodes/getNodes.js +1 -0
- package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
- package/dist/containers/Storage/shared.d.ts +0 -2
- package/dist/containers/Storage/shared.js +0 -9
- package/dist/containers/Storage/shared.js.map +1 -1
- package/dist/containers/Storage/types.d.ts +8 -0
- package/dist/containers/Storage/utils/index.d.ts +1 -0
- package/dist/containers/Storage/utils/index.js +1 -0
- package/dist/containers/Storage/utils/index.js.map +1 -1
- package/dist/containers/Storage/utils/useStorageColumnsSettings.d.ts +6 -0
- package/dist/containers/Storage/utils/useStorageColumnsSettings.js +35 -0
- package/dist/containers/Storage/utils/useStorageColumnsSettings.js.map +1 -0
- package/dist/containers/Tablet/components/TabletInfo/i18n/index.d.ts +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js +16 -17
- package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +8 -2
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.d.ts +6 -33
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js +40 -6
- package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Headers/Headers.d.ts +0 -5
- package/dist/containers/Tenant/Diagnostics/Partitions/Headers/Headers.js +0 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Headers/Headers.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Headers/Headers.scss +0 -4
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +2 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.scss +1 -15
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.js +24 -10
- package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js +2 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +3 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/columns/columns.js +7 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/columns/columns.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/columns/constants.js +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/columns/constants.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useRunningQueriesSort.d.ts +9 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useRunningQueriesSort.js +37 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useRunningQueriesSort.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSortParam.d.ts +10 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSortParam.js +50 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useSortParam.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useTopQueriesSort.d.ts +9 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useTopQueriesSort.js +40 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/hooks/useTopQueriesSort.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils.d.ts +0 -10
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js +0 -29
- package/dist/containers/Tenant/Diagnostics/TopQueries/utils.js.map +1 -1
- package/dist/containers/Tenant/Diagnostics/TopicData/FullValue.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/FullValue.js +14 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/FullValue.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/TopicData.d.ts +9 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/TopicData.js +140 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/TopicData.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/TopicData.scss +28 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/TopicDataControls/TopicDataControls.d.ts +14 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/TopicDataControls/TopicDataControls.js +68 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/TopicDataControls/TopicDataControls.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/__test__/getData.test.d.ts +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/__test__/getData.test.js +122 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/__test__/getData.test.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/columns/Columns.scss +22 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/columns/columns.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/columns/columns.js +154 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/columns/columns.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/getData.d.ts +15 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/getData.js +54 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/getData.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/i18n/en.json +28 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/i18n/index.d.ts +2 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/i18n/index.js +5 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/i18n/index.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/useTopicDataQueryParams.d.ts +11 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/useTopicDataQueryParams.js +34 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/useTopicDataQueryParams.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/utils/constants.d.ts +7 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/utils/constants.js +51 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/utils/constants.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/utils/types.d.ts +30 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/utils/types.js +30 -0
- package/dist/containers/Tenant/Diagnostics/TopicData/utils/types.js.map +1 -0
- package/dist/containers/Tenant/ObjectSummary/ObjectTree.js +8 -2
- package/dist/containers/Tenant/ObjectSummary/ObjectTree.js.map +1 -1
- package/dist/containers/Tenant/TenantPages.d.ts +2 -1
- package/dist/containers/Tenant/TenantPages.js.map +1 -1
- package/dist/containers/Tenant/utils/schema.d.ts +1 -0
- package/dist/containers/Tenant/utils/schema.js +1 -0
- package/dist/containers/Tenant/utils/schema.js.map +1 -1
- package/dist/containers/Tenants/Tenants.js +1 -1
- package/dist/containers/Tenants/Tenants.js.map +1 -1
- package/dist/containers/Tenants/Tenants.scss +0 -4
- package/dist/containers/UserSettings/i18n/en.json +1 -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 +11 -2
- package/dist/containers/UserSettings/settings.js.map +1 -1
- package/dist/services/api/viewer.d.ts +2 -1
- package/dist/services/api/viewer.js +6 -0
- package/dist/services/api/viewer.js.map +1 -1
- package/dist/services/settings.d.ts +2 -0
- package/dist/services/settings.js +3 -1
- package/dist/services/settings.js.map +1 -1
- package/dist/store/reducers/capabilities/hooks.d.ts +1 -0
- package/dist/store/reducers/capabilities/hooks.js +3 -0
- package/dist/store/reducers/capabilities/hooks.js.map +1 -1
- package/dist/store/reducers/cluster/cluster.js +1 -1
- package/dist/store/reducers/cluster/cluster.js.map +1 -1
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js +4 -2
- package/dist/store/reducers/executeTopQueries/executeTopQueries.js.map +1 -1
- package/dist/store/reducers/storage/types.d.ts +6 -2
- package/dist/store/reducers/storage/utils.d.ts +2 -2
- package/dist/store/reducers/storage/utils.js +10 -9
- package/dist/store/reducers/storage/utils.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/store/reducers/topic.d.ts +12 -0
- package/dist/store/reducers/topic.js +16 -0
- package/dist/store/reducers/topic.js.map +1 -1
- package/dist/styles/mixins.scss +0 -20
- package/dist/types/api/capabilities.d.ts +1 -1
- package/dist/types/api/cluster.d.ts +8 -1
- package/dist/types/api/cluster.js +7 -3
- package/dist/types/api/cluster.js.map +1 -1
- package/dist/types/api/topic.d.ts +117 -0
- package/dist/utils/constants.d.ts +2 -0
- package/dist/utils/constants.js +2 -0
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/dataFormatters/dataFormatters.js +1 -1
- package/dist/utils/dataFormatters/dataFormatters.js.map +1 -1
- package/dist/utils/hooks/useDebouncedValue.d.ts +5 -0
- package/dist/utils/hooks/useDebouncedValue.js +22 -0
- package/dist/utils/hooks/useDebouncedValue.js.map +1 -0
- package/dist/utils/renderPaginatedTableErrorMessage.d.ts +2 -0
- package/dist/utils/renderPaginatedTableErrorMessage.js +10 -0
- package/dist/utils/renderPaginatedTableErrorMessage.js.map +1 -0
- package/dist/utils/utils.d.ts +1 -0
- package/dist/utils/utils.js +7 -0
- package/dist/utils/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/icons/user-check.svg +0 -1
- package/dist/components/Tag/Tag.d.ts +0 -9
- package/dist/components/Tag/Tag.js +0 -8
- package/dist/components/Tag/Tag.js.map +0 -1
- package/dist/components/Tag/Tag.scss +0 -18
- package/dist/components/Tag/index.d.ts +0 -1
- package/dist/components/Tag/index.js +0 -2
- package/dist/components/Tag/index.js.map +0 -1
- package/dist/containers/Cluster/ClusterDashboard/ClusterDashboard.js +0 -71
- package/dist/containers/Cluster/ClusterDashboard/ClusterDashboard.js.map +0 -1
- package/dist/containers/Cluster/ClusterDashboard/ClusterDashboard.scss +0 -52
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCard.d.ts +0 -17
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCard.js +0 -20
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCard.js.map +0 -1
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.d.ts +0 -5
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.js +0 -26
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsCores.js.map +0 -1
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsMemory.js +0 -20
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsMemory.js.map +0 -1
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsStorage.js +0 -20
- package/dist/containers/Cluster/ClusterDashboard/components/ClusterMetricsStorage.js.map +0 -1
- package/dist/containers/Cluster/ClusterDashboard/shared.js.map +0 -1
- package/dist/containers/Cluster/ClusterDashboard/utils.d.ts +0 -19
- package/dist/containers/Cluster/ClusterDashboard/utils.js +0 -63
- package/dist/containers/Cluster/ClusterDashboard/utils.js.map +0 -1
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.d.ts +0 -8
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.js +0 -42
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.js.map +0 -1
- package/dist/containers/Cluster/ClusterInfo/components/DiskGroupsStatsBars/DiskGroupsStatsBars.scss +0 -6
- package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.d.ts +0 -8
- package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.js +0 -8
- package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.js.map +0 -1
- package/dist/containers/Cluster/ClusterInfo/components/NodesState/NodesState.scss +0 -17
- /package/dist/containers/Cluster/{ClusterDashboard → ClusterOverview}/shared.js +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
<svg viewBox="0 0 16 15" ><path fill-rule="evenodd" clip-rule="evenodd" d="M14.9801 1.82618C15.2983 1.56101 15.3413 1.08809 15.0762 0.769881C14.811 0.451673 14.3381 0.40868 14.0199 0.673853L10.3757 3.71062C10.0432 3.98775 9.59091 4.07309 9.18023 3.93619L7.02502 3.21779C5.95599 2.86145 4.77774 3.19335 4.05189 4.0553L0.926317 7.76692C0.659507 8.08375 0.700062 8.55689 1.0169 8.8237C1.33373 9.09051 1.80687 9.04996 2.07368 8.73312L5.19926 5.0215C5.52919 4.62971 6.06476 4.47884 6.55068 4.64082L8.70589 5.35922C9.60939 5.66039 10.6044 5.47264 11.336 4.86295L14.9801 1.82618ZM13.5 8.00002H11.5C11.2239 8.00002 11 8.22388 11 8.50002V10.5V13C11 13.2762 11.2239 13.5 11.5 13.5H13H13.5C13.7761 13.5 14 13.2762 14 13V8.50002C14 8.22388 13.7761 8.00002 13.5 8.00002ZM9.5 13C9.5 13.2762 9.27614 13.5 9 13.5H7C6.72386 13.5 6.5 13.2762 6.5 13V12.5V10.5C6.5 10.2239 6.72386 10 7 10H9C9.27614 10 9.5 10.2239 9.5 10.5V13ZM5 13C5 13.2762 4.77614 13.5 4.5 13.5H3.5H2.5C2.22386 13.5 2 13.2762 2 13V12.5C2 12.2239 2.22386 12 2.5 12H4.5C4.77614 12 5 12.2239 5 12.5V13ZM2.5 15H3.5H4.5H7H9H11.5H13H13.5C14.6046 15 15.5 14.1046 15.5 13V8.50002C15.5 7.39545 14.6046 6.50002 13.5 6.50002H11.5C10.3954 6.50002 9.5 7.39545 9.5 8.50002V8.56303C9.34019 8.5219 9.17265 8.50002 9 8.50002H7C5.89543 8.50002 5 9.39545 5 10.5V10.563C4.84019 10.5219 4.67265 10.5 4.5 10.5H2.5C1.39543 10.5 0.5 11.3954 0.5 12.5V13C0.5 14.1046 1.39543 15 2.5 15Z" fill="currentColor" /></svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { ButtonProps } from '@gravity-ui/uikit';
|
2
|
+
import './CopyLinkButton.scss';
|
3
|
+
export interface CopyLinkButtonProps extends ButtonProps {
|
4
|
+
text: string;
|
5
|
+
}
|
6
|
+
export declare function CopyLinkButton(props: CopyLinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { Link } from '@gravity-ui/icons';
|
4
|
+
import { ActionTooltip, Button, CopyToClipboard, Icon } from '@gravity-ui/uikit';
|
5
|
+
import { cn } from '../../utils/cn';
|
6
|
+
import i18n from './i18n';
|
7
|
+
import './CopyLinkButton.scss';
|
8
|
+
const b = cn('ydb-copy-link-button');
|
9
|
+
const DEFAULT_TIMEOUT = 1200;
|
10
|
+
const TOOLTIP_ANIMATION = 200;
|
11
|
+
const LinkButtonComponent = (props) => {
|
12
|
+
const { size = 'm', hasTooltip = true, status, closeDelay, title, ...rest } = props;
|
13
|
+
const baseTitle = title !== null && title !== void 0 ? title : i18n('description_copy');
|
14
|
+
return (_jsx(ActionTooltip, { title: status === 'success' ? i18n('description_copied') : baseTitle, disabled: !hasTooltip, closeDelay: closeDelay, children: _jsx(Button, { view: "flat", size: size, ...rest, children: _jsx(Button.Icon, { className: b('icon'), children: _jsx(Icon, { data: Link, size: 16 }) }) }) }));
|
15
|
+
};
|
16
|
+
export function CopyLinkButton(props) {
|
17
|
+
const { text, ...buttonProps } = props;
|
18
|
+
const timerIdRef = React.useRef();
|
19
|
+
const [tooltipCloseDelay, setTooltipCloseDelay] = React.useState(undefined);
|
20
|
+
const [tooltipDisabled, setTooltipDisabled] = React.useState(false);
|
21
|
+
const timeout = DEFAULT_TIMEOUT;
|
22
|
+
React.useEffect(() => window.clearTimeout(timerIdRef.current), []);
|
23
|
+
const handleCopy = React.useCallback(() => {
|
24
|
+
setTooltipDisabled(false);
|
25
|
+
setTooltipCloseDelay(timeout);
|
26
|
+
window.clearTimeout(timerIdRef.current);
|
27
|
+
timerIdRef.current = window.setTimeout(() => {
|
28
|
+
setTooltipDisabled(true);
|
29
|
+
}, timeout - TOOLTIP_ANIMATION);
|
30
|
+
}, [timeout]);
|
31
|
+
return (_jsx(CopyToClipboard, { text: text, timeout: timeout, onCopy: handleCopy, children: (status) => (_jsx(LinkButtonComponent, { ...buttonProps, closeDelay: tooltipCloseDelay, hasTooltip: !tooltipDisabled, status: status })) }));
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=CopyLinkButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CopyLinkButton.js","sourceRoot":"","sources":["../../../src/components/CopyLinkButton/CopyLinkButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,aAAa,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,OAAO,uBAAuB,CAAC;AAE/B,MAAM,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,CAAC;AAUrC,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAE,EAAE;IAC5D,MAAM,EAAC,IAAI,GAAG,GAAG,EAAE,UAAU,GAAG,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,EAAC,GAAG,KAAK,CAAC;IAElF,MAAM,SAAS,GAAG,K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C;QAExC,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YACxC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACH,KAAC,eAAe,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,YAC5D,CAAC,MAAM,EAAE,EAAE,CAAC,CACT,KAAC,mBAAmB,OACZ,WAAW,EACf,UAAU,EAAE,iBAAiB,EAC7B,UAAU,EAAE,CAAC,eAAe,EAC5B,MAAM,EAAE,MAAM,GAChB,CACL,GACa,CACrB,CAAC;AACN,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/CopyLinkButton/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3B,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAEzC,eAAe,eAAe,CAAC,SAAS,EAAE,EAAC,EAAE,EAAC,CAAC,CAAC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { TextInputProps } from '@gravity-ui/uikit';
|
2
|
+
interface DebouncedInputProps extends TextInputProps {
|
3
|
+
debounce?: number;
|
4
|
+
}
|
5
|
+
export declare const DebouncedInput: ({ onUpdate, value, debounce, ...rest }: DebouncedInputProps) => import("react/jsx-runtime").JSX.Element;
|
6
|
+
export {};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { TextInput } from '@gravity-ui/uikit';
|
3
|
+
import { useDebouncedValue } from '../../utils/hooks/useDebouncedValue';
|
4
|
+
export const DebouncedInput = ({ onUpdate, value = '', debounce = 200, ...rest }) => {
|
5
|
+
const [currentValue, handleUpdate] = useDebouncedValue({ value, onUpdate, debounce });
|
6
|
+
return _jsx(TextInput, { value: currentValue, onUpdate: handleUpdate, ...rest });
|
7
|
+
};
|
8
|
+
//# sourceMappingURL=DebouncedTextInput.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DebouncedTextInput.js","sourceRoot":"","sources":["../../../src/components/DebouncedInput/DebouncedTextInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,iBAAiB,EAAC,MAAM,qCAAqC,CAAC;AAMtE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC3B,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,QAAQ,GAAG,GAAG,EACd,GAAG,IAAI,EACW,EAAE,EAAE;IACtB,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,iBAAiB,CAAS,EAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAC,CAAC,CAAC;IAE5F,OAAO,KAAC,SAAS,IAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,KAAM,IAAI,GAAI,CAAC;AAChF,CAAC,CAAC"}
|
@@ -5,6 +5,8 @@ import './DoughnutMetrics.scss';
|
|
5
5
|
interface LegendProps {
|
6
6
|
children?: React.ReactNode;
|
7
7
|
variant?: TextProps['variant'];
|
8
|
+
color?: TextProps['color'];
|
9
|
+
note?: React.ReactNode;
|
8
10
|
}
|
9
11
|
interface DoughnutProps {
|
10
12
|
status: ProgressStatus;
|
@@ -14,7 +16,7 @@ interface DoughnutProps {
|
|
14
16
|
}
|
15
17
|
export declare function DoughnutMetrics({ status, fillWidth, children, className }: DoughnutProps): import("react/jsx-runtime").JSX.Element;
|
16
18
|
export declare namespace DoughnutMetrics {
|
17
|
-
var Legend: ({ children, variant }: LegendProps) => import("react/jsx-runtime").JSX.Element;
|
19
|
+
var Legend: ({ children, variant, color, note }: LegendProps) => import("react/jsx-runtime").JSX.Element;
|
18
20
|
var Value: ({ children, variant }: LegendProps) => import("react/jsx-runtime").JSX.Element;
|
19
21
|
}
|
20
22
|
export {};
|
@@ -1,24 +1,25 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { Text } from '@gravity-ui/uikit';
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Flex, HelpMark, Text } from '@gravity-ui/uikit';
|
3
3
|
import { cn } from '../../utils/cn';
|
4
4
|
import './DoughnutMetrics.scss';
|
5
5
|
const b = cn('ydb-doughnut-metrics');
|
6
|
-
function Legend({ children, variant = 'subheader-3' }) {
|
7
|
-
return (_jsx(Text, { variant: variant, color: "
|
6
|
+
function Legend({ children, variant = 'subheader-3', color = 'primary', note }) {
|
7
|
+
return (_jsxs(Flex, { gap: 1, alignItems: "center", children: [_jsx(Text, { variant: variant, color: color, className: b('legend'), as: "div", children: children }), note && _jsx(HelpMark, { className: b('legend-note'), children: note })] }));
|
8
8
|
}
|
9
9
|
function Value({ children, variant = 'subheader-2' }) {
|
10
|
-
return (_jsx(Text, { variant: variant,
|
10
|
+
return (_jsx(Text, { variant: variant, className: b('value'), children: children }));
|
11
11
|
}
|
12
12
|
export function DoughnutMetrics({ status, fillWidth, children, className }) {
|
13
|
-
let
|
14
|
-
let
|
15
|
-
|
16
|
-
|
17
|
-
filledDegrees
|
13
|
+
let filledDegrees = fillWidth * 3.6;
|
14
|
+
let doughnutFillVar = 'var(--doughnut-color)';
|
15
|
+
let doughnutBackdropVar = 'var(--doughnut-backdrop-color)';
|
16
|
+
if (filledDegrees > 360) {
|
17
|
+
filledDegrees -= 360;
|
18
|
+
doughnutBackdropVar = 'var(--doughnut-color)';
|
19
|
+
doughnutFillVar = 'var(--doughnut-overlap-color)';
|
18
20
|
}
|
19
|
-
const gradientDegrees = filledDegrees;
|
20
21
|
return (_jsx("div", { className: b(null, className), children: _jsx("div", { style: {
|
21
|
-
|
22
|
+
background: `conic-gradient(${doughnutFillVar} 0deg ${filledDegrees}deg, ${doughnutBackdropVar} ${filledDegrees}deg 360deg)`,
|
22
23
|
}, className: b('doughnut', { status }), children: _jsx("div", { className: b('text-wrapper'), children: children }) }) }));
|
23
24
|
}
|
24
25
|
DoughnutMetrics.Legend = Legend;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DoughnutMetrics.js","sourceRoot":"","sources":["../../../src/components/DoughnutMetrics/DoughnutMetrics.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"DoughnutMetrics.js","sourceRoot":"","sources":["../../../src/components/DoughnutMetrics/DoughnutMetrics.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAGlC,OAAO,wBAAwB,CAAC;AAEhC,MAAM,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,CAAC;AASrC,SAAS,MAAM,CAAC,EAAC,QAAQ,EAAE,OAAO,GAAG,aAAa,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,EAAc;IACrF,OAAO,CACH,MAAC,IAAI,IAAC,GAAG,EAAE,CAAC,EAAE,UAAU,EAAC,QAAQ,aAC7B,KAAC,IAAI,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAC,KAAK,YACjE,QAAQ,GACN,EACN,IAAI,IAAI,KAAC,QAAQ,IAAC,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,YAAG,IAAI,GAAY,IAC9D,CACV,CAAC;AACN,CAAC;AACD,SAAS,KAAK,CAAC,EAAC,QAAQ,EAAE,OAAO,GAAG,aAAa,EAAc;IAC3D,OAAO,CACH,KAAC,IAAI,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YACxC,QAAQ,GACN,CACV,CAAC;AACN,CAAC;AASD,MAAM,UAAU,eAAe,CAAC,EAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAgB;IACnF,IAAI,aAAa,GAAG,SAAS,GAAG,GAAG,CAAC;IACpC,IAAI,eAAe,GAAG,uBAAuB,CAAC;IAC9C,IAAI,mBAAmB,GAAG,gCAAgC,CAAC;IAE3D,IAAI,aAAa,GAAG,GAAG,EAAE,CAAC;QACtB,aAAa,IAAI,GAAG,CAAC;QACrB,mBAAmB,GAAG,uBAAuB,CAAC;QAC9C,eAAe,GAAG,+BAA+B,CAAC;IACtD,CAAC;IAED,OAAO,CACH,cAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,YAC9B,cACI,KAAK,EAAE;gBACH,UAAU,EAAE,kBAAkB,eAAe,SAAS,aAAa,QAAQ,mBAAmB,IAAI,aAAa,aAAa;aAC/H,EACD,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE,EAAC,MAAM,EAAC,CAAC,YAElC,cAAK,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,YAAG,QAAQ,GAAO,GACjD,GACJ,CACT,CAAC;AACN,CAAC;AAED,eAAe,CAAC,MAAM,GAAG,MAAM,CAAC;AAChC,eAAe,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
@@ -1,14 +1,17 @@
|
|
1
1
|
.ydb-doughnut-metrics {
|
2
|
-
--doughnut-border:
|
2
|
+
--doughnut-border: 16px;
|
3
3
|
--doughnut-color: var(--ydb-color-status-green);
|
4
|
+
--doughnut-backdrop-color: var(--g-color-base-positive-light);
|
5
|
+
--doughnut-overlap-color: var(--g-color-base-positive-heavy-hover);
|
4
6
|
&__doughnut {
|
5
7
|
position: relative;
|
6
8
|
|
7
|
-
width:
|
9
|
+
width: 100px;
|
8
10
|
aspect-ratio: 1;
|
9
11
|
|
10
12
|
border-radius: 50%;
|
11
|
-
|
13
|
+
|
14
|
+
transform: rotate(180deg);
|
12
15
|
&::before {
|
13
16
|
display: block;
|
14
17
|
|
@@ -25,9 +28,13 @@
|
|
25
28
|
}
|
26
29
|
&__doughnut_status_warning {
|
27
30
|
--doughnut-color: var(--ydb-color-status-yellow);
|
31
|
+
--doughnut-backdrop-color: var(--g-color-base-warning-light);
|
32
|
+
--doughnut-overlap-color: var(--g-color-base-warning-heavy-hover);
|
28
33
|
}
|
29
34
|
&__doughnut_status_danger {
|
30
35
|
--doughnut-color: var(--ydb-color-status-red);
|
36
|
+
--doughnut-backdrop-color: var(--g-color-base-danger-light);
|
37
|
+
--doughnut-overlap-color: var(--g-color-base-danger-heavy-hover);
|
31
38
|
}
|
32
39
|
&__text-wrapper {
|
33
40
|
--wrapper-indent: calc(var(--doughnut-border) + 5px);
|
@@ -44,15 +51,15 @@
|
|
44
51
|
width: calc(100% - calc(var(--wrapper-indent) * 2));
|
45
52
|
|
46
53
|
text-align: center;
|
54
|
+
|
55
|
+
transform: rotate(180deg);
|
47
56
|
aspect-ratio: 1;
|
48
57
|
}
|
49
58
|
&__value {
|
50
59
|
position: absolute;
|
51
60
|
bottom: 20px;
|
52
61
|
}
|
53
|
-
&__legend {
|
54
|
-
|
55
|
-
|
56
|
-
white-space: pre-wrap;
|
62
|
+
&__legend-note {
|
63
|
+
display: flex;
|
57
64
|
}
|
58
65
|
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './Drawer.scss';
|
3
|
+
type DrawerControl = {
|
4
|
+
type: 'close';
|
5
|
+
} | {
|
6
|
+
type: 'copyLink';
|
7
|
+
link: string;
|
8
|
+
} | {
|
9
|
+
type: 'custom';
|
10
|
+
node: React.ReactNode;
|
11
|
+
key: string;
|
12
|
+
};
|
13
|
+
interface DrawerPaneProps {
|
14
|
+
children: React.ReactNode;
|
15
|
+
renderDrawerContent: () => React.ReactNode;
|
16
|
+
isDrawerVisible: boolean;
|
17
|
+
onCloseDrawer: () => void;
|
18
|
+
drawerId?: string;
|
19
|
+
storageKey?: string;
|
20
|
+
defaultWidth?: number;
|
21
|
+
direction?: 'left' | 'right';
|
22
|
+
className?: string;
|
23
|
+
detectClickOutside?: boolean;
|
24
|
+
isPercentageWidth?: boolean;
|
25
|
+
drawerControls?: DrawerControl[];
|
26
|
+
title?: React.ReactNode;
|
27
|
+
headerClassName?: string;
|
28
|
+
}
|
29
|
+
export declare const DrawerWrapper: ({ children, renderDrawerContent, isDrawerVisible, onCloseDrawer, drawerId, storageKey, defaultWidth, direction, className, detectClickOutside, isPercentageWidth, drawerControls, title, headerClassName, }: DrawerPaneProps) => import("react/jsx-runtime").JSX.Element;
|
30
|
+
export {};
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { Xmark } from '@gravity-ui/icons';
|
4
|
+
import { DrawerItem, Drawer as GravityDrawer } from '@gravity-ui/navigation';
|
5
|
+
import { ActionTooltip, Button, Flex, Icon, Text } from '@gravity-ui/uikit';
|
6
|
+
import { cn } from '../../utils/cn';
|
7
|
+
import { isNumeric } from '../../utils/utils';
|
8
|
+
import { CopyLinkButton } from '../CopyLinkButton/CopyLinkButton';
|
9
|
+
import { useDrawerContext } from './DrawerContext';
|
10
|
+
const DEFAULT_DRAWER_WIDTH_PERCENTS = 60;
|
11
|
+
const DEFAULT_DRAWER_WIDTH = 600;
|
12
|
+
const DRAWER_WIDTH_KEY = 'drawer-width';
|
13
|
+
const b = cn('ydb-drawer');
|
14
|
+
import './Drawer.scss';
|
15
|
+
const DrawerPaneContentWrapper = ({ isVisible, onClose, children, drawerId = 'drawer', storageKey = DRAWER_WIDTH_KEY, defaultWidth, direction = 'right', className, detectClickOutside = false, isPercentageWidth, }) => {
|
16
|
+
const [drawerWidth, setDrawerWidth] = React.useState(() => {
|
17
|
+
const savedWidth = localStorage.getItem(storageKey);
|
18
|
+
return isNumeric(savedWidth) ? Number(savedWidth) : defaultWidth;
|
19
|
+
});
|
20
|
+
const drawerRef = React.useRef(null);
|
21
|
+
const { containerWidth } = useDrawerContext();
|
22
|
+
// Calculate drawer width based on container width percentage if specified
|
23
|
+
const calculatedWidth = React.useMemo(() => {
|
24
|
+
if (isPercentageWidth && containerWidth > 0) {
|
25
|
+
return Math.round((containerWidth * (drawerWidth || DEFAULT_DRAWER_WIDTH_PERCENTS)) / 100);
|
26
|
+
}
|
27
|
+
return drawerWidth || DEFAULT_DRAWER_WIDTH;
|
28
|
+
}, [containerWidth, isPercentageWidth, drawerWidth]);
|
29
|
+
React.useEffect(() => {
|
30
|
+
if (!detectClickOutside) {
|
31
|
+
return undefined;
|
32
|
+
}
|
33
|
+
const handleClickOutside = (event) => {
|
34
|
+
if (isVisible &&
|
35
|
+
drawerRef.current &&
|
36
|
+
!drawerRef.current.contains(event.target)) {
|
37
|
+
onClose();
|
38
|
+
}
|
39
|
+
};
|
40
|
+
document.addEventListener('click', handleClickOutside);
|
41
|
+
return () => {
|
42
|
+
document.removeEventListener('click', handleClickOutside);
|
43
|
+
};
|
44
|
+
}, [isVisible, onClose, detectClickOutside]);
|
45
|
+
const handleResizeDrawer = (width) => {
|
46
|
+
if (isPercentageWidth && containerWidth > 0) {
|
47
|
+
const percentageWidth = Math.round((width / containerWidth) * 100);
|
48
|
+
setDrawerWidth(percentageWidth);
|
49
|
+
localStorage.setItem(storageKey, percentageWidth.toString());
|
50
|
+
}
|
51
|
+
else {
|
52
|
+
setDrawerWidth(width);
|
53
|
+
localStorage.setItem(storageKey, width.toString());
|
54
|
+
}
|
55
|
+
};
|
56
|
+
return (_jsx(GravityDrawer, { onEscape: onClose, onVeilClick: onClose, hideVeil: true, className: b('container', className), children: _jsx(DrawerItem, { id: drawerId, visible: isVisible, resizable: true, maxResizeWidth: containerWidth, width: isPercentageWidth ? calculatedWidth : drawerWidth, onResize: handleResizeDrawer, direction: direction, className: b('item'), ref: detectClickOutside ? drawerRef : undefined, children: children }) }));
|
57
|
+
};
|
58
|
+
export const DrawerWrapper = ({ children, renderDrawerContent, isDrawerVisible, onCloseDrawer, drawerId, storageKey, defaultWidth, direction, className, detectClickOutside, isPercentageWidth, drawerControls = [], title, headerClassName, }) => {
|
59
|
+
React.useEffect(() => {
|
60
|
+
return () => {
|
61
|
+
onCloseDrawer();
|
62
|
+
};
|
63
|
+
}, [onCloseDrawer]);
|
64
|
+
const renderDrawerHeader = () => {
|
65
|
+
const controls = [];
|
66
|
+
for (const control of drawerControls) {
|
67
|
+
switch (control.type) {
|
68
|
+
case 'close':
|
69
|
+
controls.push(_jsx(ActionTooltip, { title: "Close", children: _jsx(Button, { view: "flat", onClick: onCloseDrawer, children: _jsx(Icon, { data: Xmark, size: 16 }) }) }, "close"));
|
70
|
+
break;
|
71
|
+
case 'copyLink':
|
72
|
+
controls.push(_jsx(CopyLinkButton, { text: control.link }, "copyLink"));
|
73
|
+
break;
|
74
|
+
case 'custom':
|
75
|
+
controls.push(_jsx(React.Fragment, { children: control.node }, control.key));
|
76
|
+
break;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
return (_jsxs(Flex, { justifyContent: "space-between", className: b('header-wrapper', headerClassName), children: [_jsx(Text, { variant: "subheader-2", children: title }), _jsx(Flex, { className: b('controls'), children: controls })] }));
|
80
|
+
};
|
81
|
+
return (_jsxs(React.Fragment, { children: [children, _jsx(DrawerPaneContentWrapper, { isVisible: isDrawerVisible, onClose: onCloseDrawer, drawerId: drawerId, storageKey: storageKey, defaultWidth: defaultWidth, direction: direction, className: className, detectClickOutside: detectClickOutside, isPercentageWidth: isPercentageWidth, children: _jsxs("div", { className: b('content-wrapper'), children: [renderDrawerHeader(), renderDrawerContent()] }) })] }));
|
82
|
+
};
|
83
|
+
//# sourceMappingURL=Drawer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRo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a,EACtB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,iBAAiB,EAAE,iBAAiB,YAEpC,eAAK,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,aAC/B,kBAAkB,EAAE,EACpB,mBAAmB,EAAE,IACpB,GACiB,IACd,CACpB,CAAC;AACN,CAAC,CAAC"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
.ydb-drawer {
|
2
|
+
&__drawer-container {
|
3
|
+
position: relative;
|
4
|
+
|
5
|
+
overflow: hidden;
|
6
|
+
|
7
|
+
height: 100%;
|
8
|
+
}
|
9
|
+
|
10
|
+
&__item {
|
11
|
+
z-index: 4;
|
12
|
+
|
13
|
+
height: 100%;
|
14
|
+
}
|
15
|
+
|
16
|
+
&__controls {
|
17
|
+
margin-left: auto;
|
18
|
+
}
|
19
|
+
|
20
|
+
&__header-wrapper {
|
21
|
+
position: sticky;
|
22
|
+
z-index: 3;
|
23
|
+
top: 0;
|
24
|
+
left: 0;
|
25
|
+
|
26
|
+
padding: var(--g-spacing-4) var(--g-spacing-4) 0 var(--g-spacing-6);
|
27
|
+
|
28
|
+
background-color: var(--g-color-base-background);
|
29
|
+
}
|
30
|
+
|
31
|
+
&__content-wrapper {
|
32
|
+
display: flex;
|
33
|
+
overflow: auto;
|
34
|
+
flex-direction: column;
|
35
|
+
|
36
|
+
height: 100%;
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './Drawer.scss';
|
3
|
+
export interface DrawerContextType {
|
4
|
+
containerWidth: number;
|
5
|
+
setContainerWidth: React.Dispatch<React.SetStateAction<number>>;
|
6
|
+
}
|
7
|
+
interface DrawerContextProviderProps {
|
8
|
+
children: React.ReactNode;
|
9
|
+
className?: string;
|
10
|
+
}
|
11
|
+
export declare const DrawerContextProvider: ({ children, className }: DrawerContextProviderProps) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
export declare const useDrawerContext: () => DrawerContextType;
|
13
|
+
export {};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { cn } from '../../utils/cn';
|
4
|
+
import './Drawer.scss';
|
5
|
+
const b = cn('ydb-drawer');
|
6
|
+
const DrawerContext = React.createContext({
|
7
|
+
containerWidth: 0,
|
8
|
+
setContainerWidth: () => { },
|
9
|
+
});
|
10
|
+
export const DrawerContextProvider = ({ children, className }) => {
|
11
|
+
const [containerWidth, setContainerWidth] = React.useState(0);
|
12
|
+
const containerRef = React.useRef(null);
|
13
|
+
React.useEffect(() => {
|
14
|
+
if (!containerRef.current) {
|
15
|
+
return undefined;
|
16
|
+
}
|
17
|
+
const updateWidth = () => {
|
18
|
+
if (containerRef.current) {
|
19
|
+
setContainerWidth(containerRef.current.clientWidth);
|
20
|
+
}
|
21
|
+
};
|
22
|
+
// Set initial width
|
23
|
+
updateWidth();
|
24
|
+
// Update width on resize
|
25
|
+
const resizeObserver = new ResizeObserver(updateWidth);
|
26
|
+
resizeObserver.observe(containerRef.current);
|
27
|
+
return () => {
|
28
|
+
if (containerRef.current) {
|
29
|
+
resizeObserver.disconnect();
|
30
|
+
}
|
31
|
+
};
|
32
|
+
}, []);
|
33
|
+
// Memoize the context value to prevent unnecessary re-renders
|
34
|
+
const value = React.useMemo(() => ({
|
35
|
+
containerWidth,
|
36
|
+
setContainerWidth,
|
37
|
+
}), [containerWidth]);
|
38
|
+
return (_jsx(DrawerContext.Provider, { value: value, children: _jsx("div", { ref: containerRef, className: b('drawer-container', className), children: children }) }));
|
39
|
+
};
|
40
|
+
export const useDrawerContext = () => {
|
41
|
+
const context = React.useContext(DrawerContext);
|
42
|
+
if (context === undefined) {
|
43
|
+
throw Error('useDrawerContext must be used within a DrawerContextProvider');
|
44
|
+
}
|
45
|
+
return context;
|
46
|
+
};
|
47
|
+
//# sourceMappingURL=DrawerContext.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DrawerContext.js","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerContext.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC;AAO3B,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAoB;IACzD,cAAc,EAAE,CAAC;IACjB,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;CAC9B,CAAC,CAAC;AAOH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAC,QAAQ,EAAE,SAAS,EAA6B,EAAE,EAAE;IACvF,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAExD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,MAAM,WAAW,GAAG,GAAG,EAAE;YACrB,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;gBACvB,iBAAiB,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YACxD,CAAC;QACL,CAAC,CAAC;QAEF,oBAAoB;QACpB,WAAW,EAAE,CAAC;QAEd,yBAAyB;QACzB,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;QACvD,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAE7C,OAAO,GAAG,EAAE;YACR,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;gBACvB,cAAc,CAAC,UAAU,EAAE,CAAC;YAChC,CAAC;QACL,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,8DAA8D;IAC9D,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CACvB,GAAG,EAAE,CAAC,CAAC;QACH,cAAc;QACd,iBAAiB;KACpB,CAAC,EACF,CAAC,cAAc,CAAC,CACnB,CAAC;IAEF,OAAO,CACH,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAChC,cAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,kBAAkB,EAAE,SAAS,CAAC,YAC9D,QAAQ,GACP,GACe,CAC5B,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAsB,EAAE;IACpD,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEhD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAChF,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { LabelProps } from '@gravity-ui/uikit';
|
3
|
+
import { EFlag } from '../../types/api/enums';
|
4
|
+
import './EntityStatus.scss';
|
5
|
+
interface EntityStatusLabelProps {
|
6
|
+
status: EFlag;
|
7
|
+
note?: React.ReactNode;
|
8
|
+
children?: React.ReactNode;
|
9
|
+
withStatusName?: boolean;
|
10
|
+
size?: LabelProps['size'];
|
11
|
+
iconSize?: number;
|
12
|
+
}
|
13
|
+
declare function EntityStatusLabel({ children, status, withStatusName, note, size, iconSize, }: EntityStatusLabelProps): import("react/jsx-runtime").JSX.Element;
|
14
|
+
interface EntityStatusProps {
|
15
|
+
children?: React.ReactNode;
|
16
|
+
className?: string;
|
17
|
+
}
|
18
|
+
export declare function EntityStatus({ className, children }: EntityStatusProps): import("react/jsx-runtime").JSX.Element;
|
19
|
+
export declare namespace EntityStatus {
|
20
|
+
var Label: typeof EntityStatusLabel;
|
21
|
+
var displayName: string;
|
22
|
+
}
|
23
|
+
export {};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { ActionTooltip, Flex, HelpMark, Label } from '@gravity-ui/uikit';
|
3
|
+
import { EFlag } from '../../types/api/enums';
|
4
|
+
import { cn } from '../../utils/cn';
|
5
|
+
import { StatusIcon } from '../StatusIconNew/StatusIcon';
|
6
|
+
import i18n from './i18n';
|
7
|
+
import { EFlagToDescription } from './utils';
|
8
|
+
import './EntityStatus.scss';
|
9
|
+
const b = cn('ydb-entity-status-new');
|
10
|
+
const EFlagToLabelTheme = {
|
11
|
+
[EFlag.Red]: 'danger',
|
12
|
+
[EFlag.Blue]: 'info',
|
13
|
+
[EFlag.Green]: 'success',
|
14
|
+
[EFlag.Grey]: 'unknown',
|
15
|
+
[EFlag.Orange]: 'orange',
|
16
|
+
[EFlag.Yellow]: 'warning',
|
17
|
+
};
|
18
|
+
const EFlagToStatusName = {
|
19
|
+
get [EFlag.Red]() {
|
20
|
+
return i18n('title_red');
|
21
|
+
},
|
22
|
+
get [EFlag.Yellow]() {
|
23
|
+
return i18n('title_yellow');
|
24
|
+
},
|
25
|
+
get [EFlag.Orange]() {
|
26
|
+
return i18n('title_orange');
|
27
|
+
},
|
28
|
+
get [EFlag.Green]() {
|
29
|
+
return i18n('title_green');
|
30
|
+
},
|
31
|
+
get [EFlag.Grey]() {
|
32
|
+
return i18n('title_grey');
|
33
|
+
},
|
34
|
+
get [EFlag.Blue]() {
|
35
|
+
return i18n('title_blue');
|
36
|
+
},
|
37
|
+
};
|
38
|
+
function EntityStatusLabel({ children, status, withStatusName = true, note, size = 'm', iconSize = 14, }) {
|
39
|
+
const theme = EFlagToLabelTheme[status];
|
40
|
+
return (_jsx(ActionTooltip, { title: EFlagToDescription[status], disabled: Boolean(note), children: _jsx(Label, { theme: theme === 'orange' ? undefined : theme, icon: _jsx(StatusIcon, { size: iconSize, status: status }), size: size, className: b({ orange: theme === 'orange' }), children: _jsxs(Flex, { gap: "2", wrap: "nowrap", children: [children, withStatusName ? EFlagToStatusName[status] : null, note && _jsx(HelpMark, { children: note })] }) }) }));
|
41
|
+
}
|
42
|
+
export function EntityStatus({ className, children }) {
|
43
|
+
return (_jsx(Flex, { gap: "2", wrap: "nowrap", alignItems: "center", className: b(null, className), children: children }));
|
44
|
+
}
|
45
|
+
EntityStatus.Label = EntityStatusLabel;
|
46
|
+
EntityStatus.displayName = 'EntityStatus';
|
47
|
+
//# sourceMappingURL=EntityStatus.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EntityStatus.js","sourceRoot":"","sources":["../../../src/components/EntityStatusNew/EntityStatus.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAC,KAAK,EAAC,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAEvD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAE3C,OAAO,qBAAqB,CAAC;AAE7B,MAAM,CAAC,GAAG,EAAE,CAAC,uBAAuB,CA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AAQ,EAAE,OAAO,CAAC,IAAI,CAAC,YACrE,KAAC,KAAK,IACF,KAAK,EAAE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EAC7C,IAAI,EAAE,KAAC,UAAU,IAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAI,EACpD,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAC,CAAC,EAAC,MAAM,EAAE,KAAK,KAAK,QAAQ,EAAC,CAAC,YAE1C,MAAC,IAAI,IAAC,GAAG,EAAC,GAAG,EAAC,IAAI,EAAC,QAAQ,aACtB,QAAQ,EACR,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EACjD,IAAI,IAAI,KAAC,QAAQ,cAAE,IAAI,GAAY,IACjC,GACH,GACI,CACnB,CAAC;AACN,CAAC;AAOD,MAAM,UAAU,YAAY,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAoB;IACjE,OAAO,CACH,KAAC,IAAI,IAAC,GAAG,EAAC,GAAG,EAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,YACxE,QAAQ,GACN,CACV,CAAC;AACN,CAAC;AAED,YAAY,CAAC,KAAK,GAAG,iBAAiB,CAAC;AACvC,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"title_red": "Failed",
|
3
|
+
"title_blue": "Normal",
|
4
|
+
"title_green": "Good",
|
5
|
+
"title_grey": "Unknown",
|
6
|
+
"title_orange": "Caution",
|
7
|
+
"title_yellow": "Warning",
|
8
|
+
"context_red": "Some systems are failed and not available",
|
9
|
+
"context_yellow": "There are minor issues",
|
10
|
+
"context_orange": "Critical state, requires immediate attention",
|
11
|
+
"context_green": "Everything is working as expected",
|
12
|
+
"context_grey": "The condition cannot be determined",
|
13
|
+
"context_blue": "All good, some parts of the system are restoring"
|
14
|
+
}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: (key: "title_red" | "title_blue" | "title_green" | "title_grey" | "title_orange" | "title_yellow" | "context_red" | "context_yellow" | "context_orange" | "context_green" | "context_grey" | "context_blue", params?: import("@gravity-ui/i18n").Params) => string;
|
2
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/EntityStatusNew/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3B,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC,eAAe,eAAe,CAAC,SAAS,EAAE,EAAC,EAAE,EAAC,CAAC,CAAC"}
|