@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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Translator } from "../Types/Translator.mjs";
|
|
2
|
+
export declare const MILLISECONDS_TEMPLATE: string;
|
|
3
|
+
export interface MillisecondsOptions {
|
|
4
|
+
maximumFractionDigits?: number | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare const roundMilliseconds: (milliseconds: number, maximumFractionDigits?: number | undefined) => number;
|
|
7
|
+
export declare const formatMilliseconds: (translator: Translator, milliseconds: number, options?: MillisecondsOptions) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Translator } from "../Types/Translator";
|
|
2
|
+
export declare const MILLISECONDS_TEMPLATE: string;
|
|
3
|
+
export interface MillisecondsOptions {
|
|
4
|
+
maximumFractionDigits?: number | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare const roundMilliseconds: (milliseconds: number, maximumFractionDigits?: number | undefined) => number;
|
|
7
|
+
export declare const formatMilliseconds: (translator: Translator, milliseconds: number, options?: MillisecondsOptions) => string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatMilliseconds = exports.roundMilliseconds = exports.MILLISECONDS_TEMPLATE = void 0;
|
|
4
|
+
const Translator_1 = require("../Types/Translator");
|
|
5
|
+
/*
|
|
6
|
+
* A DURATION IN MILLISECONDS, IN THE READER'S LANGUAGE.
|
|
7
|
+
*
|
|
8
|
+
* Every monitor type's summary - the monitor's Summary card, Test Monitor's
|
|
9
|
+
* result, Monitoring Logs' View Summary, the incident and alert pages'
|
|
10
|
+
* evaluation - built its Response Time (and a ping's jitter and round
|
|
11
|
+
* trips, a port's and a request's phases, a script's execution time) as
|
|
12
|
+
* `responseTimeInMs + " ms"`, and the monitor overview's Latest result and
|
|
13
|
+
* its Probes card did the same (issues #7224, #7416). On an Arabic or
|
|
14
|
+
* Persian page the browser lays that English text out from the right, so it
|
|
15
|
+
* read "ms 411", and in Persian its digits stayed Latin (411, not ۴۱۱)
|
|
16
|
+
* beside the card's own Persian date.
|
|
17
|
+
*
|
|
18
|
+
* Each is now one key, "{{value}} ms", which every language words with its
|
|
19
|
+
* own unit, in its own order ("411 ms", "411 мс", "411 毫秒", "۴۱۱
|
|
20
|
+
* میلیثانیه", "411 ملي ث": Intl's short unit, as Locales/ARABIC.md says a
|
|
21
|
+
* duration is written), with the figure as the reader's language writes a
|
|
22
|
+
* number (translator.formatNumber: "1,234" / "1.234" / "۱٬۲۳۴", Latin
|
|
23
|
+
* digits in Arabic). English reads "411 ms" as before; a figure of a
|
|
24
|
+
* thousand or more takes its thousands separator ("1,234 ms"), as the
|
|
25
|
+
* Retry Attempts lines under it already wrote it.
|
|
26
|
+
*
|
|
27
|
+
* It lives in Common, React-free, so a shared helper that writes a page's
|
|
28
|
+
* words with the reader's Translator (MonitorOverviewPresentationUtil, for
|
|
29
|
+
* the overview's hero) writes a duration exactly as the Dashboard's views
|
|
30
|
+
* do. The Dashboard's Utils/Milliseconds re-exports it: one helper, never
|
|
31
|
+
* two copies. Without a translator's own wording (the server, a unit test)
|
|
32
|
+
* it writes English.
|
|
33
|
+
*
|
|
34
|
+
* A guard (Common Tests/UI/MillisecondsInReadersLanguageGuard) refuses a
|
|
35
|
+
* duration built as `x + " ms"` anywhere in the Dashboard, and any "ms"
|
|
36
|
+
* written beside a figure in the monitor summaries and the overview.
|
|
37
|
+
*/
|
|
38
|
+
exports.MILLISECONDS_TEMPLATE = (0, Translator_1.translationKey)("{{value}} ms");
|
|
39
|
+
// A duration's figure, rounded to the decimals asked for.
|
|
40
|
+
const roundMilliseconds = (milliseconds, maximumFractionDigits) => {
|
|
41
|
+
if (maximumFractionDigits === undefined) {
|
|
42
|
+
return milliseconds;
|
|
43
|
+
}
|
|
44
|
+
const scale = Math.pow(10, Math.max(0, Math.min(3, Math.floor(maximumFractionDigits))));
|
|
45
|
+
return Math.round(milliseconds * scale) / scale;
|
|
46
|
+
};
|
|
47
|
+
exports.roundMilliseconds = roundMilliseconds;
|
|
48
|
+
/*
|
|
49
|
+
* "411 ms" in the reader's language. A value that is not a number (a
|
|
50
|
+
* reading the probe did not make) reads "-", as every missing fact does.
|
|
51
|
+
*/
|
|
52
|
+
const formatMilliseconds = (translator, milliseconds, options) => {
|
|
53
|
+
if (typeof milliseconds !== "number" || !Number.isFinite(milliseconds)) {
|
|
54
|
+
return "-";
|
|
55
|
+
}
|
|
56
|
+
return translator.translateTemplate(exports.MILLISECONDS_TEMPLATE, {
|
|
57
|
+
value: translator.formatNumber((0, exports.roundMilliseconds)(milliseconds, options === null || options === void 0 ? void 0 : options.maximumFractionDigits)),
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
exports.formatMilliseconds = formatMilliseconds;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ModelNames {
|
|
2
|
+
tableName?: string | null | undefined;
|
|
3
|
+
singularName?: string | null | undefined;
|
|
4
|
+
pluralName?: string | null | undefined;
|
|
5
|
+
apiSingularName?: string | null | undefined;
|
|
6
|
+
apiPluralName?: string | null | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function getApiSingularName(model: ModelNames): string;
|
|
9
|
+
export declare function getApiPluralName(model: ModelNames): string;
|
|
10
|
+
export declare const KEPT_SINGULAR_NAMES: ReadonlyArray<string>;
|
|
11
|
+
export declare function getScreenSingularName(apiSingularName: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ModelNames {
|
|
2
|
+
tableName?: string | null | undefined;
|
|
3
|
+
singularName?: string | null | undefined;
|
|
4
|
+
pluralName?: string | null | undefined;
|
|
5
|
+
apiSingularName?: string | null | undefined;
|
|
6
|
+
apiPluralName?: string | null | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function getApiSingularName(model: ModelNames): string;
|
|
9
|
+
export declare function getApiPluralName(model: ModelNames): string;
|
|
10
|
+
export declare const KEPT_SINGULAR_NAMES: ReadonlyArray<string>;
|
|
11
|
+
export declare function getScreenSingularName(apiSingularName: string): string;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* THE NAME A MODEL KEEPS OUTSIDE ITS SCREENS.
|
|
4
|
+
*
|
|
5
|
+
* A model's singularName and pluralName are words people read: list titles,
|
|
6
|
+
* empty states, buttons, the API reference. They are also, without anyone
|
|
7
|
+
* deciding it, names other things call or store the model by:
|
|
8
|
+
*
|
|
9
|
+
* - the OpenAPI spec tags every endpoint with the singular name, and the
|
|
10
|
+
* Terraform provider names its resource after the tag
|
|
11
|
+
* (oneuptime_on_call_policy_schedule);
|
|
12
|
+
* - the CLI names its command after it (oneuptime on-call-policy-schedule);
|
|
13
|
+
* - the MCP server names its tools after both (list_on_call_duty_policies);
|
|
14
|
+
* - the audit log stores the singular name as each entry's resource type.
|
|
15
|
+
*
|
|
16
|
+
* So renaming a thing on screen (#6817: one name per thing) must not rename
|
|
17
|
+
* it there: a Terraform configuration, a script, an agent's allowed tools
|
|
18
|
+
* and last year's audit entries all keep working. A renamed model says what
|
|
19
|
+
* it was called in @TableMetadata's apiSingularName and apiPluralName (both,
|
|
20
|
+
* when its singular name changed: ModelApiNames.test.ts), and everything
|
|
21
|
+
* above reads its names through these two functions.
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.KEPT_SINGULAR_NAMES = void 0;
|
|
25
|
+
exports.getApiSingularName = getApiSingularName;
|
|
26
|
+
exports.getApiPluralName = getApiPluralName;
|
|
27
|
+
exports.getScreenSingularName = getScreenSingularName;
|
|
28
|
+
// The singular name the API, Terraform, the CLI, MCP and the audit log use.
|
|
29
|
+
function getApiSingularName(model) {
|
|
30
|
+
return model.apiSingularName || model.singularName || model.tableName || "";
|
|
31
|
+
}
|
|
32
|
+
/*
|
|
33
|
+
* The plural name the MCP server's list and count tools use. A model with no
|
|
34
|
+
* plural gets its singular name with an "s", as the tools always gave it.
|
|
35
|
+
*/
|
|
36
|
+
function getApiPluralName(model) {
|
|
37
|
+
return (model.apiPluralName || model.pluralName || `${getApiSingularName(model)}s`);
|
|
38
|
+
}
|
|
39
|
+
/*
|
|
40
|
+
* What each kept singular name is called on screen now. The audit log stores
|
|
41
|
+
* an entry's resource type by the kept name, and its pages show the type
|
|
42
|
+
* through getScreenSingularName, so an entry about an Ingestion Key says
|
|
43
|
+
* Ingestion Key, as last year's entries about it now do too. Plain words, so
|
|
44
|
+
* the Dashboard reads them without loading the models; ModelApiNames.test.ts
|
|
45
|
+
* holds them to every model's own names.
|
|
46
|
+
*/
|
|
47
|
+
const SCREEN_SINGULAR_NAMES = {
|
|
48
|
+
// #6817 part 1: On-Call.
|
|
49
|
+
"On-Call Policy Schedule": "On-Call Schedule",
|
|
50
|
+
"User's On-Call Duty Escalation Rule": "Escalation Rule User",
|
|
51
|
+
"Team On-Call Duty Escalation Rule": "Escalation Rule Team",
|
|
52
|
+
"Schedule's On-Call Duty Escalation Rule": "Escalation Rule Schedule",
|
|
53
|
+
"On-Call Duty Execution Log": "On-Call Policy Execution Log",
|
|
54
|
+
"On-Call Duty Execution Log Timeline": "On-Call Policy Execution Log Timeline",
|
|
55
|
+
"On Call Duty Policy Feed": "On-Call Policy Feed",
|
|
56
|
+
"On Call Time Log": "On-Call Time Log",
|
|
57
|
+
"OnCallDutyPolicy User Owner": "On-Call Policy User Owner",
|
|
58
|
+
"OnCallDutyPolicy Team Owner": "On-Call Policy Team Owner",
|
|
59
|
+
// #6817 part 2: Ingestion Keys.
|
|
60
|
+
"Telemetry Ingestion Key": "Ingestion Key",
|
|
61
|
+
"Telemetry Ingestion Key Refusal": "Ingestion Key Refusal",
|
|
62
|
+
// #6817 part 3: maintenance events.
|
|
63
|
+
"Scheduled Maintenance Event": "Maintenance Event",
|
|
64
|
+
"Scheduled Event Internal Note": "Maintenance Event Internal Note",
|
|
65
|
+
"Scheduled Event Public Note": "Maintenance Event Public Note",
|
|
66
|
+
};
|
|
67
|
+
// The kept singular names this table knows, for its test.
|
|
68
|
+
exports.KEPT_SINGULAR_NAMES = Object.keys(SCREEN_SINGULAR_NAMES);
|
|
69
|
+
// What a singular name the API keeps is called on screen; any other is itself.
|
|
70
|
+
function getScreenSingularName(apiSingularName) {
|
|
71
|
+
return SCREEN_SINGULAR_NAMES[apiSingularName] || apiSingularName;
|
|
72
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import commonJsModule from "./ModelApiName.js";
|
|
2
|
+
export const KEPT_SINGULAR_NAMES = commonJsModule.KEPT_SINGULAR_NAMES;
|
|
3
|
+
export const getApiPluralName = commonJsModule.getApiPluralName;
|
|
4
|
+
export const getApiSingularName = commonJsModule.getApiSingularName;
|
|
5
|
+
export const getScreenSingularName = commonJsModule.getScreenSingularName;
|
|
@@ -29,8 +29,9 @@ export declare function siteKeyOf(siteId: string | null | undefined): string;
|
|
|
29
29
|
export default class DeviceMacLearningUtil {
|
|
30
30
|
static planMacLearning(data: {
|
|
31
31
|
ipBindings: Array<MacLearningIpBinding>;
|
|
32
|
-
devices: Array<
|
|
32
|
+
devices: Array<MacObservationCandidateDevice>;
|
|
33
33
|
observingSiteId?: string | null | undefined;
|
|
34
|
+
now?: number | undefined;
|
|
34
35
|
}): Array<MacLearningPlanEntry>;
|
|
35
36
|
static planMacObservations(data: {
|
|
36
37
|
ipBindings: Array<MacLearningIpBinding>;
|
|
@@ -29,8 +29,9 @@ export declare function siteKeyOf(siteId: string | null | undefined): string;
|
|
|
29
29
|
export default class DeviceMacLearningUtil {
|
|
30
30
|
static planMacLearning(data: {
|
|
31
31
|
ipBindings: Array<MacLearningIpBinding>;
|
|
32
|
-
devices: Array<
|
|
32
|
+
devices: Array<MacObservationCandidateDevice>;
|
|
33
33
|
observingSiteId?: string | null | undefined;
|
|
34
|
+
now?: number | undefined;
|
|
34
35
|
}): Array<MacLearningPlanEntry>;
|
|
35
36
|
static planMacObservations(data: {
|
|
36
37
|
ipBindings: Array<MacLearningIpBinding>;
|
|
@@ -17,6 +17,17 @@ exports.MAC_OBSERVATION_REFRESH_INTERVAL_IN_MS = 60 * 60 * 1000;
|
|
|
17
17
|
function siteKeyOf(siteId) {
|
|
18
18
|
return (siteId || "").trim();
|
|
19
19
|
}
|
|
20
|
+
/*
|
|
21
|
+
* Whether the device holds a reading taken after `now`, when this table was
|
|
22
|
+
* read: by a newer poll of a router, processed before this one - a retried
|
|
23
|
+
* job, or one that waited longer in the queue than the poll after it
|
|
24
|
+
* (OneUptime issue #7389). The newer reading stands over an older table.
|
|
25
|
+
*/
|
|
26
|
+
function isReadAfter(device, now) {
|
|
27
|
+
return (now !== undefined &&
|
|
28
|
+
device.observedAt !== undefined &&
|
|
29
|
+
device.observedAt > now);
|
|
30
|
+
}
|
|
20
31
|
class DeviceMacLearningUtil {
|
|
21
32
|
/*
|
|
22
33
|
* Which devices get which MAC. The rules, every one of them a refusal:
|
|
@@ -37,6 +48,10 @@ class DeviceMacLearningUtil {
|
|
|
37
48
|
* - Only an address the ARP table binds to exactly one MAC. Proxy ARP
|
|
38
49
|
* and stale duplicates put two MACs behind one address; neither can
|
|
39
50
|
* be trusted.
|
|
51
|
+
* - A learned MAC is not corrected by a table read before the device's
|
|
52
|
+
* recorded reading (`now`, when given): that reading is newer evidence
|
|
53
|
+
* (see isReadAfter). A first learn is not about time: an empty column
|
|
54
|
+
* takes the first trusted answer.
|
|
40
55
|
*
|
|
41
56
|
* Output is sorted by device id, so a given input always plans the same
|
|
42
57
|
* writes in the same order.
|
|
@@ -61,6 +76,10 @@ class DeviceMacLearningUtil {
|
|
|
61
76
|
if (device.isMacAddressLearned !== true || storedMac === learnedMac) {
|
|
62
77
|
continue;
|
|
63
78
|
}
|
|
79
|
+
// A newer reading than this table stands (issue #7389).
|
|
80
|
+
if (isReadAfter(device, data.now)) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
64
83
|
plan.push({
|
|
65
84
|
deviceId: device.id,
|
|
66
85
|
macAddress: learnedMac,
|
|
@@ -94,12 +113,19 @@ class DeviceMacLearningUtil {
|
|
|
94
113
|
* nothing disagrees - unless an earlier reading disagreed, which is now
|
|
95
114
|
* replaced so the disagreement goes.
|
|
96
115
|
*
|
|
116
|
+
* And never over a reading taken after this table was read (`now`): an
|
|
117
|
+
* older poll of a router, processed after a newer one (OneUptime issue
|
|
118
|
+
* #7389), would put its older answer back. See isReadAfter.
|
|
119
|
+
*
|
|
97
120
|
* Sorted by device id, like the learning plan.
|
|
98
121
|
*/
|
|
99
122
|
static planMacObservations(data) {
|
|
100
123
|
const plan = [];
|
|
101
124
|
for (const binding of DeviceMacLearningUtil.getTrustedBindings(data)) {
|
|
102
125
|
const device = binding.device;
|
|
126
|
+
if (isReadAfter(device, data.now)) {
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
103
129
|
const mac = binding.macAddress;
|
|
104
130
|
const recordedMac = (0, EndpointAttachmentUtil_1.normalizeMac)(device.observedMacAddress);
|
|
105
131
|
const storedMac = (0, EndpointAttachmentUtil_1.normalizeMac)(device.macAddress);
|
|
@@ -62,7 +62,15 @@ export interface EndpointExistingRowSnapshot {
|
|
|
62
62
|
firstSeenAt?: Date | undefined;
|
|
63
63
|
lastSeenAt?: Date | undefined;
|
|
64
64
|
}
|
|
65
|
+
export declare const ENDPOINT_WALK_WINDOW_MS: number;
|
|
65
66
|
export declare const ENDPOINT_LAST_SEEN_REFRESH_MS: number;
|
|
67
|
+
export declare const ENDPOINT_REFRESH_GROUPS: number;
|
|
68
|
+
export declare const COARSE_LAST_SEEN_STEP_SQL: string;
|
|
69
|
+
export declare function endpointRefreshSlot(data: {
|
|
70
|
+
time: number;
|
|
71
|
+
macAddress: string;
|
|
72
|
+
refreshMs: number;
|
|
73
|
+
}): number;
|
|
66
74
|
export declare const CONTROLLER_SIGHTING_CURRENT_FOR_MS: number;
|
|
67
75
|
export interface EndpointUpsertContext {
|
|
68
76
|
now: Date;
|
|
@@ -62,7 +62,15 @@ export interface EndpointExistingRowSnapshot {
|
|
|
62
62
|
firstSeenAt?: Date | undefined;
|
|
63
63
|
lastSeenAt?: Date | undefined;
|
|
64
64
|
}
|
|
65
|
+
export declare const ENDPOINT_WALK_WINDOW_MS: number;
|
|
65
66
|
export declare const ENDPOINT_LAST_SEEN_REFRESH_MS: number;
|
|
67
|
+
export declare const ENDPOINT_REFRESH_GROUPS: number;
|
|
68
|
+
export declare const COARSE_LAST_SEEN_STEP_SQL: string;
|
|
69
|
+
export declare function endpointRefreshSlot(data: {
|
|
70
|
+
time: number;
|
|
71
|
+
macAddress: string;
|
|
72
|
+
refreshMs: number;
|
|
73
|
+
}): number;
|
|
66
74
|
export declare const CONTROLLER_SIGHTING_CURRENT_FOR_MS: number;
|
|
67
75
|
export interface EndpointUpsertContext {
|
|
68
76
|
now: Date;
|
|
@@ -1,21 +1,81 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeMac = exports.CONTROLLER_SIGHTING_CURRENT_FOR_MS = exports.ENDPOINT_LAST_SEEN_REFRESH_MS = void 0;
|
|
6
|
+
exports.normalizeMac = exports.CONTROLLER_SIGHTING_CURRENT_FOR_MS = exports.COARSE_LAST_SEEN_STEP_SQL = exports.ENDPOINT_REFRESH_GROUPS = exports.ENDPOINT_LAST_SEEN_REFRESH_MS = exports.ENDPOINT_WALK_WINDOW_MS = void 0;
|
|
7
|
+
exports.endpointRefreshSlot = endpointRefreshSlot;
|
|
8
|
+
const DeviceReachabilityUtil_1 = __importDefault(require("../NetworkDevice/DeviceReachabilityUtil"));
|
|
4
9
|
/*
|
|
5
10
|
* How stale a row's lastSeenAt is allowed to get before an otherwise
|
|
6
11
|
* unchanged observation is written purely to refresh it.
|
|
7
12
|
*
|
|
8
|
-
* Freshness is load-bearing:
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* Freshness is load-bearing: the map draws an endpoint "down", the Discovered
|
|
14
|
+
* Devices list stops counting it, and the "Connected to" card stops matching
|
|
15
|
+
* a device by its address once lastSeenAt is older than the walk window
|
|
16
|
+
* (ENDPOINT_WALK_WINDOW_MS, the shared device staleness window at the default
|
|
17
|
+
* interval - 60 minutes). Suppressing the refresh entirely would mark every
|
|
18
|
+
* stable endpoint down, so the real bound is that stored lastSeenAt may lag
|
|
19
|
+
* reality by at most (refresh window + poll interval).
|
|
20
|
+
*
|
|
21
|
+
* It was a flat 5 minutes - the default poll interval itself - so every
|
|
22
|
+
* ARP/FDB walk rewrote every endpoint it saw; then just under two polls, so
|
|
23
|
+
* an unchanged endpoint was written every other poll. It is now 15 minutes,
|
|
24
|
+
* as an interface's refresh is (InterfaceInventoryUtil), counted on a clock
|
|
25
|
+
* of the endpoint's own (endpointRefreshSlot): at 5-minute polls a stable
|
|
26
|
+
* endpoint is written every third poll. The window plus a poll stays inside
|
|
27
|
+
* the walk window for every interval up to 45 minutes, and a device polled
|
|
28
|
+
* less often than the window writes on every poll, as before, so the refresh
|
|
29
|
+
* can never make an endpoint look gone.
|
|
30
|
+
*/
|
|
31
|
+
exports.ENDPOINT_WALK_WINDOW_MS = DeviceReachabilityUtil_1.default.getStaleWindowInMinutes(undefined) * 60 * 1000;
|
|
32
|
+
exports.ENDPOINT_LAST_SEEN_REFRESH_MS = 15 * 60 * 1000;
|
|
33
|
+
/*
|
|
34
|
+
* The refresh is spread across the window, not taken all at once: each
|
|
35
|
+
* endpoint counts its window on a clock of its own, offset by its MAC in
|
|
36
|
+
* steps of a fifteenth of the window (endpointRefreshSlot). A switch's
|
|
37
|
+
* endpoints then come due a few at a time - a third of them on each
|
|
38
|
+
* five-minute poll - rather than all of them on the same poll.
|
|
39
|
+
*
|
|
40
|
+
* That is what lets the refresh be a HOT update. A walk writes a device's
|
|
41
|
+
* endpoints in one statement, and the rows of a device's endpoints sit
|
|
42
|
+
* together, since its walk inserted them together. A page takes a HOT
|
|
43
|
+
* update only into room it has free while the statement runs, because the
|
|
44
|
+
* rows it replaces are not dead until the statement commits: rewriting every
|
|
45
|
+
* endpoint on a page at once needs half the page free. A third of them needs
|
|
46
|
+
* a quarter of the page, which is about the room the table keeps
|
|
47
|
+
* (fillfactor, SetNetworkEndpointFillfactor). The refresh also writes no
|
|
48
|
+
* indexed column: lastSeenAt is in no index (coarseLastSeenAt is the age-out's
|
|
49
|
+
* copy, and moves once a day).
|
|
50
|
+
*/
|
|
51
|
+
exports.ENDPOINT_REFRESH_GROUPS = 15;
|
|
52
|
+
/*
|
|
53
|
+
* How far an endpoint's lastSeenAt gets ahead of its coarseLastSeenAt before
|
|
54
|
+
* a write moves the coarse one up to it, as SQL: so coarseLastSeenAt <=
|
|
55
|
+
* lastSeenAt < coarseLastSeenAt + this. NetworkEndpointService writes by it
|
|
56
|
+
* and the age-out of discovered devices (DiscoveredDeviceAgeOut) narrows by
|
|
57
|
+
* it, so both must read this one. Hours, not '1 day': a day added to a
|
|
58
|
+
* timestamptz follows the session's time zone, and is 23 or 25 hours across
|
|
59
|
+
* a change of clocks.
|
|
17
60
|
*/
|
|
18
|
-
exports.
|
|
61
|
+
exports.COARSE_LAST_SEEN_STEP_SQL = `interval '24 hours'`;
|
|
62
|
+
/*
|
|
63
|
+
* Which refresh window of its own a time falls in, for one endpoint: windows
|
|
64
|
+
* of `refreshMs`, offset by the endpoint's MAC in steps of
|
|
65
|
+
* 1/ENDPOINT_REFRESH_GROUPS of a window. The group is the MAC's twelve hex
|
|
66
|
+
* digits as a number, modulo the groups: MACs that differ by one, as a batch
|
|
67
|
+
* of terminals from one vendor often do, come due a fifteenth of a window
|
|
68
|
+
* apart.
|
|
69
|
+
*/
|
|
70
|
+
function endpointRefreshSlot(data) {
|
|
71
|
+
const hex = data.macAddress.toLowerCase().replace(/[^0-9a-f]/g, "");
|
|
72
|
+
const value = hex ? parseInt(hex.slice(-12), 16) : 0;
|
|
73
|
+
const group = Number.isFinite(value)
|
|
74
|
+
? value % exports.ENDPOINT_REFRESH_GROUPS
|
|
75
|
+
: 0;
|
|
76
|
+
return Math.floor((data.time + (group * data.refreshMs) / exports.ENDPOINT_REFRESH_GROUPS) /
|
|
77
|
+
data.refreshMs);
|
|
78
|
+
}
|
|
19
79
|
/*
|
|
20
80
|
* How long a sighting a network controller reported stays current. A walk
|
|
21
81
|
* sees an endpoint every few minutes; a controller's client list is read
|
|
@@ -226,8 +286,8 @@ class EndpointAttachmentUtil {
|
|
|
226
286
|
* over; lastSeenAt is not refreshed meanwhile, or it never could.
|
|
227
287
|
*
|
|
228
288
|
* When `context` is supplied, an update that would write nothing but a
|
|
229
|
-
* lastSeenAt
|
|
230
|
-
* "none" — a stable 4096-MAC switch must not issue 4096 writes a poll
|
|
289
|
+
* lastSeenAt whose refresh is not due yet (endpointRefreshSlot) collapses
|
|
290
|
+
* to "none" — a stable 4096-MAC switch must not issue 4096 writes a poll
|
|
231
291
|
* just to bump a timestamp nobody reads that precisely.
|
|
232
292
|
*/
|
|
233
293
|
static decideUpsert(existing, incoming, context) {
|
|
@@ -299,7 +359,7 @@ class EndpointAttachmentUtil {
|
|
|
299
359
|
}
|
|
300
360
|
if (existing &&
|
|
301
361
|
context &&
|
|
302
|
-
EndpointAttachmentUtil.isUnchangedSighting(existing, decision, incoming
|
|
362
|
+
EndpointAttachmentUtil.isUnchangedSighting(existing, decision, incoming, context)) {
|
|
303
363
|
return {
|
|
304
364
|
action: "none",
|
|
305
365
|
setAttachment: false,
|
|
@@ -310,21 +370,36 @@ class EndpointAttachmentUtil {
|
|
|
310
370
|
}
|
|
311
371
|
/*
|
|
312
372
|
* True when applying `decision` to `existing` would change nothing a
|
|
313
|
-
* reader can observe, and
|
|
314
|
-
* refresh
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
* timestamp for) falls through to a real write.
|
|
373
|
+
* reader can observe, and the row's refresh is not due yet: the sighting
|
|
374
|
+
* falls in the same refresh window of the endpoint's own as the row's
|
|
375
|
+
* lastSeenAt (endpointRefreshSlot). Deliberately conservative — any doubt
|
|
376
|
+
* (a row that still needs the firstSeenAt backfill, a row we have never
|
|
377
|
+
* seen a timestamp for) falls through to a real write.
|
|
378
|
+
*
|
|
379
|
+
* A sighting older than the row's lastSeenAt refreshes nothing either.
|
|
380
|
+
* That is an older poll processed after a newer one (OneUptime issue
|
|
381
|
+
* #7389), or a row stamped by a clock a little ahead. The write never
|
|
382
|
+
* moves lastSeenAt backwards (NetworkEndpointService keeps the later of
|
|
383
|
+
* the two), so writing it would change nothing.
|
|
318
384
|
*/
|
|
319
|
-
static isUnchangedSighting(existing, decision,
|
|
385
|
+
static isUnchangedSighting(existing, decision, incoming, context) {
|
|
320
386
|
var _a;
|
|
387
|
+
const incomingDeviceId = incoming.deviceId;
|
|
321
388
|
// Rows predating first-seen tracking still owe us a backfill.
|
|
322
389
|
if (!existing.firstSeenAt || !existing.lastSeenAt) {
|
|
323
390
|
return false;
|
|
324
391
|
}
|
|
325
392
|
const refreshMs = (_a = context.lastSeenRefreshMs) !== null && _a !== void 0 ? _a : exports.ENDPOINT_LAST_SEEN_REFRESH_MS;
|
|
326
|
-
|
|
327
|
-
|
|
393
|
+
if (endpointRefreshSlot({
|
|
394
|
+
time: context.now.getTime(),
|
|
395
|
+
macAddress: incoming.macAddress,
|
|
396
|
+
refreshMs: refreshMs,
|
|
397
|
+
}) >
|
|
398
|
+
endpointRefreshSlot({
|
|
399
|
+
time: new Date(existing.lastSeenAt).getTime(),
|
|
400
|
+
macAddress: incoming.macAddress,
|
|
401
|
+
refreshMs: refreshMs,
|
|
402
|
+
})) {
|
|
328
403
|
return false;
|
|
329
404
|
}
|
|
330
405
|
if (decision.setIpAddress &&
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import commonJsModule from "./EndpointAttachmentUtil.js";
|
|
2
2
|
export default commonJsModule.default;
|
|
3
|
+
export const COARSE_LAST_SEEN_STEP_SQL = commonJsModule.COARSE_LAST_SEEN_STEP_SQL;
|
|
3
4
|
export const CONTROLLER_SIGHTING_CURRENT_FOR_MS = commonJsModule.CONTROLLER_SIGHTING_CURRENT_FOR_MS;
|
|
4
5
|
export const ENDPOINT_LAST_SEEN_REFRESH_MS = commonJsModule.ENDPOINT_LAST_SEEN_REFRESH_MS;
|
|
6
|
+
export const ENDPOINT_REFRESH_GROUPS = commonJsModule.ENDPOINT_REFRESH_GROUPS;
|
|
7
|
+
export const ENDPOINT_WALK_WINDOW_MS = commonJsModule.ENDPOINT_WALK_WINDOW_MS;
|
|
8
|
+
export const endpointRefreshSlot = commonJsModule.endpointRefreshSlot;
|
|
5
9
|
export const normalizeMac = commonJsModule.normalizeMac;
|
|
@@ -6,6 +6,8 @@ export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN: string;
|
|
|
6
6
|
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_NOT_MONITORED: string;
|
|
7
7
|
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE: string;
|
|
8
8
|
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE_OF: string;
|
|
9
|
+
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_PRIVATE_MESSAGE: string;
|
|
10
|
+
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_IP_NOT_ALLOWED_MESSAGE: string;
|
|
9
11
|
export interface ExternalStatusPageOneUptimeNote {
|
|
10
12
|
template: string;
|
|
11
13
|
values: Record<string, string>;
|
|
@@ -41,4 +43,5 @@ export default class ExternalStatusPageReading {
|
|
|
41
43
|
static readIncidentIo(json: unknown): ExternalStatusPageContents | null;
|
|
42
44
|
static readOneUptimeSummary(summary: StatusPageSummary): ExternalStatusPageContents;
|
|
43
45
|
static readOneUptimeNote(description: string | undefined): ExternalStatusPageOneUptimeNote | null;
|
|
46
|
+
static readOneUptimeFailureCause(failureCause: string | undefined): string | null;
|
|
44
47
|
}
|
|
@@ -6,6 +6,8 @@ export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN: string;
|
|
|
6
6
|
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_NOT_MONITORED: string;
|
|
7
7
|
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE: string;
|
|
8
8
|
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE_OF: string;
|
|
9
|
+
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_PRIVATE_MESSAGE: string;
|
|
10
|
+
export declare const EXTERNAL_STATUS_PAGE_ONEUPTIME_IP_NOT_ALLOWED_MESSAGE: string;
|
|
9
11
|
export interface ExternalStatusPageOneUptimeNote {
|
|
10
12
|
template: string;
|
|
11
13
|
values: Record<string, string>;
|
|
@@ -41,4 +43,5 @@ export default class ExternalStatusPageReading {
|
|
|
41
43
|
static readIncidentIo(json: unknown): ExternalStatusPageContents | null;
|
|
42
44
|
static readOneUptimeSummary(summary: StatusPageSummary): ExternalStatusPageContents;
|
|
43
45
|
static readOneUptimeNote(description: string | undefined): ExternalStatusPageOneUptimeNote | null;
|
|
46
|
+
static readOneUptimeFailureCause(failureCause: string | undefined): string | null;
|
|
44
47
|
}
|
|
@@ -3,7 +3,7 @@ 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.EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE_OF = exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE = exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_NOT_MONITORED = exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN = exports.EXTERNAL_STATUS_PAGE_UNNAMED_INCIDENT = exports.EXTERNAL_STATUS_PAGE_MAX_INCIDENTS = exports.EXTERNAL_STATUS_PAGE_MAX_COMPONENTS = void 0;
|
|
6
|
+
exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_IP_NOT_ALLOWED_MESSAGE = exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_PRIVATE_MESSAGE = exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE_OF = exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE = exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_NOT_MONITORED = exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN = exports.EXTERNAL_STATUS_PAGE_UNNAMED_INCIDENT = exports.EXTERNAL_STATUS_PAGE_MAX_INCIDENTS = exports.EXTERNAL_STATUS_PAGE_MAX_COMPONENTS = void 0;
|
|
7
7
|
const ExternalStatusPageComponentStatusUtil_1 = __importDefault(require("./ExternalStatusPageComponentStatusUtil"));
|
|
8
8
|
const TrailingRuns_1 = require("../TrailingRuns");
|
|
9
9
|
const Translator_1 = require("../../Types/Translator");
|
|
@@ -70,6 +70,26 @@ const ONEUPTIME_SENTENCE_NOTES = [
|
|
|
70
70
|
exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN,
|
|
71
71
|
exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_NOT_MONITORED,
|
|
72
72
|
];
|
|
73
|
+
/*
|
|
74
|
+
* WHY A ONEUPTIME PAGE COULD NOT BE READ.
|
|
75
|
+
*
|
|
76
|
+
* With the OneUptime Status Page provider chosen, a page that answers but
|
|
77
|
+
* will not let the probe in fails the check, and the probe writes why as
|
|
78
|
+
* the check's failure cause (ExternalStatusPageMonitor's
|
|
79
|
+
* tryOneUptimeStatusPage): a private page (sign-in or password), or one
|
|
80
|
+
* whose IP allowlist leaves the probe out. Each is a translation key, as
|
|
81
|
+
* the notes above are, so the monitor's summary draws its Error in the
|
|
82
|
+
* reader's language (readOneUptimeFailureCause) while the probe stores the
|
|
83
|
+
* English: monitor criteria and logs compare that English, so it never
|
|
84
|
+
* changes.
|
|
85
|
+
*/
|
|
86
|
+
exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_PRIVATE_MESSAGE = (0, Translator_1.translationKey)("This status page is private: only people who sign in to it, or who know its password, can read it. Only a public status page can be watched.");
|
|
87
|
+
exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_IP_NOT_ALLOWED_MESSAGE = (0, Translator_1.translationKey)("This status page lets in only the IP addresses on its allowlist, and this probe's address is not one of them. Add the probe's address to the allowlist, or watch the page from a probe inside that network.");
|
|
88
|
+
// The failure causes the probe writes in OneUptime's words, each a whole sentence.
|
|
89
|
+
const ONEUPTIME_FAILURE_CAUSES = [
|
|
90
|
+
exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_PRIVATE_MESSAGE,
|
|
91
|
+
exports.EXTERNAL_STATUS_PAGE_ONEUPTIME_IP_NOT_ALLOWED_MESSAGE,
|
|
92
|
+
];
|
|
73
93
|
const isRecord = (value) => {
|
|
74
94
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
75
95
|
};
|
|
@@ -445,5 +465,19 @@ class ExternalStatusPageReading {
|
|
|
445
465
|
}
|
|
446
466
|
return null;
|
|
447
467
|
}
|
|
468
|
+
/*
|
|
469
|
+
* One of OneUptime's failure causes, read back from a check's failure
|
|
470
|
+
* cause: its English, a translation key, when the cause is exactly one of
|
|
471
|
+
* them (a private page, a page whose IP allowlist leaves the probe out);
|
|
472
|
+
* null for any other cause - the network's, a provider's, an older
|
|
473
|
+
* probe's - which stays as written.
|
|
474
|
+
*
|
|
475
|
+
* Only a check of a OneUptime page is read this way (the caller asks for
|
|
476
|
+
* that provider).
|
|
477
|
+
*/
|
|
478
|
+
static readOneUptimeFailureCause(failureCause) {
|
|
479
|
+
const text = (failureCause || "").trim();
|
|
480
|
+
return ONEUPTIME_FAILURE_CAUSES.includes(text) ? text : null;
|
|
481
|
+
}
|
|
448
482
|
}
|
|
449
483
|
exports.default = ExternalStatusPageReading;
|
|
@@ -2,7 +2,9 @@ import commonJsModule from "./ExternalStatusPageReading.js";
|
|
|
2
2
|
export default commonJsModule.default;
|
|
3
3
|
export const EXTERNAL_STATUS_PAGE_MAX_COMPONENTS = commonJsModule.EXTERNAL_STATUS_PAGE_MAX_COMPONENTS;
|
|
4
4
|
export const EXTERNAL_STATUS_PAGE_MAX_INCIDENTS = commonJsModule.EXTERNAL_STATUS_PAGE_MAX_INCIDENTS;
|
|
5
|
+
export const EXTERNAL_STATUS_PAGE_ONEUPTIME_IP_NOT_ALLOWED_MESSAGE = commonJsModule.EXTERNAL_STATUS_PAGE_ONEUPTIME_IP_NOT_ALLOWED_MESSAGE;
|
|
5
6
|
export const EXTERNAL_STATUS_PAGE_ONEUPTIME_NOT_MONITORED = commonJsModule.EXTERNAL_STATUS_PAGE_ONEUPTIME_NOT_MONITORED;
|
|
7
|
+
export const EXTERNAL_STATUS_PAGE_ONEUPTIME_PRIVATE_MESSAGE = commonJsModule.EXTERNAL_STATUS_PAGE_ONEUPTIME_PRIVATE_MESSAGE;
|
|
6
8
|
export const EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN = commonJsModule.EXTERNAL_STATUS_PAGE_ONEUPTIME_STATUS_NOT_SHOWN;
|
|
7
9
|
export const EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE = commonJsModule.EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE;
|
|
8
10
|
export const EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE_OF = commonJsModule.EXTERNAL_STATUS_PAGE_ONEUPTIME_UNDER_MAINTENANCE_OF;
|
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
import SnmpInterface from "../../Types/Monitor/SnmpMonitor/SnmpInterface.mjs";
|
|
2
|
+
export declare const INTERFACE_LAST_SEEN_REFRESH_MS: number;
|
|
3
|
+
export declare const INTERFACE_REFRESH_GROUPS: number;
|
|
4
|
+
export declare const INTERFACE_READING_RELATIVE_CHANGE: number;
|
|
5
|
+
export declare const INTERFACE_RATE_FLOOR_SHARE_OF_SPEED: number;
|
|
6
|
+
export declare const INTERFACE_RATE_FLOOR_MBPS_WITHOUT_SPEED: number;
|
|
7
|
+
export declare const INTERFACE_UTILIZATION_FLOOR_PERCENT: number;
|
|
8
|
+
export declare const INTERFACE_ERRORS_FLOOR_PER_SECOND: number;
|
|
9
|
+
export declare const INTERFACE_SATURATION_THRESHOLD_PERCENT: number;
|
|
2
10
|
export interface InterfaceExistingRowSnapshot {
|
|
3
11
|
interfaceIndex?: number | undefined;
|
|
4
12
|
isMonitored?: boolean | undefined;
|
|
13
|
+
name?: string | null | undefined;
|
|
14
|
+
alias?: string | null | undefined;
|
|
15
|
+
macAddress?: string | null | undefined;
|
|
16
|
+
interfaceType?: number | null | undefined;
|
|
17
|
+
isOperationallyUp?: boolean | null | undefined;
|
|
18
|
+
isAdministrativelyUp?: boolean | null | undefined;
|
|
19
|
+
speedInMbps?: number | null | undefined;
|
|
20
|
+
inRateMbps?: number | null | undefined;
|
|
21
|
+
outRateMbps?: number | null | undefined;
|
|
22
|
+
utilizationPercent?: number | null | undefined;
|
|
23
|
+
errorsPerSecond?: number | null | undefined;
|
|
24
|
+
lastSeenAt?: Date | string | null | undefined;
|
|
5
25
|
}
|
|
6
26
|
export interface InterfaceInsertRow {
|
|
7
27
|
interfaceIndex: number;
|
|
@@ -33,6 +53,7 @@ export interface InterfaceUpdateRow {
|
|
|
33
53
|
export interface InterfaceUpsertPlan {
|
|
34
54
|
inserts: Array<InterfaceInsertRow>;
|
|
35
55
|
updates: Array<InterfaceUpdateRow>;
|
|
56
|
+
unchangedInterfaceIndexes: Array<number>;
|
|
36
57
|
unmonitoredInterfaceIndexes: Array<number>;
|
|
37
58
|
}
|
|
38
59
|
export default class InterfaceInventoryUtil {
|
|
@@ -40,7 +61,26 @@ export default class InterfaceInventoryUtil {
|
|
|
40
61
|
walkedInterfaces: Array<SnmpInterface>;
|
|
41
62
|
existingRows: Array<InterfaceExistingRowSnapshot>;
|
|
42
63
|
now: Date;
|
|
64
|
+
refreshMs?: number | undefined;
|
|
43
65
|
}): InterfaceUpsertPlan;
|
|
66
|
+
static needsWrite(data: {
|
|
67
|
+
stored: InterfaceExistingRowSnapshot;
|
|
68
|
+
update: InterfaceUpdateRow;
|
|
69
|
+
now: Date;
|
|
70
|
+
refreshMs?: number | undefined;
|
|
71
|
+
}): boolean;
|
|
72
|
+
static refreshSlot(data: {
|
|
73
|
+
time: number;
|
|
74
|
+
interfaceIndex: number;
|
|
75
|
+
refreshMs: number;
|
|
76
|
+
}): number;
|
|
77
|
+
static ratesMoved(data: {
|
|
78
|
+
stored: InterfaceExistingRowSnapshot;
|
|
79
|
+
update: InterfaceUpdateRow;
|
|
80
|
+
}): boolean;
|
|
81
|
+
private static readingMoved;
|
|
82
|
+
private static isSame;
|
|
83
|
+
private static toTime;
|
|
44
84
|
private static interfaceName;
|
|
45
85
|
private static toMbps;
|
|
46
86
|
private static toRoundedMbps;
|