@oneuptime/common 14.0.110 → 14.2.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/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.d.mts +1 -0
- package/Models/DatabaseModels/Alert.d.ts +1 -0
- package/Models/DatabaseModels/Alert.js +52 -2
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/EmailLog.js +2 -2
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +4 -4
- package/Models/DatabaseModels/GlobalConfig.js +46 -45
- package/Models/DatabaseModels/Incident.d.mts +1 -0
- package/Models/DatabaseModels/Incident.d.ts +1 -0
- package/Models/DatabaseModels/Incident.js +53 -2
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/Index.js +6 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +51 -17
- 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.js +23 -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/OnCallDutyPolicyExecutionLog.js +19 -5
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +1 -0
- package/Models/DatabaseModels/Project.d.ts +1 -0
- package/Models/DatabaseModels/Project.js +46 -3
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
- 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 +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
- 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 +28 -2
- package/Types/AI/AIActionWords.d.ts +28 -2
- package/Types/AI/AIActionWords.js +235 -3
- package/Types/AI/AIActionWords.mjs +8 -0
- package/Types/AI/AIChatTypes.d.mts +3 -1
- package/Types/AI/AIChatTypes.d.ts +3 -1
- package/Types/AI/AIReadTableWords.d.mts +192 -0
- package/Types/AI/AIReadTableWords.d.ts +192 -0
- package/Types/AI/AIReadTableWords.js +368 -0
- package/Types/AI/AIReadTableWords.mjs +18 -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 +48 -0
- package/Types/AI/AiRunRefusal.d.ts +48 -0
- package/Types/AI/AiRunRefusal.js +208 -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/AI/ResourceAiAccessPermissions.js +7 -18
- 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/AuditLog/AuditLogActionLabel.js +19 -9
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +32 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +32 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +199 -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/CloudResourceHealth.d.mts +30 -1
- package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
- package/Types/Cloud/CloudResourceHealth.js +405 -13
- package/Types/Cloud/CloudResourceHealth.mjs +28 -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/DataCheckRefusals.d.mts +32 -0
- package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
- package/Types/DataObservability/DataCheckRefusals.js +77 -0
- package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
- package/Types/Date.d.mts +8 -1
- package/Types/Date.d.ts +8 -1
- package/Types/Date.js +61 -7
- package/Types/Date.mjs +1 -0
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +8 -5
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +2 -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/EgressGuardException.js +1 -1
- package/Types/Exception/ErrorMessageRule.d.mts +1 -0
- package/Types/Exception/ErrorMessageRule.d.ts +1 -0
- package/Types/Exception/ErrorMessageRule.js +67 -13
- package/Types/Exception/ErrorMessageRule.mjs +1 -0
- package/Types/Exception/ExceptionMessages.d.mts +2 -0
- package/Types/Exception/ExceptionMessages.d.ts +2 -0
- package/Types/Exception/ExceptionMessages.js +2 -0
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.js +74 -0
- package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
- package/Types/JSONFunctions.js +10 -3
- package/Types/Link.d.mts +1 -0
- package/Types/Link.d.ts +1 -0
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/MeaningKeys.d.mts +4 -0
- package/Types/MeaningKeys.d.ts +4 -0
- package/Types/MeaningKeys.js +74 -0
- package/Types/MeaningKeys.mjs +5 -0
- 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/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 -0
- package/Types/Monitor/WhoIsTold.d.ts +3 -0
- package/Types/Monitor/WhoIsTold.js +63 -13
- package/Types/NoBreakSpaces.d.mts +16 -0
- package/Types/NoBreakSpaces.d.ts +16 -0
- package/Types/NoBreakSpaces.js +419 -0
- package/Types/NoBreakSpaces.mjs +9 -0
- package/Types/NotificationRule/PagingLadder.d.mts +12 -0
- package/Types/NotificationRule/PagingLadder.d.ts +12 -0
- package/Types/NotificationRule/PagingLadder.js +159 -11
- package/Types/NotificationRule/PagingLadder.mjs +3 -0
- 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/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
- package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +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 +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- 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/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/OpenStack/OpenStackCapacity.js +12 -5
- package/Types/Permission.d.mts +4 -0
- package/Types/Permission.d.ts +4 -0
- package/Types/Permission.js +66 -10
- 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/ProductUsage.js +2 -1
- package/Types/Product/ProjectProductsAnswer.js +2 -1
- 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/ResourceAiAgent/AiResourceType.d.mts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.js +12 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
- package/Types/Rum/ProductAnalyticsEvents.js +13 -1
- package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.js +12 -0
- package/Types/Rum/SessionReplayCustomEvents.mjs +1 -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/SetupHealth/SetupHealth.d.mts +1 -0
- package/Types/SetupHealth/SetupHealth.d.ts +1 -0
- package/Types/SetupHealth/SetupHealth.js +13 -5
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
- package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
- package/Types/StatusPage/DefaultStatusNames.js +74 -28
- package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
- 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/StatusPage/StateChangeNoteMessage.d.mts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
- 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 +48 -7
- package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
- 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 +470 -63
- package/Types/Translator.mjs +1 -0
- package/Types/UserSession/SessionLength.d.mts +33 -0
- package/Types/UserSession/SessionLength.d.ts +33 -0
- package/Types/UserSession/SessionLength.js +134 -5
- package/Types/UserSession/SessionLength.mjs +5 -0
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +2 -2
- package/Types/Workflow/WorkflowStatus.js +21 -10
- 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 +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -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/InvestigationReport.js +2 -2
- package/Utils/API.d.mts +0 -11
- package/Utils/API.d.ts +0 -11
- package/Utils/API.js +0 -432
- package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
- package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
- package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
- package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
- 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/DefaultRecordNames.d.mts +6 -0
- package/Utils/DefaultRecordNames.d.ts +6 -0
- package/Utils/DefaultRecordNames.js +122 -0
- package/Utils/DefaultRecordNames.mjs +6 -0
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/Grok/Grok.js +7 -4
- 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/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
- package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/LookupTable.d.mts +3 -0
- package/Utils/LookupTable.d.ts +3 -0
- package/Utils/LookupTable.js +61 -0
- package/Utils/LookupTable.mjs +3 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
- package/Utils/Markdown/OverLongText.js +296 -2
- package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
- package/Utils/Markdown/SlowMarkdown.js +354 -4
- package/Utils/Markdown/SlowMarkdown.mjs +1 -0
- package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
- package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
- package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
- package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
- package/Utils/Metrics/MetricSeriesScope.js +5 -1
- 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/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -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 +5 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +5 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +148 -5
- 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/ProbeAgreementRule.d.mts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.js +58 -0
- package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
- package/Utils/Monitor/ProbeFailureReading.d.mts +18 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +18 -0
- package/Utils/Monitor/ProbeFailureReading.js +166 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +8 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
- package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -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/Project/NextNumber.js +1 -1
- 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 +974 -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 +829 -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/PromQLLabelOrder.d.mts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.js +212 -0
- package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +219 -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 +205 -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 +836 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +20 -0
- package/Utils/PromQL/PromQLRegex.d.ts +20 -0
- package/Utils/PromQL/PromQLRegex.js +1014 -0
- package/Utils/PromQL/PromQLRegex.mjs +5 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +92 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
- package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
- package/Utils/PromQL/RE2CharacterClass.js +532 -0
- package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
- package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
- package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
- package/Utils/RequestFailedDetailsUtil.js +452 -0
- package/Utils/RequestFailedDetailsUtil.mjs +2 -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 +5 -1
- package/Utils/Rum/UrlScrubber.d.ts +5 -1
- package/Utils/Rum/UrlScrubber.js +153 -7
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +202 -29
- 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/Schema/TypeSchemas.js +6 -0
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
- package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -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/Sms/OnCallPageSms.d.mts +2 -0
- package/Utils/Sms/OnCallPageSms.d.ts +2 -0
- package/Utils/Sms/OnCallPageSms.js +3 -1
- package/Utils/StateListType.d.mts +11 -0
- package/Utils/StateListType.d.ts +11 -0
- package/Utils/StateListType.js +21 -0
- package/Utils/StateListType.mjs +2 -0
- package/Utils/StateOrder.d.mts +8 -11
- package/Utils/StateOrder.d.ts +8 -11
- package/Utils/StateOrder.js +50 -88
- package/Utils/StateOrder.mjs +2 -0
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
- package/Utils/Syslog/SyslogMessageParser.js +16 -6
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +113 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/Utils/ValueFormatter.d.mts +1 -0
- package/Utils/ValueFormatter.d.ts +1 -0
- package/Utils/ValueFormatter.js +258 -18
- package/package.json +1 -1
package/Utils/StateOrder.js
CHANGED
|
@@ -3,103 +3,45 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getStateListDeleteRefusalMessage = exports.getStateListOrderViolationMessage = exports.getStateListDeleteRefusal = exports.getStateListInsertValue = exports.getStateListRowsAfterCreate = exports.getStateListRowsAfterMove = exports.getStateListOrderViolationIntroduced = exports.getStateListOrderViolation = exports.isStateListRowAfter = exports.getStateListReachedBuiltIn = exports.getStateListBuiltInRows = exports.getStateListBuiltIn = exports.sortStateListRows = exports.toStateListRow = exports.STATE_LISTS = exports.StateListType = void 0;
|
|
6
|
+
exports.getStateListDeleteRefusalMessage = exports.getStateListOrderViolationMessage = exports.getStateListDeleteRefusal = exports.getStateListInsertValue = exports.getStateListRowsAfterCreate = exports.getStateListRowsAfterMove = exports.getStateListOrderViolationIntroduced = exports.getStateListOrderViolation = exports.isStateListRowAfter = exports.getStateListReachedBuiltIn = exports.getStateListBuiltInRows = exports.getStateListBuiltIn = exports.sortStateListRows = exports.toStateListRow = exports.getStateListOfTable = exports.STATE_LISTS = exports.StateListEnd = exports.StateListType = void 0;
|
|
7
7
|
const SortOrder_1 = __importDefault(require("../Types/BaseDatabase/SortOrder"));
|
|
8
8
|
const ListOrder_1 = require("./ListOrder");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* 1 is the top. On top of that:
|
|
18
|
-
*
|
|
19
|
-
* - Incident, alert and scheduled maintenance states are a path. An
|
|
20
|
-
* incident, an alert, an episode or a maintenance event only ever moves
|
|
21
|
-
* down its list (every state timeline refuses a move back up, by the one
|
|
22
|
-
* rule in Common/Utils/StateMove), and the built-in states mark the
|
|
23
|
-
* points that mean something: a state at or below the acknowledged one
|
|
24
|
-
* counts as acknowledged (on-call stops escalating), at or below the
|
|
25
|
-
* resolved one as resolved. So the built-in states have to stay in their
|
|
26
|
-
* order - Resolved above Acknowledged would page nobody and resolve
|
|
27
|
-
* nothing - and a new state goes just above the state that closes the
|
|
28
|
-
* list, never after it, where it would quietly count as resolved.
|
|
29
|
-
* - Monitor statuses run from the healthiest to the worst: where monitors
|
|
30
|
-
* are shown together (a status page, a monitor group) the lowest one in
|
|
31
|
-
* the list wins. A new status goes just above the offline one, so that
|
|
32
|
-
* an outage still shows as an outage.
|
|
33
|
-
* - Severities are ranked, most severe first. Any order goes, and a new
|
|
34
|
-
* one goes to the end.
|
|
35
|
-
* - Postmortem statuses are how far an incident's postmortem has come: not
|
|
36
|
-
* started, then a draft, then completed. A status at or below the
|
|
37
|
-
* completed one counts as done - the postmortem is no longer owed - so a
|
|
38
|
-
* project's own "Not Needed" goes after it, and a new status goes just
|
|
39
|
-
* above it, where it counts as in progress ("In Review"). Unlike a
|
|
40
|
-
* state, a postmortem can move back up (reopened for another look); the
|
|
41
|
-
* order only says what each status counts as
|
|
42
|
-
* (Common/Utils/Incident/PostmortemStatus).
|
|
43
|
-
* - Security case statuses are how far a case has come: new, taken on
|
|
44
|
-
* (acknowledged), contained, closed. A status at or below the
|
|
45
|
-
* acknowledged one counts as acknowledged, at or below the contained one
|
|
46
|
-
* as contained, at or below the closed one as closed - a project's own
|
|
47
|
-
* "Closed - Duplicate" goes after it - so the four built-in statuses keep
|
|
48
|
-
* that order, and a new status goes just above the closed one. Like a
|
|
49
|
-
* postmortem, a case can move back up (reopened); the order only says
|
|
50
|
-
* what each status counts as (Common/Utils/SecurityCase/
|
|
51
|
-
* SecurityCaseStatuses).
|
|
52
|
-
* - Security case priorities are ranked, most urgent first, like
|
|
53
|
-
* severities, but five of them are built in: the priorities a Critical,
|
|
54
|
-
* High, Medium, Low and Informational detection opens its case at. They
|
|
55
|
-
* keep that order, so a more severe detection never lands lower, and
|
|
56
|
-
* the project's own go anywhere among them; a new one goes to the end
|
|
57
|
-
* (Common/Utils/SecurityCase/SecurityCasePriorities).
|
|
58
|
-
* - Every built-in row (the created, acknowledged and resolved states, the
|
|
59
|
-
* operational and offline statuses...) is something OneUptime itself
|
|
60
|
-
* moves things into, so a list keeps at least one of each kind.
|
|
61
|
-
*/
|
|
62
|
-
var StateListType;
|
|
63
|
-
(function (StateListType) {
|
|
64
|
-
StateListType["IncidentState"] = "IncidentState";
|
|
65
|
-
StateListType["AlertState"] = "AlertState";
|
|
66
|
-
StateListType["ScheduledMaintenanceState"] = "ScheduledMaintenanceState";
|
|
67
|
-
StateListType["MonitorStatus"] = "MonitorStatus";
|
|
68
|
-
StateListType["IncidentSeverity"] = "IncidentSeverity";
|
|
69
|
-
StateListType["AlertSeverity"] = "AlertSeverity";
|
|
70
|
-
StateListType["IncidentPostmortemStatus"] = "IncidentPostmortemStatus";
|
|
71
|
-
StateListType["SecurityCaseStatus"] = "SecurityCaseStatus";
|
|
72
|
-
StateListType["SecurityCasePriority"] = "SecurityCasePriority";
|
|
73
|
-
})(StateListType || (exports.StateListType = StateListType = {}));
|
|
9
|
+
const StateListType_1 = require("./StateListType");
|
|
10
|
+
Object.defineProperty(exports, "StateListType", { enumerable: true, get: function () { return StateListType_1.StateListType; } });
|
|
11
|
+
// An end of a project's list: the top (1) or the bottom.
|
|
12
|
+
var StateListEnd;
|
|
13
|
+
(function (StateListEnd) {
|
|
14
|
+
StateListEnd["Top"] = "Top";
|
|
15
|
+
StateListEnd["Bottom"] = "Bottom";
|
|
16
|
+
})(StateListEnd || (exports.StateListEnd = StateListEnd = {}));
|
|
74
17
|
const INCIDENT_AND_ALERT_STATE_BUILT_INS = [
|
|
75
18
|
{ flag: "isCreatedState", role: "created state" },
|
|
76
19
|
{ flag: "isAcknowledgedState", role: "acknowledged state" },
|
|
77
20
|
{ flag: "isResolvedState", role: "resolved state" },
|
|
78
21
|
];
|
|
79
22
|
exports.STATE_LISTS = {
|
|
80
|
-
[StateListType.IncidentState]: {
|
|
81
|
-
type: StateListType.IncidentState,
|
|
23
|
+
[StateListType_1.StateListType.IncidentState]: {
|
|
24
|
+
type: StateListType_1.StateListType.IncidentState,
|
|
82
25
|
orderColumn: "order",
|
|
83
26
|
subject: { singular: "incident", plural: "incidents" },
|
|
84
27
|
builtIns: INCIDENT_AND_ALERT_STATE_BUILT_INS,
|
|
85
28
|
keepsBuiltInOrder: true,
|
|
86
29
|
insertAboveFlag: "isResolvedState",
|
|
30
|
+
worstAt: StateListEnd.Top,
|
|
87
31
|
},
|
|
88
|
-
[StateListType.AlertState]: {
|
|
89
|
-
type: StateListType.AlertState,
|
|
32
|
+
[StateListType_1.StateListType.AlertState]: {
|
|
33
|
+
type: StateListType_1.StateListType.AlertState,
|
|
90
34
|
orderColumn: "order",
|
|
91
35
|
subject: { singular: "alert", plural: "alerts" },
|
|
92
36
|
builtIns: INCIDENT_AND_ALERT_STATE_BUILT_INS,
|
|
93
37
|
keepsBuiltInOrder: true,
|
|
94
38
|
insertAboveFlag: "isResolvedState",
|
|
39
|
+
worstAt: StateListEnd.Top,
|
|
95
40
|
},
|
|
96
|
-
[StateListType.ScheduledMaintenanceState]: {
|
|
97
|
-
type: StateListType.ScheduledMaintenanceState,
|
|
41
|
+
[StateListType_1.StateListType.ScheduledMaintenanceState]: {
|
|
42
|
+
type: StateListType_1.StateListType.ScheduledMaintenanceState,
|
|
98
43
|
orderColumn: "order",
|
|
99
|
-
subject: {
|
|
100
|
-
singular: "scheduled maintenance event",
|
|
101
|
-
plural: "scheduled maintenance events",
|
|
102
|
-
},
|
|
44
|
+
subject: { singular: "maintenance event", plural: "maintenance events" },
|
|
103
45
|
builtIns: [
|
|
104
46
|
{ flag: "isScheduledState", role: "scheduled state" },
|
|
105
47
|
{ flag: "isOngoingState", role: "ongoing state" },
|
|
@@ -108,9 +50,10 @@ exports.STATE_LISTS = {
|
|
|
108
50
|
],
|
|
109
51
|
keepsBuiltInOrder: true,
|
|
110
52
|
insertAboveFlag: "isResolvedState",
|
|
53
|
+
worstAt: StateListEnd.Top,
|
|
111
54
|
},
|
|
112
|
-
[StateListType.MonitorStatus]: {
|
|
113
|
-
type: StateListType.MonitorStatus,
|
|
55
|
+
[StateListType_1.StateListType.MonitorStatus]: {
|
|
56
|
+
type: StateListType_1.StateListType.MonitorStatus,
|
|
114
57
|
orderColumn: "priority",
|
|
115
58
|
subject: { singular: "monitor", plural: "monitors" },
|
|
116
59
|
builtIns: [
|
|
@@ -119,23 +62,26 @@ exports.STATE_LISTS = {
|
|
|
119
62
|
],
|
|
120
63
|
keepsBuiltInOrder: false,
|
|
121
64
|
insertAboveFlag: "isOfflineState",
|
|
65
|
+
worstAt: StateListEnd.Bottom,
|
|
122
66
|
},
|
|
123
|
-
[StateListType.IncidentSeverity]: {
|
|
124
|
-
type: StateListType.IncidentSeverity,
|
|
67
|
+
[StateListType_1.StateListType.IncidentSeverity]: {
|
|
68
|
+
type: StateListType_1.StateListType.IncidentSeverity,
|
|
125
69
|
orderColumn: "order",
|
|
126
70
|
subject: { singular: "incident", plural: "incidents" },
|
|
127
71
|
builtIns: [],
|
|
128
72
|
keepsBuiltInOrder: false,
|
|
73
|
+
worstAt: StateListEnd.Top,
|
|
129
74
|
},
|
|
130
|
-
[StateListType.AlertSeverity]: {
|
|
131
|
-
type: StateListType.AlertSeverity,
|
|
75
|
+
[StateListType_1.StateListType.AlertSeverity]: {
|
|
76
|
+
type: StateListType_1.StateListType.AlertSeverity,
|
|
132
77
|
orderColumn: "order",
|
|
133
78
|
subject: { singular: "alert", plural: "alerts" },
|
|
134
79
|
builtIns: [],
|
|
135
80
|
keepsBuiltInOrder: false,
|
|
81
|
+
worstAt: StateListEnd.Top,
|
|
136
82
|
},
|
|
137
|
-
[StateListType.IncidentPostmortemStatus]: {
|
|
138
|
-
type: StateListType.IncidentPostmortemStatus,
|
|
83
|
+
[StateListType_1.StateListType.IncidentPostmortemStatus]: {
|
|
84
|
+
type: StateListType_1.StateListType.IncidentPostmortemStatus,
|
|
139
85
|
orderColumn: "order",
|
|
140
86
|
subject: { singular: "postmortem", plural: "postmortems" },
|
|
141
87
|
builtIns: [
|
|
@@ -146,9 +92,10 @@ exports.STATE_LISTS = {
|
|
|
146
92
|
keepsBuiltInOrder: true,
|
|
147
93
|
insertAboveFlag: "isCompletedStatus",
|
|
148
94
|
orderReason: "A postmortem is started, drafted and then completed",
|
|
95
|
+
worstAt: StateListEnd.Top,
|
|
149
96
|
},
|
|
150
|
-
[StateListType.SecurityCaseStatus]: {
|
|
151
|
-
type: StateListType.SecurityCaseStatus,
|
|
97
|
+
[StateListType_1.StateListType.SecurityCaseStatus]: {
|
|
98
|
+
type: StateListType_1.StateListType.SecurityCaseStatus,
|
|
152
99
|
orderColumn: "order",
|
|
153
100
|
subject: { singular: "security case", plural: "security cases" },
|
|
154
101
|
builtIns: [
|
|
@@ -160,9 +107,10 @@ exports.STATE_LISTS = {
|
|
|
160
107
|
keepsBuiltInOrder: true,
|
|
161
108
|
insertAboveFlag: "isClosedStatus",
|
|
162
109
|
orderReason: "A case is opened, taken on, contained and then closed",
|
|
110
|
+
worstAt: StateListEnd.Top,
|
|
163
111
|
},
|
|
164
|
-
[StateListType.SecurityCasePriority]: {
|
|
165
|
-
type: StateListType.SecurityCasePriority,
|
|
112
|
+
[StateListType_1.StateListType.SecurityCasePriority]: {
|
|
113
|
+
type: StateListType_1.StateListType.SecurityCasePriority,
|
|
166
114
|
orderColumn: "order",
|
|
167
115
|
subject: { singular: "security case", plural: "security cases" },
|
|
168
116
|
builtIns: [
|
|
@@ -174,8 +122,22 @@ exports.STATE_LISTS = {
|
|
|
174
122
|
],
|
|
175
123
|
keepsBuiltInOrder: true,
|
|
176
124
|
orderReason: "Priorities are ranked most urgent first, and detections open their cases at the built-in priority of their severity",
|
|
125
|
+
worstAt: StateListEnd.Top,
|
|
177
126
|
},
|
|
178
127
|
};
|
|
128
|
+
/*
|
|
129
|
+
* The list a model's records make up, when they are one of these: its
|
|
130
|
+
* tableName is the list's type (IncidentSeverity, MonitorStatus). Null for
|
|
131
|
+
* any other model.
|
|
132
|
+
*/
|
|
133
|
+
const getStateListOfTable = (tableName) => {
|
|
134
|
+
if (!tableName ||
|
|
135
|
+
!Object.prototype.hasOwnProperty.call(exports.STATE_LISTS, tableName)) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
return exports.STATE_LISTS[tableName];
|
|
139
|
+
};
|
|
140
|
+
exports.getStateListOfTable = getStateListOfTable;
|
|
179
141
|
const toIdString = (value) => {
|
|
180
142
|
if (value === null || value === undefined) {
|
|
181
143
|
return "";
|
package/Utils/StateOrder.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import commonJsModule from "./StateOrder.js";
|
|
2
2
|
export const STATE_LISTS = commonJsModule.STATE_LISTS;
|
|
3
|
+
export const StateListEnd = commonJsModule.StateListEnd;
|
|
3
4
|
export const StateListType = commonJsModule.StateListType;
|
|
4
5
|
export const getStateListBuiltIn = commonJsModule.getStateListBuiltIn;
|
|
5
6
|
export const getStateListBuiltInRows = commonJsModule.getStateListBuiltInRows;
|
|
6
7
|
export const getStateListDeleteRefusal = commonJsModule.getStateListDeleteRefusal;
|
|
7
8
|
export const getStateListDeleteRefusalMessage = commonJsModule.getStateListDeleteRefusalMessage;
|
|
8
9
|
export const getStateListInsertValue = commonJsModule.getStateListInsertValue;
|
|
10
|
+
export const getStateListOfTable = commonJsModule.getStateListOfTable;
|
|
9
11
|
export const getStateListOrderViolation = commonJsModule.getStateListOrderViolation;
|
|
10
12
|
export const getStateListOrderViolationIntroduced = commonJsModule.getStateListOrderViolationIntroduced;
|
|
11
13
|
export const getStateListOrderViolationMessage = commonJsModule.getStateListOrderViolationMessage;
|
|
@@ -47,7 +47,7 @@ var StateTimelineRecord;
|
|
|
47
47
|
exports.ONLY_STATE_DELETE_MESSAGES = {
|
|
48
48
|
[StateTimelineRecord.Incident]: "The incident's only state can't be deleted: an incident always has a state. To change it, add a new state.",
|
|
49
49
|
[StateTimelineRecord.Alert]: "The alert's only state can't be deleted: an alert always has a state. To change it, add a new state.",
|
|
50
|
-
[StateTimelineRecord.ScheduledMaintenance]: "The event's only state can't be deleted: a
|
|
50
|
+
[StateTimelineRecord.ScheduledMaintenance]: "The event's only state can't be deleted: a maintenance event always has a state. To change it, add a new state.",
|
|
51
51
|
[StateTimelineRecord.IncidentEpisode]: "The episode's only state can't be deleted: an episode always has a state. To change it, add a new state.",
|
|
52
52
|
[StateTimelineRecord.AlertEpisode]: "The episode's only state can't be deleted: an episode always has a state. To change it, add a new state.",
|
|
53
53
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CodeTaskStage } from "../../Types/AI/CodeTaskStage.mjs";
|
|
2
|
+
import SuggestionOffer from "./SuggestionOffer.mjs";
|
|
3
|
+
export interface ActionItemCodeTaskOfferInput {
|
|
4
|
+
isAiEnabled: boolean;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
taskStage: CodeTaskStage | null;
|
|
7
|
+
hasConnectedRepository: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function getActionItemCodeTaskOffer(input: ActionItemCodeTaskOfferInput): SuggestionOffer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CodeTaskStage } from "../../Types/AI/CodeTaskStage";
|
|
2
|
+
import SuggestionOffer from "./SuggestionOffer";
|
|
3
|
+
export interface ActionItemCodeTaskOfferInput {
|
|
4
|
+
isAiEnabled: boolean;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
taskStage: CodeTaskStage | null;
|
|
7
|
+
hasConnectedRepository: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function getActionItemCodeTaskOffer(input: ActionItemCodeTaskOfferInput): SuggestionOffer;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getActionItemCodeTaskOffer = getActionItemCodeTaskOffer;
|
|
4
|
+
const CodeTaskStage_1 = require("../../Types/AI/CodeTaskStage");
|
|
5
|
+
const CodeFixSuggestion_1 = require("./CodeFixSuggestion");
|
|
6
|
+
const FINISHED_STAGES = [
|
|
7
|
+
CodeTaskStage_1.CodeTaskStage.PullRequestOpen,
|
|
8
|
+
CodeTaskStage_1.CodeTaskStage.Merged,
|
|
9
|
+
CodeTaskStage_1.CodeTaskStage.Done,
|
|
10
|
+
];
|
|
11
|
+
const MOVING_STAGES = [
|
|
12
|
+
CodeTaskStage_1.CodeTaskStage.Queued,
|
|
13
|
+
CodeTaskStage_1.CodeTaskStage.Working,
|
|
14
|
+
CodeTaskStage_1.CodeTaskStage.Retrying,
|
|
15
|
+
];
|
|
16
|
+
function getActionItemCodeTaskOffer(input) {
|
|
17
|
+
return (0, CodeFixSuggestion_1.getCodeFixOffer)({
|
|
18
|
+
isAiEnabled: input.isAiEnabled,
|
|
19
|
+
applies: input.isOpen,
|
|
20
|
+
hasActiveFix: Boolean(input.taskStage && MOVING_STAGES.includes(input.taskStage)),
|
|
21
|
+
hasFinishedFix: Boolean(input.taskStage && FINISHED_STAGES.includes(input.taskStage)),
|
|
22
|
+
hasConnectedRepository: input.hasConnectedRepository,
|
|
23
|
+
isBackedByEvidence: true,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { VerifiedFixRunbookInput } from "../AiRemediation/VerifiedFixRunbook.mjs";
|
|
2
|
+
import SuggestionOffer from "./SuggestionOffer.mjs";
|
|
3
|
+
export declare function getVerifiedFixRunbookOffer(input: VerifiedFixRunbookInput & {
|
|
4
|
+
mayCreateRunbook: boolean;
|
|
5
|
+
}): SuggestionOffer;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getVerifiedFixRunbookOffer = getVerifiedFixRunbookOffer;
|
|
7
|
+
const VerifiedFixRunbook_1 = require("../AiRemediation/VerifiedFixRunbook");
|
|
8
|
+
const SuggestionOffer_1 = __importDefault(require("./SuggestionOffer"));
|
|
9
|
+
/*
|
|
10
|
+
* WHEN A FIX OFFERS "SAVE AS RUNBOOK" (issue #6801).
|
|
11
|
+
*
|
|
12
|
+
* A fix OneUptime AI ran on its own commands or MCP calls, once verified,
|
|
13
|
+
* can be written down as a runbook (VerifiedFixRunbook). The fix's card on
|
|
14
|
+
* the incident or alert asks this, and the server's save asks the same
|
|
15
|
+
* refusal, so the card never offers what the server would refuse:
|
|
16
|
+
*
|
|
17
|
+
* - Saved already: Done. The card names the runbook and links to it,
|
|
18
|
+
* instead of offering a second one.
|
|
19
|
+
* - Not verified, a runbook's own run, or nothing of it ran: None. Only
|
|
20
|
+
* what worked is written down, and a runbook's run is a runbook
|
|
21
|
+
* already.
|
|
22
|
+
* - The reader may not create runbooks: None. Saving is creating a
|
|
23
|
+
* runbook, which their role does not allow; the fix's card has nothing
|
|
24
|
+
* for them to press.
|
|
25
|
+
* - Otherwise: Act.
|
|
26
|
+
*
|
|
27
|
+
* Not an AI action: saving calls no model - the runbook is written from
|
|
28
|
+
* what ran - so it is offered whether AI is on now or not.
|
|
29
|
+
*/
|
|
30
|
+
function getVerifiedFixRunbookOffer(input) {
|
|
31
|
+
const refusal = (0, VerifiedFixRunbook_1.getVerifiedFixRunbookRefusal)(input);
|
|
32
|
+
if (refusal === VerifiedFixRunbook_1.VerifiedFixRunbookRefusal.AlreadySaved) {
|
|
33
|
+
return SuggestionOffer_1.default.Done;
|
|
34
|
+
}
|
|
35
|
+
if (refusal || !input.mayCreateRunbook) {
|
|
36
|
+
return SuggestionOffer_1.default.None;
|
|
37
|
+
}
|
|
38
|
+
return SuggestionOffer_1.default.Act;
|
|
39
|
+
}
|
|
@@ -8,6 +8,7 @@ exports.getSyslogHeaderFormat = getSyslogHeaderFormat;
|
|
|
8
8
|
exports.parseSyslogMessage = parseSyslogMessage;
|
|
9
9
|
exports.sanitizeSyslogAttributeKey = sanitizeSyslogAttributeKey;
|
|
10
10
|
const Date_1 = __importDefault(require("../../Types/Date"));
|
|
11
|
+
const LookupTable_1 = require("../LookupTable");
|
|
11
12
|
// The header a message came with, for callers that treat the two apart.
|
|
12
13
|
var SyslogHeaderFormat;
|
|
13
14
|
(function (SyslogHeaderFormat) {
|
|
@@ -307,7 +308,7 @@ function extractStructuredData(value) {
|
|
|
307
308
|
};
|
|
308
309
|
}
|
|
309
310
|
function parseStructuredData(raw) {
|
|
310
|
-
var _a, _b
|
|
311
|
+
var _a, _b;
|
|
311
312
|
const result = {};
|
|
312
313
|
const sdRegex = /\[([^\s\]]+)((?:\s+[^\s=]+="[^"]*")*)\]/g;
|
|
313
314
|
let match;
|
|
@@ -315,8 +316,19 @@ function parseStructuredData(raw) {
|
|
|
315
316
|
const sdIdRaw = match[1];
|
|
316
317
|
const params = (_a = match[2]) !== null && _a !== void 0 ? _a : "";
|
|
317
318
|
const sdId = sanitizeKey(sdIdRaw);
|
|
318
|
-
|
|
319
|
-
|
|
319
|
+
/*
|
|
320
|
+
* The element's own entry only, written as the result's own key. An
|
|
321
|
+
* SD-ID and a parameter name are whatever the sender wrote, and a
|
|
322
|
+
* plain read of an SD-ID named __proto__ found the prototype every
|
|
323
|
+
* object shares: its parameters were then written onto it, into every
|
|
324
|
+
* object of the process that read the line (a probe's syslog
|
|
325
|
+
* listener, the syslog ingest). One named constructor wrote onto the
|
|
326
|
+
* Object function. Each is an element like any other now.
|
|
327
|
+
*/
|
|
328
|
+
let entry = (0, LookupTable_1.readOwnValue)(result, sdId);
|
|
329
|
+
if (!entry) {
|
|
330
|
+
entry = {};
|
|
331
|
+
(0, LookupTable_1.writeOwnValue)(result, sdId, entry);
|
|
320
332
|
}
|
|
321
333
|
const paramRegex = /([^\s=]+)="([^"]*)"/g;
|
|
322
334
|
let paramMatch;
|
|
@@ -324,9 +336,7 @@ function parseStructuredData(raw) {
|
|
|
324
336
|
const keyRaw = paramMatch[1];
|
|
325
337
|
const value = (_b = paramMatch[2]) !== null && _b !== void 0 ? _b : "";
|
|
326
338
|
const key = sanitizeKey(keyRaw);
|
|
327
|
-
|
|
328
|
-
entry[key] = value;
|
|
329
|
-
result[sdId] = entry;
|
|
339
|
+
(0, LookupTable_1.writeOwnValue)(entry, key, value);
|
|
330
340
|
}
|
|
331
341
|
}
|
|
332
342
|
return result;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import AggregatedModel from "../../Types/BaseDatabase/AggregatedModel.mjs";
|
|
2
|
+
import Timezone from "../../Types/Timezone.mjs";
|
|
2
3
|
import { ReceivingGap } from "./ReceivingGaps.mjs";
|
|
3
4
|
export interface HeartbeatAvailabilityPoint {
|
|
4
5
|
x: Date;
|
|
@@ -19,7 +20,10 @@ export declare class HeartbeatAvailabilityUtil {
|
|
|
19
20
|
windowEnd: Date;
|
|
20
21
|
now: Date;
|
|
21
22
|
receivingGaps?: Array<ReceivingGap> | undefined;
|
|
23
|
+
timezone?: Timezone | undefined;
|
|
22
24
|
}): HeartbeatAvailabilityResult;
|
|
25
|
+
private static getSlots;
|
|
26
|
+
private static getNearestSlotIndex;
|
|
23
27
|
private static isNotMonitored;
|
|
24
28
|
private static getBucketTimestamp;
|
|
25
29
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import AggregatedModel from "../../Types/BaseDatabase/AggregatedModel";
|
|
2
|
+
import Timezone from "../../Types/Timezone";
|
|
2
3
|
import { ReceivingGap } from "./ReceivingGaps";
|
|
3
4
|
export interface HeartbeatAvailabilityPoint {
|
|
4
5
|
x: Date;
|
|
@@ -19,7 +20,10 @@ export declare class HeartbeatAvailabilityUtil {
|
|
|
19
20
|
windowEnd: Date;
|
|
20
21
|
now: Date;
|
|
21
22
|
receivingGaps?: Array<ReceivingGap> | undefined;
|
|
23
|
+
timezone?: Timezone | undefined;
|
|
22
24
|
}): HeartbeatAvailabilityResult;
|
|
25
|
+
private static getSlots;
|
|
26
|
+
private static getNearestSlotIndex;
|
|
23
27
|
private static isNotMonitored;
|
|
24
28
|
private static getBucketTimestamp;
|
|
25
29
|
}
|
|
@@ -5,6 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
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
7
|
const AggregationIntervalUtil_1 = __importDefault(require("../../Types/BaseDatabase/AggregationIntervalUtil"));
|
|
8
|
+
const Date_1 = __importDefault(require("../../Types/Date"));
|
|
9
|
+
const Timezone_1 = __importDefault(require("../../Types/Timezone"));
|
|
10
|
+
const TimezoneAlias_1 = __importDefault(require("../../Types/TimezoneAlias"));
|
|
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
|
|
@@ -69,31 +72,29 @@ class HeartbeatAvailabilityUtil {
|
|
|
69
72
|
rowTimestamps.sort((a, b) => {
|
|
70
73
|
return a - b;
|
|
71
74
|
});
|
|
75
|
+
const slots = this.getSlots({
|
|
76
|
+
interval,
|
|
77
|
+
bucketMs,
|
|
78
|
+
rowTimestamps,
|
|
79
|
+
windowStartMs,
|
|
80
|
+
windowEndMs,
|
|
81
|
+
timezone: data.timezone,
|
|
82
|
+
});
|
|
83
|
+
const lastIndex = slots.length - 1;
|
|
84
|
+
if (lastIndex < 0) {
|
|
85
|
+
return { points: [], uptimePercent: null };
|
|
86
|
+
}
|
|
72
87
|
/*
|
|
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.
|
|
88
|
+
* Snap each row to the slot whose start is nearest it instead of
|
|
89
|
+
* requiring exact equality: a row a few seconds or an hour off its
|
|
90
|
+
* slot - a serialization offset, or day buckets the server cut in
|
|
91
|
+
* another zone than the one this was given - still lands on a slot
|
|
92
|
+
* of its own, and no row is ever mapped to two slots.
|
|
92
93
|
*/
|
|
93
94
|
const presentSlots = new Set();
|
|
94
95
|
for (const t of rowTimestamps) {
|
|
95
|
-
const index =
|
|
96
|
-
if (index >= 0
|
|
96
|
+
const index = this.getNearestSlotIndex(slots, t);
|
|
97
|
+
if (index >= 0) {
|
|
97
98
|
presentSlots.add(index);
|
|
98
99
|
}
|
|
99
100
|
}
|
|
@@ -103,12 +104,12 @@ class HeartbeatAvailabilityUtil {
|
|
|
103
104
|
* they start before the window does (leading edge of the grid).
|
|
104
105
|
*/
|
|
105
106
|
const evaluableEndMs = Math.min(windowEndMs, nowMs - exports.HEARTBEAT_INGEST_LAG_MS);
|
|
106
|
-
const receivingGaps = ReceivingGaps_1.default.clip(data.receivingGaps || [], new Date(
|
|
107
|
+
const receivingGaps = ReceivingGaps_1.default.clip(data.receivingGaps || [], new Date(slots[0].startMs), new Date(slots[lastIndex].endMs));
|
|
107
108
|
const states = [];
|
|
108
109
|
for (let index = 0; index <= lastIndex; index++) {
|
|
109
|
-
const startMs
|
|
110
|
+
const { startMs, endMs } = slots[index];
|
|
110
111
|
const up = presentSlots.has(index);
|
|
111
|
-
const isPartial = startMs < windowStartMs ||
|
|
112
|
+
const isPartial = startMs < windowStartMs || endMs > evaluableEndMs;
|
|
112
113
|
if (up) {
|
|
113
114
|
states.push("up");
|
|
114
115
|
}
|
|
@@ -118,7 +119,7 @@ class HeartbeatAvailabilityUtil {
|
|
|
118
119
|
else if (this.isNotMonitored({
|
|
119
120
|
receivingGaps,
|
|
120
121
|
startMs,
|
|
121
|
-
endMs
|
|
122
|
+
endMs,
|
|
122
123
|
})) {
|
|
123
124
|
states.push("excluded");
|
|
124
125
|
}
|
|
@@ -166,7 +167,7 @@ class HeartbeatAvailabilityUtil {
|
|
|
166
167
|
}
|
|
167
168
|
const up = state === "up" || isBridged(index);
|
|
168
169
|
points.push({
|
|
169
|
-
x: new Date(
|
|
170
|
+
x: new Date(slots[index].startMs),
|
|
170
171
|
y: up ? 100 : 0,
|
|
171
172
|
});
|
|
172
173
|
evaluatedCount++;
|
|
@@ -179,6 +180,92 @@ class HeartbeatAvailabilityUtil {
|
|
|
179
180
|
uptimePercent: evaluatedCount > 0 ? (upCount / evaluatedCount) * 100 : null,
|
|
180
181
|
};
|
|
181
182
|
}
|
|
183
|
+
/*
|
|
184
|
+
* The server's buckets from the one holding the window's start to the one
|
|
185
|
+
* holding its end, in order.
|
|
186
|
+
*/
|
|
187
|
+
static getSlots(data) {
|
|
188
|
+
const slots = [];
|
|
189
|
+
/*
|
|
190
|
+
* The server starts a day, week, month or year bucket at a midnight, a
|
|
191
|
+
* Monday, a 1st or a 1 January in the zone the request named
|
|
192
|
+
* (AggregateBy.timezone), or in UTC when it named none (issue #7277).
|
|
193
|
+
*/
|
|
194
|
+
const unit = AggregationIntervalUtil_1.default.getCalendarUnit(data.interval);
|
|
195
|
+
if (unit) {
|
|
196
|
+
/*
|
|
197
|
+
* Days, weeks, months and years are walked on the calendar of the
|
|
198
|
+
* zone the request named, as the server cut them: each slot runs from
|
|
199
|
+
* one midnight (Monday, 1st, 1 January) to the next, however long
|
|
200
|
+
* that was. A fixed step drifts off them - an hour a clock change for
|
|
201
|
+
* days, which put two slots on one day and the rest a day early, and
|
|
202
|
+
* days a month for months.
|
|
203
|
+
*/
|
|
204
|
+
const timezone = data.timezone
|
|
205
|
+
? TimezoneAlias_1.default.getCanonicalTimezone(data.timezone)
|
|
206
|
+
: Timezone_1.default.UTC;
|
|
207
|
+
let startMs = Date_1.default.getStartOfCalendarUnit(new Date(data.windowStartMs), unit, timezone).getTime();
|
|
208
|
+
while (startMs <= data.windowEndMs) {
|
|
209
|
+
// Where the next one starts, however long this one was.
|
|
210
|
+
const endMs = AggregationIntervalUtil_1.default.getBucketEnd({
|
|
211
|
+
bucketStart: new Date(startMs),
|
|
212
|
+
interval: data.interval,
|
|
213
|
+
timezone: timezone,
|
|
214
|
+
}).getTime();
|
|
215
|
+
if (!(endMs > startMs)) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
slots.push({ startMs, endMs });
|
|
219
|
+
startMs = endMs;
|
|
220
|
+
}
|
|
221
|
+
return slots;
|
|
222
|
+
}
|
|
223
|
+
/*
|
|
224
|
+
* Finer buckets are the same width in every zone. Anchor their grid to
|
|
225
|
+
* the first returned row rather than to the window start: server
|
|
226
|
+
* buckets are `toStartOfInterval`-aligned and the window start
|
|
227
|
+
* generally isn't, and anchoring to real data also absorbs any
|
|
228
|
+
* constant offset introduced by timestamp serialization. With no rows
|
|
229
|
+
* at all, anchor to the window start — everything is down regardless
|
|
230
|
+
* of alignment.
|
|
231
|
+
*/
|
|
232
|
+
const anchorMs = data.rowTimestamps.length > 0
|
|
233
|
+
? data.rowTimestamps[0]
|
|
234
|
+
: data.windowStartMs;
|
|
235
|
+
const stepsBack = Math.ceil((anchorMs - data.windowStartMs) / data.bucketMs);
|
|
236
|
+
const gridStartMs = anchorMs - stepsBack * data.bucketMs;
|
|
237
|
+
const lastIndex = Math.floor((data.windowEndMs - gridStartMs) / data.bucketMs);
|
|
238
|
+
for (let index = 0; index <= lastIndex; index++) {
|
|
239
|
+
const startMs = gridStartMs + index * data.bucketMs;
|
|
240
|
+
slots.push({ startMs, endMs: startMs + data.bucketMs });
|
|
241
|
+
}
|
|
242
|
+
return slots;
|
|
243
|
+
}
|
|
244
|
+
/*
|
|
245
|
+
* The slot whose start is nearest `t`: `t` is past the middle of the slot
|
|
246
|
+
* before it, and short of its own middle. Up to half a slot before the
|
|
247
|
+
* first slot still counts, as does anything short of the middle of the
|
|
248
|
+
* last one; further out is no slot (-1).
|
|
249
|
+
*/
|
|
250
|
+
static getNearestSlotIndex(slots, t) {
|
|
251
|
+
const first = slots[0];
|
|
252
|
+
if (t < first.startMs - (first.endMs - first.startMs) / 2) {
|
|
253
|
+
return -1;
|
|
254
|
+
}
|
|
255
|
+
let low = 0;
|
|
256
|
+
let high = slots.length;
|
|
257
|
+
while (low < high) {
|
|
258
|
+
const middle = Math.floor((low + high) / 2);
|
|
259
|
+
const slot = slots[middle];
|
|
260
|
+
if (t < (slot.startMs + slot.endMs) / 2) {
|
|
261
|
+
high = middle;
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
low = middle + 1;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return low < slots.length ? low : -1;
|
|
268
|
+
}
|
|
182
269
|
/*
|
|
183
270
|
* Rule 4: a silent bucket OneUptime was not receiving for, except for
|
|
184
271
|
* 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;
|
|
@@ -6,6 +6,7 @@ export interface FormattedValue {
|
|
|
6
6
|
export interface ValueFormatterOptions {
|
|
7
7
|
metricName?: string;
|
|
8
8
|
language?: string | undefined;
|
|
9
|
+
unitName?: ((unit: string) => string) | undefined;
|
|
9
10
|
}
|
|
10
11
|
export default class ValueFormatter {
|
|
11
12
|
static formatValue(value: number, unit: string, options?: ValueFormatterOptions): string;
|