@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
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.resolveClockFace = exports.getClockAnalogDialSizeInPx = exports.getClockDigitalFontSizeInPx = exports.getClockTimeWidthInFontUnits = exports.getClockContentBox = exports.getClockCaptionLineCount = exports.CLOCK_SECONDARY_FONT_SCALE = exports.isDaytimeAtClock = exports.getMillisecondsUntilNextClockTick = exports.getClockHandAngles = exports.getClockGmtOffsetText = exports.getClockWidgetDisplay = exports.isClockTimezoneFallback = exports.resolveUse12HourFormat = exports.getClockLabel = exports.getCityFromTimezone = exports.resolveClockTimezone = exports.isSupportedClockTimezone = void 0;
|
|
37
37
|
const DashboardClockComponent_1 = require("../../Types/Dashboard/DashboardComponents/DashboardClockComponent");
|
|
38
38
|
const Date_1 = __importStar(require("../../Types/Date"));
|
|
39
|
+
const DateLanguage_1 = require("../../Types/DateLanguage");
|
|
39
40
|
/**
|
|
40
41
|
* Every derivation the dashboard Clock widget needs to turn "now" into what
|
|
41
42
|
* it draws — the digit strings, the caption, the analog hand angles, and how
|
|
@@ -116,16 +117,68 @@ const isClockTimezoneFallback = (timezone) => {
|
|
|
116
117
|
return !(0, exports.isSupportedClockTimezone)(timezone);
|
|
117
118
|
};
|
|
118
119
|
exports.isClockTimezoneFallback = isClockTimezoneFallback;
|
|
120
|
+
/*
|
|
121
|
+
* THE DATE AND THE AM/PM, IN THE READER'S LANGUAGE (#7093).
|
|
122
|
+
*
|
|
123
|
+
* The clock wrote its date and its meridiem with fixed English formats:
|
|
124
|
+
* every board read "Thu, Nov 12" and "PM", and a Persian one drew Latin
|
|
125
|
+
* digits beside Persian words. In another language than English they are
|
|
126
|
+
* Intl's words for it, in the clock's zone and on the Gregorian calendar
|
|
127
|
+
* (getDateLocale): "Do., 12. Nov." and "PM" in German, "پنجشنبه ۱۲ نوامبر"
|
|
128
|
+
* and "ب.ظ." in Persian, "11月12日(木)" and "午後" - before the time - in
|
|
129
|
+
* Japanese. The digits are the ones the Dashboard writes in that language
|
|
130
|
+
* (writeDigitsInLocale): Persian ones in Persian, Latin ones everywhere
|
|
131
|
+
* else, Arabic too. English is written as it always was.
|
|
132
|
+
*/
|
|
133
|
+
// The weekday, the month and the day: "Thu, Nov 12".
|
|
134
|
+
const CLOCK_DATE_OPTIONS = {
|
|
135
|
+
weekday: "short",
|
|
136
|
+
month: "short",
|
|
137
|
+
day: "numeric",
|
|
138
|
+
};
|
|
139
|
+
// An hour on a 12-hour clock, for its day period: "9 PM", "午後9時".
|
|
140
|
+
const CLOCK_MERIDIEM_OPTIONS = {
|
|
141
|
+
hour: "numeric",
|
|
142
|
+
hour12: true,
|
|
143
|
+
};
|
|
144
|
+
/*
|
|
145
|
+
* The meridiem the reader's language writes at `date` in `timezone`, and
|
|
146
|
+
* whether it comes before the hour; null when Intl cannot say.
|
|
147
|
+
*/
|
|
148
|
+
const getClockMeridiemInLocale = (data) => {
|
|
149
|
+
var _a;
|
|
150
|
+
const format = (0, DateLanguage_1.getDateTimeFormat)({
|
|
151
|
+
locale: data.locale,
|
|
152
|
+
timezones: [data.timezone],
|
|
153
|
+
options: CLOCK_MERIDIEM_OPTIONS,
|
|
154
|
+
});
|
|
155
|
+
if (!format) {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
const parts = format.formatToParts(data.date);
|
|
159
|
+
const dayPeriodIndex = parts.findIndex((part) => {
|
|
160
|
+
return part.type === "dayPeriod";
|
|
161
|
+
});
|
|
162
|
+
const hourIndex = parts.findIndex((part) => {
|
|
163
|
+
return part.type === "hour";
|
|
164
|
+
});
|
|
165
|
+
const text = (((_a = parts[dayPeriodIndex]) === null || _a === void 0 ? void 0 : _a.value) || "").trim();
|
|
166
|
+
if (dayPeriodIndex < 0 || !text) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
return { text: text, isFirst: hourIndex >= 0 && dayPeriodIndex < hourIndex };
|
|
170
|
+
};
|
|
119
171
|
const getClockWidgetDisplay = (data) => {
|
|
120
172
|
const isFallbackTimezone = (0, exports.isClockTimezoneFallback)(data.timezone);
|
|
121
173
|
const timezone = (0, exports.resolveClockTimezone)(data.timezone);
|
|
122
174
|
const use12HourFormat = (0, exports.resolveUse12HourFormat)(data.hourFormat);
|
|
123
175
|
const zoned = (0, Date_1.Moment)(data.date).tz(timezone);
|
|
124
|
-
|
|
176
|
+
const display = {
|
|
125
177
|
label: (0, exports.getClockLabel)({ label: data.label, timezone: timezone }),
|
|
126
178
|
time: zoned.format(use12HourFormat ? "h:mm" : "HH:mm"),
|
|
127
179
|
seconds: data.showSeconds ? zoned.format("ss") : null,
|
|
128
180
|
meridiem: use12HourFormat ? zoned.format("A") : null,
|
|
181
|
+
isMeridiemFirst: false,
|
|
129
182
|
dateText: data.showDate ? zoned.format("ddd, MMM D") : null,
|
|
130
183
|
zoneAbbreviation: data.showTimezoneAbbreviation
|
|
131
184
|
? Date_1.default.getZoneAbbrByTimezone(timezone, data.date)
|
|
@@ -133,6 +186,38 @@ const getClockWidgetDisplay = (data) => {
|
|
|
133
186
|
timezone: timezone,
|
|
134
187
|
isFallbackTimezone: isFallbackTimezone,
|
|
135
188
|
};
|
|
189
|
+
if ((0, DateLanguage_1.isEnglishDateLanguage)(data.language)) {
|
|
190
|
+
return display;
|
|
191
|
+
}
|
|
192
|
+
const locale = (0, DateLanguage_1.getDateLocale)(data.language);
|
|
193
|
+
display.time = (0, DateLanguage_1.writeDigitsInLocale)(display.time, locale);
|
|
194
|
+
display.seconds =
|
|
195
|
+
display.seconds === null
|
|
196
|
+
? null
|
|
197
|
+
: (0, DateLanguage_1.writeDigitsInLocale)(display.seconds, locale);
|
|
198
|
+
if (use12HourFormat) {
|
|
199
|
+
const meridiem = getClockMeridiemInLocale({
|
|
200
|
+
date: data.date,
|
|
201
|
+
timezone: timezone,
|
|
202
|
+
locale: locale,
|
|
203
|
+
});
|
|
204
|
+
// Where Intl has no words for it, the English ones, as before.
|
|
205
|
+
if (meridiem) {
|
|
206
|
+
display.meridiem = meridiem.text;
|
|
207
|
+
display.isMeridiemFirst = meridiem.isFirst;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (data.showDate) {
|
|
211
|
+
const dateFormat = (0, DateLanguage_1.getDateTimeFormat)({
|
|
212
|
+
locale: locale,
|
|
213
|
+
timezones: [timezone],
|
|
214
|
+
options: CLOCK_DATE_OPTIONS,
|
|
215
|
+
});
|
|
216
|
+
if (dateFormat) {
|
|
217
|
+
display.dateText = dateFormat.format(data.date);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return display;
|
|
136
221
|
};
|
|
137
222
|
exports.getClockWidgetDisplay = getClockWidgetDisplay;
|
|
138
223
|
const getClockGmtOffsetText = (data) => {
|
|
@@ -193,6 +278,24 @@ exports.isDaytimeAtClock = isDaytimeAtClock;
|
|
|
193
278
|
exports.CLOCK_SECONDARY_FONT_SCALE = 0.45;
|
|
194
279
|
/** Advance width of one tabular-numeral, as a fraction of the font size. */
|
|
195
280
|
const TABULAR_DIGIT_WIDTH_RATIO = 0.62;
|
|
281
|
+
/*
|
|
282
|
+
* A character set as wide as it is tall - Chinese, Japanese and Korean,
|
|
283
|
+
* and the full-width forms - in a meridiem: "午後", "오후", "下午".
|
|
284
|
+
*/
|
|
285
|
+
const FULL_WIDTH_CHARACTER = /[\u1100-\u115f\u2e80-\ua4cf\uac00-\ud7a3\uf900-\ufaff\ufe30-\ufe4f\uff00-\uff60\uffe0-\uffe6]/;
|
|
286
|
+
/*
|
|
287
|
+
* How many digit widths `text` takes: one for each character, and a
|
|
288
|
+
* full-width one's own width (an em) for each of those.
|
|
289
|
+
*/
|
|
290
|
+
const getWidthInDigits = (text) => {
|
|
291
|
+
let width = 0;
|
|
292
|
+
for (const character of text) {
|
|
293
|
+
width += FULL_WIDTH_CHARACTER.test(character)
|
|
294
|
+
? 1 / TABULAR_DIGIT_WIDTH_RATIO
|
|
295
|
+
: 1;
|
|
296
|
+
}
|
|
297
|
+
return width;
|
|
298
|
+
};
|
|
196
299
|
/** Vertical space one secondary line (label / date / zone) occupies. */
|
|
197
300
|
const SECONDARY_LINE_HEIGHT_IN_PX = 16;
|
|
198
301
|
/** The `gap-1` the renderer puts between every stacked row. */
|
|
@@ -244,7 +347,7 @@ const getClockTimeWidthInFontUnits = (display) => {
|
|
|
244
347
|
? (display.seconds.length + 1) * exports.CLOCK_SECONDARY_FONT_SCALE
|
|
245
348
|
: 0;
|
|
246
349
|
const meridiemChars = display.meridiem
|
|
247
|
-
? (display.meridiem
|
|
350
|
+
? (getWidthInDigits(display.meridiem) + 1) * exports.CLOCK_SECONDARY_FONT_SCALE
|
|
248
351
|
: 0;
|
|
249
352
|
return ((display.time.length + secondsChars + meridiemChars) *
|
|
250
353
|
TABULAR_DIGIT_WIDTH_RATIO);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import DashboardViewConfig from "../../Types/Dashboard/DashboardViewConfig.mjs";
|
|
2
|
+
export declare const getDashboardViewConfigSignature: (config: DashboardViewConfig) => string;
|
|
3
|
+
export declare const isSameDashboardViewConfig: (first: DashboardViewConfig, second: DashboardViewConfig) => boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import DashboardViewConfig from "../../Types/Dashboard/DashboardViewConfig";
|
|
2
|
+
export declare const getDashboardViewConfigSignature: (config: DashboardViewConfig) => string;
|
|
3
|
+
export declare const isSameDashboardViewConfig: (first: DashboardViewConfig, second: DashboardViewConfig) => boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isSameDashboardViewConfig = exports.getDashboardViewConfigSignature = void 0;
|
|
7
|
+
const JSONFunctions_1 = __importDefault(require("../../Types/JSONFunctions"));
|
|
8
|
+
const StableStringify_1 = __importDefault(require("../StableStringify"));
|
|
9
|
+
/*
|
|
10
|
+
* A dashboard's board as Save Changes writes it, in one string: the words
|
|
11
|
+
* the request carries (JSONFunctions.serializeValue, then JSON), with every
|
|
12
|
+
* object's keys sorted and a key left undefined left out.
|
|
13
|
+
*
|
|
14
|
+
* The same board gives the same string however its objects were built - a
|
|
15
|
+
* widget handed back by its settings unchanged, a key spread into a copy in
|
|
16
|
+
* another order, an id as a class or as the JSON it is sent as. Any change
|
|
17
|
+
* Save would write gives another: a widget added, moved, resized, removed
|
|
18
|
+
* or set up differently, a variable, the default time range or
|
|
19
|
+
* auto-refresh, the board's height.
|
|
20
|
+
*
|
|
21
|
+
* No variables at all and an empty list of them are one board: the
|
|
22
|
+
* Variables dialog's Save writes the list, empty for a board that has none,
|
|
23
|
+
* and a board that never had one has no list.
|
|
24
|
+
*
|
|
25
|
+
* The dashboard compares the board with the one editing started from, so a
|
|
26
|
+
* board opened for editing and left as it was holds nothing unsaved.
|
|
27
|
+
*/
|
|
28
|
+
const getDashboardViewConfigSignature = (config) => {
|
|
29
|
+
const asSent = JSON.stringify(JSONFunctions_1.default.serializeValue(config));
|
|
30
|
+
const board = asSent === undefined ? null : JSON.parse(asSent);
|
|
31
|
+
if (board &&
|
|
32
|
+
typeof board === "object" &&
|
|
33
|
+
!Array.isArray(board) &&
|
|
34
|
+
Array.isArray(board.variables) &&
|
|
35
|
+
board.variables.length === 0) {
|
|
36
|
+
delete board.variables;
|
|
37
|
+
}
|
|
38
|
+
return (0, StableStringify_1.default)(board);
|
|
39
|
+
};
|
|
40
|
+
exports.getDashboardViewConfigSignature = getDashboardViewConfigSignature;
|
|
41
|
+
const isSameDashboardViewConfig = (first, second) => {
|
|
42
|
+
return ((0, exports.getDashboardViewConfigSignature)(first) ===
|
|
43
|
+
(0, exports.getDashboardViewConfigSignature)(second));
|
|
44
|
+
};
|
|
45
|
+
exports.isSameDashboardViewConfig = isSameDashboardViewConfig;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Timezone from "../../Types/Timezone.mjs";
|
|
1
2
|
export interface ValueWidgetPoint {
|
|
2
3
|
timestamp: Date;
|
|
3
4
|
value: number;
|
|
@@ -38,6 +39,7 @@ export declare const VALUE_WIDGET_MAX_FILLED_POINTS: number;
|
|
|
38
39
|
export interface FillValueWidgetSeriesGapsData {
|
|
39
40
|
series: Array<ValueWidgetPoint>;
|
|
40
41
|
bucketWidthMs: number;
|
|
42
|
+
timezone?: Timezone | undefined;
|
|
41
43
|
}
|
|
42
44
|
export declare const fillValueWidgetSeriesGaps: (data: FillValueWidgetSeriesGapsData) => Array<ValueWidgetPoint>;
|
|
43
45
|
export declare const getValueWidgetTrend: (data: GetValueWidgetTrendData) => ValueWidgetTrend | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Timezone from "../../Types/Timezone";
|
|
1
2
|
export interface ValueWidgetPoint {
|
|
2
3
|
timestamp: Date;
|
|
3
4
|
value: number;
|
|
@@ -38,6 +39,7 @@ export declare const VALUE_WIDGET_MAX_FILLED_POINTS: number;
|
|
|
38
39
|
export interface FillValueWidgetSeriesGapsData {
|
|
39
40
|
series: Array<ValueWidgetPoint>;
|
|
40
41
|
bucketWidthMs: number;
|
|
42
|
+
timezone?: Timezone | undefined;
|
|
41
43
|
}
|
|
42
44
|
export declare const fillValueWidgetSeriesGaps: (data: FillValueWidgetSeriesGapsData) => Array<ValueWidgetPoint>;
|
|
43
45
|
export declare const getValueWidgetTrend: (data: GetValueWidgetTrendData) => ValueWidgetTrend | null;
|
|
@@ -22,8 +22,12 @@
|
|
|
22
22
|
* Plain TypeScript with no React, so the arithmetic is unit-testable and the
|
|
23
23
|
* metric and Data Source hosts share one definition.
|
|
24
24
|
*/
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.getValueWidgetTrend = exports.fillValueWidgetSeriesGaps = exports.VALUE_WIDGET_MAX_FILLED_POINTS = exports.getValueWidgetBucketWidthMs = exports.getValueWidgetSeries = exports.getValueWidgetPointTime = exports.getMeanOfValues = exports.VALUE_WIDGET_FLAT_TREND_PERCENT = exports.ValueWidgetTrendDirection = void 0;
|
|
30
|
+
const Date_1 = __importDefault(require("../../Types/Date"));
|
|
27
31
|
var ValueWidgetTrendDirection;
|
|
28
32
|
(function (ValueWidgetTrendDirection) {
|
|
29
33
|
ValueWidgetTrendDirection["Up"] = "Up";
|
|
@@ -156,6 +160,34 @@ const isUsableDate = (date) => {
|
|
|
156
160
|
* as it came.
|
|
157
161
|
*/
|
|
158
162
|
exports.VALUE_WIDGET_MAX_FILLED_POINTS = 2000;
|
|
163
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
164
|
+
/*
|
|
165
|
+
* The start of the bucket after the one that starts at `startMs`, when a
|
|
166
|
+
* bucket is `days` of `timezone`'s calendar days: the start of the zone's
|
|
167
|
+
* day that many days on. Half a day past that many 24-hour days is inside
|
|
168
|
+
* that day whatever the clocks did in between (they move by two hours at
|
|
169
|
+
* most), and the day's start is where the server starts its bucket - its
|
|
170
|
+
* midnight, or the first instant after it on a day whose midnight the
|
|
171
|
+
* clocks skip.
|
|
172
|
+
*/
|
|
173
|
+
const getNextCalendarBucketStartMs = (startMs, days, timezone) => {
|
|
174
|
+
return Date_1.default.getStartOfDay(new Date(startMs + days * DAY_MS + DAY_MS / 2), timezone).getTime();
|
|
175
|
+
};
|
|
176
|
+
/*
|
|
177
|
+
* The slots of buckets of whole calendar days in a zone, `days` of its days
|
|
178
|
+
* apart: from the first reading's, up to the first at or after the last
|
|
179
|
+
* reading. Null when that is more than VALUE_WIDGET_MAX_FILLED_POINTS.
|
|
180
|
+
*/
|
|
181
|
+
const getCalendarBucketSlots = (data) => {
|
|
182
|
+
const slots = [data.firstMs];
|
|
183
|
+
while (slots[slots.length - 1] < data.lastMs) {
|
|
184
|
+
if (slots.length >= exports.VALUE_WIDGET_MAX_FILLED_POINTS) {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
slots.push(getNextCalendarBucketStartMs(slots[slots.length - 1], data.days, data.timezone));
|
|
188
|
+
}
|
|
189
|
+
return slots;
|
|
190
|
+
};
|
|
159
191
|
/*
|
|
160
192
|
* A sum's or a count's series with the empty buckets between its readings
|
|
161
193
|
* drawn as 0.
|
|
@@ -180,6 +212,11 @@ exports.VALUE_WIDGET_MAX_FILLED_POINTS = 2000;
|
|
|
180
212
|
* month or year is not a fixed width, and a widget bucketed some other
|
|
181
213
|
* way must not get zeros between its real points);
|
|
182
214
|
* - the readings span more buckets than VALUE_WIDGET_MAX_FILLED_POINTS.
|
|
215
|
+
*
|
|
216
|
+
* Days and weeks in the reader's zone (`timezone`) are a grid of its
|
|
217
|
+
* calendar days, not of fixed widths: across a change of its clocks one
|
|
218
|
+
* day is 23 or 25 hours long, and a fixed step would put every later
|
|
219
|
+
* reading off the grid and fill nothing.
|
|
183
220
|
*/
|
|
184
221
|
const fillValueWidgetSeriesGaps = (data) => {
|
|
185
222
|
var _a;
|
|
@@ -191,6 +228,44 @@ const fillValueWidgetSeriesGaps = (data) => {
|
|
|
191
228
|
const firstMs = series[0].timestamp.getTime();
|
|
192
229
|
const lastMs = series[series.length - 1].timestamp.getTime();
|
|
193
230
|
const valuesByTime = new Map();
|
|
231
|
+
/*
|
|
232
|
+
* Whole days in a zone, from a reading at the start of one of its days:
|
|
233
|
+
* the zone's calendar is the grid. Readings that are not on it - on
|
|
234
|
+
* UTC's midnights, say - are measured against the fixed width below.
|
|
235
|
+
*/
|
|
236
|
+
if (data.timezone &&
|
|
237
|
+
widthMs % DAY_MS === 0 &&
|
|
238
|
+
Date_1.default.getStartOfDay(new Date(firstMs), data.timezone).getTime() ===
|
|
239
|
+
firstMs) {
|
|
240
|
+
const slots = getCalendarBucketSlots({
|
|
241
|
+
firstMs: firstMs,
|
|
242
|
+
lastMs: lastMs,
|
|
243
|
+
days: widthMs / DAY_MS,
|
|
244
|
+
timezone: data.timezone,
|
|
245
|
+
});
|
|
246
|
+
if (!slots) {
|
|
247
|
+
return series;
|
|
248
|
+
}
|
|
249
|
+
const onTheGrid = new Set(slots);
|
|
250
|
+
for (const point of series) {
|
|
251
|
+
const timeMs = point.timestamp.getTime();
|
|
252
|
+
if (!onTheGrid.has(timeMs)) {
|
|
253
|
+
return series;
|
|
254
|
+
}
|
|
255
|
+
valuesByTime.set(timeMs, point.value);
|
|
256
|
+
}
|
|
257
|
+
if (slots.length === series.length) {
|
|
258
|
+
// No bucket between the readings is empty.
|
|
259
|
+
return series;
|
|
260
|
+
}
|
|
261
|
+
return slots.map((slotMs) => {
|
|
262
|
+
var _a;
|
|
263
|
+
return {
|
|
264
|
+
timestamp: new Date(slotMs),
|
|
265
|
+
value: (_a = valuesByTime.get(slotMs)) !== null && _a !== void 0 ? _a : 0,
|
|
266
|
+
};
|
|
267
|
+
});
|
|
268
|
+
}
|
|
194
269
|
for (const point of series) {
|
|
195
270
|
const timeMs = point.timestamp.getTime();
|
|
196
271
|
if ((timeMs - firstMs) % widthMs !== 0) {
|
|
@@ -56,8 +56,8 @@ const Index_1 = __importDefault(require("./Detectors/Index"));
|
|
|
56
56
|
* wherever it sits, and a match is kept only by the window it starts in, so
|
|
57
57
|
* none is counted twice. Windows bound what one regular expression sees,
|
|
58
58
|
* which keeps V8's backtracking shallow however long the text is
|
|
59
|
-
* (
|
|
60
|
-
* the work one value can ask for.
|
|
59
|
+
* (Docs/notifications/README.md, "Megabyte-long values"), and
|
|
60
|
+
* MAX_SCANNED_TEXT_LENGTH bounds the work one value can ask for.
|
|
61
61
|
*/
|
|
62
62
|
exports.WINDOW_SIZE = 65536;
|
|
63
63
|
exports.WINDOW_OVERLAP = 4096;
|
|
@@ -10,6 +10,7 @@ exports.describeResourceForPrompt = describeResourceForPrompt;
|
|
|
10
10
|
exports.getAssistantPrompts = getAssistantPrompts;
|
|
11
11
|
const ExampleValues_1 = require("./ExampleValues");
|
|
12
12
|
const TerraformSchema_1 = require("./TerraformSchema");
|
|
13
|
+
const ModelApiName_1 = require("../ModelApiName");
|
|
13
14
|
/*
|
|
14
15
|
* The MCP server's tool-name rule (MCP/Tools/SchemaConverter.ts
|
|
15
16
|
* sanitizeToolName): "On-Call Policy" -> on_call_policy.
|
|
@@ -33,10 +34,9 @@ function getMcpToolNames(modelType) {
|
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
35
36
|
const model = new modelType();
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const plural = sanitizeMcpToolName(pluralName);
|
|
37
|
+
// By the names the API keeps: a model renamed on screen keeps its tools.
|
|
38
|
+
const singular = sanitizeMcpToolName((0, ModelApiName_1.getApiSingularName)(model));
|
|
39
|
+
const plural = sanitizeMcpToolName((0, ModelApiName_1.getApiPluralName)(model));
|
|
40
40
|
return {
|
|
41
41
|
create: `create_${singular}`,
|
|
42
42
|
get: `get_${singular}`,
|
|
@@ -32,6 +32,7 @@ export declare function toCliCommandName(singularName: string): string;
|
|
|
32
32
|
export declare function getCliResourceName(model: {
|
|
33
33
|
tableName: string | null | undefined;
|
|
34
34
|
singularName: string | null | undefined;
|
|
35
|
+
apiSingularName?: string | null | undefined;
|
|
35
36
|
}): string;
|
|
36
37
|
export declare function toCliFlag(columnName: string): string;
|
|
37
38
|
export declare function toCommanderAttributeName(flag: string): string;
|
|
@@ -32,6 +32,7 @@ export declare function toCliCommandName(singularName: string): string;
|
|
|
32
32
|
export declare function getCliResourceName(model: {
|
|
33
33
|
tableName: string | null | undefined;
|
|
34
34
|
singularName: string | null | undefined;
|
|
35
|
+
apiSingularName?: string | null | undefined;
|
|
35
36
|
}): string;
|
|
36
37
|
export declare function toCliFlag(columnName: string): string;
|
|
37
38
|
export declare function toCommanderAttributeName(flag: string): string;
|
|
@@ -47,6 +47,7 @@ const HeldPermissions_1 = require("../../Types/HeldPermissions");
|
|
|
47
47
|
const ObjectID_1 = __importDefault(require("../../Types/ObjectID"));
|
|
48
48
|
const StateOrder_1 = require("../StateOrder");
|
|
49
49
|
const ClientResourceNames_1 = require("./ClientResourceNames");
|
|
50
|
+
const ModelApiName_1 = require("../ModelApiName");
|
|
50
51
|
const PeopleByEmail_1 = require("./PeopleByEmail");
|
|
51
52
|
const TerraformSchema_1 = require("./TerraformSchema");
|
|
52
53
|
/*
|
|
@@ -156,7 +157,7 @@ function toCliCommandName(singularName) {
|
|
|
156
157
|
*/
|
|
157
158
|
function getCliResourceName(model) {
|
|
158
159
|
const tableName = model.tableName || "";
|
|
159
|
-
return toCliCommandName((0, ClientResourceNames_1.getClientResourceName)(tableName, model
|
|
160
|
+
return toCliCommandName((0, ClientResourceNames_1.getClientResourceName)(tableName, (0, ModelApiName_1.getApiSingularName)(model) || tableName));
|
|
160
161
|
}
|
|
161
162
|
// A field's flag: incidentSeverityId -> --incident-severity-id.
|
|
162
163
|
function toCliFlag(columnName) {
|
|
@@ -40,7 +40,8 @@ function databaseResource(modelType, taken) {
|
|
|
40
40
|
const tableName = model.tableName || modelType.name;
|
|
41
41
|
const singularName = model.singularName || tableName;
|
|
42
42
|
return {
|
|
43
|
-
name
|
|
43
|
+
// The command keeps the name the API keeps; its help says the new one.
|
|
44
|
+
name: uniqueName({ tableName, singularName, apiSingularName: model.apiSingularName }, taken),
|
|
44
45
|
singularName,
|
|
45
46
|
pluralName: model.pluralName || `${singularName}s`,
|
|
46
47
|
tableName,
|
|
@@ -1191,7 +1191,7 @@ function getApiTasks(data) {
|
|
|
1191
1191
|
};
|
|
1192
1192
|
});
|
|
1193
1193
|
}
|
|
1194
|
-
// "an incident", "a
|
|
1194
|
+
// "an incident", "a maintenance event": for step titles.
|
|
1195
1195
|
function getCreateTitle(data) {
|
|
1196
1196
|
const profile = (0, ResourceProfiles_1.getDeveloperDocsProfile)(data.modelType);
|
|
1197
1197
|
return (profile.createTitle ||
|
|
@@ -477,7 +477,7 @@ exports.DEVELOPER_DOCS_PROFILES = {
|
|
|
477
477
|
},
|
|
478
478
|
{
|
|
479
479
|
title: "Internal note",
|
|
480
|
-
description: "A note only
|
|
480
|
+
description: "A private note: only the people who can see the incident can read it.",
|
|
481
481
|
scopes: ["view"],
|
|
482
482
|
modelType: IncidentInternalNote_1.default,
|
|
483
483
|
operation: "create",
|
|
@@ -631,7 +631,7 @@ exports.DEVELOPER_DOCS_PROFILES = {
|
|
|
631
631
|
},
|
|
632
632
|
{
|
|
633
633
|
title: "Internal note",
|
|
634
|
-
description: "A note only
|
|
634
|
+
description: "A private note: only the people who can see the alert can read it.",
|
|
635
635
|
scopes: ["view"],
|
|
636
636
|
modelType: AlertInternalNote_1.default,
|
|
637
637
|
operation: "create",
|
|
@@ -24,6 +24,7 @@ const TableColumnType_1 = __importDefault(require("../../Types/Database/TableCol
|
|
|
24
24
|
const Permission_1 = __importDefault(require("../../Types/Permission"));
|
|
25
25
|
const PeopleByEmail_1 = require("./PeopleByEmail");
|
|
26
26
|
const TerraformValues_1 = require("./TerraformValues");
|
|
27
|
+
const ModelApiName_1 = require("../ModelApiName");
|
|
27
28
|
/*
|
|
28
29
|
* What the OneUptime Terraform provider makes of a model, worked out in the
|
|
29
30
|
* browser from the same metadata the provider is generated from.
|
|
@@ -265,7 +266,8 @@ function getTerraformTypeName(modelType) {
|
|
|
265
266
|
return null;
|
|
266
267
|
}
|
|
267
268
|
const model = new modelType();
|
|
268
|
-
|
|
269
|
+
// By the name the API keeps: a model renamed on screen keeps its resource.
|
|
270
|
+
const name = (0, ClientResourceNames_1.getClientResourceName)(model.tableName || "", (0, ModelApiName_1.getApiSingularName)(model));
|
|
269
271
|
return `oneuptime_${toTerraformTypeSnakeCase(name)}`;
|
|
270
272
|
}
|
|
271
273
|
function getKindForColumn(column) {
|
|
@@ -2,7 +2,12 @@ import StatusPage from "../../Models/DatabaseModels/StatusPage.mjs";
|
|
|
2
2
|
import StatusPageResource from "../../Models/DatabaseModels/StatusPageResource.mjs";
|
|
3
3
|
import ObjectID from "../../Types/ObjectID.mjs";
|
|
4
4
|
import UptimePrecision from "../../Types/StatusPage/UptimePrecision.mjs";
|
|
5
|
+
import { Translator } from "../../Types/Translator.mjs";
|
|
5
6
|
export declare const STATUS_PAGE_NAME_MIN_LENGTH: number;
|
|
7
|
+
export declare const getDefaultStatusPageName: (data: {
|
|
8
|
+
translator?: Translator | undefined;
|
|
9
|
+
projectName: string | undefined;
|
|
10
|
+
}) => string;
|
|
6
11
|
export interface StatusPageResourceOptions {
|
|
7
12
|
displayTooltip?: string | undefined;
|
|
8
13
|
showCurrentStatus?: boolean | undefined;
|
|
@@ -2,7 +2,12 @@ import StatusPage from "../../Models/DatabaseModels/StatusPage";
|
|
|
2
2
|
import StatusPageResource from "../../Models/DatabaseModels/StatusPageResource";
|
|
3
3
|
import ObjectID from "../../Types/ObjectID";
|
|
4
4
|
import UptimePrecision from "../../Types/StatusPage/UptimePrecision";
|
|
5
|
+
import { Translator } from "../../Types/Translator";
|
|
5
6
|
export declare const STATUS_PAGE_NAME_MIN_LENGTH: number;
|
|
7
|
+
export declare const getDefaultStatusPageName: (data: {
|
|
8
|
+
translator?: Translator | undefined;
|
|
9
|
+
projectName: string | undefined;
|
|
10
|
+
}) => string;
|
|
6
11
|
export interface StatusPageResourceOptions {
|
|
7
12
|
displayTooltip?: string | undefined;
|
|
8
13
|
showCurrentStatus?: boolean | undefined;
|
|
@@ -3,9 +3,10 @@ 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.buildGuidedStatusPageMonitor = exports.buildStatusPageResource = exports.buildGuidedStatusPage = exports.GUIDED_SETUP_RESOURCE_OPTIONS = exports.STATUS_PAGE_NAME_MIN_LENGTH = void 0;
|
|
6
|
+
exports.buildGuidedStatusPageMonitor = exports.buildStatusPageResource = exports.buildGuidedStatusPage = exports.GUIDED_SETUP_RESOURCE_OPTIONS = exports.getDefaultStatusPageName = exports.STATUS_PAGE_NAME_MIN_LENGTH = void 0;
|
|
7
7
|
const StatusPage_1 = __importDefault(require("../../Models/DatabaseModels/StatusPage"));
|
|
8
8
|
const StatusPageResource_1 = __importDefault(require("../../Models/DatabaseModels/StatusPageResource"));
|
|
9
|
+
const Translator_1 = require("../../Types/Translator");
|
|
9
10
|
/*
|
|
10
11
|
* THE STATUS PAGE A GUIDED SETUP PUBLISHES, AND THE MONITORS ON IT.
|
|
11
12
|
*
|
|
@@ -16,7 +17,8 @@ const StatusPageResource_1 = __importDefault(require("../../Models/DatabaseModel
|
|
|
16
17
|
* Monitors build them, so for the same answers they make the same records:
|
|
17
18
|
*
|
|
18
19
|
* - the page: its name and project, everything else the server's defaults
|
|
19
|
-
* (public, at <host>/status-page/<id>);
|
|
20
|
+
* (public, at <host>/status-page/<id>); a page the person does not name
|
|
21
|
+
* is named after the project, in the person's language (below);
|
|
20
22
|
* - each monitor: a resource named after the monitor, showing its current
|
|
21
23
|
* status, its uptime and its history.
|
|
22
24
|
*
|
|
@@ -26,6 +28,29 @@ const StatusPageResource_1 = __importDefault(require("../../Models/DatabaseModel
|
|
|
26
28
|
*/
|
|
27
29
|
// Create Status Page's own rule (StatusPageCreateForm): at least two letters.
|
|
28
30
|
exports.STATUS_PAGE_NAME_MIN_LENGTH = 2;
|
|
31
|
+
/*
|
|
32
|
+
* THE NAME A PAGE STARTS WITH: the project's, so a new project's owner can
|
|
33
|
+
* keep it and type nothing ("Acme Status"), in the language of the person
|
|
34
|
+
* it is made for - the Dashboard's translator in the guided setup, and the
|
|
35
|
+
* server's for the language the person reads the Dashboard in when Ask AI
|
|
36
|
+
* publishes it (#7247, ServerTranslation's getRecordWordsTranslator), so
|
|
37
|
+
* both name it "Status von Acme" for a reader of German. No translator is
|
|
38
|
+
* English. Empty when the project's name is not known: the person names it.
|
|
39
|
+
*
|
|
40
|
+
* The Dashboard's extractor reads this file as a "keys" root, and the
|
|
41
|
+
* server's locale set copies the Dashboard's wording of its sentences
|
|
42
|
+
* (Scripts/I18n/ServerLocales' DASHBOARD_SHARED_TEXT_SOURCES): after
|
|
43
|
+
* changing one, translate it in the Dashboard's files and run
|
|
44
|
+
* `npm run i18n:server-sync` from the repository's root.
|
|
45
|
+
*/
|
|
46
|
+
const getDefaultStatusPageName = (data) => {
|
|
47
|
+
const projectName = (data.projectName || "").trim();
|
|
48
|
+
if (!projectName) {
|
|
49
|
+
return "";
|
|
50
|
+
}
|
|
51
|
+
return (data.translator || (0, Translator_1.createTranslator)(undefined)).translateTemplate("{{project}} Status", { project: projectName });
|
|
52
|
+
};
|
|
53
|
+
exports.getDefaultStatusPageName = getDefaultStatusPageName;
|
|
29
54
|
// How a guided setup shows each monitor: its status, its uptime and its history.
|
|
30
55
|
exports.GUIDED_SETUP_RESOURCE_OPTIONS = {
|
|
31
56
|
showCurrentStatus: true,
|
|
@@ -4,3 +4,4 @@ export const STATUS_PAGE_NAME_MIN_LENGTH = commonJsModule.STATUS_PAGE_NAME_MIN_L
|
|
|
4
4
|
export const buildGuidedStatusPage = commonJsModule.buildGuidedStatusPage;
|
|
5
5
|
export const buildGuidedStatusPageMonitor = commonJsModule.buildGuidedStatusPageMonitor;
|
|
6
6
|
export const buildStatusPageResource = commonJsModule.buildStatusPageResource;
|
|
7
|
+
export const getDefaultStatusPageName = commonJsModule.getDefaultStatusPageName;
|
|
@@ -177,6 +177,12 @@ exports.pickWebsiteMonitorSeeds = pickWebsiteMonitorSeeds;
|
|
|
177
177
|
* minutes unless the person asked for another of Create Monitor's
|
|
178
178
|
* intervals. The probes are left to the server, which adds the ones a new
|
|
179
179
|
* monitor starts with when the create names none.
|
|
180
|
+
*
|
|
181
|
+
* The translator is the person's, both ways in (#7247): the guided setup
|
|
182
|
+
* hands the Dashboard's, and Ask AI the server's for the language the
|
|
183
|
+
* person reads the Dashboard in (ServerTranslation's
|
|
184
|
+
* getRecordWordsTranslator), which words every criteria as the
|
|
185
|
+
* Dashboard's does.
|
|
180
186
|
*/
|
|
181
187
|
const buildWebsiteMonitor = (data) => {
|
|
182
188
|
var _a, _b;
|
package/Utils/HostAddressUtil.js
CHANGED
|
@@ -81,5 +81,35 @@ class HostAddressUtil {
|
|
|
81
81
|
? `[${bare}]:${port}`
|
|
82
82
|
: `${bare}:${port}`;
|
|
83
83
|
}
|
|
84
|
+
/*
|
|
85
|
+
* A host with an optional port, without the port: what a server name, a
|
|
86
|
+
* certificate's name or a comparison of hosts takes from a HOST such as
|
|
87
|
+
* "oneuptime.example.com:8080".
|
|
88
|
+
*
|
|
89
|
+
* Cutting at the first ":" is wrong for IPv6, whose colons are its own
|
|
90
|
+
* (problem 2 above): "[2001:db8::1]:8080" became "[2001". So:
|
|
91
|
+
* - a bracketed address is everything up to its closing bracket, and
|
|
92
|
+
* keeps the brackets: "[2001:db8::1]:8080" is "[2001:db8::1]", which is
|
|
93
|
+
* how nginx and Express name the host of such a request;
|
|
94
|
+
* - an address without brackets has no port to take off, as its colons
|
|
95
|
+
* are all its own: "2001:db8::1" stays as it is;
|
|
96
|
+
* - a name or an IPv4 address loses what follows its one ":".
|
|
97
|
+
*
|
|
98
|
+
* The ingress's scripts (packages/Nginx: envsubst-on-templates.sh's
|
|
99
|
+
* HOST_WITHOUT_PORT, run.sh's PRIMARY_DOMAIN) take the port off by this
|
|
100
|
+
* same rule, so the ingress and the app agree on which host is their own.
|
|
101
|
+
*/
|
|
102
|
+
static stripPort(hostAndPort) {
|
|
103
|
+
const value = (hostAndPort || "").trim();
|
|
104
|
+
const closingBracket = value.indexOf("]");
|
|
105
|
+
if (value.startsWith("[") && closingBracket !== -1) {
|
|
106
|
+
return value.substring(0, closingBracket + 1);
|
|
107
|
+
}
|
|
108
|
+
const colon = value.indexOf(":");
|
|
109
|
+
if (colon === -1 || colon !== value.lastIndexOf(":")) {
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
return value.substring(0, colon);
|
|
113
|
+
}
|
|
84
114
|
}
|
|
85
115
|
exports.default = HostAddressUtil;
|
|
@@ -257,7 +257,11 @@ class LinearRegExp {
|
|
|
257
257
|
const index = slots[0];
|
|
258
258
|
const end = slots[1];
|
|
259
259
|
const captures = [];
|
|
260
|
-
|
|
260
|
+
/*
|
|
261
|
+
* With no prototype, as JavaScript's own: a group may be named
|
|
262
|
+
* constructor or toString, and a name no group has reads undefined.
|
|
263
|
+
*/
|
|
264
|
+
const groups = Object.create(null);
|
|
261
265
|
if (this.capturesGroups) {
|
|
262
266
|
for (let group = 1; group <= this.compiled.captureCount; group++) {
|
|
263
267
|
const start = slots[group * 2];
|