@oneuptime/common 11.7.3 → 11.7.4
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/Models/DatabaseModels/AlertEpisodeStateTimeline.ts +1 -0
- package/Models/DatabaseModels/AlertStateTimeline.ts +1 -0
- package/Models/DatabaseModels/IncidentEpisodeStateTimeline.ts +1 -0
- package/Models/DatabaseModels/IncidentStateTimeline.ts +1 -0
- package/Models/DatabaseModels/Index.ts +5 -0
- package/Models/DatabaseModels/LogDropFilter.ts +89 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +13 -3
- package/Models/DatabaseModels/RecommendationDismissal.ts +463 -0
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.ts +1 -0
- package/Models/DatabaseModels/StatusPageGroup.ts +95 -0
- package/Models/DatabaseModels/TraceDropFilter.ts +89 -0
- package/Models/DatabaseModels/WorkflowVariable.ts +5 -1
- package/Server/API/AlertAPI.ts +32 -17
- package/Server/API/BaseAPI.ts +31 -2
- package/Server/API/BaseAnalyticsAPI.ts +36 -2
- package/Server/API/CommonAPI.ts +57 -0
- package/Server/API/IncidentAPI.ts +60 -33
- package/Server/API/IncidentEpisodeAPI.ts +31 -16
- package/Server/API/MonitorAPI.ts +30 -0
- package/Server/API/MonitorTemplateAPI.ts +8 -0
- package/Server/API/ProbeAPI.ts +196 -15
- package/Server/API/ProjectAPI.ts +79 -1
- package/Server/API/ScheduledMaintenanceAPI.ts +33 -18
- package/Server/API/StatusPageAPI.ts +74 -37
- package/Server/API/WorkspaceNotificationRuleAPI.ts +34 -4
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785320000000-RepairCrossProjectIncidentReferences.ts +527 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785329453269-AddParentGroupToStatusPageGroup.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785397674289-AddRecommendationDismissalTable.ts +55 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785405581596-AddDroppedCountersToDropFilters.ts +53 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
- package/Server/Services/AlertEpisodeService.ts +47 -0
- package/Server/Services/AlertService.ts +125 -0
- package/Server/Services/BillingService.ts +98 -0
- package/Server/Services/DatabaseService.ts +184 -20
- package/Server/Services/IncidentEpisodeService.ts +47 -0
- package/Server/Services/IncidentService.ts +123 -0
- package/Server/Services/IncidentTemplateService.ts +123 -1
- package/Server/Services/Index.ts +2 -0
- package/Server/Services/LogDropFilterService.ts +133 -0
- package/Server/Services/MonitorProbeService.ts +94 -4
- package/Server/Services/MonitorService.ts +48 -43
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +70 -0
- package/Server/Services/ProbeService.ts +66 -0
- package/Server/Services/ProjectService.ts +131 -7
- package/Server/Services/RecommendationDismissalService.ts +52 -0
- package/Server/Services/RunbookAgentJobService.ts +68 -7
- package/Server/Services/ScheduledMaintenanceService.ts +103 -0
- package/Server/Services/ScheduledMaintenanceTemplateService.ts +90 -0
- package/Server/Services/StatusPageGroupService.ts +186 -0
- package/Server/Services/TraceDropFilterService.ts +133 -0
- package/Server/Types/Workflow/Components/API/Delete.ts +12 -0
- package/Server/Types/Workflow/Components/API/Get.ts +12 -0
- package/Server/Types/Workflow/Components/API/Patch.ts +12 -0
- package/Server/Types/Workflow/Components/API/Post.ts +12 -0
- package/Server/Types/Workflow/Components/API/Put.ts +13 -0
- package/Server/Utils/Database/ProjectScopedReferenceValidator.ts +212 -0
- package/Server/Utils/DropFilterValidation.ts +127 -0
- package/Server/Utils/Errors.ts +5 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +28 -1
- package/Server/Utils/Monitor/MonitorIncident.ts +31 -2
- package/Server/Utils/Telemetry/AppMetrics.ts +31 -0
- package/Tests/Models/DatabaseModels/MonitorProbeColumnAccessControl.test.ts +196 -0
- package/Tests/Models/RecommendationDismissalModel.test.ts +269 -0
- package/Tests/Server/API/BaseAPIUpdatePayloadValidation.test.ts +320 -0
- package/Tests/Server/API/BaseAnalyticsAPIUpdatePayloadValidation.test.ts +293 -0
- package/Tests/Server/API/CommonAPIAuthGuard.test.ts +164 -0
- package/Tests/Server/API/ProbeAPI.test.ts +422 -53
- package/Tests/Server/API/ProjectAPI.test.ts +180 -0
- package/Tests/Server/API/ProjectAPIExtendTrialBillingDisabled.test.ts +138 -0
- package/Tests/Server/API/ProjectScopedCustomRouteAuth.test.ts +458 -0
- package/Tests/Server/Infrastructure/ContainerBootConfiguration.test.ts +359 -0
- package/Tests/Server/Infrastructure/ProcessSignalDelivery.test.ts +427 -0
- package/Tests/Server/Services/BillingServiceExtendTrial.test.ts +439 -0
- package/Tests/Server/Services/CrossProjectReferenceWriteGuard.test.ts +810 -0
- package/Tests/Server/Services/DatabaseServiceAtomicAddToColumns.test.ts +269 -0
- package/Tests/Server/Services/DatabaseServiceEmptyUpdate.test.ts +277 -0
- package/Tests/Server/Services/DatabaseServiceSortColumnSelect.test.ts +201 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +81 -23
- package/Tests/Server/Services/DropFilterSaveValidation.test.ts +398 -0
- package/Tests/Server/Services/MonitorProbeDeleteHooks.test.ts +280 -0
- package/Tests/Server/Services/MonitorProbeServiceProbeTenancy.test.ts +304 -0
- package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +262 -0
- package/Tests/Server/Services/ProjectServiceExtendTrial.test.ts +614 -0
- package/Tests/Server/Services/RecommendationDismissalService.test.ts +306 -0
- package/Tests/Server/Services/RepairCrossProjectIncidentReferencesMigration.test.ts +528 -0
- package/Tests/Server/Services/StatusPageGroupNesting.test.ts +395 -0
- package/Tests/Server/TestingUtils/Services/BillingServiceHelper.ts +26 -21
- package/Tests/Server/Types/Database/Permissions/WorkflowVariableColumnPermission.test.ts +227 -0
- package/Tests/Server/Types/Workflow/Components/ApiComponentErrorPort.test.ts +285 -0
- package/Tests/Server/Utils/Database/ProjectScopedReferenceValidator.test.ts +463 -0
- package/Tests/Server/Utils/DropFilterValidation.test.ts +269 -0
- package/Tests/Server/Utils/Telemetry/SpanUtil.test.ts +94 -0
- package/Tests/Types/DateUserTimezone.test.ts +52 -0
- package/Tests/Types/Monitor/KubernetesAlertTemplates.test.ts +177 -9
- package/Tests/Types/Monitor/MonitorStepDnsMonitor.test.ts +105 -0
- package/Tests/Types/Monitor/MonitorStepDnssecMonitor.test.ts +131 -0
- package/Tests/Types/Monitor/MonitorStepDomainMonitor.test.ts +60 -0
- package/Tests/Types/Monitor/MonitorStepExternalStatusPageMonitor.test.ts +82 -0
- package/Tests/Types/Monitor/MonitorStepInfrastructureMonitors.test.ts +268 -0
- package/Tests/Types/Monitor/MonitorStepMetricMonitor.test.ts +386 -0
- package/Tests/Types/Monitor/MonitorStepProfileMonitor.test.ts +185 -0
- package/Tests/Types/Monitor/MonitorStepSnmpMonitor.test.ts +156 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCatalog.test.ts +371 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCoverage.test.ts +901 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationNotificationMode.test.ts +607 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.test.ts +754 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationUtil.test.ts +960 -0
- package/Tests/Types/RollingTime/RollingTimeUtil.test.ts +186 -0
- package/Tests/Types/Runbook/RunbookStepTimeout.test.ts +410 -0
- package/Tests/Types/Telemetry/DropFilterSampling.test.ts +241 -0
- package/Tests/Types/Workspace/NotificationRuleConditionUtil.test.ts +353 -0
- package/Tests/Types/Workspace/NotificationRuleUtil.test.ts +566 -0
- package/Tests/UI/Components/CodeEditor.test.tsx +174 -0
- package/Tests/UI/Components/ErrorBoundary.test.tsx +555 -24
- package/Tests/UI/Components/InfoCard.test.tsx +358 -0
- package/Tests/UI/Components/LogTimeRangePicker.test.tsx +138 -0
- package/Tests/UI/Components/Modal.test.tsx +43 -5
- package/Tests/UI/Components/ModelTable/BaseModelTableSearchLabels.test.tsx +397 -0
- package/Tests/UI/Components/ModelTable/ColumnCustomizationModal.test.tsx +427 -0
- package/Tests/UI/Components/Runbook/StepTimeoutInput.test.tsx +386 -0
- package/Tests/UI/Components/StatusPage/ResourceGroupSection.test.tsx +671 -0
- package/Tests/UI/Components/TelemetryTimeRangePicker.test.tsx +404 -0
- package/Tests/UI/Utils/DropdownAlignment.test.ts +306 -0
- package/Tests/UI/Utils/TableFilterUrlState.test.ts +292 -0
- package/Tests/Utils/Monitor/MonitorSummaryProbeUtil.test.ts +263 -0
- package/Tests/Utils/NetworkDiscovery/ScanTargetUtil.test.ts +583 -0
- package/Tests/Utils/StatusPage/GroupNestingLayout.test.ts +1072 -0
- package/Tests/Utils/StatusPage/GroupTree.test.ts +583 -0
- package/Tests/Utils/StatusPage/ResourceUptime.test.ts +411 -0
- package/Types/Date.ts +15 -6
- package/Types/Monitor/KubernetesAlertTemplates.ts +205 -0
- package/Types/Monitor/MonitorStep.ts +10 -1
- package/Types/Monitor/MonitorStepMetricMonitor.ts +46 -1
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.ts +413 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.ts +168 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationTypes.ts +175 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.ts +743 -0
- package/Types/Permission.ts +45 -0
- package/Types/Recommendation/RecommendationType.ts +20 -0
- package/Types/Runbook/RunbookExecutionDeadline.ts +129 -0
- package/Types/Runbook/RunbookStepTimeout.ts +202 -0
- package/Types/Telemetry/DropFilterSampling.ts +92 -0
- package/UI/Components/AI/GenerateFromAIModal.tsx +0 -2
- package/UI/Components/Accordion/Accordion.tsx +10 -2
- package/UI/Components/BulkUpdate/BulkLabelActions.tsx +0 -1
- package/UI/Components/CodeEditor/CodeEditor.tsx +34 -20
- package/UI/Components/Date/RangeStartAndEndDateView.tsx +0 -1
- package/UI/Components/EditionLabel/EditionLabel.tsx +1 -27
- package/UI/Components/Error/PageError.tsx +0 -4
- package/UI/Components/ErrorBoundary.tsx +252 -15
- package/UI/Components/InfoCard/InfoCard.tsx +58 -1
- package/UI/Components/LogsViewer/components/LogTimeRangePicker.tsx +34 -1
- package/UI/Components/Modal/Modal.tsx +16 -60
- package/UI/Components/ModelFormModal/ModelFormModal.tsx +0 -8
- package/UI/Components/ModelTable/BaseModelTable.tsx +116 -67
- package/UI/Components/ModelTable/ColumnCustomizationModal.tsx +150 -47
- package/UI/Components/Runbook/StepTimeoutInput.tsx +173 -0
- package/UI/Components/StatusPage/ResourceGroupSection.tsx +231 -0
- package/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.tsx +34 -1
- package/UI/Utils/DropdownAlignment.ts +162 -0
- package/UI/Utils/TableFilterUrlState.ts +59 -20
- package/Utils/API.ts +106 -2
- package/Utils/Monitor/MonitorSummaryProbeUtil.ts +130 -0
- package/Utils/NetworkDiscovery/ScanTargetUtil.ts +434 -0
- package/Utils/StatusPage/GroupNestingLayout.ts +343 -0
- package/Utils/StatusPage/GroupTree.ts +307 -0
- package/Utils/StatusPage/ResourceUptime.ts +90 -17
- package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentEpisodeStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/IncidentEpisodeStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LogDropFilter.js +91 -0
- package/build/dist/Models/DatabaseModels/LogDropFilter.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +14 -4
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RecommendationDismissal.js +484 -0
- package/build/dist/Models/DatabaseModels/RecommendationDismissal.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageGroup.js +94 -0
- package/build/dist/Models/DatabaseModels/StatusPageGroup.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TraceDropFilter.js +91 -0
- package/build/dist/Models/DatabaseModels/TraceDropFilter.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowVariable.js +5 -1
- package/build/dist/Models/DatabaseModels/WorkflowVariable.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +22 -13
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +22 -1
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAnalyticsAPI.js +24 -1
- package/build/dist/Server/API/BaseAnalyticsAPI.js.map +1 -1
- package/build/dist/Server/API/CommonAPI.js +42 -0
- package/build/dist/Server/API/CommonAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +43 -26
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +21 -12
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/MonitorAPI.js +23 -0
- package/build/dist/Server/API/MonitorAPI.js.map +1 -1
- package/build/dist/Server/API/MonitorTemplateAPI.js +4 -0
- package/build/dist/Server/API/MonitorTemplateAPI.js.map +1 -1
- package/build/dist/Server/API/ProbeAPI.js +131 -15
- package/build/dist/Server/API/ProbeAPI.js.map +1 -1
- package/build/dist/Server/API/ProjectAPI.js +62 -3
- package/build/dist/Server/API/ProjectAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +23 -14
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +61 -33
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/WorkspaceNotificationRuleAPI.js +26 -2
- package/build/dist/Server/API/WorkspaceNotificationRuleAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785320000000-RepairCrossProjectIncidentReferences.js +397 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785320000000-RepairCrossProjectIncidentReferences.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785329453269-AddParentGroupToStatusPageGroup.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785329453269-AddParentGroupToStatusPageGroup.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785397674289-AddRecommendationDismissalTable.js +30 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785397674289-AddRecommendationDismissalTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785405581596-AddDroppedCountersToDropFilters.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785405581596-AddDroppedCountersToDropFilters.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeService.js +39 -0
- package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +95 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/BillingService.js +71 -0
- package/build/dist/Server/Services/BillingService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +140 -17
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeService.js +39 -0
- package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +100 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentTemplateService.js +97 -0
- package/build/dist/Server/Services/IncidentTemplateService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +2 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LogDropFilterService.js +93 -0
- package/build/dist/Server/Services/LogDropFilterService.js.map +1 -1
- package/build/dist/Server/Services/MonitorProbeService.js +73 -5
- package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +34 -39
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +71 -0
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -1
- package/build/dist/Server/Services/ProbeService.js +64 -0
- package/build/dist/Server/Services/ProbeService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +103 -7
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/RecommendationDismissalService.js +50 -0
- package/build/dist/Server/Services/RecommendationDismissalService.js.map +1 -0
- package/build/dist/Server/Services/RunbookAgentJobService.js +63 -5
- package/build/dist/Server/Services/RunbookAgentJobService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +83 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceTemplateService.js +65 -0
- package/build/dist/Server/Services/ScheduledMaintenanceTemplateService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageGroupService.js +136 -0
- package/build/dist/Server/Services/StatusPageGroupService.js.map +1 -1
- package/build/dist/Server/Services/TraceDropFilterService.js +93 -0
- package/build/dist/Server/Services/TraceDropFilterService.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Delete.js +11 -0
- package/build/dist/Server/Types/Workflow/Components/API/Delete.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Get.js +11 -0
- package/build/dist/Server/Types/Workflow/Components/API/Get.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Patch.js +11 -0
- package/build/dist/Server/Types/Workflow/Components/API/Patch.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Post.js +11 -0
- package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Put.js +12 -0
- package/build/dist/Server/Types/Workflow/Components/API/Put.js.map +1 -1
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js +132 -0
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js.map +1 -0
- package/build/dist/Server/Utils/DropFilterValidation.js +80 -0
- package/build/dist/Server/Utils/DropFilterValidation.js.map +1 -0
- package/build/dist/Server/Utils/Errors.js +3 -0
- package/build/dist/Server/Utils/Errors.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +30 -12
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +38 -18
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/AppMetrics.js +26 -0
- package/build/dist/Server/Utils/Telemetry/AppMetrics.js.map +1 -1
- package/build/dist/Types/Date.js +14 -4
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +192 -0
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +6 -1
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepMetricMonitor.js +32 -1
- package/build/dist/Types/Monitor/MonitorStepMetricMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +294 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.js +110 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.js.map +1 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js +58 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js.map +1 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +451 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js.map +1 -0
- package/build/dist/Types/Permission.js +40 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Recommendation/RecommendationType.js +21 -0
- package/build/dist/Types/Recommendation/RecommendationType.js.map +1 -0
- package/build/dist/Types/Runbook/RunbookExecutionDeadline.js +93 -0
- package/build/dist/Types/Runbook/RunbookExecutionDeadline.js.map +1 -0
- package/build/dist/Types/Runbook/RunbookStepTimeout.js +142 -0
- package/build/dist/Types/Runbook/RunbookStepTimeout.js.map +1 -0
- package/build/dist/Types/Telemetry/DropFilterSampling.js +75 -0
- package/build/dist/Types/Telemetry/DropFilterSampling.js.map +1 -0
- package/build/dist/UI/Components/AI/GenerateFromAIModal.js +1 -2
- package/build/dist/UI/Components/AI/GenerateFromAIModal.js.map +1 -1
- package/build/dist/UI/Components/Accordion/Accordion.js +9 -2
- package/build/dist/UI/Components/Accordion/Accordion.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js +27 -14
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/dist/UI/Components/Date/RangeStartAndEndDateView.js +1 -1
- package/build/dist/UI/Components/Date/RangeStartAndEndDateView.js.map +1 -1
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js +2 -20
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
- package/build/dist/UI/Components/Error/PageError.js +1 -3
- package/build/dist/UI/Components/Error/PageError.js.map +1 -1
- package/build/dist/UI/Components/ErrorBoundary.js +145 -11
- package/build/dist/UI/Components/ErrorBoundary.js.map +1 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js +28 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js +13 -2
- package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js.map +1 -1
- package/build/dist/UI/Components/Modal/Modal.js +4 -32
- package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +69 -33
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/ColumnCustomizationModal.js +73 -32
- package/build/dist/UI/Components/ModelTable/ColumnCustomizationModal.js.map +1 -1
- package/build/dist/UI/Components/Runbook/StepTimeoutInput.js +101 -0
- package/build/dist/UI/Components/Runbook/StepTimeoutInput.js.map +1 -0
- package/build/dist/UI/Components/StatusPage/ResourceGroupSection.js +73 -0
- package/build/dist/UI/Components/StatusPage/ResourceGroupSection.js.map +1 -0
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js +13 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js.map +1 -1
- package/build/dist/UI/Utils/DropdownAlignment.js +98 -0
- package/build/dist/UI/Utils/DropdownAlignment.js.map +1 -0
- package/build/dist/UI/Utils/TableFilterUrlState.js +48 -15
- package/build/dist/UI/Utils/TableFilterUrlState.js.map +1 -1
- package/build/dist/Utils/API.js +39 -2
- package/build/dist/Utils/API.js.map +1 -1
- package/build/dist/Utils/Monitor/MonitorSummaryProbeUtil.js +97 -0
- package/build/dist/Utils/Monitor/MonitorSummaryProbeUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ScanTargetUtil.js +330 -0
- package/build/dist/Utils/NetworkDiscovery/ScanTargetUtil.js.map +1 -0
- package/build/dist/Utils/StatusPage/GroupNestingLayout.js +280 -0
- package/build/dist/Utils/StatusPage/GroupNestingLayout.js.map +1 -0
- package/build/dist/Utils/StatusPage/GroupTree.js +214 -0
- package/build/dist/Utils/StatusPage/GroupTree.js.map +1 -0
- package/build/dist/Utils/StatusPage/ResourceUptime.js +60 -16
- package/build/dist/Utils/StatusPage/ResourceUptime.js.map +1 -1
- package/package.json +1 -1
|
@@ -42,6 +42,13 @@ const ColumnCustomizationModal = (props) => {
|
|
|
42
42
|
.includes(normalizedSearch);
|
|
43
43
|
});
|
|
44
44
|
}, [entries, normalizedSearch, isSearching]);
|
|
45
|
+
/*
|
|
46
|
+
* Both bulk actions are switched off when they have nothing left to do -
|
|
47
|
+
* "Show all" with everything already on is a no-op, and "Hide all" cannot go
|
|
48
|
+
* below the one column that has to stay.
|
|
49
|
+
*/
|
|
50
|
+
const isEverythingVisible = visibleCount === entries.length;
|
|
51
|
+
const isOnlyOneVisible = visibleCount <= 1;
|
|
45
52
|
const toggleColumn = (id, isVisible) => {
|
|
46
53
|
setEntries((current) => {
|
|
47
54
|
const isLastVisible = !isVisible &&
|
|
@@ -106,29 +113,42 @@ const ColumnCustomizationModal = (props) => {
|
|
|
106
113
|
});
|
|
107
114
|
});
|
|
108
115
|
};
|
|
116
|
+
/*
|
|
117
|
+
* Rendered as plain buttons rather than through <Button>: these sit inside
|
|
118
|
+
* the body as a compact pair, and the shared button styles are sized for a
|
|
119
|
+
* footer.
|
|
120
|
+
*/
|
|
121
|
+
const getBulkAction = (data) => {
|
|
122
|
+
return (React.createElement("button", { type: "button", "data-testid": data.dataTestId, disabled: data.disabled, onClick: data.onClick, className: "rounded-md px-2 py-1 text-xs font-medium text-gray-600 transition-colors hover:bg-white hover:text-gray-900 hover:shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 disabled:cursor-not-allowed disabled:text-gray-300 disabled:hover:bg-transparent disabled:hover:shadow-none" }, data.title));
|
|
123
|
+
};
|
|
109
124
|
const getRowContents = (data) => {
|
|
110
125
|
const { entry, index } = data;
|
|
111
126
|
const isOnlyVisibleColumn = entry.isVisible && visibleCount <= 1;
|
|
112
|
-
return (React.createElement("div", { className: "flex items-center gap-
|
|
113
|
-
data.dragHandle || React.createElement("div", { className: "w-
|
|
114
|
-
React.createElement("div", { className: "
|
|
115
|
-
React.createElement(CheckboxElement, { value: entry.isVisible, disabled: isOnlyVisibleColumn, dataTestId: `column-toggle-${entry.id}`,
|
|
127
|
+
return (React.createElement("div", { className: "group flex items-center gap-2 px-3 py-2 transition-colors hover:bg-gray-50" },
|
|
128
|
+
data.dragHandle || React.createElement("div", { className: "w-5 flex-none" }),
|
|
129
|
+
React.createElement("div", { className: "min-w-0 flex-1" },
|
|
130
|
+
React.createElement(CheckboxElement, { value: entry.isVisible, disabled: isOnlyVisibleColumn, dataTestId: `column-toggle-${entry.id}`, outerDivClassName: "relative flex items-center", title: React.createElement("span", { className: entry.isVisible
|
|
131
|
+
? "text-sm font-medium text-gray-900"
|
|
132
|
+
: "text-sm font-normal text-gray-400" }, entry.column.title), onChange: (value) => {
|
|
116
133
|
toggleColumn(entry.id, value);
|
|
117
134
|
} })),
|
|
118
|
-
React.createElement("
|
|
119
|
-
|
|
135
|
+
isOnlyVisibleColumn && (React.createElement("span", { className: "flex-none rounded-full bg-gray-100 px-2 py-0.5 text-[11px] font-medium text-gray-500", "data-testid": `column-locked-${entry.id}` }, "Required")),
|
|
136
|
+
React.createElement("div", { className: "flex flex-none items-center gap-0.5" },
|
|
137
|
+
React.createElement(Button, { buttonSize: ButtonSize.Small, buttonStyle: ButtonStyleType.ICON, icon: IconProp.ChevronUp, title: "", tooltip: "Move up", ariaLabel: `Move ${entry.column.title} up`, className: "text-gray-400 hover:bg-gray-200 hover:text-gray-700 disabled:text-gray-200 disabled:hover:bg-transparent", dataTestId: `column-move-up-${entry.id}`, disabled: isSearching || index === 0, onClick: () => {
|
|
120
138
|
moveColumn(index, index - 1);
|
|
121
139
|
} }),
|
|
122
|
-
React.createElement(Button, { buttonSize: ButtonSize.Small, buttonStyle: ButtonStyleType.ICON, icon: IconProp.ChevronDown, title: "", dataTestId: `column-move-down-${entry.id}`, disabled: isSearching || index === entries.length - 1, onClick: () => {
|
|
140
|
+
React.createElement(Button, { buttonSize: ButtonSize.Small, buttonStyle: ButtonStyleType.ICON, icon: IconProp.ChevronDown, title: "", tooltip: "Move down", ariaLabel: `Move ${entry.column.title} down`, className: "text-gray-400 hover:bg-gray-200 hover:text-gray-700 disabled:text-gray-200 disabled:hover:bg-transparent", dataTestId: `column-move-down-${entry.id}`, disabled: isSearching || index === entries.length - 1, onClick: () => {
|
|
123
141
|
moveColumn(index, index + 1);
|
|
124
142
|
} }))));
|
|
125
143
|
};
|
|
126
144
|
const getList = () => {
|
|
127
145
|
if (shownEntries.length === 0) {
|
|
128
|
-
return (React.createElement("div", { className: "px-3 py-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
146
|
+
return (React.createElement("div", { className: "flex flex-col items-center gap-2 px-3 py-10 text-center", "data-testid": "column-customization-no-results" },
|
|
147
|
+
React.createElement(Icon, { icon: IconProp.Search, className: "h-6 w-6 text-gray-300" }),
|
|
148
|
+
React.createElement("p", { className: "text-sm text-gray-500" },
|
|
149
|
+
"No columns match \"",
|
|
150
|
+
searchText,
|
|
151
|
+
"\".")));
|
|
132
152
|
}
|
|
133
153
|
/*
|
|
134
154
|
* Dragging a filtered list would move a column to a position that only
|
|
@@ -145,13 +165,15 @@ const ColumnCustomizationModal = (props) => {
|
|
|
145
165
|
}
|
|
146
166
|
return (React.createElement(DragDropContext, { onDragEnd: onDragEnd },
|
|
147
167
|
React.createElement(Droppable, { droppableId: "model-table-columns" }, (droppableProvided) => {
|
|
148
|
-
return (React.createElement("div", Object.assign({ ref: droppableProvided.innerRef }, droppableProvided.droppableProps, { className: "divide-y divide-gray-100" }),
|
|
168
|
+
return (React.createElement("div", Object.assign({ ref: droppableProvided.innerRef }, droppableProvided.droppableProps, { className: "divide-y divide-gray-100", "aria-label": "Columns" }),
|
|
149
169
|
shownEntries.map((entry, index) => {
|
|
150
|
-
return (React.createElement(Draggable, { draggableId: entry.id, index: index, key: entry.id }, (draggableProvided) => {
|
|
151
|
-
return (React.createElement("div", Object.assign({ ref: draggableProvided.innerRef }, draggableProvided.draggableProps, { className:
|
|
170
|
+
return (React.createElement(Draggable, { draggableId: entry.id, index: index, key: entry.id }, (draggableProvided, draggableSnapshot) => {
|
|
171
|
+
return (React.createElement("div", Object.assign({ ref: draggableProvided.innerRef }, draggableProvided.draggableProps, { className: draggableSnapshot.isDragging
|
|
172
|
+
? "rounded-md bg-white shadow-lg ring-1 ring-gray-200"
|
|
173
|
+
: "bg-white" }), getRowContents({
|
|
152
174
|
entry,
|
|
153
175
|
index,
|
|
154
|
-
dragHandle: (React.createElement("div", Object.assign({}, draggableProvided.dragHandleProps, { className: "flex-none cursor-grab text-gray-
|
|
176
|
+
dragHandle: (React.createElement("div", Object.assign({}, draggableProvided.dragHandleProps, { className: "flex w-5 flex-none cursor-grab justify-center text-gray-300 transition-colors group-hover:text-gray-500 active:cursor-grabbing", "aria-label": `Drag to reorder ${entry.column.title}`, title: "Drag to reorder" }),
|
|
155
177
|
React.createElement(Icon, { icon: IconProp.GripVertical, className: "h-4 w-4" }))),
|
|
156
178
|
})));
|
|
157
179
|
}));
|
|
@@ -160,30 +182,49 @@ const ColumnCustomizationModal = (props) => {
|
|
|
160
182
|
})));
|
|
161
183
|
};
|
|
162
184
|
return (React.createElement(Modal, { title: props.title || "Customize Columns", description: props.description ||
|
|
163
|
-
"Choose which columns to show and drag them into the order you want.", modalWidth: ModalWidth.Medium,
|
|
185
|
+
"Choose which columns to show and drag them into the order you want.", modalWidth: ModalWidth.Medium, submitButtonText: "Save", closeButtonText: "Cancel", onClose: props.onClose, onSubmit: () => {
|
|
164
186
|
props.onSave(entries);
|
|
165
|
-
}, leftFooterElement: props.isDefaultLayout ? (React.createElement(React.Fragment, null)) : (React.createElement(Button, { title: "Reset to default", buttonSize: ButtonSize.Normal, buttonStyle: ButtonStyleType.
|
|
187
|
+
}, leftFooterElement: props.isDefaultLayout ? (React.createElement(React.Fragment, null)) : (React.createElement(Button, { title: "Reset to default", icon: IconProp.Refresh, buttonSize: ButtonSize.Normal, buttonStyle: ButtonStyleType.NORMAL, dataTestId: "column-customization-reset", onClick: () => {
|
|
166
188
|
props.onReset();
|
|
167
189
|
} })) },
|
|
168
190
|
React.createElement("div", { className: "space-y-3", "data-testid": "column-customization-modal" },
|
|
191
|
+
React.createElement("div", { className: "relative" },
|
|
192
|
+
React.createElement("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" },
|
|
193
|
+
React.createElement(Icon, { icon: IconProp.Search, className: "h-4 w-4 text-gray-400" })),
|
|
194
|
+
React.createElement(Input, { type: InputType.TEXT, placeholder: "Search columns...", value: searchText, dataTestId: "column-customization-search", outerDivClassName: "w-full", className: "block w-full rounded-md border border-gray-300 bg-white py-2 pl-9 pr-9 text-sm placeholder-gray-400 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500", onChange: (value) => {
|
|
195
|
+
setSearchText(value);
|
|
196
|
+
} }),
|
|
197
|
+
searchText.length > 0 && (React.createElement("button", { type: "button", "aria-label": "Clear search", title: "Clear search", "data-testid": "column-customization-search-clear", onClick: () => {
|
|
198
|
+
setSearchText("");
|
|
199
|
+
}, className: "absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 transition-colors hover:text-gray-600 focus:outline-none focus-visible:text-gray-600" },
|
|
200
|
+
React.createElement(Icon, { icon: IconProp.Close, className: "h-4 w-4" })))),
|
|
169
201
|
React.createElement("div", { className: "flex items-center justify-between gap-3" },
|
|
170
|
-
React.createElement("div", { className: "
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
202
|
+
React.createElement("div", { className: "text-xs font-medium text-gray-500", "data-testid": "column-customization-count" },
|
|
203
|
+
visibleCount,
|
|
204
|
+
" of ",
|
|
205
|
+
entries.length,
|
|
206
|
+
" columns shown"),
|
|
207
|
+
React.createElement("div", { className: "flex flex-none items-center gap-1 rounded-md bg-gray-50 p-0.5 ring-1 ring-inset ring-gray-200" },
|
|
208
|
+
getBulkAction({
|
|
209
|
+
title: "Show all",
|
|
210
|
+
dataTestId: "column-customization-show-all",
|
|
211
|
+
disabled: isEverythingVisible,
|
|
212
|
+
onClick: () => {
|
|
176
213
|
setAllVisible(true);
|
|
177
|
-
}
|
|
178
|
-
|
|
214
|
+
},
|
|
215
|
+
}),
|
|
216
|
+
getBulkAction({
|
|
217
|
+
title: "Hide all",
|
|
218
|
+
dataTestId: "column-customization-hide-all",
|
|
219
|
+
disabled: isOnlyOneVisible,
|
|
220
|
+
onClick: () => {
|
|
179
221
|
setAllVisible(false);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
"
|
|
186
|
-
React.createElement("div", { className: "rounded-md border border-gray-200 overflow-hidden" }, getList()))));
|
|
222
|
+
},
|
|
223
|
+
}))),
|
|
224
|
+
React.createElement("div", { className: "max-h-80 overflow-y-auto overscroll-contain rounded-md border border-gray-200 bg-white" }, getList()),
|
|
225
|
+
React.createElement("p", { className: "text-xs text-gray-400", "data-testid": "column-customization-hint" }, isSearching
|
|
226
|
+
? "Clear the search to reorder columns."
|
|
227
|
+
: "Drag a row, or use the arrows, to change the column order."))));
|
|
187
228
|
};
|
|
188
229
|
export default ColumnCustomizationModal;
|
|
189
230
|
//# sourceMappingURL=ColumnCustomizationModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnCustomizationModal.js","sourceRoot":"","sources":["../../../../../UI/Components/ModelTable/ColumnCustomizationModal.tsx"],"names":[],"mappings":"AACA,OAAO,MAAM,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,QAAQ,MAAM,8BAA8B,CAAC;AACpD,OAAO,KAAK,EAAE,EAAgB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EACL,eAAe,EACf,SAAS,
|
|
1
|
+
{"version":3,"file":"ColumnCustomizationModal.js","sourceRoot":"","sources":["../../../../../UI/Components/ModelTable/ColumnCustomizationModal.tsx"],"names":[],"mappings":"AACA,OAAO,MAAM,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,QAAQ,MAAM,8BAA8B,CAAC;AACpD,OAAO,KAAK,EAAE,EAAgB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EACL,eAAe,EACf,SAAS,EAGT,SAAS,GAGV,MAAM,qBAAqB,CAAC;AA0B7B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,wBAAw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ACzB,KAAK,EAAC,cAAc,iBACR,mCAAmC,EAC/C,OAAO,EAAE,GAAG,EAAE;wBACZ,aAAa,CAAC,EAAE,CAAC,CAAC;oBACpB,CAAC,EACD,SAAS,EAAC,sJAAsJ;oBAEhK,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAC,SAAS,GAAG,CAC3C,CACV,CACG;YAEN,6BAAK,SAAS,EAAC,yCAAyC;gBACtD,6BACE,SAAS,EAAC,mCAAmC,iBACjC,4BAA4B;oBAEvC,YAAY;;oBAAM,OAAO,CAAC,MAAM;qCAC7B;gBACN,6BAAK,SAAS,EAAC,+FAA+F;oBAC3G,aAAa,CAAC;wBACb,KAAK,EAAE,UAAU;wBACjB,UAAU,EAAE,+BAA+B;wBAC3C,QAAQ,EAAE,mBAAmB;wBAC7B,OAAO,EAAE,GAAG,EAAE;4BACZ,aAAa,CAAC,IAAI,CAAC,CAAC;wBACtB,CAAC;qBACF,CAAC;oBACD,aAAa,CAAC;wBACb,KAAK,EAAE,UAAU;wBACjB,UAAU,EAAE,+BAA+B;wBAC3C,QAAQ,EAAE,gBAAgB;wBAC1B,OAAO,EAAE,GAAG,EAAE;4BACZ,aAAa,CAAC,KAAK,CAAC,CAAC;wBACvB,CAAC;qBACF,CAAC,CACE,CACF;YAEN,6BAAK,SAAS,EAAC,wFAAwF,IACpG,OAAO,EAAE,CACN;YAEN,2BACE,SAAS,EAAC,uBAAuB,iBACrB,2BAA2B,IAEtC,WAAW;gBACV,CAAC,CAAC,sCAAsC;gBACxC,CAAC,CAAC,4DAA4D,CAC9D,CACA,CACA,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React, { useEffect, useId, useState, } from "react";
|
|
2
|
+
import { NON_NUMERIC_TIMEOUT_MESSAGE, getTimeoutValidationError, secondsInputValueToTimeoutInMs, timeoutInMsToSecondsInputValue, willTimeoutBeClamped, } from "../../../Types/Runbook/RunbookStepTimeout";
|
|
3
|
+
/*
|
|
4
|
+
* Seconds-in, milliseconds-out editor for a per-step timeout.
|
|
5
|
+
*
|
|
6
|
+
* The typed text is held locally rather than derived from the stored value on
|
|
7
|
+
* every keystroke: deriving it would fight the author mid-edit, because a
|
|
8
|
+
* partially typed "0" or an emptied field both resolve to "unset" and would
|
|
9
|
+
* erase what they were typing. The stored value only moves when the text
|
|
10
|
+
* parses to something usable.
|
|
11
|
+
*/
|
|
12
|
+
const StepTimeoutInput = (props) => {
|
|
13
|
+
const uniqueId = useId();
|
|
14
|
+
const inputId = `step-timeout-${uniqueId}`;
|
|
15
|
+
const describedById = `step-timeout-help-${uniqueId}`;
|
|
16
|
+
const errorId = `step-timeout-error-${uniqueId}`;
|
|
17
|
+
const [text, setText] = useState(timeoutInMsToSecondsInputValue(props.value));
|
|
18
|
+
/*
|
|
19
|
+
* A number input reports an empty string for text it cannot parse — a
|
|
20
|
+
* dangling exponent ("1e"), a lone "-" — while still showing that text to
|
|
21
|
+
* the author. Tracked separately from `text` so an unparseable keystroke
|
|
22
|
+
* does not read as "the author cleared the field".
|
|
23
|
+
*/
|
|
24
|
+
const [hasUnparseableInput, setHasUnparseableInput] = useState(false);
|
|
25
|
+
/*
|
|
26
|
+
* Re-sync when the step being edited changes underneath us (collapse /
|
|
27
|
+
* reorder / reload). Skipped while the text still represents the stored
|
|
28
|
+
* value so the author's in-progress typing survives re-renders.
|
|
29
|
+
*/
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const storedAsText = timeoutInMsToSecondsInputValue(props.value);
|
|
32
|
+
setText((currentText) => {
|
|
33
|
+
return secondsInputValueToTimeoutInMs(currentText) === props.value
|
|
34
|
+
? currentText
|
|
35
|
+
: storedAsText;
|
|
36
|
+
});
|
|
37
|
+
}, [props.value]);
|
|
38
|
+
const validationError = hasUnparseableInput
|
|
39
|
+
? NON_NUMERIC_TIMEOUT_MESSAGE
|
|
40
|
+
: getTimeoutValidationError(text, props.bounds);
|
|
41
|
+
const defaultInSeconds = props.bounds.defaultInMs / 1000;
|
|
42
|
+
const handleChange = (value, isUnparseable) => {
|
|
43
|
+
if (isUnparseable) {
|
|
44
|
+
/*
|
|
45
|
+
* Hold the stored value. Reporting undefined here would discard a
|
|
46
|
+
* timeout the author had already saved, without them touching a digit —
|
|
47
|
+
* the field would look edited, save cleanly, and the step would silently
|
|
48
|
+
* drop back to the default.
|
|
49
|
+
*/
|
|
50
|
+
setHasUnparseableInput(true);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
setHasUnparseableInput(false);
|
|
54
|
+
setText(value);
|
|
55
|
+
props.onChange(secondsInputValueToTimeoutInMs(value));
|
|
56
|
+
};
|
|
57
|
+
/*
|
|
58
|
+
* Only a usable-but-out-of-range value gets clamped at run time. Anything
|
|
59
|
+
* unusable falls back to the default instead, so the two cases need
|
|
60
|
+
* different copy.
|
|
61
|
+
*/
|
|
62
|
+
const consequence = hasUnparseableInput
|
|
63
|
+
? "The saved value is unchanged."
|
|
64
|
+
: willTimeoutBeClamped(text, props.bounds)
|
|
65
|
+
? "Values outside the range are clamped when the step runs."
|
|
66
|
+
: "Leave the field blank to use the default.";
|
|
67
|
+
let inputClassName = "block w-full rounded-md border border-gray-300 bg-white py-2 pl-3 pr-3 text-sm placeholder-gray-500 focus:border-indigo-500 focus:text-gray-900 focus:placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm";
|
|
68
|
+
if (validationError) {
|
|
69
|
+
inputClassName +=
|
|
70
|
+
" border-red-300 text-red-900 placeholder-red-300 focus:border-red-500 focus:ring-red-500";
|
|
71
|
+
}
|
|
72
|
+
if (props.disabled) {
|
|
73
|
+
inputClassName += " bg-gray-100 text-gray-500 cursor-not-allowed";
|
|
74
|
+
}
|
|
75
|
+
return (React.createElement("div", null,
|
|
76
|
+
React.createElement("label", { htmlFor: inputId, className: "block text-xs font-medium text-gray-700 mb-1.5" },
|
|
77
|
+
props.label,
|
|
78
|
+
React.createElement("span", { className: "ml-2 text-[10px] font-normal text-gray-400" }, "seconds")),
|
|
79
|
+
React.createElement("input", { id: inputId, type: "number", inputMode: "decimal", min: props.bounds.minInMs / 1000, max: props.bounds.maxInMs / 1000, step: "any", disabled: props.disabled, className: inputClassName, value: text, placeholder: `${defaultInSeconds}`, "aria-describedby": validationError ? `${describedById} ${errorId}` : describedById, "aria-invalid": validationError ? true : undefined, "data-testid": props.dataTestId, onChange: (e) => {
|
|
80
|
+
var _a;
|
|
81
|
+
handleChange(e.target.value, ((_a = e.target.validity) === null || _a === void 0 ? void 0 : _a.badInput) === true);
|
|
82
|
+
} }),
|
|
83
|
+
React.createElement("p", { id: describedById, className: "text-xs text-gray-500 mt-1.5" },
|
|
84
|
+
props.description ? React.createElement(React.Fragment, null,
|
|
85
|
+
props.description,
|
|
86
|
+
" ") : null,
|
|
87
|
+
"Leave blank to use the default of ",
|
|
88
|
+
defaultInSeconds,
|
|
89
|
+
" seconds. Allowed range: ",
|
|
90
|
+
props.bounds.minInMs / 1000,
|
|
91
|
+
"\u2013",
|
|
92
|
+
props.bounds.maxInMs / 1000,
|
|
93
|
+
" ",
|
|
94
|
+
"seconds."),
|
|
95
|
+
validationError ? (React.createElement("p", { id: errorId, role: "alert", className: "text-xs text-red-600 mt-1" },
|
|
96
|
+
validationError,
|
|
97
|
+
" ",
|
|
98
|
+
consequence)) : null));
|
|
99
|
+
};
|
|
100
|
+
export default StepTimeoutInput;
|
|
101
|
+
//# sourceMappingURL=StepTimeoutInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepTimeoutInput.js","sourceRoot":"","sources":["../../../../../UI/Components/Runbook/StepTimeoutInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIZ,SAAS,EACT,KAAK,EACL,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EACL,2BAA2B,EAE3B,yBAAyB,EACzB,8BAA8B,EAC9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C,CAAC,SAAS,iBACnC,KAAK,CAAC,UAAU,EAC7B,QAAQ,EAAE,CAAC,CAAsC,EAAE,EAAE;;gBACnD,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA,MAAA,CAAC,CAAC,MAAM,CAAC,QAAQ,0CAAE,QAAQ,MAAK,IAAI,CAAC,CAAC;YACrE,CAAC,GACD;QACF,2BAAG,EAAE,EAAE,aAAa,EAAE,SAAS,EAAC,8BAA8B;YAC3D,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;gBAAG,KAAK,CAAC,WAAW;oBAAK,CAAC,CAAC,CAAC,IAAI;;YAClB,gBAAgB;;YAC3C,KAAK,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI;;YAAG,KAAK,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI;YAAE,GAAG;uBAEpE;QACH,eAAe,CAAC,CAAC,CAAC,CACjB,2BAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,2BAA2B;YAC/D,eAAe;;YAAG,WAAW,CAC5B,CACL,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import Icon, { ThickProp } from "../Icon/Icon";
|
|
2
|
+
import MarkdownViewer from "../Markdown.tsx/LazyMarkdownViewer";
|
|
3
|
+
import IconProp from "../../../Types/Icon/IconProp";
|
|
4
|
+
import StatusPageGroupNestingLayoutUtil from "../../../Utils/StatusPage/GroupNestingLayout";
|
|
5
|
+
import React, { useEffect, useState, } from "react";
|
|
6
|
+
/*
|
|
7
|
+
* One level of the status page resource group hierarchy.
|
|
8
|
+
*
|
|
9
|
+
* A top level group is a card. Everything under it is a row on a tree rail -
|
|
10
|
+
* no card, no second border, no background tint stacked on the last one - so
|
|
11
|
+
* the hierarchy stays readable however deep it goes and the uptime bars keep
|
|
12
|
+
* the width they need.
|
|
13
|
+
*/
|
|
14
|
+
const ResourceGroupSection = (props) => {
|
|
15
|
+
const [isOpen, setIsOpen] = useState(Boolean(props.isInitiallyExpanded));
|
|
16
|
+
/*
|
|
17
|
+
* Groups arrive with the page payload, so isInitiallyExpanded can flip after
|
|
18
|
+
* the first render. Keyed on the *boolean*, not on the prop: the column is an
|
|
19
|
+
* optional boolean, so it routinely arrives as undefined and settles to false,
|
|
20
|
+
* and keying on the prop would fire on that and slam shut a section the
|
|
21
|
+
* visitor had just opened.
|
|
22
|
+
*/
|
|
23
|
+
const initiallyExpanded = Boolean(props.isInitiallyExpanded);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setIsOpen(initiallyExpanded);
|
|
26
|
+
}, [initiallyExpanded]);
|
|
27
|
+
const generatedId = React.useId();
|
|
28
|
+
const bodyId = `status-page-group-body-${generatedId}`;
|
|
29
|
+
const descriptionId = `status-page-group-description-${generatedId}`;
|
|
30
|
+
const isRootLevel = StatusPageGroupNestingLayoutUtil.isRootLevel({
|
|
31
|
+
depth: props.depth,
|
|
32
|
+
});
|
|
33
|
+
const subGroupCount = props.subGroupCount || 0;
|
|
34
|
+
const showSubGroupDivider = StatusPageGroupNestingLayoutUtil.shouldShowSubGroupDivider({
|
|
35
|
+
hasOwnResources: Boolean(props.hasOwnResources),
|
|
36
|
+
subGroupCount: subGroupCount,
|
|
37
|
+
});
|
|
38
|
+
return (React.createElement("div", { className: StatusPageGroupNestingLayoutUtil.getContainerClassName({
|
|
39
|
+
depth: props.depth,
|
|
40
|
+
}), "data-testid": props.testId ||
|
|
41
|
+
(isRootLevel ? "status-page-group" : "status-page-nested-group"), "data-depth": props.depth },
|
|
42
|
+
React.createElement("button", { type: "button", className: StatusPageGroupNestingLayoutUtil.getHeaderClassName({
|
|
43
|
+
depth: props.depth,
|
|
44
|
+
}), "aria-expanded": isOpen, "aria-controls": isOpen ? bodyId : undefined, "aria-describedby": props.description ? descriptionId : undefined, "data-testid": "status-page-group-header", onClick: () => {
|
|
45
|
+
setIsOpen(!isOpen);
|
|
46
|
+
} },
|
|
47
|
+
React.createElement("span", { className: StatusPageGroupNestingLayoutUtil.getHeaderRowClassName() },
|
|
48
|
+
React.createElement("span", { className: `${StatusPageGroupNestingLayoutUtil.getChevronBoxClassName()} ${isOpen ? "bg-gray-900/5 text-gray-700" : "text-gray-400"}`, "data-testid": "status-page-group-chevron", "aria-hidden": "true" },
|
|
49
|
+
React.createElement(Icon, { className: `h-3.5 w-3.5 transition-transform duration-200 ease-out ${isOpen ? "rotate-90" : ""}`, icon: IconProp.ChevronRight, thick: ThickProp.Thick })),
|
|
50
|
+
React.createElement("span", { className: StatusPageGroupNestingLayoutUtil.getTitleClassName({
|
|
51
|
+
depth: props.depth,
|
|
52
|
+
}), title: props.name }, props.name),
|
|
53
|
+
props.subGroupCountLabel ? (React.createElement("span", { className: StatusPageGroupNestingLayoutUtil.getSubGroupCountBadgeClassName(), "data-testid": "status-page-group-sub-group-count" }, props.subGroupCountLabel)) : (React.createElement(React.Fragment, null))),
|
|
54
|
+
props.rollupLabel ? (React.createElement("span", { className: StatusPageGroupNestingLayoutUtil.getRollupClassName(), "data-testid": "status-page-group-rollup" },
|
|
55
|
+
React.createElement("span", { className: "inline-flex items-center gap-1.5" },
|
|
56
|
+
React.createElement("span", { className: StatusPageGroupNestingLayoutUtil.getRollupDotClassName(), style: props.rollupColor
|
|
57
|
+
? { backgroundColor: props.rollupColor }
|
|
58
|
+
: undefined, "data-testid": "status-page-group-rollup-dot", "aria-hidden": "true" }),
|
|
59
|
+
React.createElement("span", { className: StatusPageGroupNestingLayoutUtil.getRollupLabelClassName(), style: props.rollupColor ? { color: props.rollupColor } : undefined }, props.rollupLabel)))) : (React.createElement(React.Fragment, null))),
|
|
60
|
+
props.description ? (React.createElement("div", { id: descriptionId, className: StatusPageGroupNestingLayoutUtil.getDescriptionClassName(), "data-testid": "status-page-group-description" },
|
|
61
|
+
React.createElement(MarkdownViewer, { text: props.description }))) : (React.createElement(React.Fragment, null)),
|
|
62
|
+
isOpen ? (React.createElement("div", { id: bodyId, className: StatusPageGroupNestingLayoutUtil.getBodyClassName({
|
|
63
|
+
depth: props.depth,
|
|
64
|
+
}), "data-testid": "status-page-group-body" },
|
|
65
|
+
props.resourcesElement || React.createElement(React.Fragment, null),
|
|
66
|
+
props.subGroupsElement ? (React.createElement("div", { className: `${showSubGroupDivider
|
|
67
|
+
? StatusPageGroupNestingLayoutUtil.getSubGroupDividerClassName()
|
|
68
|
+
: ""} ${StatusPageGroupNestingLayoutUtil.getSubGroupListClassName({
|
|
69
|
+
depth: props.depth,
|
|
70
|
+
})}`.trim(), "data-testid": "status-page-sub-group-list" }, props.subGroupsElement)) : (React.createElement(React.Fragment, null)))) : (React.createElement(React.Fragment, null))));
|
|
71
|
+
};
|
|
72
|
+
export default ResourceGroupSection;
|
|
73
|
+
//# sourceMappingURL=ResourceGroupSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceGroupSection.js","sourceRoot":"","sources":["../../../../../UI/Components/StatusPage/ResourceGroupSection.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,cAAc,MAAM,oCAAoC,CAAC;AAChE,OAAO,QAAQ,MAAM,8BAA8B,CAAC;AACpD,OAAO,gCAAgC,MAAM,8CAA8C,CAAC;AAC5F,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC;AA0Cf;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAAsC,CAC9D,KAAqB,EACP,EAAE;IAChB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAClC,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CACnC,CAAC;IAEF;;;;;;OAMG;IACH,MAAM,iBAAiB,GAAY,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAEtE,SAA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EAAE,CAAC,CAAC,CAAC,SAAS,IAG7D,KAAK,CAAC,WAAW,CACb,CACF,CACF,CACR,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACM;QACR,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CACnB,6BACE,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,gCAAgC,CAAC,uBAAuB,EAAE,iBACzD,+BAA+B;YAE3C,oBAAC,cAAc,IAAC,IAAI,EAAE,KAAK,CAAC,WAAW,GAAI,CACvC,CACP,CAAC,CAAC,CAAC,CACF,yCAAK,CACN;QACA,MAAM,CAAC,CAAC,CAAC,CACR,6BACE,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,gCAAgC,CAAC,gBAAgB,CAAC;gBAC3D,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB,CAAC,iBACU,wBAAwB;YAEnC,KAAK,CAAC,gBAAgB,IAAI,yCAAK;YAC/B,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CACxB,6BACE,SAAS,EAAE,GACT,mBAAmB;oBACjB,CAAC,CAAC,gCAAgC,CAAC,2BAA2B,EAAE;oBAChE,CAAC,CAAC,EACN,IAAI,gCAAgC,CAAC,wBAAwB,CAAC;oBAC5D,KAAK,EAAE,KAAK,CAAC,KAAK;iBACnB,CAAC,EAAE,CAAC,IAAI,EAAE,iBACC,4BAA4B,IAEvC,KAAK,CAAC,gBAAgB,CACnB,CACP,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACG,CACP,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -3,6 +3,9 @@ import Icon from "../../Icon/Icon";
|
|
|
3
3
|
import IconProp from "../../../../Types/Icon/IconProp";
|
|
4
4
|
import TimeRange from "../../../../Types/Time/TimeRange";
|
|
5
5
|
import StartAndEndDate, { StartAndEndDateType, } from "../../Date/StartAndEndDate";
|
|
6
|
+
import { getDropdownAlignmentClassName, useDropdownHorizontalAlignment, } from "../../../Utils/DropdownAlignment";
|
|
7
|
+
// Matches the Tailwind `w-72` on the dropdown below (18rem).
|
|
8
|
+
export const TIME_RANGE_DROPDOWN_WIDTH_IN_PX = 288;
|
|
6
9
|
const PRESET_OPTIONS = [
|
|
7
10
|
{ range: TimeRange.PAST_FIVE_MINS, label: "Past 5 Minutes" },
|
|
8
11
|
{ range: TimeRange.PAST_FIFTEEN_MINS, label: "Past 15 Minutes" },
|
|
@@ -39,6 +42,14 @@ const TelemetryTimeRangePicker = (props) => {
|
|
|
39
42
|
const [isOpen, setIsOpen] = useState(false);
|
|
40
43
|
const [showCustom, setShowCustom] = useState(props.value.range === TimeRange.CUSTOM);
|
|
41
44
|
const containerRef = useRef(null);
|
|
45
|
+
const buttonRef = useRef(null);
|
|
46
|
+
const dropdownRef = useRef(null);
|
|
47
|
+
const alignment = useDropdownHorizontalAlignment({
|
|
48
|
+
isOpen: isOpen,
|
|
49
|
+
anchorRef: buttonRef,
|
|
50
|
+
dropdownRef: dropdownRef,
|
|
51
|
+
dropdownWidthInPx: TIME_RANGE_DROPDOWN_WIDTH_IN_PX,
|
|
52
|
+
});
|
|
42
53
|
useEffect(() => {
|
|
43
54
|
const handleClickOutside = (e) => {
|
|
44
55
|
if (containerRef.current &&
|
|
@@ -69,7 +80,7 @@ const TelemetryTimeRangePicker = (props) => {
|
|
|
69
80
|
}, [props]);
|
|
70
81
|
const buttonLabel = getButtonLabel(props.value);
|
|
71
82
|
return (React.createElement("div", { ref: containerRef, className: "relative" },
|
|
72
|
-
React.createElement("button", { type: "button", className: `inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium shadow-sm transition-colors ${isOpen
|
|
83
|
+
React.createElement("button", { ref: buttonRef, type: "button", "data-testid": "telemetry-time-range-picker-button", "aria-haspopup": "true", "aria-expanded": isOpen, className: `inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium shadow-sm transition-colors ${isOpen
|
|
73
84
|
? "border-indigo-300 bg-indigo-50 text-indigo-700"
|
|
74
85
|
: "border-gray-200 bg-white text-gray-700 hover:border-gray-300 hover:bg-gray-50"}`, onClick: () => {
|
|
75
86
|
setIsOpen(!isOpen);
|
|
@@ -77,7 +88,7 @@ const TelemetryTimeRangePicker = (props) => {
|
|
|
77
88
|
React.createElement(Icon, { icon: IconProp.Clock, className: "h-3.5 w-3.5" }),
|
|
78
89
|
React.createElement("span", null, buttonLabel),
|
|
79
90
|
React.createElement(Icon, { icon: IconProp.ChevronDown, className: `h-3 w-3 transition-transform ${isOpen ? "rotate-180" : ""}` })),
|
|
80
|
-
isOpen && (React.createElement("div", {
|
|
91
|
+
isOpen && (React.createElement("div", { ref: dropdownRef, "data-testid": "telemetry-time-range-picker-dropdown", "data-align": alignment, className: `absolute ${getDropdownAlignmentClassName(alignment)} top-full z-50 mt-1 w-72 max-w-[calc(100vw-1rem)] rounded-lg border border-gray-200 bg-white shadow-lg` },
|
|
81
92
|
React.createElement("div", { className: "max-h-64 overflow-y-auto py-1" },
|
|
82
93
|
PRESET_OPTIONS.map((option) => {
|
|
83
94
|
const isActive = props.value.range === option.range;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TelemetryTimeRangePicker.js","sourceRoot":"","sources":["../../../../../../UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,WAAW,GACZ,MAAM,OAAO,CAAC;AACf,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AAEvD,OAAO,SAAS,MAAM,kCAAkC,CAAC;AAEzD,OAAO,eAAe,EAAE,EACtB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"TelemetryTimeRangePicker.js","sourceRoot":"","sources":["../../../../../../UI/Components/Telemetry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|
2
|
+
/*
|
|
3
|
+
* Horizontal edge of the trigger that a popup pins itself to.
|
|
4
|
+
* "Left" means the popup grows rightwards from the trigger's left edge
|
|
5
|
+
* (Tailwind `left-0`), "Right" means it grows leftwards from the trigger's
|
|
6
|
+
* right edge (Tailwind `right-0`).
|
|
7
|
+
*/
|
|
8
|
+
export var DropdownHorizontalAlignment;
|
|
9
|
+
(function (DropdownHorizontalAlignment) {
|
|
10
|
+
DropdownHorizontalAlignment["Left"] = "left";
|
|
11
|
+
DropdownHorizontalAlignment["Right"] = "right";
|
|
12
|
+
})(DropdownHorizontalAlignment || (DropdownHorizontalAlignment = {}));
|
|
13
|
+
// Breathing room we keep between a popup and the edge of the viewport.
|
|
14
|
+
export const DEFAULT_DROPDOWN_VIEWPORT_MARGIN_IN_PX = 8;
|
|
15
|
+
/*
|
|
16
|
+
* Picks the edge a popup should align to so that it stays inside the viewport.
|
|
17
|
+
*
|
|
18
|
+
* Left alignment is preferred because it reads naturally next to the trigger.
|
|
19
|
+
* We only flip to the right edge when left alignment would spill past the right
|
|
20
|
+
* side of the viewport, and we never flip if doing so would spill past the left
|
|
21
|
+
* side by even more (which is what produced the off-screen popup on the metric
|
|
22
|
+
* explorer toolbar, where the trigger sits at the far left of the page).
|
|
23
|
+
*/
|
|
24
|
+
export function getDropdownHorizontalAlignment(input) {
|
|
25
|
+
const margin = input.viewportMargin === undefined
|
|
26
|
+
? DEFAULT_DROPDOWN_VIEWPORT_MARGIN_IN_PX
|
|
27
|
+
: input.viewportMargin;
|
|
28
|
+
/*
|
|
29
|
+
* Before the popup is laid out (or in a non-visual environment) measurements
|
|
30
|
+
* come back as zero. There is nothing to solve for, so keep the default.
|
|
31
|
+
*/
|
|
32
|
+
if (!Number.isFinite(input.dropdownWidth) ||
|
|
33
|
+
!Number.isFinite(input.viewportWidth) ||
|
|
34
|
+
input.dropdownWidth <= 0 ||
|
|
35
|
+
input.viewportWidth <= 0) {
|
|
36
|
+
return DropdownHorizontalAlignment.Left;
|
|
37
|
+
}
|
|
38
|
+
// How far a left-aligned popup would poke past the right gutter.
|
|
39
|
+
const leftAlignedOverflow = input.anchorLeft + input.dropdownWidth - (input.viewportWidth - margin);
|
|
40
|
+
// How far a right-aligned popup would poke past the left gutter.
|
|
41
|
+
const rightAlignedOverflow = margin - (input.anchorRight - input.dropdownWidth);
|
|
42
|
+
if (leftAlignedOverflow <= 0) {
|
|
43
|
+
return DropdownHorizontalAlignment.Left;
|
|
44
|
+
}
|
|
45
|
+
if (rightAlignedOverflow <= 0) {
|
|
46
|
+
return DropdownHorizontalAlignment.Right;
|
|
47
|
+
}
|
|
48
|
+
// Neither edge fits. Pick whichever clips the least, preferring left on a tie.
|
|
49
|
+
return leftAlignedOverflow <= rightAlignedOverflow
|
|
50
|
+
? DropdownHorizontalAlignment.Left
|
|
51
|
+
: DropdownHorizontalAlignment.Right;
|
|
52
|
+
}
|
|
53
|
+
/*
|
|
54
|
+
* Tailwind positioning class for an alignment. Kept next to the resolver so
|
|
55
|
+
* callers cannot drift out of sync with the enum.
|
|
56
|
+
*/
|
|
57
|
+
export function getDropdownAlignmentClassName(alignment) {
|
|
58
|
+
return alignment === DropdownHorizontalAlignment.Right ? "right-0" : "left-0";
|
|
59
|
+
}
|
|
60
|
+
/*
|
|
61
|
+
* Keeps a popup's horizontal alignment in sync with the space available around
|
|
62
|
+
* its trigger. Re-measures when the popup opens and whenever the viewport
|
|
63
|
+
* changes size or scrolls the trigger somewhere new.
|
|
64
|
+
*/
|
|
65
|
+
export function useDropdownHorizontalAlignment(options) {
|
|
66
|
+
const [alignment, setAlignment] = useState(DropdownHorizontalAlignment.Left);
|
|
67
|
+
const { isOpen, anchorRef, dropdownRef, dropdownWidthInPx, viewportMargin, } = options;
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (!isOpen) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
const measure = () => {
|
|
73
|
+
var _a;
|
|
74
|
+
const anchor = anchorRef.current;
|
|
75
|
+
if (!anchor || typeof anchor.getBoundingClientRect !== "function") {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const anchorRect = anchor.getBoundingClientRect();
|
|
79
|
+
const measuredWidth = ((_a = dropdownRef === null || dropdownRef === void 0 ? void 0 : dropdownRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0;
|
|
80
|
+
setAlignment(getDropdownHorizontalAlignment({
|
|
81
|
+
anchorLeft: anchorRect.left,
|
|
82
|
+
anchorRight: anchorRect.right,
|
|
83
|
+
dropdownWidth: measuredWidth > 0 ? measuredWidth : dropdownWidthInPx,
|
|
84
|
+
viewportWidth: window.innerWidth,
|
|
85
|
+
viewportMargin: viewportMargin,
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
measure();
|
|
89
|
+
window.addEventListener("resize", measure);
|
|
90
|
+
window.addEventListener("scroll", measure, true);
|
|
91
|
+
return () => {
|
|
92
|
+
window.removeEventListener("resize", measure);
|
|
93
|
+
window.removeEventListener("scroll", measure, true);
|
|
94
|
+
};
|
|
95
|
+
}, [isOpen, anchorRef, dropdownRef, dropdownWidthInPx, viewportMargin]);
|
|
96
|
+
return alignment;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=DropdownAlignment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownAlignment.js","sourceRoot":"","sources":["../../../../UI/Utils/DropdownAlignment.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,8CAAe,CAAA;AACjB,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,sCAAsC,GAAW,CAAC,CAAC;AAehE;;;;;;;;GAQG;AACH,MAAM,UAAU,8BAA8B,CAC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