@oneuptime/common 14.0.109 → 14.1.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/Models/AnalyticsModels/SecurityEvent.js +1 -1
- package/Models/DatabaseModels/AIInsight.js +2 -2
- package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
- package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
- package/Models/DatabaseModels/AIRunRecording.js +181 -0
- package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
- package/Models/DatabaseModels/Alert.js +20 -4
- package/Models/DatabaseModels/AlertEpisode.js +2 -2
- package/Models/DatabaseModels/AlertEpisodeOnCallRule.js +3 -3
- package/Models/DatabaseModels/AlertGroupingRule.d.mts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.d.ts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.js +48 -2
- package/Models/DatabaseModels/AlertOnCallRule.js +3 -3
- package/Models/DatabaseModels/AlertSeverity.js +13 -4
- package/Models/DatabaseModels/AlertState.js +1 -1
- package/Models/DatabaseModels/CallLog.js +12 -12
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.mts +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.ts +2 -0
- package/Models/DatabaseModels/EmailLog.js +14 -14
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +6 -6
- package/Models/DatabaseModels/GlobalConfig.d.mts +1 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +1 -0
- package/Models/DatabaseModels/GlobalConfig.js +74 -45
- package/Models/DatabaseModels/Incident.js +20 -4
- package/Models/DatabaseModels/IncidentEpisode.js +2 -2
- package/Models/DatabaseModels/IncidentEpisodeOnCallRule.js +3 -3
- package/Models/DatabaseModels/IncidentGroupingRule.d.mts +1 -0
- package/Models/DatabaseModels/IncidentGroupingRule.d.ts +1 -0
- package/Models/DatabaseModels/IncidentGroupingRule.js +48 -2
- package/Models/DatabaseModels/IncidentOnCallRule.js +3 -3
- package/Models/DatabaseModels/IncidentSeverity.js +13 -4
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/IncidentState.js +1 -1
- package/Models/DatabaseModels/IncidentTemplate.js +2 -2
- package/Models/DatabaseModels/Index.js +4 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +54 -20
- package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
- package/Models/DatabaseModels/MonitorProbe.js +22 -5
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +64 -7
- package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
- package/Models/DatabaseModels/NetworkInterface.js +5 -5
- package/Models/DatabaseModels/OnCallDutyPolicy.js +4 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRule.js +1 -1
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleSchedule.js +8 -5
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleTeam.js +5 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleUser.js +5 -2
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +28 -11
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +10 -7
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +16 -11
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js +7 -4
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js +7 -4
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.js +6 -3
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +4 -4
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +3 -3
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +6 -6
- package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +9 -6
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +3 -0
- package/Models/DatabaseModels/Project.d.ts +3 -0
- package/Models/DatabaseModels/Project.js +142 -5
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/ProxmoxCluster.d.mts +1 -0
- package/Models/DatabaseModels/ProxmoxCluster.d.ts +1 -0
- package/Models/DatabaseModels/ProxmoxCluster.js +52 -3
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/PushNotificationLog.js +12 -12
- package/Models/DatabaseModels/Reseller.js +8 -2
- package/Models/DatabaseModels/ResellerPlan.js +8 -2
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +9 -6
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +7 -4
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +10 -7
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/Service.js +1 -1
- package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +4 -4
- package/Models/DatabaseModels/ServiceLevelObjectiveErrorBudgetPolicyTier.js +4 -4
- package/Models/DatabaseModels/SmsLog.js +12 -12
- package/Models/DatabaseModels/StatusPage.js +5 -5
- package/Models/DatabaseModels/StatusPageSubscriber.js +2 -2
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/TelegramLog.js +12 -12
- package/Models/DatabaseModels/TelemetryIngestionKey.js +8 -5
- package/Models/DatabaseModels/TelemetryIngestionKeyRefusal.js +7 -4
- package/Models/DatabaseModels/User.d.mts +4 -0
- package/Models/DatabaseModels/User.d.ts +4 -0
- package/Models/DatabaseModels/User.js +100 -0
- package/Models/DatabaseModels/UserOnCallLog.js +6 -6
- package/Models/DatabaseModels/UserOnCallLogTimeline.js +3 -3
- package/Models/DatabaseModels/UserOnCallShiftReminderLog.js +2 -2
- package/Models/DatabaseModels/WebhookLog.js +12 -12
- package/Models/DatabaseModels/WhatsAppLog.js +12 -12
- package/Models/DatabaseModels/WorkspaceNotificationLog.js +12 -12
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
- package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
- package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
- package/Server/Services/DatabaseService.d.mts +4 -1
- package/Server/Services/DatabaseService.d.ts +4 -1
- package/Server/Types/Database/CountBy.d.mts +1 -0
- package/Server/Types/Database/CountBy.d.ts +1 -0
- package/Server/Types/Database/UpdateLimit.d.mts +6 -0
- package/Server/Types/Database/UpdateLimit.d.ts +6 -0
- package/Types/AI/AIActionWords.d.mts +25 -1
- package/Types/AI/AIActionWords.d.ts +25 -1
- package/Types/AI/AIActionWords.js +166 -3
- package/Types/AI/AIActionWords.mjs +6 -0
- package/Types/AI/AIChatTypes.d.mts +4 -2
- package/Types/AI/AIChatTypes.d.ts +4 -2
- package/Types/AI/AIChatTypes.js +5 -0
- package/Types/AI/AiOutcomes.d.mts +57 -0
- package/Types/AI/AiOutcomes.d.ts +57 -0
- package/Types/AI/AiOutcomes.js +67 -0
- package/Types/AI/AiOutcomes.mjs +10 -0
- package/Types/AI/AiRunRefusal.d.mts +45 -0
- package/Types/AI/AiRunRefusal.d.ts +45 -0
- package/Types/AI/AiRunRefusal.js +187 -0
- package/Types/AI/AiRunRefusal.mjs +12 -0
- package/Types/AI/InvestigationRecording.d.mts +46 -0
- package/Types/AI/InvestigationRecording.d.ts +46 -0
- package/Types/AI/InvestigationRecording.js +42 -0
- package/Types/AI/InvestigationRecording.mjs +7 -0
- package/Types/API/HTTPResponse.d.mts +3 -0
- package/Types/API/HTTPResponse.d.ts +3 -0
- package/Types/API/HTTPResponse.js +15 -0
- package/Types/Analytics/ProductEvent.d.mts +6 -1
- package/Types/Analytics/ProductEvent.d.ts +6 -1
- package/Types/Analytics/ProductEvent.js +41 -0
- package/Types/AuditLog/AuditLogCoverage.d.mts +1 -0
- package/Types/AuditLog/AuditLogCoverage.d.ts +1 -0
- package/Types/AuditLog/AuditLogCoverage.js +4 -2
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +92 -2
- package/Types/BaseDatabase/ListResult.d.mts +1 -0
- package/Types/BaseDatabase/ListResult.d.ts +1 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
- package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
- package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
- package/Types/Cloud/CloudResourceCatalog.js +33 -3
- package/Types/Cloud/CloudResourceCatalog.mjs +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
- package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
- package/Types/DataObservability/DataCheckSuggestions.d.mts +25 -0
- package/Types/DataObservability/DataCheckSuggestions.d.ts +25 -0
- package/Types/DataObservability/DataCheckSuggestions.js +102 -65
- package/Types/DataObservability/DataCheckSuggestions.mjs +1 -0
- package/Types/Database/TableMetadata.d.mts +2 -0
- package/Types/Database/TableMetadata.d.ts +2 -0
- package/Types/Database/TableMetadata.js +6 -0
- package/Types/Date.d.mts +26 -2
- package/Types/Date.d.ts +26 -2
- package/Types/Date.js +81 -9
- package/Types/Date.mjs +1 -0
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +44 -2
- package/Types/DateLanguage.mjs +2 -0
- package/Types/DirectionArrow.d.mts +7 -0
- package/Types/DirectionArrow.d.ts +7 -0
- package/Types/DirectionArrow.js +88 -0
- package/Types/DirectionArrow.mjs +7 -0
- package/Types/Docs/GlossaryTerm.d.mts +1 -0
- package/Types/Docs/GlossaryTerm.d.ts +1 -0
- package/Types/Docs/GlossaryTerm.js +2 -0
- package/Types/Docs/RetiredNames.d.mts +11 -0
- package/Types/Docs/RetiredNames.d.ts +11 -0
- package/Types/Docs/RetiredNames.js +139 -0
- package/Types/Docs/RetiredNames.mjs +3 -0
- package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
- package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
- package/Types/Email/ServerEmailEnvironment.js +793 -0
- package/Types/Email/ServerEmailEnvironment.mjs +14 -0
- package/Types/Exception/AiRunRefusalException.d.mts +6 -0
- package/Types/Exception/AiRunRefusalException.d.ts +6 -0
- package/Types/Exception/AiRunRefusalException.js +23 -0
- package/Types/Exception/AiRunRefusalException.mjs +2 -0
- package/Types/Exception/RefusalWithValues.d.mts +7 -0
- package/Types/Exception/RefusalWithValues.d.ts +7 -0
- package/Types/Exception/RefusalWithValues.js +76 -0
- package/Types/Exception/RefusalWithValues.mjs +3 -0
- package/Types/Exception/UnexplainedError.d.mts +13 -0
- package/Types/Exception/UnexplainedError.d.ts +13 -0
- package/Types/Exception/UnexplainedError.js +53 -1
- package/Types/Exception/UnexplainedError.mjs +1 -0
- package/Types/File/FileSize.d.mts +4 -1
- package/Types/File/FileSize.d.ts +4 -1
- package/Types/File/FileSize.js +18 -17
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/HostCollector/HostCollector.d.mts +1 -0
- package/Types/HostCollector/HostCollector.d.ts +1 -0
- package/Types/HostCollector/HostCollector.js +26 -10
- package/Types/HostCollector/HostCollector.mjs +1 -0
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/Monitor/MonitorCriteria.js +2 -2
- package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
- package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
- package/Types/Monitor/MonitorStep.js +1 -1
- package/Types/Monitor/MonitorTemplateSyncField.d.mts +6 -0
- package/Types/Monitor/MonitorTemplateSyncField.d.ts +6 -0
- package/Types/Monitor/MonitorTemplateSyncField.js +106 -64
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.mts +1 -0
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.ts +1 -0
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.js +11 -3
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
- package/Types/Monitor/UptimeHistoryLabels.js +2 -2
- package/Types/Monitor/WhoIsTold.d.mts +3 -1
- package/Types/Monitor/WhoIsTold.d.ts +3 -1
- package/Types/Monitor/WhoIsTold.js +2 -1
- package/Types/NotificationRule/PagingLadder.d.mts +137 -0
- package/Types/NotificationRule/PagingLadder.d.ts +137 -0
- package/Types/NotificationRule/PagingLadder.js +682 -0
- package/Types/NotificationRule/PagingLadder.mjs +28 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +1 -1
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.d.mts +26 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.d.ts +26 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.js +136 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.mjs +18 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +44 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +44 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +96 -5
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.mts +19 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.ts +19 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.js +222 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.mjs +6 -0
- package/Types/OnCallDutyPolicy/ScheduleLayerDefaults.js +5 -2
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideCoverRequest.js +9 -1
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
- package/Types/Permission.d.mts +2 -2
- package/Types/Permission.d.ts +2 -2
- package/Types/Permission.js +196 -195
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +10 -0
- package/Types/Product/ProductCatalog.d.mts +10 -0
- package/Types/Product/ProductCatalog.d.ts +10 -0
- package/Types/Product/ProductCatalog.js +208 -0
- package/Types/Product/ProductCatalog.mjs +6 -0
- package/Types/Product/ProductOfTable.d.mts +3 -0
- package/Types/Product/ProductOfTable.d.ts +3 -0
- package/Types/Product/ProductOfTable.js +68 -0
- package/Types/Product/ProductOfTable.mjs +3 -0
- package/Types/Product/ProjectProductsAnswer.d.mts +3 -0
- package/Types/Product/ProjectProductsAnswer.d.ts +3 -0
- package/Types/Product/ProjectProductsAnswer.js +35 -2
- package/Types/Product/ProjectProductsAnswer.mjs +1 -0
- package/Types/Product/ServerProducts.d.mts +65 -0
- package/Types/Product/ServerProducts.d.ts +65 -0
- package/Types/Product/ServerProducts.js +383 -0
- package/Types/Product/ServerProducts.mjs +26 -0
- package/Types/Product/ServerProductsAnswer.d.mts +21 -0
- package/Types/Product/ServerProductsAnswer.d.ts +21 -0
- package/Types/Product/ServerProductsAnswer.js +78 -0
- package/Types/Product/ServerProductsAnswer.mjs +5 -0
- package/Types/ProductFeedback/ProductFeedback.d.mts +3 -1
- package/Types/ProductFeedback/ProductFeedback.d.ts +3 -1
- package/Types/ProductFeedback/ProductFeedback.js +8 -0
- package/Types/ReaderLanguage.d.mts +1 -0
- package/Types/ReaderLanguage.d.ts +1 -0
- package/Types/ReaderLanguage.js +13 -1
- package/Types/ReaderLanguage.mjs +1 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/Rum/SessionReplayCustomEvents.d.mts +1 -0
- package/Types/Rum/SessionReplayCustomEvents.d.ts +1 -0
- package/Types/SampleProject/SampleProject.d.mts +54 -0
- package/Types/SampleProject/SampleProject.d.ts +54 -0
- package/Types/SampleProject/SampleProject.js +177 -0
- package/Types/SampleProject/SampleProject.mjs +22 -0
- package/Types/SampleProject/SampleProjectContent.d.mts +127 -0
- package/Types/SampleProject/SampleProjectContent.d.ts +127 -0
- package/Types/SampleProject/SampleProjectContent.js +397 -0
- package/Types/SampleProject/SampleProjectContent.mjs +18 -0
- package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
- package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
- package/Types/ServerSending/ServerSendingStatus.js +49 -2
- package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
- package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
- package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
- package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
- package/Types/Telemetry/CompatibleIngest.js +123 -0
- package/Types/Telemetry/CompatibleIngest.mjs +21 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.js +54 -12
- package/Types/TimezoneAlias.d.mts +1 -0
- package/Types/TimezoneAlias.d.ts +1 -0
- package/Types/TimezoneAlias.js +13 -0
- package/Types/Translator.d.mts +1 -0
- package/Types/Translator.d.ts +1 -0
- package/Types/Translator.js +414 -50
- package/Types/Translator.mjs +1 -0
- package/Types/UsedBy/UsedBy.d.mts +103 -0
- package/Types/UsedBy/UsedBy.d.ts +103 -0
- package/Types/UsedBy/UsedBy.js +389 -0
- package/Types/UsedBy/UsedBy.mjs +20 -0
- package/Types/UsedBy/UsedByServerProducts.d.mts +4 -0
- package/Types/UsedBy/UsedByServerProducts.d.ts +4 -0
- package/Types/UsedBy/UsedByServerProducts.js +48 -0
- package/Types/UsedBy/UsedByServerProducts.mjs +3 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +6 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +6 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.js +54 -2
- package/Types/WelcomeChecklist/WelcomeChecklist.mjs +4 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +3 -0
- package/Types/Workflow/PassedOnFields.js +2 -1
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +3 -3
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +28 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +28 -1
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
- package/Utils/AI/MeaningMatch.d.mts +36 -0
- package/Utils/AI/MeaningMatch.d.ts +36 -0
- package/Utils/AI/MeaningMatch.js +535 -0
- package/Utils/AI/MeaningMatch.mjs +7 -0
- package/Utils/ArchivableValues.js +1 -1
- package/Utils/AuditLog/AuditLogValues.js +2 -2
- package/Utils/Dashboard/ClockWidgetFormat.d.mts +14 -2
- package/Utils/Dashboard/ClockWidgetFormat.d.ts +14 -2
- package/Utils/Dashboard/ClockWidgetFormat.js +105 -2
- package/Utils/Dashboard/DashboardViewConfigSignature.d.mts +3 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.d.ts +3 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.js +45 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.mjs +3 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
- package/Utils/DataSecurity/TextScanner.js +2 -2
- package/Utils/DeveloperDocs/AiAssistantExamples.js +4 -4
- package/Utils/DeveloperDocs/CliCommands.d.mts +1 -0
- package/Utils/DeveloperDocs/CliCommands.d.ts +1 -0
- package/Utils/DeveloperDocs/CliCommands.js +2 -1
- package/Utils/DeveloperDocs/CliResources.js +2 -1
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/DeveloperDocs/TerraformSchema.js +3 -1
- package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
- package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
- package/Utils/HostAddressUtil.d.mts +1 -0
- package/Utils/HostAddressUtil.d.ts +1 -0
- package/Utils/HostAddressUtil.js +30 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +8 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +8 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +1493 -131
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +1 -0
- package/Utils/Markdown/MarkdownTableCell.js +2 -1
- package/Utils/Markdown/OverLongText.js +523 -5
- package/Utils/Markdown/SlowMarkdown.d.mts +14 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +14 -0
- package/Utils/Markdown/SlowMarkdown.js +595 -11
- package/Utils/Markdown/SlowMarkdown.mjs +6 -0
- package/Utils/Milliseconds.d.mts +7 -0
- package/Utils/Milliseconds.d.ts +7 -0
- package/Utils/Milliseconds.js +60 -0
- package/Utils/Milliseconds.mjs +4 -0
- package/Utils/ModelApiName.d.mts +11 -0
- package/Utils/ModelApiName.d.ts +11 -0
- package/Utils/ModelApiName.js +72 -0
- package/Utils/ModelApiName.mjs +5 -0
- package/Utils/Monitor/DeviceMacLearningUtil.d.mts +2 -1
- package/Utils/Monitor/DeviceMacLearningUtil.d.ts +2 -1
- package/Utils/Monitor/DeviceMacLearningUtil.js +26 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +97 -22
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.mts +3 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.ts +3 -0
- package/Utils/Monitor/ExternalStatusPageReading.js +35 -1
- package/Utils/Monitor/ExternalStatusPageReading.mjs +2 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
- package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +58 -4
- package/Utils/Monitor/MonitorTemplateLinkRefusal.d.mts +9 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.d.ts +9 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.js +45 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.mjs +6 -0
- package/Utils/Monitor/MonitoringOff.d.mts +2 -0
- package/Utils/Monitor/MonitoringOff.d.ts +2 -0
- package/Utils/Monitor/MonitoringOff.js +21 -0
- package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
- package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
- package/Utils/Monitor/ProbeFailureReading.d.mts +14 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +14 -0
- package/Utils/Monitor/ProbeFailureReading.js +137 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +7 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
- package/Utils/OpenStack/OpenStackCheckName.js +2 -1
- package/Utils/OpenStack/OpenStackLogScrub.js +1 -1
- package/Utils/OpenStack/OpenStackLogs.js +3 -2
- package/Utils/OpenStack/OpenStackTraces.js +2 -1
- package/Utils/Project/NextNumber.js +1 -1
- package/Utils/Project/NotificationChannels.js +5 -5
- package/Utils/Project/ProjectBalance.js +2 -2
- package/Utils/Project/TwilioAccount.js +2 -2
- package/Utils/PromQL/PromQLAst.d.mts +159 -0
- package/Utils/PromQL/PromQLAst.d.ts +159 -0
- package/Utils/PromQL/PromQLAst.js +118 -0
- package/Utils/PromQL/PromQLAst.mjs +12 -0
- package/Utils/PromQL/PromQLDuration.d.mts +2 -0
- package/Utils/PromQL/PromQLDuration.d.ts +2 -0
- package/Utils/PromQL/PromQLDuration.js +78 -0
- package/Utils/PromQL/PromQLDuration.mjs +3 -0
- package/Utils/PromQL/PromQLEngine.d.mts +15 -0
- package/Utils/PromQL/PromQLEngine.d.ts +15 -0
- package/Utils/PromQL/PromQLEngine.js +965 -0
- package/Utils/PromQL/PromQLEngine.mjs +7 -0
- package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.js +10 -0
- package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
- package/Utils/PromQL/PromQLError.d.mts +11 -0
- package/Utils/PromQL/PromQLError.d.ts +11 -0
- package/Utils/PromQL/PromQLError.js +27 -0
- package/Utils/PromQL/PromQLError.mjs +3 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.js +773 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
- package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
- package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
- package/Utils/PromQL/PromQLFunctions.js +127 -0
- package/Utils/PromQL/PromQLFunctions.mjs +4 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +218 -0
- package/Utils/PromQL/PromQLLabels.mjs +9 -0
- package/Utils/PromQL/PromQLLexer.d.mts +39 -0
- package/Utils/PromQL/PromQLLexer.d.ts +39 -0
- package/Utils/PromQL/PromQLLexer.js +391 -0
- package/Utils/PromQL/PromQLLexer.mjs +3 -0
- package/Utils/PromQL/PromQLMath.d.mts +19 -0
- package/Utils/PromQL/PromQLMath.d.ts +19 -0
- package/Utils/PromQL/PromQLMath.js +200 -0
- package/Utils/PromQL/PromQLMath.mjs +9 -0
- package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
- package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
- package/Utils/PromQL/PromQLMetricNames.js +199 -0
- package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
- package/Utils/PromQL/PromQLParser.d.mts +4 -0
- package/Utils/PromQL/PromQLParser.d.ts +4 -0
- package/Utils/PromQL/PromQLParser.js +831 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +9 -0
- package/Utils/PromQL/PromQLRegex.d.ts +9 -0
- package/Utils/PromQL/PromQLRegex.js +74 -0
- package/Utils/PromQL/PromQLRegex.mjs +2 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +90 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/Rum/PathInSentence.d.mts +5 -0
- package/Utils/Rum/PathInSentence.d.ts +5 -0
- package/Utils/Rum/PathInSentence.js +46 -0
- package/Utils/Rum/PathInSentence.mjs +6 -0
- package/Utils/Rum/UrlScrubber.d.mts +4 -0
- package/Utils/Rum/UrlScrubber.d.ts +4 -0
- package/Utils/Rum/UrlScrubber.js +143 -3
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +180 -25
- package/Utils/Rum/UserFlow.mjs +1 -1
- package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.js +30 -0
- package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
- package/Utils/ScheduledMaintenanceStart.d.mts +3 -0
- package/Utils/ScheduledMaintenanceStart.d.ts +3 -0
- package/Utils/ScheduledMaintenanceStart.js +9 -0
- package/Utils/Schema/ModelSchema.js +10 -1
- package/Utils/Schema/TypeSchemas.js +6 -0
- package/Utils/Slo/SloDuration.d.mts +5 -2
- package/Utils/Slo/SloDuration.d.ts +5 -2
- package/Utils/Slo/SloDuration.js +11 -6
- package/Utils/Slo/SloHealth.js +1 -1
- package/Utils/StateOrder.js +1 -4
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +118 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/Utils/Uptime/UptimeMaintenanceUtil.js +2 -1
- package/Utils/ValueFormatter.d.mts +8 -6
- package/Utils/ValueFormatter.d.ts +8 -6
- package/Utils/ValueFormatter.js +145 -0
- package/package.json +1 -1
|
@@ -4,7 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.HeartbeatAvailabilityUtil = exports.MIN_SILENCE_EVIDENCE_MS = exports.HEARTBEAT_MAX_BACKDATE_MS = exports.HEARTBEAT_INGEST_LAG_MS = void 0;
|
|
7
|
+
const AggregationInterval_1 = __importDefault(require("../../Types/BaseDatabase/AggregationInterval"));
|
|
7
8
|
const AggregationIntervalUtil_1 = __importDefault(require("../../Types/BaseDatabase/AggregationIntervalUtil"));
|
|
9
|
+
const Date_1 = __importDefault(require("../../Types/Date"));
|
|
10
|
+
const Timezone_1 = __importDefault(require("../../Types/Timezone"));
|
|
8
11
|
const ReceivingGaps_1 = __importDefault(require("./ReceivingGaps"));
|
|
9
12
|
/*
|
|
10
13
|
* How long after a bucket closes we keep treating silence in it as
|
|
@@ -43,6 +46,18 @@ exports.HEARTBEAT_MAX_BACKDATE_MS = 2 * 60000;
|
|
|
43
46
|
* down when the host stayed silent through minutes OneUptime was listening.
|
|
44
47
|
*/
|
|
45
48
|
exports.MIN_SILENCE_EVIDENCE_MS = 2 * 60000;
|
|
49
|
+
/*
|
|
50
|
+
* The calendar unit of each bucket that is one. The server starts a day,
|
|
51
|
+
* week, month or year bucket at a midnight, a Monday, a 1st or a 1 January
|
|
52
|
+
* in the zone the request named (AggregateBy.timezone), or in UTC when it
|
|
53
|
+
* named none (issue #7277).
|
|
54
|
+
*/
|
|
55
|
+
const CALENDAR_UNIT_OF_INTERVAL = {
|
|
56
|
+
[AggregationInterval_1.default.Day]: "day",
|
|
57
|
+
[AggregationInterval_1.default.Week]: "week",
|
|
58
|
+
[AggregationInterval_1.default.Month]: "month",
|
|
59
|
+
[AggregationInterval_1.default.Year]: "year",
|
|
60
|
+
};
|
|
46
61
|
class HeartbeatAvailabilityUtil {
|
|
47
62
|
static buildAvailabilitySeries(data) {
|
|
48
63
|
const windowStartMs = data.windowStart.getTime();
|
|
@@ -69,31 +84,29 @@ class HeartbeatAvailabilityUtil {
|
|
|
69
84
|
rowTimestamps.sort((a, b) => {
|
|
70
85
|
return a - b;
|
|
71
86
|
});
|
|
87
|
+
const slots = this.getSlots({
|
|
88
|
+
interval,
|
|
89
|
+
bucketMs,
|
|
90
|
+
rowTimestamps,
|
|
91
|
+
windowStartMs,
|
|
92
|
+
windowEndMs,
|
|
93
|
+
timezone: data.timezone,
|
|
94
|
+
});
|
|
95
|
+
const lastIndex = slots.length - 1;
|
|
96
|
+
if (lastIndex < 0) {
|
|
97
|
+
return { points: [], uptimePercent: null };
|
|
98
|
+
}
|
|
72
99
|
/*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* everything is down regardless of alignment.
|
|
79
|
-
*/
|
|
80
|
-
const anchorMs = rowTimestamps.length > 0 ? rowTimestamps[0] : windowStartMs;
|
|
81
|
-
const stepsBack = Math.ceil((anchorMs - windowStartMs) / bucketMs);
|
|
82
|
-
const gridStartMs = anchorMs - stepsBack * bucketMs;
|
|
83
|
-
const lastIndex = Math.floor((windowEndMs - gridStartMs) / bucketMs);
|
|
84
|
-
/*
|
|
85
|
-
* Snap each row to its nearest grid slot instead of requiring
|
|
86
|
-
* exact equality. Minute/hour buckets land exactly; day buckets
|
|
87
|
-
* can drift by an hour against a fixed 24h step when timestamps
|
|
88
|
-
* cross a DST boundary in the rendering timezone, and Month/Year
|
|
89
|
-
* widths are calendar-approximate — nearest-slot matching with a
|
|
90
|
-
* half-bucket tolerance absorbs all of those without ever mapping
|
|
91
|
-
* one row to two slots.
|
|
100
|
+
* Snap each row to the slot whose start is nearest it instead of
|
|
101
|
+
* requiring exact equality: a row a few seconds or an hour off its
|
|
102
|
+
* slot - a serialization offset, or day buckets the server cut in
|
|
103
|
+
* another zone than the one this was given - still lands on a slot
|
|
104
|
+
* of its own, and no row is ever mapped to two slots.
|
|
92
105
|
*/
|
|
93
106
|
const presentSlots = new Set();
|
|
94
107
|
for (const t of rowTimestamps) {
|
|
95
|
-
const index =
|
|
96
|
-
if (index >= 0
|
|
108
|
+
const index = this.getNearestSlotIndex(slots, t);
|
|
109
|
+
if (index >= 0) {
|
|
97
110
|
presentSlots.add(index);
|
|
98
111
|
}
|
|
99
112
|
}
|
|
@@ -103,12 +116,12 @@ class HeartbeatAvailabilityUtil {
|
|
|
103
116
|
* they start before the window does (leading edge of the grid).
|
|
104
117
|
*/
|
|
105
118
|
const evaluableEndMs = Math.min(windowEndMs, nowMs - exports.HEARTBEAT_INGEST_LAG_MS);
|
|
106
|
-
const receivingGaps = ReceivingGaps_1.default.clip(data.receivingGaps || [], new Date(
|
|
119
|
+
const receivingGaps = ReceivingGaps_1.default.clip(data.receivingGaps || [], new Date(slots[0].startMs), new Date(slots[lastIndex].endMs));
|
|
107
120
|
const states = [];
|
|
108
121
|
for (let index = 0; index <= lastIndex; index++) {
|
|
109
|
-
const startMs
|
|
122
|
+
const { startMs, endMs } = slots[index];
|
|
110
123
|
const up = presentSlots.has(index);
|
|
111
|
-
const isPartial = startMs < windowStartMs ||
|
|
124
|
+
const isPartial = startMs < windowStartMs || endMs > evaluableEndMs;
|
|
112
125
|
if (up) {
|
|
113
126
|
states.push("up");
|
|
114
127
|
}
|
|
@@ -118,7 +131,7 @@ class HeartbeatAvailabilityUtil {
|
|
|
118
131
|
else if (this.isNotMonitored({
|
|
119
132
|
receivingGaps,
|
|
120
133
|
startMs,
|
|
121
|
-
endMs
|
|
134
|
+
endMs,
|
|
122
135
|
})) {
|
|
123
136
|
states.push("excluded");
|
|
124
137
|
}
|
|
@@ -166,7 +179,7 @@ class HeartbeatAvailabilityUtil {
|
|
|
166
179
|
}
|
|
167
180
|
const up = state === "up" || isBridged(index);
|
|
168
181
|
points.push({
|
|
169
|
-
x: new Date(
|
|
182
|
+
x: new Date(slots[index].startMs),
|
|
170
183
|
y: up ? 100 : 0,
|
|
171
184
|
});
|
|
172
185
|
evaluatedCount++;
|
|
@@ -179,6 +192,85 @@ class HeartbeatAvailabilityUtil {
|
|
|
179
192
|
uptimePercent: evaluatedCount > 0 ? (upCount / evaluatedCount) * 100 : null,
|
|
180
193
|
};
|
|
181
194
|
}
|
|
195
|
+
/*
|
|
196
|
+
* The server's buckets from the one holding the window's start to the one
|
|
197
|
+
* holding its end, in order.
|
|
198
|
+
*/
|
|
199
|
+
static getSlots(data) {
|
|
200
|
+
const slots = [];
|
|
201
|
+
const unit = CALENDAR_UNIT_OF_INTERVAL[data.interval];
|
|
202
|
+
if (unit) {
|
|
203
|
+
/*
|
|
204
|
+
* Days, weeks, months and years are walked on the calendar of the
|
|
205
|
+
* zone the request named, as the server cut them: each slot runs from
|
|
206
|
+
* one midnight (Monday, 1st, 1 January) to the next, however long
|
|
207
|
+
* that was. A fixed step drifts off them - an hour a clock change for
|
|
208
|
+
* days, which put two slots on one day and the rest a day early, and
|
|
209
|
+
* days a month for months.
|
|
210
|
+
*/
|
|
211
|
+
const timezone = data.timezone || Timezone_1.default.UTC;
|
|
212
|
+
let startMs = Date_1.default.getStartOfCalendarUnit(new Date(data.windowStartMs), unit, timezone).getTime();
|
|
213
|
+
while (startMs <= data.windowEndMs) {
|
|
214
|
+
/*
|
|
215
|
+
* The next unit is the one holding the instant a unit and a half
|
|
216
|
+
* on: no real unit is half a nominal one shorter or longer than it
|
|
217
|
+
* (a day is 23 to 25 hours, a month 28 to 31 days).
|
|
218
|
+
*/
|
|
219
|
+
const endMs = Date_1.default.getStartOfCalendarUnit(new Date(startMs + data.bucketMs * 1.5), unit, timezone).getTime();
|
|
220
|
+
if (!(endMs > startMs)) {
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
slots.push({ startMs, endMs });
|
|
224
|
+
startMs = endMs;
|
|
225
|
+
}
|
|
226
|
+
return slots;
|
|
227
|
+
}
|
|
228
|
+
/*
|
|
229
|
+
* Finer buckets are the same width in every zone. Anchor their grid to
|
|
230
|
+
* the first returned row rather than to the window start: server
|
|
231
|
+
* buckets are `toStartOfInterval`-aligned and the window start
|
|
232
|
+
* generally isn't, and anchoring to real data also absorbs any
|
|
233
|
+
* constant offset introduced by timestamp serialization. With no rows
|
|
234
|
+
* at all, anchor to the window start — everything is down regardless
|
|
235
|
+
* of alignment.
|
|
236
|
+
*/
|
|
237
|
+
const anchorMs = data.rowTimestamps.length > 0
|
|
238
|
+
? data.rowTimestamps[0]
|
|
239
|
+
: data.windowStartMs;
|
|
240
|
+
const stepsBack = Math.ceil((anchorMs - data.windowStartMs) / data.bucketMs);
|
|
241
|
+
const gridStartMs = anchorMs - stepsBack * data.bucketMs;
|
|
242
|
+
const lastIndex = Math.floor((data.windowEndMs - gridStartMs) / data.bucketMs);
|
|
243
|
+
for (let index = 0; index <= lastIndex; index++) {
|
|
244
|
+
const startMs = gridStartMs + index * data.bucketMs;
|
|
245
|
+
slots.push({ startMs, endMs: startMs + data.bucketMs });
|
|
246
|
+
}
|
|
247
|
+
return slots;
|
|
248
|
+
}
|
|
249
|
+
/*
|
|
250
|
+
* The slot whose start is nearest `t`: `t` is past the middle of the slot
|
|
251
|
+
* before it, and short of its own middle. Up to half a slot before the
|
|
252
|
+
* first slot still counts, as does anything short of the middle of the
|
|
253
|
+
* last one; further out is no slot (-1).
|
|
254
|
+
*/
|
|
255
|
+
static getNearestSlotIndex(slots, t) {
|
|
256
|
+
const first = slots[0];
|
|
257
|
+
if (t < first.startMs - (first.endMs - first.startMs) / 2) {
|
|
258
|
+
return -1;
|
|
259
|
+
}
|
|
260
|
+
let low = 0;
|
|
261
|
+
let high = slots.length;
|
|
262
|
+
while (low < high) {
|
|
263
|
+
const middle = Math.floor((low + high) / 2);
|
|
264
|
+
const slot = slots[middle];
|
|
265
|
+
if (t < (slot.startMs + slot.endMs) / 2) {
|
|
266
|
+
high = middle;
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
low = middle + 1;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return low < slots.length ? low : -1;
|
|
273
|
+
}
|
|
182
274
|
/*
|
|
183
275
|
* Rule 4: a silent bucket OneUptime was not receiving for, except for
|
|
184
276
|
* less than MIN_SILENCE_EVIDENCE_MS of it, says nothing about the host.
|
|
@@ -138,8 +138,8 @@ class DayUptimeGraphUtil {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
/*
|
|
141
|
-
* "1
|
|
142
|
-
*
|
|
141
|
+
* "1 maintenance event", "3 maintenance events": the count a day's
|
|
142
|
+
* accessible name and its dialog read out.
|
|
143
143
|
*/
|
|
144
144
|
static getMaintenanceCountLabel(data) {
|
|
145
145
|
const labels = data.labels || UptimeHistoryLabels_1.DefaultUptimeHistoryLabels;
|
|
@@ -324,7 +324,8 @@ class UptimeMaintenanceUtil {
|
|
|
324
324
|
}),
|
|
325
325
|
],
|
|
326
326
|
options: {
|
|
327
|
-
|
|
327
|
+
// "5:14 ص" on a 12-hour clock, "05:14" on a 24-hour one.
|
|
328
|
+
hour: (0, DateLanguage_1.getHourOption)(use12HourFormat),
|
|
328
329
|
minute: "2-digit",
|
|
329
330
|
hour12: use12HourFormat,
|
|
330
331
|
},
|
|
@@ -3,16 +3,18 @@ export interface FormattedValue {
|
|
|
3
3
|
unit: string;
|
|
4
4
|
formatted: string;
|
|
5
5
|
}
|
|
6
|
+
export interface ValueFormatterOptions {
|
|
7
|
+
metricName?: string;
|
|
8
|
+
language?: string | undefined;
|
|
9
|
+
}
|
|
6
10
|
export default class ValueFormatter {
|
|
7
|
-
static formatValue(value: number, unit: string, options?:
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
static formatValue(value: number, unit: string, options?: ValueFormatterOptions): string;
|
|
12
|
+
static formatValueInParts(value: number, unit: string, options?: ValueFormatterOptions): FormattedValue;
|
|
13
|
+
static isUnitSetApart(parts: FormattedValue): boolean;
|
|
10
14
|
static getCompactUnit(unit: string, options?: {
|
|
11
15
|
metricName?: string;
|
|
12
16
|
}): string;
|
|
13
|
-
static formatValueCompact(value: number, unit: string, options?:
|
|
14
|
-
metricName?: string;
|
|
15
|
-
}): FormattedValue;
|
|
17
|
+
static formatValueCompact(value: number, unit: string, options?: ValueFormatterOptions): FormattedValue;
|
|
16
18
|
static isPercentUnit(unit: string | undefined): boolean;
|
|
17
19
|
static isFractionMetric(metricName: string | undefined): boolean;
|
|
18
20
|
static isHigherWorseMetric(metricName: string | undefined): boolean;
|
|
@@ -3,16 +3,18 @@ export interface FormattedValue {
|
|
|
3
3
|
unit: string;
|
|
4
4
|
formatted: string;
|
|
5
5
|
}
|
|
6
|
+
export interface ValueFormatterOptions {
|
|
7
|
+
metricName?: string;
|
|
8
|
+
language?: string | undefined;
|
|
9
|
+
}
|
|
6
10
|
export default class ValueFormatter {
|
|
7
|
-
static formatValue(value: number, unit: string, options?:
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
static formatValue(value: number, unit: string, options?: ValueFormatterOptions): string;
|
|
12
|
+
static formatValueInParts(value: number, unit: string, options?: ValueFormatterOptions): FormattedValue;
|
|
13
|
+
static isUnitSetApart(parts: FormattedValue): boolean;
|
|
10
14
|
static getCompactUnit(unit: string, options?: {
|
|
11
15
|
metricName?: string;
|
|
12
16
|
}): string;
|
|
13
|
-
static formatValueCompact(value: number, unit: string, options?:
|
|
14
|
-
metricName?: string;
|
|
15
|
-
}): FormattedValue;
|
|
17
|
+
static formatValueCompact(value: number, unit: string, options?: ValueFormatterOptions): FormattedValue;
|
|
16
18
|
static isPercentUnit(unit: string | undefined): boolean;
|
|
17
19
|
static isFractionMetric(metricName: string | undefined): boolean;
|
|
18
20
|
static isHigherWorseMetric(metricName: string | undefined): boolean;
|
package/Utils/ValueFormatter.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Converts raw values like 1048576 bytes → "1 MB", 3661 seconds → "1.02 hr", etc.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const DateLanguage_1 = require("../Types/DateLanguage");
|
|
7
8
|
const byteUnits = [
|
|
8
9
|
{ threshold: 1e15, unit: "PB", divisor: 1e15 },
|
|
9
10
|
{ threshold: 1e12, unit: "TB", divisor: 1e12 },
|
|
@@ -363,6 +364,107 @@ function formatPercent(value) {
|
|
|
363
364
|
}
|
|
364
365
|
return value.toFixed(2);
|
|
365
366
|
}
|
|
367
|
+
/*
|
|
368
|
+
* THE NUMBER IN THE READER'S LANGUAGE (#7094).
|
|
369
|
+
*
|
|
370
|
+
* The formatter writes its numbers the way English does - "73.40", "1.5K" -
|
|
371
|
+
* and a Gauge or a Value widget drew them so on every board: Latin digits
|
|
372
|
+
* and a point on a Persian one, beside an SLO tile that wrote "۹۹٫۹٪", and
|
|
373
|
+
* "73.4" where German writes "73,4". Given the reader's language, a number
|
|
374
|
+
* keeps exactly the decimals and the scale letter (K, M, B, T, P) it was
|
|
375
|
+
* written with, in that language's digits, decimal sign and minus: "73,40"
|
|
376
|
+
* in German, "۷۳٫۴۰" in Persian, Latin digits in Arabic (getNumberLocale).
|
|
377
|
+
* A percentage takes the language's own percent sign and spacing, as the
|
|
378
|
+
* SLO tiles write theirs: "73,40 %", "۷۳٫۴۰٪". No language, or English,
|
|
379
|
+
* writes every number exactly as before.
|
|
380
|
+
*/
|
|
381
|
+
// A number as formatNumber and formatPercent write it: "73.40", "-1.5", "119.25B".
|
|
382
|
+
const WRITTEN_NUMBER = /^(-?\d+)(?:\.(\d+))?([KMBTP]?)$/;
|
|
383
|
+
// What follows a number that sets its unit apart: a space, or a no-break one.
|
|
384
|
+
const STARTS_WITH_SPACE = /^\s/;
|
|
385
|
+
// One Intl format per language, decimals and style: a board writes many numbers.
|
|
386
|
+
const languageNumberFormats = new Map();
|
|
387
|
+
function getLanguageNumberFormat(language, decimals, isPercent) {
|
|
388
|
+
const key = [
|
|
389
|
+
language,
|
|
390
|
+
decimals,
|
|
391
|
+
isPercent ? "percent" : "decimal",
|
|
392
|
+
].join("|");
|
|
393
|
+
if (!languageNumberFormats.has(key)) {
|
|
394
|
+
let format = null;
|
|
395
|
+
try {
|
|
396
|
+
format = new Intl.NumberFormat((0, DateLanguage_1.getNumberLocale)(language), {
|
|
397
|
+
style: isPercent ? "percent" : "decimal",
|
|
398
|
+
minimumFractionDigits: decimals,
|
|
399
|
+
maximumFractionDigits: decimals,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
catch (_a) {
|
|
403
|
+
format = null;
|
|
404
|
+
}
|
|
405
|
+
languageNumberFormats.set(key, format);
|
|
406
|
+
}
|
|
407
|
+
return languageNumberFormats.get(key) || null;
|
|
408
|
+
}
|
|
409
|
+
/*
|
|
410
|
+
* `text`, a number this formatter wrote in English, written in `language`:
|
|
411
|
+
* the number (with its scale letter), the percent sign when it is a
|
|
412
|
+
* percentage ("" otherwise), and the two as the language joins them. Null
|
|
413
|
+
* where there is nothing to rewrite - English, or a text that is not a
|
|
414
|
+
* number - and the English stands.
|
|
415
|
+
*/
|
|
416
|
+
function writeNumberInLanguage(text, isPercent, language) {
|
|
417
|
+
var _a;
|
|
418
|
+
if ((0, DateLanguage_1.isEnglishDateLanguage)(language)) {
|
|
419
|
+
return null;
|
|
420
|
+
}
|
|
421
|
+
const match = WRITTEN_NUMBER.exec(text);
|
|
422
|
+
if (!match) {
|
|
423
|
+
return null;
|
|
424
|
+
}
|
|
425
|
+
const fraction = match[2] || "";
|
|
426
|
+
const scaleLetter = match[3] || "";
|
|
427
|
+
const format = getLanguageNumberFormat((language || "").trim(), fraction.length, isPercent);
|
|
428
|
+
if (!format) {
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
const number = Number(fraction ? `${match[1]}.${fraction}` : match[1]);
|
|
432
|
+
const parts = format.formatToParts(isPercent ? number / 100 : number);
|
|
433
|
+
/*
|
|
434
|
+
* Everything but the percent sign is the number - a negative's minus and
|
|
435
|
+
* the mark that keeps it before its digits on a page read from the right
|
|
436
|
+
* too - except the space or the marks set beside the sign (German's
|
|
437
|
+
* space, Arabic's marks), which go with the sign.
|
|
438
|
+
*/
|
|
439
|
+
const value = parts
|
|
440
|
+
.filter((part, index) => {
|
|
441
|
+
var _a, _b;
|
|
442
|
+
if (part.type === "percentSign") {
|
|
443
|
+
return false;
|
|
444
|
+
}
|
|
445
|
+
return (part.type !== "literal" ||
|
|
446
|
+
(((_a = parts[index - 1]) === null || _a === void 0 ? void 0 : _a.type) !== "percentSign" &&
|
|
447
|
+
((_b = parts[index + 1]) === null || _b === void 0 ? void 0 : _b.type) !== "percentSign"));
|
|
448
|
+
})
|
|
449
|
+
.map((part) => {
|
|
450
|
+
return part.value;
|
|
451
|
+
})
|
|
452
|
+
.join("");
|
|
453
|
+
const percentSign = ((_a = parts.find((part) => {
|
|
454
|
+
return part.type === "percentSign";
|
|
455
|
+
})) === null || _a === void 0 ? void 0 : _a.value) || "";
|
|
456
|
+
return {
|
|
457
|
+
value: `${value}${scaleLetter}`,
|
|
458
|
+
percentSign: percentSign,
|
|
459
|
+
formatted: isPercent
|
|
460
|
+
? parts
|
|
461
|
+
.map((part) => {
|
|
462
|
+
return part.value;
|
|
463
|
+
})
|
|
464
|
+
.join("")
|
|
465
|
+
: `${value}${scaleLetter}`,
|
|
466
|
+
};
|
|
467
|
+
}
|
|
366
468
|
/*
|
|
367
469
|
* The separator rules formatValue has always used: percent joins with no
|
|
368
470
|
* space, an empty unit contributes nothing, everything else gets one space.
|
|
@@ -400,6 +502,21 @@ function compactThresholdUnit(unit) {
|
|
|
400
502
|
function formatValueParts(value, unit, options, unitStyle) {
|
|
401
503
|
const trimmedUnit = (unit || "").trim();
|
|
402
504
|
const build = (partValue, partUnit) => {
|
|
505
|
+
// In the reader's language, when one is given (#7094).
|
|
506
|
+
const inLanguage = writeNumberInLanguage(partValue, partUnit === "%", options === null || options === void 0 ? void 0 : options.language);
|
|
507
|
+
if (inLanguage) {
|
|
508
|
+
return partUnit === "%"
|
|
509
|
+
? {
|
|
510
|
+
value: inLanguage.value,
|
|
511
|
+
unit: inLanguage.percentSign || partUnit,
|
|
512
|
+
formatted: inLanguage.formatted,
|
|
513
|
+
}
|
|
514
|
+
: {
|
|
515
|
+
value: inLanguage.value,
|
|
516
|
+
unit: partUnit,
|
|
517
|
+
formatted: joinValueAndUnit(inLanguage.value, partUnit),
|
|
518
|
+
};
|
|
519
|
+
}
|
|
403
520
|
return {
|
|
404
521
|
value: partValue,
|
|
405
522
|
unit: partUnit,
|
|
@@ -477,10 +594,38 @@ class ValueFormatter {
|
|
|
477
594
|
* e.g. formatValue(3661, "seconds") → "1.02 hr"
|
|
478
595
|
* e.g. formatValue(42, "%") → "42%"
|
|
479
596
|
* e.g. formatValue(0.25, "1", { metricName: "system.cpu.utilization" }) → "25%"
|
|
597
|
+
* e.g. formatValue(73.4, "%", { language: "de" }) → "73,40 %"
|
|
480
598
|
*/
|
|
481
599
|
static formatValue(value, unit, options) {
|
|
482
600
|
return formatValueParts(value, unit, options, "readable").formatted;
|
|
483
601
|
}
|
|
602
|
+
/*
|
|
603
|
+
* formatValue, but returning the number and the unit separately, the unit
|
|
604
|
+
* named as formatValue names it ("hours", "Bytes per Second"). For a
|
|
605
|
+
* widget that draws the two at different sizes, as formatValueCompact is
|
|
606
|
+
* for one that draws the unit's symbol: the Gauge split the joined string
|
|
607
|
+
* at its last space, which put "requests per" in the big-number span and
|
|
608
|
+
* cannot find the number in "73,40 %" or "۷۳٫۴۰٪".
|
|
609
|
+
*/
|
|
610
|
+
static formatValueInParts(value, unit, options) {
|
|
611
|
+
return formatValueParts(value, unit, options, "readable");
|
|
612
|
+
}
|
|
613
|
+
/*
|
|
614
|
+
* Whether `parts` set their unit apart from the number - "1.5 MB", and
|
|
615
|
+
* "73,40 %" in German - or write it right after it: "73.40%", "۷۳٫۴۰٪".
|
|
616
|
+
* What a widget that draws the number and the unit in spans of their own
|
|
617
|
+
* leaves between them.
|
|
618
|
+
*/
|
|
619
|
+
static isUnitSetApart(parts) {
|
|
620
|
+
if (!parts.unit) {
|
|
621
|
+
return false;
|
|
622
|
+
}
|
|
623
|
+
const valueStart = parts.formatted.indexOf(parts.value);
|
|
624
|
+
if (valueStart < 0) {
|
|
625
|
+
return parts.unit !== "%";
|
|
626
|
+
}
|
|
627
|
+
return STARTS_WITH_SPACE.test(parts.formatted.slice(valueStart + parts.value.length));
|
|
628
|
+
}
|
|
484
629
|
/*
|
|
485
630
|
* Compact sibling of getReadableUnit: the unit SYMBOL, for surfaces where
|
|
486
631
|
* the spelled-out name competes with the value for horizontal space.
|