@oneuptime/common 14.0.106 → 14.0.108
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/AuditLog.js +1 -1
- package/Models/AnalyticsModels/Index.js +3 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.mts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.ts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.js +300 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.mjs +3 -0
- package/Models/DatabaseModels/CallLog.d.mts +4 -0
- package/Models/DatabaseModels/CallLog.d.ts +4 -0
- package/Models/DatabaseModels/CallLog.js +85 -0
- package/Models/DatabaseModels/DataBiConnection.d.mts +7 -0
- package/Models/DatabaseModels/DataBiConnection.d.ts +7 -0
- package/Models/DatabaseModels/DataBiConnection.js +105 -2
- package/Models/DatabaseModels/DataDashboard.d.mts +10 -0
- package/Models/DatabaseModels/DataDashboard.d.ts +10 -0
- package/Models/DatabaseModels/DataDashboard.js +129 -2
- package/Models/DatabaseModels/Index.js +8 -0
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +55 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.mts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.ts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.js +536 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.mjs +2 -0
- package/Models/DatabaseModels/NetworkSite.d.mts +1 -0
- package/Models/DatabaseModels/NetworkSite.d.ts +1 -0
- package/Models/DatabaseModels/NetworkSite.js +51 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.mts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.ts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +41 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.mts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.ts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +80 -1
- package/Models/DatabaseModels/RumApplication.d.mts +2 -0
- package/Models/DatabaseModels/RumApplication.d.ts +2 -0
- package/Models/DatabaseModels/RumApplication.js +108 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.mts +20 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.ts +20 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.js +353 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.mjs +2 -0
- package/Models/DatabaseModels/Team.js +10 -2
- package/Models/DatabaseModels/TeamComplianceSetting.js +8 -1
- package/Models/DatabaseModels/TeamCustomRole.js +9 -1
- package/Models/DatabaseModels/TeamMember.js +15 -1
- package/Models/DatabaseModels/TeamOwnerTeam.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.js +325 -0
- package/Models/DatabaseModels/TeamOwnerTeam.mjs +2 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.js +331 -0
- package/Models/DatabaseModels/TeamOwnerUser.mjs +2 -0
- package/Models/DatabaseModels/TeamPermission.js +12 -1
- package/Models/DatabaseModels/TelemetryUsageBilling.d.mts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.d.ts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.js +34 -0
- package/Models/DatabaseModels/WhatsAppLog.d.mts +3 -0
- package/Models/DatabaseModels/WhatsAppLog.d.ts +3 -0
- package/Models/DatabaseModels/WhatsAppLog.js +62 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +11 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +11 -0
- package/Models/DatabaseModels/WorkspaceUserGroup.js +1 -1
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +212 -0
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +212 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.mts +3 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.ts +3 -0
- package/Types/AI/AIActionWords.d.mts +1 -0
- package/Types/AI/AIActionWords.d.ts +1 -0
- package/Types/AI/AIActionWords.js +15 -4
- package/Types/AI/AIChatRecordSeen.d.mts +3 -0
- package/Types/AI/AIChatRecordSeen.d.ts +3 -0
- package/Types/AI/AIChatRecordSeen.js +28 -3
- package/Types/AI/AIChatRecordSeen.mjs +1 -0
- package/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AIChatTypes.js +2 -0
- package/Types/AI/InvestigationNotStartedReason.d.mts +7 -0
- package/Types/AI/InvestigationNotStartedReason.d.ts +7 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.mts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.ts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.js +7 -0
- package/Types/AuditLog/AuditLogRetention.d.mts +10 -0
- package/Types/AuditLog/AuditLogRetention.d.ts +10 -0
- package/Types/AuditLog/AuditLogRetention.js +91 -0
- package/Types/AuditLog/AuditLogRetention.mjs +8 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.mts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.ts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.js +224 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.mjs +3 -0
- package/Types/CodeInSentence.d.mts +8 -0
- package/Types/CodeInSentence.d.ts +8 -0
- package/Types/CodeInSentence.js +875 -0
- package/Types/CodeInSentence.mjs +4 -0
- package/Types/CodeRepository/CodeFileSeen.d.mts +3 -0
- package/Types/CodeRepository/CodeFileSeen.d.ts +3 -0
- package/Types/CodeRepository/CodeFileSeen.js +61 -3
- package/Types/Dashboard/DashboardComponentType.d.mts +2 -0
- package/Types/Dashboard/DashboardComponentType.d.ts +2 -0
- package/Types/Dashboard/DashboardComponentType.js +7 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.d.mts +3 -1
- package/Types/Dashboard/DashboardComponents/ComponentArgument.d.ts +3 -1
- package/Types/Dashboard/DashboardComponents/ComponentArgument.js +3 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.mts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.ts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.js +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.mjs +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.mts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.ts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.js +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.mjs +1 -0
- package/Types/Dashboard/PublicDashboardServedSettings.js +15 -7
- package/Types/DataObservability/DataBiRefreshAlert.d.mts +44 -0
- package/Types/DataObservability/DataBiRefreshAlert.d.ts +44 -0
- package/Types/DataObservability/DataBiRefreshAlert.js +206 -0
- package/Types/DataObservability/DataBiRefreshAlert.mjs +12 -0
- package/Types/DataObservability/DataDashboardActivity.d.mts +40 -0
- package/Types/DataObservability/DataDashboardActivity.d.ts +40 -0
- package/Types/DataObservability/DataDashboardActivity.js +119 -0
- package/Types/DataObservability/DataDashboardActivity.mjs +12 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +14 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +14 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +14 -0
- package/Types/DataObservability/DataTableLineage.d.mts +108 -0
- package/Types/DataObservability/DataTableLineage.d.ts +108 -0
- package/Types/DataObservability/DataTableLineage.js +119 -0
- package/Types/DataObservability/DataTableLineage.mjs +21 -0
- package/Types/DataSecurity/DataStoreKind.d.mts +1 -0
- package/Types/DataSecurity/DataStoreKind.d.ts +1 -0
- package/Types/DataSecurity/DataStoreKind.js +3 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +6 -0
- package/Types/DatabaseServer/DatabaseServerMetricCatalog.js +71 -82
- package/Types/Date.d.mts +4 -0
- package/Types/Date.d.ts +4 -0
- package/Types/Date.js +47 -2
- package/Types/Date.mjs +2 -0
- package/Types/DateLanguage.d.mts +9 -0
- package/Types/DateLanguage.d.ts +9 -0
- package/Types/DateLanguage.js +79 -1
- package/Types/DateLanguage.mjs +4 -0
- package/Types/HashedString.js +9 -2
- package/Types/MessageQueue/MessageQueueMetricCatalog.js +61 -61
- package/Types/Monitor/CriteriaFilterTerms.d.mts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.d.ts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.js +166 -0
- package/Types/Monitor/CriteriaFilterTerms.mjs +4 -0
- package/Types/Monitor/CriteriaFilterValues.d.mts +16 -0
- package/Types/Monitor/CriteriaFilterValues.d.ts +16 -0
- package/Types/Monitor/CriteriaFilterValues.js +324 -0
- package/Types/Monitor/CriteriaFilterValues.mjs +2 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.d.mts +13 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.d.ts +13 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.js +108 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.mjs +3 -0
- package/Types/Monitor/EvaluationSentence.d.mts +37 -0
- package/Types/Monitor/EvaluationSentence.d.ts +37 -0
- package/Types/Monitor/EvaluationSentence.js +298 -0
- package/Types/Monitor/EvaluationSentence.mjs +12 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.mts +1 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.ts +1 -0
- package/Types/Monitor/MonitorCriteria.d.mts +2 -0
- package/Types/Monitor/MonitorCriteria.d.ts +2 -0
- package/Types/Monitor/MonitorCriteria.js +8 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.mts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.ts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +265 -196
- package/Types/Monitor/MonitorEvaluationDetails.d.mts +2 -0
- package/Types/Monitor/MonitorEvaluationDetails.d.ts +2 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.mts +4 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.ts +4 -0
- package/Types/Monitor/MonitorStep.d.mts +2 -0
- package/Types/Monitor/MonitorStep.d.ts +2 -0
- package/Types/Monitor/MonitorStep.js +28 -11
- package/Types/Monitor/MonitorStepMetricMonitor.js +6 -1
- package/Types/Monitor/MonitorStepRollingTime.d.mts +12 -0
- package/Types/Monitor/MonitorStepRollingTime.d.ts +12 -0
- package/Types/Monitor/MonitorStepRollingTime.js +117 -0
- package/Types/Monitor/MonitorStepRollingTime.mjs +2 -0
- package/Types/Monitor/MonitorSteps.d.mts +2 -0
- package/Types/Monitor/MonitorSteps.d.ts +2 -0
- package/Types/Monitor/MonitorType.d.mts +1 -0
- package/Types/Monitor/MonitorType.d.ts +1 -0
- package/Types/Monitor/MonitorType.js +12 -0
- package/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +11 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.mts +1 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.ts +1 -0
- package/Types/Monitor/TelemetryAlertRule.js +7 -2
- package/Types/Monitor/TelemetryObservation.d.mts +15 -0
- package/Types/Monitor/TelemetryObservation.d.ts +15 -0
- package/Types/Monitor/TelemetryObservation.js +28 -0
- package/Types/Monitor/TelemetryObservation.mjs +2 -0
- package/Types/NetworkDevice/DeviceNaming.d.mts +87 -0
- package/Types/NetworkDevice/DeviceNaming.d.ts +87 -0
- package/Types/NetworkDevice/DeviceNaming.js +279 -0
- package/Types/NetworkDevice/DeviceNaming.mjs +24 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.mts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.ts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.js +4 -0
- package/Types/NotificationRule/NotificationRepeat.d.mts +10 -0
- package/Types/NotificationRule/NotificationRepeat.d.ts +10 -0
- package/Types/NotificationRule/NotificationRepeat.js +51 -0
- package/Types/NotificationRule/NotificationRepeat.mjs +2 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +70 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +70 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +276 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +12 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.mts +9 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.ts +9 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.js +44 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.mjs +5 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.mts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.ts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.js +351 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.mjs +15 -0
- package/Types/Permission.d.mts +5 -0
- package/Types/Permission.d.ts +5 -0
- package/Types/Permission.js +61 -5
- package/Types/Probe/ProbeMonitorResponse.d.mts +1 -0
- package/Types/Probe/ProbeMonitorResponse.d.ts +1 -0
- package/Types/ReadingDirection.d.mts +2 -0
- package/Types/ReadingDirection.d.ts +2 -0
- package/Types/ReadingDirection.js +221 -25
- package/Types/ReadingDirection.mjs +2 -0
- package/Types/RollingTime/RollingTimeUtil.d.mts +7 -0
- package/Types/RollingTime/RollingTimeUtil.d.ts +7 -0
- package/Types/RollingTime/RollingTimeUtil.js +240 -71
- package/Types/Rules/RuleCriteriaFieldRegistry.js +12 -0
- package/Types/Rules/RuleCriteriaSubject.js +1 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.mts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.ts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.js +166 -0
- package/Types/Rum/ProductAnalyticsEventReads.mjs +27 -0
- package/Types/Rum/ProductAnalyticsEvents.d.mts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.d.ts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.js +477 -0
- package/Types/Rum/ProductAnalyticsEvents.mjs +40 -0
- package/Types/Rum/ProductAnalyticsSavedViews.d.mts +56 -0
- package/Types/Rum/ProductAnalyticsSavedViews.d.ts +56 -0
- package/Types/Rum/ProductAnalyticsSavedViews.js +219 -0
- package/Types/Rum/ProductAnalyticsSavedViews.mjs +14 -0
- package/Types/Rum/SessionReplay.d.mts +4 -0
- package/Types/Rum/SessionReplay.d.ts +4 -0
- package/Types/Rum/SessionReplayHealth.js +1 -1
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +8 -7
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.mts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.ts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.js +51 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.mjs +4 -0
- package/Types/Team/BuiltInTeam.d.mts +1 -0
- package/Types/Team/BuiltInTeam.d.ts +1 -0
- package/Types/Team/BuiltInTeam.js +14 -1
- package/Types/Team/BuiltInTeam.mjs +1 -0
- package/Types/Telemetry/ServiceType.d.mts +1 -0
- package/Types/Telemetry/ServiceType.d.ts +1 -0
- package/Types/Telemetry/ServiceType.js +6 -0
- package/Types/Telemetry/TelemetryUsage.d.mts +7 -2
- package/Types/Telemetry/TelemetryUsage.d.ts +7 -2
- package/Types/Telemetry/TelemetryUsage.js +24 -5
- package/Types/Telemetry/TelemetryUsage.mjs +3 -0
- package/Types/UserNotification/UserNotificationStatus.d.mts +2 -1
- package/Types/UserNotification/UserNotificationStatus.d.ts +2 -1
- package/Types/UserNotification/UserNotificationStatus.js +8 -0
- package/Types/Workspace/NotificationRules/EventType.d.mts +2 -1
- package/Types/Workspace/NotificationRules/EventType.d.ts +2 -1
- package/Types/Workspace/NotificationRules/EventType.js +8 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleInvites.js +5 -1
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.mts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.ts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.js +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.mjs +1 -0
- package/Utils/AI/InvestigationReport.js +93 -21
- package/Utils/AI/InvestigationReportLanguages.d.mts +25 -0
- package/Utils/AI/InvestigationReportLanguages.d.ts +25 -0
- package/Utils/AI/InvestigationReportLanguages.js +603 -0
- package/Utils/AI/InvestigationReportLanguages.mjs +11 -0
- package/Utils/Crypto.js +10 -3
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.mts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.ts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.js +67 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.mjs +2 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.mts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.ts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.js +68 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.mjs +2 -0
- package/Utils/Dashboard/DashboardWidgetIds.js +6 -1
- package/Utils/Dashboard/TableThresholds.js +5 -2
- package/Utils/Metrics/MetricQueryCloudAggregation.js +2 -4
- package/Utils/Monitor/MonitorLogSummaryUtil.d.mts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.d.ts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.js +170 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +246 -0
- package/Utils/Monitor/MonitorRootCauseWording.mjs +2 -0
- package/Utils/Monitor/MonitorStepMetricQueries.js +2 -1
- package/Utils/Monitor/MonitorStepsValuesUtil.d.mts +13 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.d.ts +13 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.js +80 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.mjs +2 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.mts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.ts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -2
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.mts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.ts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.js +303 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.mjs +8 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.mts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.ts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.js +649 -0
- package/Utils/NetworkDevice/Naming/NamePattern.mjs +22 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.js +467 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.mjs +14 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.mts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.ts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.js +327 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.mjs +7 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.mts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.ts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.js +8 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.mts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.ts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.js +1 -0
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.mts +7 -6
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.ts +7 -6
- package/Utils/SessionReplay/SessionReplayHealth.js +703 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.mts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.ts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.js +39 -0
- package/Utils/Slo/SloErrorBudgetPolicy.mjs +1 -0
- package/Utils/Slo/SloFeedMarkdown.d.mts +19 -4
- package/Utils/Slo/SloFeedMarkdown.d.ts +19 -4
- package/Utils/Slo/SloFeedMarkdown.js +64 -17
- package/Utils/Slo/SloFeedMarkdown.mjs +4 -0
- package/Utils/Slo/SloProjection.d.mts +18 -0
- package/Utils/Slo/SloProjection.d.ts +18 -0
- package/Utils/Slo/SloProjection.js +53 -12
- package/Utils/Slo/SloProjection.mjs +2 -0
- package/Utils/StatusPage/ResourceExplorer.d.mts +0 -10
- package/Utils/StatusPage/ResourceExplorer.d.ts +0 -10
- package/Utils/StatusPage/ResourceExplorer.js +5 -32
- package/Utils/TotpSetupKey.d.mts +3 -0
- package/Utils/TotpSetupKey.d.ts +3 -0
- package/Utils/TotpSetupKey.js +72 -0
- package/Utils/TotpSetupKey.mjs +4 -0
- package/Utils/Workspace/WorkspaceChannelName.js +5 -1
- package/package.json +1 -1
- package/Utils/Rum/SessionReplayHealth.js +0 -558
- /package/Utils/{Rum → SessionReplay}/SessionReplayHealth.mjs +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare enum NamingLookupKey {
|
|
2
|
+
LastIpOctet = "lastIpOctet",
|
|
3
|
+
IpAddress = "ipAddress",
|
|
4
|
+
MacAddress = "macAddress",
|
|
5
|
+
DiscoveredName = "discoveredName"
|
|
6
|
+
}
|
|
7
|
+
export declare const ALL_NAMING_LOOKUP_KEYS: ReadonlyArray<NamingLookupKey>;
|
|
8
|
+
export declare function isNamingLookupKey(value: unknown): value is NamingLookupKey;
|
|
9
|
+
export interface NamingLookupEntry {
|
|
10
|
+
key: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const MAX_NAMING_LOOKUP_ENTRIES: number;
|
|
14
|
+
export declare const MAX_NAMING_LOOKUP_KEY_LENGTH: number;
|
|
15
|
+
export declare const MAX_NAMING_LOOKUP_VALUE_LENGTH: number;
|
|
16
|
+
export declare const MAX_NAME_PATTERN_LENGTH: number;
|
|
17
|
+
export declare enum DeviceNamingOutcome {
|
|
18
|
+
Named = "Named",
|
|
19
|
+
FollowsRules = "FollowsRules",
|
|
20
|
+
NoMatchingRule = "NoMatchingRule",
|
|
21
|
+
MissingValue = "MissingValue",
|
|
22
|
+
NameTaken = "NameTaken",
|
|
23
|
+
NameTooLong = "NameTooLong"
|
|
24
|
+
}
|
|
25
|
+
export declare const ALL_DEVICE_NAMING_OUTCOMES: ReadonlyArray<DeviceNamingOutcome>;
|
|
26
|
+
export declare function isDeviceNamingOutcome(value: unknown): value is DeviceNamingOutcome;
|
|
27
|
+
export interface DeviceNamingResult {
|
|
28
|
+
outcome: DeviceNamingOutcome;
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
ruleId?: string | undefined;
|
|
31
|
+
ruleName?: string | undefined;
|
|
32
|
+
missing?: string | undefined;
|
|
33
|
+
takenName?: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface DeviceNamingPreviewItem extends DeviceNamingResult {
|
|
36
|
+
key: string;
|
|
37
|
+
discoveredName: string;
|
|
38
|
+
}
|
|
39
|
+
export interface DeviceNamingPreview {
|
|
40
|
+
hasRules: boolean;
|
|
41
|
+
items: Array<DeviceNamingPreviewItem>;
|
|
42
|
+
}
|
|
43
|
+
export interface DeviceNamingPlanItem extends DeviceNamingResult {
|
|
44
|
+
deviceId: string;
|
|
45
|
+
currentName: string;
|
|
46
|
+
isNamedByPerson: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface DeviceNamingPlan {
|
|
49
|
+
hasRules: boolean;
|
|
50
|
+
devicesChecked: number;
|
|
51
|
+
items: Array<DeviceNamingPlanItem>;
|
|
52
|
+
followingCount: number;
|
|
53
|
+
isTruncated: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare const MAX_DEVICES_PER_NAMING_PLAN: number;
|
|
56
|
+
export declare const MAX_RENAMES_PER_NAMING_APPLY: number;
|
|
57
|
+
export interface DeviceNamingRename {
|
|
58
|
+
deviceId: string;
|
|
59
|
+
fromName: string;
|
|
60
|
+
toName: string;
|
|
61
|
+
}
|
|
62
|
+
export interface DeviceNamingApplyResult {
|
|
63
|
+
renamed: number;
|
|
64
|
+
skipped: Array<{
|
|
65
|
+
deviceId: string;
|
|
66
|
+
reason: string;
|
|
67
|
+
}>;
|
|
68
|
+
}
|
|
69
|
+
export declare const NAMING_APPLY_DEVICE_GONE_REASON: string;
|
|
70
|
+
export declare const NAMING_APPLY_NAME_CHANGED_REASON: string;
|
|
71
|
+
export declare const NAMING_APPLY_RULES_CHANGED_REASON: string;
|
|
72
|
+
export declare function isDeviceNamedByPerson(device: {
|
|
73
|
+
name?: unknown;
|
|
74
|
+
discoveredName?: unknown;
|
|
75
|
+
ruleAssignedName?: unknown;
|
|
76
|
+
hostname?: unknown;
|
|
77
|
+
}): boolean;
|
|
78
|
+
export declare function isDeviceStillNamedByRule(device: {
|
|
79
|
+
name?: unknown;
|
|
80
|
+
ruleAssignedName?: unknown;
|
|
81
|
+
}): boolean;
|
|
82
|
+
export declare function readDeviceNamingResult(value: unknown): DeviceNamingResult | null;
|
|
83
|
+
export declare function readDeviceNamingPreview(value: unknown): DeviceNamingPreview;
|
|
84
|
+
export declare function readDeviceNamingPlan(value: unknown): DeviceNamingPlan;
|
|
85
|
+
export declare function readDeviceNamingApplyResult(value: unknown): DeviceNamingApplyResult;
|
|
86
|
+
export declare function getRenamesForPlanItems(items: ReadonlyArray<DeviceNamingPlanItem>, selectedDeviceIds: ReadonlySet<string>): Array<DeviceNamingRename>;
|
|
87
|
+
export declare function getInitialPlanSelection(items: ReadonlyArray<DeviceNamingPlanItem>): Set<string>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare enum NamingLookupKey {
|
|
2
|
+
LastIpOctet = "lastIpOctet",
|
|
3
|
+
IpAddress = "ipAddress",
|
|
4
|
+
MacAddress = "macAddress",
|
|
5
|
+
DiscoveredName = "discoveredName"
|
|
6
|
+
}
|
|
7
|
+
export declare const ALL_NAMING_LOOKUP_KEYS: ReadonlyArray<NamingLookupKey>;
|
|
8
|
+
export declare function isNamingLookupKey(value: unknown): value is NamingLookupKey;
|
|
9
|
+
export interface NamingLookupEntry {
|
|
10
|
+
key: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const MAX_NAMING_LOOKUP_ENTRIES: number;
|
|
14
|
+
export declare const MAX_NAMING_LOOKUP_KEY_LENGTH: number;
|
|
15
|
+
export declare const MAX_NAMING_LOOKUP_VALUE_LENGTH: number;
|
|
16
|
+
export declare const MAX_NAME_PATTERN_LENGTH: number;
|
|
17
|
+
export declare enum DeviceNamingOutcome {
|
|
18
|
+
Named = "Named",
|
|
19
|
+
FollowsRules = "FollowsRules",
|
|
20
|
+
NoMatchingRule = "NoMatchingRule",
|
|
21
|
+
MissingValue = "MissingValue",
|
|
22
|
+
NameTaken = "NameTaken",
|
|
23
|
+
NameTooLong = "NameTooLong"
|
|
24
|
+
}
|
|
25
|
+
export declare const ALL_DEVICE_NAMING_OUTCOMES: ReadonlyArray<DeviceNamingOutcome>;
|
|
26
|
+
export declare function isDeviceNamingOutcome(value: unknown): value is DeviceNamingOutcome;
|
|
27
|
+
export interface DeviceNamingResult {
|
|
28
|
+
outcome: DeviceNamingOutcome;
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
ruleId?: string | undefined;
|
|
31
|
+
ruleName?: string | undefined;
|
|
32
|
+
missing?: string | undefined;
|
|
33
|
+
takenName?: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface DeviceNamingPreviewItem extends DeviceNamingResult {
|
|
36
|
+
key: string;
|
|
37
|
+
discoveredName: string;
|
|
38
|
+
}
|
|
39
|
+
export interface DeviceNamingPreview {
|
|
40
|
+
hasRules: boolean;
|
|
41
|
+
items: Array<DeviceNamingPreviewItem>;
|
|
42
|
+
}
|
|
43
|
+
export interface DeviceNamingPlanItem extends DeviceNamingResult {
|
|
44
|
+
deviceId: string;
|
|
45
|
+
currentName: string;
|
|
46
|
+
isNamedByPerson: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface DeviceNamingPlan {
|
|
49
|
+
hasRules: boolean;
|
|
50
|
+
devicesChecked: number;
|
|
51
|
+
items: Array<DeviceNamingPlanItem>;
|
|
52
|
+
followingCount: number;
|
|
53
|
+
isTruncated: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare const MAX_DEVICES_PER_NAMING_PLAN: number;
|
|
56
|
+
export declare const MAX_RENAMES_PER_NAMING_APPLY: number;
|
|
57
|
+
export interface DeviceNamingRename {
|
|
58
|
+
deviceId: string;
|
|
59
|
+
fromName: string;
|
|
60
|
+
toName: string;
|
|
61
|
+
}
|
|
62
|
+
export interface DeviceNamingApplyResult {
|
|
63
|
+
renamed: number;
|
|
64
|
+
skipped: Array<{
|
|
65
|
+
deviceId: string;
|
|
66
|
+
reason: string;
|
|
67
|
+
}>;
|
|
68
|
+
}
|
|
69
|
+
export declare const NAMING_APPLY_DEVICE_GONE_REASON: string;
|
|
70
|
+
export declare const NAMING_APPLY_NAME_CHANGED_REASON: string;
|
|
71
|
+
export declare const NAMING_APPLY_RULES_CHANGED_REASON: string;
|
|
72
|
+
export declare function isDeviceNamedByPerson(device: {
|
|
73
|
+
name?: unknown;
|
|
74
|
+
discoveredName?: unknown;
|
|
75
|
+
ruleAssignedName?: unknown;
|
|
76
|
+
hostname?: unknown;
|
|
77
|
+
}): boolean;
|
|
78
|
+
export declare function isDeviceStillNamedByRule(device: {
|
|
79
|
+
name?: unknown;
|
|
80
|
+
ruleAssignedName?: unknown;
|
|
81
|
+
}): boolean;
|
|
82
|
+
export declare function readDeviceNamingResult(value: unknown): DeviceNamingResult | null;
|
|
83
|
+
export declare function readDeviceNamingPreview(value: unknown): DeviceNamingPreview;
|
|
84
|
+
export declare function readDeviceNamingPlan(value: unknown): DeviceNamingPlan;
|
|
85
|
+
export declare function readDeviceNamingApplyResult(value: unknown): DeviceNamingApplyResult;
|
|
86
|
+
export declare function getRenamesForPlanItems(items: ReadonlyArray<DeviceNamingPlanItem>, selectedDeviceIds: ReadonlySet<string>): Array<DeviceNamingRename>;
|
|
87
|
+
export declare function getInitialPlanSelection(items: ReadonlyArray<DeviceNamingPlanItem>): Set<string>;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* NAMING RULES FOR NETWORK DEVICES (OneUptime issue #6619).
|
|
4
|
+
*
|
|
5
|
+
* Discovery names a device by what it finds: its SNMP name, its NetBIOS
|
|
6
|
+
* name, its DNS name, or its address (Utils/NetworkDevice/DeviceNameRule).
|
|
7
|
+
* An estate that names its devices by a convention of its own - "UN1216
|
|
8
|
+
* MNUPLR01" is the menu player of unit 1216 - got a list of "Samsung",
|
|
9
|
+
* "dmb-5" and bare addresses, and renamed every device by hand.
|
|
10
|
+
*
|
|
11
|
+
* A naming rule says what the devices it matches are called: which devices
|
|
12
|
+
* (conditions on their address, MAC, vendor, discovered name and site) and a
|
|
13
|
+
* name pattern ("UN{site.code}MNUPLR{nn}"). Rules are kept in order, and the
|
|
14
|
+
* first rule that matches a device and can fill in its pattern names it. An
|
|
15
|
+
* import names each device it creates that way, the name discovery found is
|
|
16
|
+
* kept as the device's Discovered Name, and the same rules can be applied to
|
|
17
|
+
* the devices already in the project, after a preview of every rename.
|
|
18
|
+
*
|
|
19
|
+
* These are the shapes the server, the workers and the Dashboard share.
|
|
20
|
+
* React-free and database-free, so every rule is tested on its own.
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.NAMING_APPLY_RULES_CHANGED_REASON = exports.NAMING_APPLY_NAME_CHANGED_REASON = exports.NAMING_APPLY_DEVICE_GONE_REASON = exports.MAX_RENAMES_PER_NAMING_APPLY = exports.MAX_DEVICES_PER_NAMING_PLAN = exports.ALL_DEVICE_NAMING_OUTCOMES = exports.DeviceNamingOutcome = exports.MAX_NAME_PATTERN_LENGTH = exports.MAX_NAMING_LOOKUP_VALUE_LENGTH = exports.MAX_NAMING_LOOKUP_KEY_LENGTH = exports.MAX_NAMING_LOOKUP_ENTRIES = exports.ALL_NAMING_LOOKUP_KEYS = exports.NamingLookupKey = void 0;
|
|
24
|
+
exports.isNamingLookupKey = isNamingLookupKey;
|
|
25
|
+
exports.isDeviceNamingOutcome = isDeviceNamingOutcome;
|
|
26
|
+
exports.isDeviceNamedByPerson = isDeviceNamedByPerson;
|
|
27
|
+
exports.isDeviceStillNamedByRule = isDeviceStillNamedByRule;
|
|
28
|
+
exports.readDeviceNamingResult = readDeviceNamingResult;
|
|
29
|
+
exports.readDeviceNamingPreview = readDeviceNamingPreview;
|
|
30
|
+
exports.readDeviceNamingPlan = readDeviceNamingPlan;
|
|
31
|
+
exports.readDeviceNamingApplyResult = readDeviceNamingApplyResult;
|
|
32
|
+
exports.getRenamesForPlanItems = getRenamesForPlanItems;
|
|
33
|
+
exports.getInitialPlanSelection = getInitialPlanSelection;
|
|
34
|
+
/*
|
|
35
|
+
* What a rule's lookup table is keyed by: the value of the device a table
|
|
36
|
+
* row is looked up with. The customer's table (issue #6619) maps the last
|
|
37
|
+
* number of each device's address in a unit's subnet to its role - .51 is
|
|
38
|
+
* the menu player, .151 the left screen - so the last part of the address
|
|
39
|
+
* comes first.
|
|
40
|
+
*/
|
|
41
|
+
var NamingLookupKey;
|
|
42
|
+
(function (NamingLookupKey) {
|
|
43
|
+
NamingLookupKey["LastIpOctet"] = "lastIpOctet";
|
|
44
|
+
NamingLookupKey["IpAddress"] = "ipAddress";
|
|
45
|
+
NamingLookupKey["MacAddress"] = "macAddress";
|
|
46
|
+
NamingLookupKey["DiscoveredName"] = "discoveredName";
|
|
47
|
+
})(NamingLookupKey || (exports.NamingLookupKey = NamingLookupKey = {}));
|
|
48
|
+
exports.ALL_NAMING_LOOKUP_KEYS = [
|
|
49
|
+
NamingLookupKey.LastIpOctet,
|
|
50
|
+
NamingLookupKey.IpAddress,
|
|
51
|
+
NamingLookupKey.MacAddress,
|
|
52
|
+
NamingLookupKey.DiscoveredName,
|
|
53
|
+
];
|
|
54
|
+
function isNamingLookupKey(value) {
|
|
55
|
+
return (typeof value === "string" &&
|
|
56
|
+
exports.ALL_NAMING_LOOKUP_KEYS.includes(value));
|
|
57
|
+
}
|
|
58
|
+
/*
|
|
59
|
+
* The longest a lookup table may be. A table maps the positions of one kind
|
|
60
|
+
* of site, or the MACs of an asset list: hundreds of rows at most. A rule is
|
|
61
|
+
* read on every import, so the ceiling keeps one rule from being megabytes.
|
|
62
|
+
*/
|
|
63
|
+
exports.MAX_NAMING_LOOKUP_ENTRIES = 5000;
|
|
64
|
+
// The longest a lookup row's key and value may be.
|
|
65
|
+
exports.MAX_NAMING_LOOKUP_KEY_LENGTH = 100;
|
|
66
|
+
exports.MAX_NAMING_LOOKUP_VALUE_LENGTH = 80;
|
|
67
|
+
// The longest a name pattern may be (it is stored as LongText).
|
|
68
|
+
exports.MAX_NAME_PATTERN_LENGTH = 255;
|
|
69
|
+
/*
|
|
70
|
+
* What the naming rules made of one device.
|
|
71
|
+
*
|
|
72
|
+
* - Named: a rule gives it a name - for a device being imported, the name
|
|
73
|
+
* it is created under; for one already in the project, a new name.
|
|
74
|
+
* - FollowsRules: a device already in the project is already called what
|
|
75
|
+
* the rules call it (with a counter, any free number of the pattern).
|
|
76
|
+
* - NoMatchingRule: no enabled rule matches it, so it keeps the name it has
|
|
77
|
+
* (or, being imported, the name discovery found).
|
|
78
|
+
* - MissingValue: a rule matches it, but the device lacks a value the
|
|
79
|
+
* rule's pattern needs - no site code, no MAC, no row in the lookup
|
|
80
|
+
* table - and no rule after it could name it either.
|
|
81
|
+
* - NameTaken: a rule names it, but another device already has that name
|
|
82
|
+
* and the pattern has no counter to make it unique.
|
|
83
|
+
* - NameTooLong: the name the rule gives it is longer than a device name
|
|
84
|
+
* may be.
|
|
85
|
+
*/
|
|
86
|
+
var DeviceNamingOutcome;
|
|
87
|
+
(function (DeviceNamingOutcome) {
|
|
88
|
+
DeviceNamingOutcome["Named"] = "Named";
|
|
89
|
+
DeviceNamingOutcome["FollowsRules"] = "FollowsRules";
|
|
90
|
+
DeviceNamingOutcome["NoMatchingRule"] = "NoMatchingRule";
|
|
91
|
+
DeviceNamingOutcome["MissingValue"] = "MissingValue";
|
|
92
|
+
DeviceNamingOutcome["NameTaken"] = "NameTaken";
|
|
93
|
+
DeviceNamingOutcome["NameTooLong"] = "NameTooLong";
|
|
94
|
+
})(DeviceNamingOutcome || (exports.DeviceNamingOutcome = DeviceNamingOutcome = {}));
|
|
95
|
+
exports.ALL_DEVICE_NAMING_OUTCOMES = [
|
|
96
|
+
DeviceNamingOutcome.Named,
|
|
97
|
+
DeviceNamingOutcome.FollowsRules,
|
|
98
|
+
DeviceNamingOutcome.NoMatchingRule,
|
|
99
|
+
DeviceNamingOutcome.MissingValue,
|
|
100
|
+
DeviceNamingOutcome.NameTaken,
|
|
101
|
+
DeviceNamingOutcome.NameTooLong,
|
|
102
|
+
];
|
|
103
|
+
function isDeviceNamingOutcome(value) {
|
|
104
|
+
return (typeof value === "string" &&
|
|
105
|
+
exports.ALL_DEVICE_NAMING_OUTCOMES.includes(value));
|
|
106
|
+
}
|
|
107
|
+
// How many devices one plan checks. A project with more is planned per selection.
|
|
108
|
+
exports.MAX_DEVICES_PER_NAMING_PLAN = 20000;
|
|
109
|
+
// How many renames one apply carries.
|
|
110
|
+
exports.MAX_RENAMES_PER_NAMING_APPLY = 5000;
|
|
111
|
+
// The reasons an apply leaves a device alone, worded once for the tests.
|
|
112
|
+
exports.NAMING_APPLY_DEVICE_GONE_REASON = "The device was deleted, or is no longer in this project.";
|
|
113
|
+
exports.NAMING_APPLY_NAME_CHANGED_REASON = "The device was renamed since the preview, so it was left alone.";
|
|
114
|
+
exports.NAMING_APPLY_RULES_CHANGED_REASON = "The naming rules give this device another name now. Preview again to see it.";
|
|
115
|
+
/*
|
|
116
|
+
* The device's name, its discovered name and its rule-given name: which of
|
|
117
|
+
* them is the one it has. True when the name was typed by a person - it is
|
|
118
|
+
* neither what discovery recorded nor what a naming rule gave it, nor its
|
|
119
|
+
* own address (what a device added without a name is called, and what an
|
|
120
|
+
* import before discovery recorded names named a device by). A device with
|
|
121
|
+
* no record at all was otherwise added by hand, so its name is a person's.
|
|
122
|
+
*/
|
|
123
|
+
function isDeviceNamedByPerson(device) {
|
|
124
|
+
const name = typeof device.name === "string" ? device.name.trim() : "";
|
|
125
|
+
if (!name) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
if (typeof device.hostname === "string" &&
|
|
129
|
+
name.toLowerCase() === device.hostname.trim().toLowerCase()) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
const discoveredName = typeof device.discoveredName === "string"
|
|
133
|
+
? device.discoveredName.trim()
|
|
134
|
+
: "";
|
|
135
|
+
const ruleAssignedName = typeof device.ruleAssignedName === "string"
|
|
136
|
+
? device.ruleAssignedName.trim()
|
|
137
|
+
: "";
|
|
138
|
+
return name !== discoveredName && name !== ruleAssignedName;
|
|
139
|
+
}
|
|
140
|
+
/*
|
|
141
|
+
* True when the device is still called exactly what a naming rule called it
|
|
142
|
+
* - so the rules, not a person, decide its name, and discovery leaves it
|
|
143
|
+
* alone (DiscoveredNameUpgrade, RunImportedDeviceNaming).
|
|
144
|
+
*/
|
|
145
|
+
function isDeviceStillNamedByRule(device) {
|
|
146
|
+
if (typeof device.name !== "string" ||
|
|
147
|
+
typeof device.ruleAssignedName !== "string") {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
const name = device.name.trim();
|
|
151
|
+
return Boolean(name) && name === device.ruleAssignedName.trim();
|
|
152
|
+
}
|
|
153
|
+
/*
|
|
154
|
+
* READING THE SERVER'S ANSWERS. The Dashboard reads every answer through
|
|
155
|
+
* these, so an answer from a newer server - an outcome this build does not
|
|
156
|
+
* know, a field missing - is read as what it can be, never drawn as
|
|
157
|
+
* something it is not: an item with an unknown outcome is dropped.
|
|
158
|
+
*/
|
|
159
|
+
function readRecord(value) {
|
|
160
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
161
|
+
? value
|
|
162
|
+
: {};
|
|
163
|
+
}
|
|
164
|
+
function readOptionalString(value) {
|
|
165
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
166
|
+
}
|
|
167
|
+
function readCount(value) {
|
|
168
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0
|
|
169
|
+
? Math.floor(value)
|
|
170
|
+
: 0;
|
|
171
|
+
}
|
|
172
|
+
function readDeviceNamingResult(value) {
|
|
173
|
+
const record = readRecord(value);
|
|
174
|
+
if (!isDeviceNamingOutcome(record["outcome"])) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
const result = { outcome: record["outcome"] };
|
|
178
|
+
for (const key of [
|
|
179
|
+
"name",
|
|
180
|
+
"ruleId",
|
|
181
|
+
"ruleName",
|
|
182
|
+
"missing",
|
|
183
|
+
"takenName",
|
|
184
|
+
]) {
|
|
185
|
+
const text = readOptionalString(record[key]);
|
|
186
|
+
if (text) {
|
|
187
|
+
result[key] = text;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return result;
|
|
191
|
+
}
|
|
192
|
+
function readDeviceNamingPreview(value) {
|
|
193
|
+
const record = readRecord(value);
|
|
194
|
+
const items = [];
|
|
195
|
+
if (Array.isArray(record["items"])) {
|
|
196
|
+
for (const item of record["items"]) {
|
|
197
|
+
const result = readDeviceNamingResult(item);
|
|
198
|
+
const itemRecord = readRecord(item);
|
|
199
|
+
const key = readOptionalString(itemRecord["key"]);
|
|
200
|
+
if (!result || !key) {
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
items.push(Object.assign(Object.assign({}, result), { key: key, discoveredName: readOptionalString(itemRecord["discoveredName"]) || "" }));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return { hasRules: record["hasRules"] === true, items: items };
|
|
207
|
+
}
|
|
208
|
+
function readDeviceNamingPlan(value) {
|
|
209
|
+
const record = readRecord(value);
|
|
210
|
+
const items = [];
|
|
211
|
+
if (Array.isArray(record["items"])) {
|
|
212
|
+
for (const item of record["items"]) {
|
|
213
|
+
const result = readDeviceNamingResult(item);
|
|
214
|
+
const itemRecord = readRecord(item);
|
|
215
|
+
const deviceId = readOptionalString(itemRecord["deviceId"]);
|
|
216
|
+
if (!result || !deviceId) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
items.push(Object.assign(Object.assign({}, result), { deviceId: deviceId, currentName: readOptionalString(itemRecord["currentName"]) || "", isNamedByPerson: itemRecord["isNamedByPerson"] === true }));
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
hasRules: record["hasRules"] === true,
|
|
224
|
+
devicesChecked: readCount(record["devicesChecked"]),
|
|
225
|
+
items: items,
|
|
226
|
+
followingCount: readCount(record["followingCount"]),
|
|
227
|
+
isTruncated: record["isTruncated"] === true,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function readDeviceNamingApplyResult(value) {
|
|
231
|
+
const record = readRecord(value);
|
|
232
|
+
const skipped = [];
|
|
233
|
+
if (Array.isArray(record["skipped"])) {
|
|
234
|
+
for (const item of record["skipped"]) {
|
|
235
|
+
const itemRecord = readRecord(item);
|
|
236
|
+
const deviceId = readOptionalString(itemRecord["deviceId"]);
|
|
237
|
+
if (deviceId) {
|
|
238
|
+
skipped.push({
|
|
239
|
+
deviceId: deviceId,
|
|
240
|
+
reason: readOptionalString(itemRecord["reason"]) || "",
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return { renamed: readCount(record["renamed"]), skipped: skipped };
|
|
246
|
+
}
|
|
247
|
+
/*
|
|
248
|
+
* The renames a plan's ticked devices ask for: the Named ones, each with
|
|
249
|
+
* the name it has and the name the rules give it.
|
|
250
|
+
*/
|
|
251
|
+
function getRenamesForPlanItems(items, selectedDeviceIds) {
|
|
252
|
+
const renames = [];
|
|
253
|
+
for (const item of items) {
|
|
254
|
+
if (item.outcome !== DeviceNamingOutcome.Named ||
|
|
255
|
+
!item.name ||
|
|
256
|
+
!selectedDeviceIds.has(item.deviceId)) {
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
renames.push({
|
|
260
|
+
deviceId: item.deviceId,
|
|
261
|
+
fromName: item.currentName,
|
|
262
|
+
toName: item.name,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
return renames;
|
|
266
|
+
}
|
|
267
|
+
/*
|
|
268
|
+
* The devices ticked when a plan opens: every one the rules rename, except
|
|
269
|
+
* the ones a person named - renaming what someone chose is their call.
|
|
270
|
+
*/
|
|
271
|
+
function getInitialPlanSelection(items) {
|
|
272
|
+
const selected = new Set();
|
|
273
|
+
for (const item of items) {
|
|
274
|
+
if (item.outcome === DeviceNamingOutcome.Named && !item.isNamedByPerson) {
|
|
275
|
+
selected.add(item.deviceId);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return selected;
|
|
279
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import commonJsModule from "./DeviceNaming.js";
|
|
2
|
+
export const ALL_DEVICE_NAMING_OUTCOMES = commonJsModule.ALL_DEVICE_NAMING_OUTCOMES;
|
|
3
|
+
export const ALL_NAMING_LOOKUP_KEYS = commonJsModule.ALL_NAMING_LOOKUP_KEYS;
|
|
4
|
+
export const DeviceNamingOutcome = commonJsModule.DeviceNamingOutcome;
|
|
5
|
+
export const MAX_DEVICES_PER_NAMING_PLAN = commonJsModule.MAX_DEVICES_PER_NAMING_PLAN;
|
|
6
|
+
export const MAX_NAME_PATTERN_LENGTH = commonJsModule.MAX_NAME_PATTERN_LENGTH;
|
|
7
|
+
export const MAX_NAMING_LOOKUP_ENTRIES = commonJsModule.MAX_NAMING_LOOKUP_ENTRIES;
|
|
8
|
+
export const MAX_NAMING_LOOKUP_KEY_LENGTH = commonJsModule.MAX_NAMING_LOOKUP_KEY_LENGTH;
|
|
9
|
+
export const MAX_NAMING_LOOKUP_VALUE_LENGTH = commonJsModule.MAX_NAMING_LOOKUP_VALUE_LENGTH;
|
|
10
|
+
export const MAX_RENAMES_PER_NAMING_APPLY = commonJsModule.MAX_RENAMES_PER_NAMING_APPLY;
|
|
11
|
+
export const NAMING_APPLY_DEVICE_GONE_REASON = commonJsModule.NAMING_APPLY_DEVICE_GONE_REASON;
|
|
12
|
+
export const NAMING_APPLY_NAME_CHANGED_REASON = commonJsModule.NAMING_APPLY_NAME_CHANGED_REASON;
|
|
13
|
+
export const NAMING_APPLY_RULES_CHANGED_REASON = commonJsModule.NAMING_APPLY_RULES_CHANGED_REASON;
|
|
14
|
+
export const NamingLookupKey = commonJsModule.NamingLookupKey;
|
|
15
|
+
export const getInitialPlanSelection = commonJsModule.getInitialPlanSelection;
|
|
16
|
+
export const getRenamesForPlanItems = commonJsModule.getRenamesForPlanItems;
|
|
17
|
+
export const isDeviceNamedByPerson = commonJsModule.isDeviceNamedByPerson;
|
|
18
|
+
export const isDeviceNamingOutcome = commonJsModule.isDeviceNamingOutcome;
|
|
19
|
+
export const isDeviceStillNamedByRule = commonJsModule.isDeviceStillNamedByRule;
|
|
20
|
+
export const isNamingLookupKey = commonJsModule.isNamingLookupKey;
|
|
21
|
+
export const readDeviceNamingApplyResult = commonJsModule.readDeviceNamingApplyResult;
|
|
22
|
+
export const readDeviceNamingPlan = commonJsModule.readDeviceNamingPlan;
|
|
23
|
+
export const readDeviceNamingPreview = commonJsModule.readDeviceNamingPreview;
|
|
24
|
+
export const readDeviceNamingResult = commonJsModule.readDeviceNamingResult;
|
|
@@ -99,6 +99,7 @@ export interface DiscoveredDeviceImportFacts {
|
|
|
99
99
|
macAddress: string;
|
|
100
100
|
siteId?: string | undefined;
|
|
101
101
|
probeId?: string | undefined;
|
|
102
|
+
vendor?: string | undefined;
|
|
102
103
|
}
|
|
103
104
|
export declare function readDiscoveredDeviceImportFacts(value: unknown): DiscoveredDeviceImportFacts | null;
|
|
104
105
|
export declare function getEndpointNodeKey(endpointId: string): string;
|
|
@@ -99,6 +99,7 @@ export interface DiscoveredDeviceImportFacts {
|
|
|
99
99
|
macAddress: string;
|
|
100
100
|
siteId?: string | undefined;
|
|
101
101
|
probeId?: string | undefined;
|
|
102
|
+
vendor?: string | undefined;
|
|
102
103
|
}
|
|
103
104
|
export declare function readDiscoveredDeviceImportFacts(value: unknown): DiscoveredDeviceImportFacts | null;
|
|
104
105
|
export declare function getEndpointNodeKey(endpointId: string): string;
|
|
@@ -380,12 +380,16 @@ function readDiscoveredDeviceImportFacts(value) {
|
|
|
380
380
|
};
|
|
381
381
|
const siteId = optionalText(facts["siteId"]);
|
|
382
382
|
const probeId = optionalText(facts["probeId"]);
|
|
383
|
+
const vendor = optionalText(facts["vendor"]);
|
|
383
384
|
if (siteId && ObjectID_1.default.isValidUUID(siteId)) {
|
|
384
385
|
read.siteId = siteId;
|
|
385
386
|
}
|
|
386
387
|
if (probeId && ObjectID_1.default.isValidUUID(probeId)) {
|
|
387
388
|
read.probeId = probeId;
|
|
388
389
|
}
|
|
390
|
+
if (vendor) {
|
|
391
|
+
read.vendor = vendor;
|
|
392
|
+
}
|
|
389
393
|
return read;
|
|
390
394
|
}
|
|
391
395
|
// The topology map's key for an endpoint node (NetworkTopologySuppression.nodeKey).
|
|
@@ -21,3 +21,13 @@ export declare function getDueRuleExecution(data: {
|
|
|
21
21
|
repeatEveryMinutes: unknown;
|
|
22
22
|
minutesSinceStart: number;
|
|
23
23
|
}): number | null;
|
|
24
|
+
export declare function getRuleExecutionDueAfterMinutes(data: {
|
|
25
|
+
notifyAfterMinutes: number;
|
|
26
|
+
repeatEveryMinutes: unknown;
|
|
27
|
+
executionNumber: number;
|
|
28
|
+
}): number;
|
|
29
|
+
export declare function getFirstOwedRuleExecution(data: {
|
|
30
|
+
executedClaimKeys: ReadonlyArray<string>;
|
|
31
|
+
ruleId: string;
|
|
32
|
+
executionNumber: number;
|
|
33
|
+
}): number;
|
|
@@ -21,3 +21,13 @@ export declare function getDueRuleExecution(data: {
|
|
|
21
21
|
repeatEveryMinutes: unknown;
|
|
22
22
|
minutesSinceStart: number;
|
|
23
23
|
}): number | null;
|
|
24
|
+
export declare function getRuleExecutionDueAfterMinutes(data: {
|
|
25
|
+
notifyAfterMinutes: number;
|
|
26
|
+
repeatEveryMinutes: unknown;
|
|
27
|
+
executionNumber: number;
|
|
28
|
+
}): number;
|
|
29
|
+
export declare function getFirstOwedRuleExecution(data: {
|
|
30
|
+
executedClaimKeys: ReadonlyArray<string>;
|
|
31
|
+
ruleId: string;
|
|
32
|
+
executionNumber: number;
|
|
33
|
+
}): number;
|
|
@@ -25,6 +25,8 @@ exports.getDueRepeatNumber = getDueRepeatNumber;
|
|
|
25
25
|
exports.getRepeatClaimKey = getRepeatClaimKey;
|
|
26
26
|
exports.isRuleFullyExecuted = isRuleFullyExecuted;
|
|
27
27
|
exports.getDueRuleExecution = getDueRuleExecution;
|
|
28
|
+
exports.getRuleExecutionDueAfterMinutes = getRuleExecutionDueAfterMinutes;
|
|
29
|
+
exports.getFirstOwedRuleExecution = getFirstOwedRuleExecution;
|
|
28
30
|
// Off: the rule sends once, as every rule did before.
|
|
29
31
|
exports.NO_NOTIFICATION_REPEAT = 0;
|
|
30
32
|
// The intervals the On-Call Rules page offers, in minutes.
|
|
@@ -109,3 +111,52 @@ function getDueRuleExecution(data) {
|
|
|
109
111
|
? null
|
|
110
112
|
: repeatNumber;
|
|
111
113
|
}
|
|
114
|
+
/*
|
|
115
|
+
* WHEN A DELIVERY OF A RULE WAS DUE, for how late it went out
|
|
116
|
+
* (notification.send.lag, OnCallSendLag).
|
|
117
|
+
*
|
|
118
|
+
* How many minutes after its log started a rule's delivery comes due: its
|
|
119
|
+
* first push (0) after notifyAfterMinutes, repeat n after notifyAfterMinutes
|
|
120
|
+
* + n * repeatEveryMinutes - the first whole minute at which
|
|
121
|
+
* getDueRuleExecution, counting whole minutes as the worker does, says it
|
|
122
|
+
* is due.
|
|
123
|
+
*/
|
|
124
|
+
function getRuleExecutionDueAfterMinutes(data) {
|
|
125
|
+
const notifyAfterMinutes = Number.isFinite(data.notifyAfterMinutes)
|
|
126
|
+
? data.notifyAfterMinutes
|
|
127
|
+
: 0;
|
|
128
|
+
const repeats = toRepeatNumber(data.executionNumber);
|
|
129
|
+
return Math.max(0, Math.ceil(notifyAfterMinutes +
|
|
130
|
+
repeats * getRepeatEveryMinutes(data.repeatEveryMinutes)));
|
|
131
|
+
}
|
|
132
|
+
/*
|
|
133
|
+
* An execution number as the repeat it is: 0 for the first push - and for
|
|
134
|
+
* anything that is not a number above 0 - whole repeats, never past the
|
|
135
|
+
* last (MAX_NOTIFICATION_REPEATS).
|
|
136
|
+
*/
|
|
137
|
+
function toRepeatNumber(executionNumber) {
|
|
138
|
+
if (!Number.isFinite(executionNumber) || executionNumber <= 0) {
|
|
139
|
+
return 0;
|
|
140
|
+
}
|
|
141
|
+
return Math.min(exports.MAX_NOTIFICATION_REPEATS, Math.floor(executionNumber));
|
|
142
|
+
}
|
|
143
|
+
/*
|
|
144
|
+
* The earliest delivery a rule's send now stands in for. A worker that fell
|
|
145
|
+
* behind sends the latest repeat due and skips the ones it missed
|
|
146
|
+
* (getDueRuleExecution), so repeat n sent now was owed since the first
|
|
147
|
+
* repeat after the last one sent - the person went without a push from
|
|
148
|
+
* then. Its first push, and a repeat right after the last one sent, stand
|
|
149
|
+
* for themselves.
|
|
150
|
+
*/
|
|
151
|
+
function getFirstOwedRuleExecution(data) {
|
|
152
|
+
const executionNumber = toRepeatNumber(data.executionNumber);
|
|
153
|
+
if (executionNumber === 0) {
|
|
154
|
+
return 0;
|
|
155
|
+
}
|
|
156
|
+
for (let repeat = executionNumber - 1; repeat >= 1; repeat--) {
|
|
157
|
+
if (data.executedClaimKeys.includes(getRepeatClaimKey(data.ruleId, repeat))) {
|
|
158
|
+
return repeat + 1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return 1;
|
|
162
|
+
}
|
|
@@ -4,7 +4,9 @@ export const NO_NOTIFICATION_REPEAT = commonJsModule.NO_NOTIFICATION_REPEAT;
|
|
|
4
4
|
export const REPEAT_EVERY_MINUTES_OPTIONS = commonJsModule.REPEAT_EVERY_MINUTES_OPTIONS;
|
|
5
5
|
export const getDueRepeatNumber = commonJsModule.getDueRepeatNumber;
|
|
6
6
|
export const getDueRuleExecution = commonJsModule.getDueRuleExecution;
|
|
7
|
+
export const getFirstOwedRuleExecution = commonJsModule.getFirstOwedRuleExecution;
|
|
7
8
|
export const getRepeatClaimKey = commonJsModule.getRepeatClaimKey;
|
|
8
9
|
export const getRepeatEveryMinutes = commonJsModule.getRepeatEveryMinutes;
|
|
10
|
+
export const getRuleExecutionDueAfterMinutes = commonJsModule.getRuleExecutionDueAfterMinutes;
|
|
9
11
|
export const isRepeatEveryMinutes = commonJsModule.isRepeatEveryMinutes;
|
|
10
12
|
export const isRuleFullyExecuted = commonJsModule.isRuleFullyExecuted;
|