@oneuptime/common 14.0.109 → 14.0.110
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/Alert.js +2 -2
- 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/DatabaseBaseModel/DatabaseBaseModel.d.mts +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.ts +2 -0
- package/Models/DatabaseModels/EmailLog.js +12 -12
- package/Models/DatabaseModels/FormSubmission.js +2 -2
- package/Models/DatabaseModels/GlobalConfig.d.mts +1 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +1 -0
- package/Models/DatabaseModels/GlobalConfig.js +28 -0
- package/Models/DatabaseModels/Incident.js +2 -2
- 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/IncidentState.js +1 -1
- package/Models/DatabaseModels/IncidentTemplate.js +2 -2
- package/Models/DatabaseModels/Monitor.js +3 -3
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +41 -0
- 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 +9 -6
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +10 -7
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +14 -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/Project.d.mts +2 -0
- package/Models/DatabaseModels/Project.d.ts +2 -0
- package/Models/DatabaseModels/Project.js +96 -2
- 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/PushNotificationLog.js +12 -12
- package/Models/DatabaseModels/Reseller.js +8 -2
- package/Models/DatabaseModels/ResellerPlan.js +8 -2
- package/Models/DatabaseModels/ScheduledMaintenance.js +6 -3
- package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +7 -4
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +2 -2
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +7 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +1 -1
- 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/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/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AIChatTypes.js +5 -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/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/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 +20 -1
- package/Types/Date.d.ts +20 -1
- package/Types/Date.js +42 -2
- 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/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/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/Monitor/MonitorCriteria.js +2 -2
- 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/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/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/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/UserOverrideCoverRequest.js +9 -1
- package/Types/Permission.d.mts +2 -2
- package/Types/Permission.d.ts +2 -2
- package/Types/Permission.js +194 -193
- 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/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/Telemetry/TelemetryIngestSurface.js +6 -5
- package/Types/Translator.d.mts +1 -0
- package/Types/Translator.d.ts +1 -0
- package/Types/Translator.js +40 -2
- 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/Templates.js +1 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +2 -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/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/TerraformSchema.js +3 -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/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.js +8 -3
- 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/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/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/NotificationChannels.js +5 -5
- package/Utils/Project/ProjectBalance.js +2 -2
- package/Utils/Project/TwilioAccount.js +2 -2
- 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/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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readUnexplainedError = exports.getUnexplainedServerErrorMessage = exports.UnexplainedErrorWords = exports.UNEXPLAINED_ERROR_MESSAGES = exports.SERVER_DOWN_MESSAGE = exports.UnexplainedErrorKind = exports.isErrorReference = exports.toErrorReference = exports.ERROR_REFERENCE_LENGTH = exports.ERROR_REFERENCE_FIELD = void 0;
|
|
3
|
+
exports.getExplanationWords = exports.readUnexplainedError = exports.getUnexplainedServerErrorMessage = exports.UnexplainedErrorWords = exports.UNEXPLAINED_ERROR_MESSAGES = exports.SERVER_DOWN_MESSAGE = exports.UnexplainedErrorKind = exports.isErrorReference = exports.toErrorReference = exports.ERROR_REFERENCE_LENGTH = exports.ERROR_REFERENCE_FIELD = void 0;
|
|
4
4
|
const Translator_1 = require("../Translator");
|
|
5
5
|
/*
|
|
6
6
|
* An error nobody explained (#6836): the server failed in a way no message
|
|
@@ -177,3 +177,55 @@ const readUnexplainedError = (message) => {
|
|
|
177
177
|
return null;
|
|
178
178
|
};
|
|
179
179
|
exports.readUnexplainedError = readUnexplainedError;
|
|
180
|
+
/*
|
|
181
|
+
* The English words (translation keys) for each kind, for the reader the
|
|
182
|
+
* page has. ErrorExplanation draws them as a block of their own, and
|
|
183
|
+
* ErrorSentence inside a sentence a card writes around them
|
|
184
|
+
* (Common/UI/Utils/ErrorInSentence): one set of words for both.
|
|
185
|
+
*/
|
|
186
|
+
const getExplanationWords = (data) => {
|
|
187
|
+
const isSelfHostedAdmin = !data.isCloud && data.isMasterAdmin && !data.isVisitor;
|
|
188
|
+
switch (data.error.kind) {
|
|
189
|
+
case UnexplainedErrorKind.ServerWithReference:
|
|
190
|
+
return {
|
|
191
|
+
why: exports.UnexplainedErrorWords.serverWhy,
|
|
192
|
+
next: data.isVisitor
|
|
193
|
+
? exports.UnexplainedErrorWords.serverNext
|
|
194
|
+
: data.isCloud
|
|
195
|
+
? exports.UnexplainedErrorWords.serverNextWithReferenceCloud
|
|
196
|
+
: exports.UnexplainedErrorWords.serverNextWithReferenceSelfHosted,
|
|
197
|
+
whereToLook: isSelfHostedAdmin
|
|
198
|
+
? exports.UnexplainedErrorWords.adminWhereToLookWithReference
|
|
199
|
+
: null,
|
|
200
|
+
};
|
|
201
|
+
case UnexplainedErrorKind.Server:
|
|
202
|
+
return {
|
|
203
|
+
why: exports.UnexplainedErrorWords.serverWhy,
|
|
204
|
+
next: exports.UnexplainedErrorWords.serverNext,
|
|
205
|
+
whereToLook: isSelfHostedAdmin
|
|
206
|
+
? exports.UnexplainedErrorWords.adminWhereToLook
|
|
207
|
+
: null,
|
|
208
|
+
};
|
|
209
|
+
case UnexplainedErrorKind.ServerDown:
|
|
210
|
+
return {
|
|
211
|
+
why: exports.UnexplainedErrorWords.serverDownWhy,
|
|
212
|
+
next: exports.UnexplainedErrorWords.serverDownNext,
|
|
213
|
+
whereToLook: data.isCloud || data.isVisitor
|
|
214
|
+
? null
|
|
215
|
+
: exports.UnexplainedErrorWords.serverDownWhereToLook,
|
|
216
|
+
};
|
|
217
|
+
case UnexplainedErrorKind.Unreachable:
|
|
218
|
+
return {
|
|
219
|
+
why: exports.UnexplainedErrorWords.unreachableWhy,
|
|
220
|
+
next: exports.UnexplainedErrorWords.unreachableNext,
|
|
221
|
+
whereToLook: null,
|
|
222
|
+
};
|
|
223
|
+
default:
|
|
224
|
+
return {
|
|
225
|
+
why: exports.UnexplainedErrorWords.pageWhy,
|
|
226
|
+
next: exports.UnexplainedErrorWords.pageNext,
|
|
227
|
+
whereToLook: null,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
exports.getExplanationWords = getExplanationWords;
|
|
@@ -5,6 +5,7 @@ export const SERVER_DOWN_MESSAGE = commonJsModule.SERVER_DOWN_MESSAGE;
|
|
|
5
5
|
export const UNEXPLAINED_ERROR_MESSAGES = commonJsModule.UNEXPLAINED_ERROR_MESSAGES;
|
|
6
6
|
export const UnexplainedErrorKind = commonJsModule.UnexplainedErrorKind;
|
|
7
7
|
export const UnexplainedErrorWords = commonJsModule.UnexplainedErrorWords;
|
|
8
|
+
export const getExplanationWords = commonJsModule.getExplanationWords;
|
|
8
9
|
export const getUnexplainedServerErrorMessage = commonJsModule.getUnexplainedServerErrorMessage;
|
|
9
10
|
export const isErrorReference = commonJsModule.isErrorReference;
|
|
10
11
|
export const readUnexplainedError = commonJsModule.readUnexplainedError;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface FileSizeOptions {
|
|
2
|
+
language?: string | undefined;
|
|
3
|
+
}
|
|
4
|
+
export type FormatFileSizeFunction = (bytes: number, options?: FileSizeOptions) => string;
|
|
2
5
|
export declare const formatFileSize: FormatFileSizeFunction;
|
|
3
6
|
export default formatFileSize;
|
package/Types/File/FileSize.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface FileSizeOptions {
|
|
2
|
+
language?: string | undefined;
|
|
3
|
+
}
|
|
4
|
+
export type FormatFileSizeFunction = (bytes: number, options?: FileSizeOptions) => string;
|
|
2
5
|
export declare const formatFileSize: FormatFileSizeFunction;
|
|
3
6
|
export default formatFileSize;
|
package/Types/File/FileSize.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* A FILE'S SIZE AS PEOPLE READ IT: "640 B", "48 KB", "1.5 MB".
|
|
4
|
-
*
|
|
5
|
-
* Whole kilobytes under a megabyte, one decimal from a megabyte on: the
|
|
6
|
-
* precision a person compares two files by, never "47.1 KB" beside
|
|
7
|
-
* "240.0 KB". A file under a kilobyte is counted in bytes, so a tiny text
|
|
8
|
-
* file never reads as "0.1 KB" - or as "0 KB", as if it were empty.
|
|
9
|
-
*
|
|
10
|
-
* Every place that lists files says their sizes this way: the Custom Fields
|
|
11
|
-
* card, the file picker a form lists them in, a form's review step.
|
|
12
|
-
*
|
|
13
|
-
* Pure, with no React imports.
|
|
14
|
-
*/
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.formatFileSize = void 0;
|
|
17
|
-
const
|
|
4
|
+
const DateLanguage_1 = require("../DateLanguage");
|
|
5
|
+
const formatFileSize = (bytes, options) => {
|
|
18
6
|
if (!Number.isFinite(bytes) || bytes < 0) {
|
|
19
7
|
return "";
|
|
20
8
|
}
|
|
9
|
+
const language = options === null || options === void 0 ? void 0 : options.language;
|
|
21
10
|
if (bytes < 1024) {
|
|
22
|
-
return `${Math.floor(bytes)} B`;
|
|
11
|
+
return `${(0, DateLanguage_1.formatReaderFigure)(Math.floor(bytes), { decimals: 0, language })} B`;
|
|
23
12
|
}
|
|
24
13
|
if (bytes < 1024 * 1024) {
|
|
25
|
-
return `${Math.max(1, Math.round(bytes / 1024))
|
|
14
|
+
return `${(0, DateLanguage_1.formatReaderFigure)(Math.max(1, Math.round(bytes / 1024)), {
|
|
15
|
+
decimals: 0,
|
|
16
|
+
language,
|
|
17
|
+
})} KB`;
|
|
26
18
|
}
|
|
27
|
-
|
|
19
|
+
/*
|
|
20
|
+
* Rounded to a tenth as it always was, then written with that tenth
|
|
21
|
+
* only when it is not a whole number: "1 MB", "1.5 MB".
|
|
22
|
+
*/
|
|
23
|
+
const megabytes = Math.round((bytes / (1024 * 1024)) * 10) / 10;
|
|
24
|
+
return `${(0, DateLanguage_1.formatReaderFigure)(megabytes, {
|
|
25
|
+
decimals: 1,
|
|
26
|
+
dropTrailingZeros: true,
|
|
27
|
+
language,
|
|
28
|
+
})} MB`;
|
|
28
29
|
};
|
|
29
30
|
exports.formatFileSize = formatFileSize;
|
|
30
31
|
exports.default = exports.formatFileSize;
|
|
@@ -12,26 +12,42 @@
|
|
|
12
12
|
* OneUptime sends it over OpAMP (the OpenTelemetry Agent Management
|
|
13
13
|
* Protocol).
|
|
14
14
|
*
|
|
15
|
-
* The supervisor phones home to OneUptime (POST
|
|
16
|
-
* with the project's telemetry ingestion
|
|
17
|
-
* header), and OneUptime answers with the
|
|
18
|
-
* first Collector Config of the project
|
|
19
|
-
* default for its operating system. The
|
|
20
|
-
* and whether it applied; a config that
|
|
21
|
-
* to the last one that worked.
|
|
15
|
+
* The supervisor phones home to OneUptime (POST
|
|
16
|
+
* <OneUptime URL>/telemetry/opamp/v1, with the project's telemetry ingestion
|
|
17
|
+
* key in the x-oneuptime-token header), and OneUptime answers with the
|
|
18
|
+
* config the host should run: the first Collector Config of the project
|
|
19
|
+
* that applies to it, or OneUptime's default for its operating system. The
|
|
20
|
+
* host reports which config it runs, and whether it applied; a config that
|
|
21
|
+
* fails on a host is rolled back there to the last one that worked.
|
|
22
22
|
*
|
|
23
23
|
* Plain values on purpose, so the Dashboard, the server and the tests read
|
|
24
24
|
* the same ones.
|
|
25
25
|
*/
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.HOST_COLLECTOR_ERROR_MAX_LENGTH = exports.HOST_COLLECTOR_CONFIG_MAX_BYTES = exports.HOST_COLLECTOR_CONFIG_CHANGED_NOTE = exports.HOST_COLLECTOR_CONFIG_CREATED_NOTE = exports.HostCollectorConfigStatus = exports.HOST_COLLECTOR_OS_NAMES = exports.HOST_COLLECTOR_INSTALLABLE_OS_TYPES = exports.HostCollectorOsType = exports.HOST_COLLECTOR_LABEL_ATTRIBUTE_PREFIX = exports.HOST_COLLECTOR_EXPORTER_ENDPOINT = exports.HOST_COLLECTOR_INGESTION_KEY_REFERENCE = exports.HOST_COLLECTOR_URL_REFERENCE = exports.HOST_COLLECTOR_INGESTION_KEY_ENV = exports.HOST_COLLECTOR_URL_ENV = exports.HOST_COLLECTOR_MACOS_LOG_FILE = exports.HOST_COLLECTOR_MACOS_SERVICE_LABEL = exports.HOST_COLLECTOR_SERVICE_NAME = exports.HOST_COLLECTOR_PINNED_VERSION = exports.HOST_COLLECTOR_WINDOWS_INSTALL_SCRIPT_PATH = exports.HOST_COLLECTOR_INSTALL_SCRIPT_PATH = exports.HOST_COLLECTOR_OPAMP_PATH = void 0;
|
|
27
|
+
exports.HOST_COLLECTOR_ERROR_MAX_LENGTH = exports.HOST_COLLECTOR_CONFIG_MAX_BYTES = exports.HOST_COLLECTOR_CONFIG_CHANGED_NOTE = exports.HOST_COLLECTOR_CONFIG_CREATED_NOTE = exports.HostCollectorConfigStatus = exports.HOST_COLLECTOR_OS_NAMES = exports.HOST_COLLECTOR_INSTALLABLE_OS_TYPES = exports.HostCollectorOsType = exports.HOST_COLLECTOR_LABEL_ATTRIBUTE_PREFIX = exports.HOST_COLLECTOR_EXPORTER_ENDPOINT = exports.HOST_COLLECTOR_INGESTION_KEY_REFERENCE = exports.HOST_COLLECTOR_URL_REFERENCE = exports.HOST_COLLECTOR_INGESTION_KEY_ENV = exports.HOST_COLLECTOR_URL_ENV = exports.HOST_COLLECTOR_MACOS_LOG_FILE = exports.HOST_COLLECTOR_MACOS_SERVICE_LABEL = exports.HOST_COLLECTOR_SERVICE_NAME = exports.HOST_COLLECTOR_PINNED_VERSION = exports.HOST_COLLECTOR_WINDOWS_INSTALL_SCRIPT_PATH = exports.HOST_COLLECTOR_INSTALL_SCRIPT_PATH = exports.HOST_COLLECTOR_OPAMP_PATH = exports.HOST_COLLECTOR_OPAMP_ROUTE = void 0;
|
|
28
28
|
exports.getHostCollectorOsType = getHostCollectorOsType;
|
|
29
29
|
exports.isHostCollectorOsType = isHostCollectorOsType;
|
|
30
30
|
exports.isHostCollectorConfigStatus = isHostCollectorConfigStatus;
|
|
31
31
|
exports.getHostCollectorConfigRestoredNote = getHostCollectorConfigRestoredNote;
|
|
32
32
|
exports.getHostCollectorConfigRestoredVersion = getHostCollectorConfigRestoredVersion;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
/*
|
|
34
|
+
* Where the supervisor posts its AgentToServer messages (OpAMP over HTTP).
|
|
35
|
+
*
|
|
36
|
+
* The route as the Telemetry router declares it. It is mounted under every
|
|
37
|
+
* telemetry prefix, "/telemetry" and "/", so the App serves both addresses.
|
|
38
|
+
*/
|
|
39
|
+
exports.HOST_COLLECTOR_OPAMP_ROUTE = "/opamp/v1";
|
|
40
|
+
/*
|
|
41
|
+
* The address the installers point the supervisor at: the route under
|
|
42
|
+
* /telemetry, which every OneUptime ingress sends to the App, as the session
|
|
43
|
+
* replay recorder and the Kubernetes cost agent call theirs. The bare route
|
|
44
|
+
* reaches the App only where the ingress has a location for it; on
|
|
45
|
+
* oneuptime.com, where everything else at the root is the marketing site,
|
|
46
|
+
* the installers' first /opamp/v1 answered 404, and the hosts never got a
|
|
47
|
+
* config. Those hosts still ask at /opamp/v1, which the ingress now sends to
|
|
48
|
+
* the App too (Nginx/default.conf.template).
|
|
49
|
+
*/
|
|
50
|
+
exports.HOST_COLLECTOR_OPAMP_PATH = `/telemetry${exports.HOST_COLLECTOR_OPAMP_ROUTE}`;
|
|
35
51
|
/*
|
|
36
52
|
* Where every OneUptime serves the installers (the Docs feature set's static
|
|
37
53
|
* folder), so a self-hosted OneUptime hands out the installer of its own
|
|
@@ -12,6 +12,7 @@ export const HOST_COLLECTOR_LABEL_ATTRIBUTE_PREFIX = commonJsModule.HOST_COLLECT
|
|
|
12
12
|
export const HOST_COLLECTOR_MACOS_LOG_FILE = commonJsModule.HOST_COLLECTOR_MACOS_LOG_FILE;
|
|
13
13
|
export const HOST_COLLECTOR_MACOS_SERVICE_LABEL = commonJsModule.HOST_COLLECTOR_MACOS_SERVICE_LABEL;
|
|
14
14
|
export const HOST_COLLECTOR_OPAMP_PATH = commonJsModule.HOST_COLLECTOR_OPAMP_PATH;
|
|
15
|
+
export const HOST_COLLECTOR_OPAMP_ROUTE = commonJsModule.HOST_COLLECTOR_OPAMP_ROUTE;
|
|
15
16
|
export const HOST_COLLECTOR_OS_NAMES = commonJsModule.HOST_COLLECTOR_OS_NAMES;
|
|
16
17
|
export const HOST_COLLECTOR_PINNED_VERSION = commonJsModule.HOST_COLLECTOR_PINNED_VERSION;
|
|
17
18
|
export const HOST_COLLECTOR_SERVICE_NAME = commonJsModule.HOST_COLLECTOR_SERVICE_NAME;
|
|
@@ -73,10 +73,10 @@ class MonitorCriteria extends DatabaseProperty_1.default {
|
|
|
73
73
|
}
|
|
74
74
|
static getValidationError(value, monitorType) {
|
|
75
75
|
if (!value.data) {
|
|
76
|
-
return "
|
|
76
|
+
return "Criteria are required";
|
|
77
77
|
}
|
|
78
78
|
if (value.data.monitorCriteriaInstanceArray.length === 0) {
|
|
79
|
-
return "
|
|
79
|
+
return "Criteria are required";
|
|
80
80
|
}
|
|
81
81
|
for (const criteria of value.data.monitorCriteriaInstanceArray) {
|
|
82
82
|
if (MonitorCriteriaInstance_1.default.getValidationError(criteria, monitorType)) {
|
|
@@ -636,7 +636,7 @@ class MonitorStep extends DatabaseProperty_1.default {
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
if (!value.data.monitorCriteria) {
|
|
639
|
-
return "
|
|
639
|
+
return "Criteria are required";
|
|
640
640
|
}
|
|
641
641
|
if (MonitorCriteria_1.default.getValidationError(value.data.monitorCriteria, monitorType)) {
|
|
642
642
|
return MonitorCriteria_1.default.getValidationError(value.data.monitorCriteria, monitorType);
|
|
@@ -9,6 +9,12 @@ export interface MonitorTemplateSyncField {
|
|
|
9
9
|
* named fields can be preserved; criteria and step identities always sync.
|
|
10
10
|
* Some options preserve related values together to keep credentials and
|
|
11
11
|
* resource selectors consistent.
|
|
12
|
+
*
|
|
13
|
+
* Each field's label and description is a translationKey: the Template sync
|
|
14
|
+
* settings card and its summary line say them in the reader's language (the
|
|
15
|
+
* Dashboard's extractor reads this file as a "keys" root). A field's path is
|
|
16
|
+
* never one: templates store it in doNotSyncFields, and parse() reads it back
|
|
17
|
+
* as written.
|
|
12
18
|
*/
|
|
13
19
|
export default class MonitorTemplateSyncFieldUtil {
|
|
14
20
|
static getFields(monitorType: MonitorType): Array<MonitorTemplateSyncField>;
|
|
@@ -9,6 +9,12 @@ export interface MonitorTemplateSyncField {
|
|
|
9
9
|
* named fields can be preserved; criteria and step identities always sync.
|
|
10
10
|
* Some options preserve related values together to keep credentials and
|
|
11
11
|
* resource selectors consistent.
|
|
12
|
+
*
|
|
13
|
+
* Each field's label and description is a translationKey: the Template sync
|
|
14
|
+
* settings card and its summary line say them in the reader's language (the
|
|
15
|
+
* Dashboard's extractor reads this file as a "keys" root). A field's path is
|
|
16
|
+
* never one: templates store it in doNotSyncFields, and parse() reads it back
|
|
17
|
+
* as written.
|
|
12
18
|
*/
|
|
13
19
|
export default class MonitorTemplateSyncFieldUtil {
|
|
14
20
|
static getFields(monitorType: MonitorType): Array<MonitorTemplateSyncField>;
|
|
@@ -6,11 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const BadDataException_1 = __importDefault(require("../Exception/BadDataException"));
|
|
7
7
|
const MonitorType_1 = __importDefault(require("./MonitorType"));
|
|
8
8
|
const RefusedValue_1 = require("../../Utils/RefusedValue");
|
|
9
|
+
const Translator_1 = require("../Translator");
|
|
9
10
|
/**
|
|
10
11
|
* The shared catalogue for the template editor and sync service. Only these
|
|
11
12
|
* named fields can be preserved; criteria and step identities always sync.
|
|
12
13
|
* Some options preserve related values together to keep credentials and
|
|
13
14
|
* resource selectors consistent.
|
|
15
|
+
*
|
|
16
|
+
* Each field's label and description is a translationKey: the Template sync
|
|
17
|
+
* settings card and its summary line say them in the reader's language (the
|
|
18
|
+
* Dashboard's extractor reads this file as a "keys" root). A field's path is
|
|
19
|
+
* never one: templates store it in doNotSyncFields, and parse() reads it back
|
|
20
|
+
* as written.
|
|
14
21
|
*/
|
|
15
22
|
class MonitorTemplateSyncFieldUtil {
|
|
16
23
|
static getFields(monitorType) {
|
|
@@ -27,140 +34,175 @@ class MonitorTemplateSyncFieldUtil {
|
|
|
27
34
|
MonitorType_1.default.SSLCertificate,
|
|
28
35
|
MonitorType_1.default.NTP,
|
|
29
36
|
].includes(monitorType)) {
|
|
30
|
-
add("monitorDestination", "Monitor destination");
|
|
31
|
-
add("requestTimeoutInMs", "Request timeout");
|
|
32
|
-
add("retryCount", "Retry count");
|
|
37
|
+
add("monitorDestination", (0, Translator_1.translationKey)("Monitor destination"));
|
|
38
|
+
add("requestTimeoutInMs", (0, Translator_1.translationKey)("Request timeout"));
|
|
39
|
+
add("retryCount", (0, Translator_1.translationKey)("Retry count"));
|
|
33
40
|
}
|
|
34
41
|
if (monitorType === MonitorType_1.default.API) {
|
|
35
|
-
add("requestHeaders", "Request headers", "Keep the monitor's entire set of request headers.");
|
|
36
|
-
add("requestType", "Request method");
|
|
37
|
-
add("requestBody", "Request body");
|
|
42
|
+
add("requestHeaders", (0, Translator_1.translationKey)("Request headers"), (0, Translator_1.translationKey)("Keep the monitor's entire set of request headers."));
|
|
43
|
+
add("requestType", (0, Translator_1.translationKey)("Request method"));
|
|
44
|
+
add("requestBody", (0, Translator_1.translationKey)("Request body"));
|
|
38
45
|
}
|
|
39
46
|
if ([MonitorType_1.default.Website, MonitorType_1.default.API].includes(monitorType)) {
|
|
40
|
-
add("doNotFollowRedirects", "Redirect behavior");
|
|
41
|
-
add("allowSelfSignedCertificates", "Allow self-signed certificates");
|
|
42
|
-
add("tlsClientAuthentication", "Client certificate authentication", "Keep the certificate, private key, and key passphrase together.");
|
|
47
|
+
add("doNotFollowRedirects", (0, Translator_1.translationKey)("Redirect behavior"));
|
|
48
|
+
add("allowSelfSignedCertificates", (0, Translator_1.translationKey)("Allow self-signed certificates"));
|
|
49
|
+
add("tlsClientAuthentication", (0, Translator_1.translationKey)("Client certificate authentication"), (0, Translator_1.translationKey)("Keep the certificate, private key, and key passphrase together."));
|
|
43
50
|
}
|
|
44
51
|
if ([MonitorType_1.default.Port, MonitorType_1.default.NTP].includes(monitorType)) {
|
|
45
|
-
add("monitorDestinationPort", "Port");
|
|
52
|
+
add("monitorDestinationPort", (0, Translator_1.translationKey)("Port"));
|
|
46
53
|
}
|
|
47
54
|
if ([MonitorType_1.default.SyntheticMonitor, MonitorType_1.default.CustomJavaScriptCode].includes(monitorType)) {
|
|
48
|
-
add("customCode", "Check code");
|
|
55
|
+
add("customCode", (0, Translator_1.translationKey)("Check code"));
|
|
49
56
|
}
|
|
50
57
|
if (monitorType === MonitorType_1.default.SyntheticMonitor) {
|
|
51
|
-
add("browserTypes", "Browsers");
|
|
52
|
-
add("screenSizeTypes", "Screen sizes");
|
|
53
|
-
add("retryCountOnError", "Retry count on error");
|
|
58
|
+
add("browserTypes", (0, Translator_1.translationKey)("Browsers"));
|
|
59
|
+
add("screenSizeTypes", (0, Translator_1.translationKey)("Screen sizes"));
|
|
60
|
+
add("retryCountOnError", (0, Translator_1.translationKey)("Retry count on error"));
|
|
54
61
|
}
|
|
55
62
|
if (monitorType === MonitorType_1.default.DNS) {
|
|
56
|
-
add("dnsMonitor.queryName", "DNS query name");
|
|
57
|
-
add("dnsMonitor.recordType", "DNS record type");
|
|
58
|
-
add("dnsMonitor.resolver", "DNS resolver", "Keep the DNS server and port together.");
|
|
59
|
-
add("dnsMonitor.timeout", "DNS timeout");
|
|
60
|
-
add("dnsMonitor.retries", "DNS retries");
|
|
63
|
+
add("dnsMonitor.queryName", (0, Translator_1.translationKey)("DNS query name"));
|
|
64
|
+
add("dnsMonitor.recordType", (0, Translator_1.translationKey)("DNS record type"));
|
|
65
|
+
add("dnsMonitor.resolver", (0, Translator_1.translationKey)("DNS resolver"), (0, Translator_1.translationKey)("Keep the DNS server and port together."));
|
|
66
|
+
add("dnsMonitor.timeout", (0, Translator_1.translationKey)("DNS timeout"));
|
|
67
|
+
add("dnsMonitor.retries", (0, Translator_1.translationKey)("DNS retries"));
|
|
61
68
|
}
|
|
62
69
|
if (monitorType === MonitorType_1.default.Domain) {
|
|
63
|
-
add("domainMonitor.domainName", "Domain name");
|
|
64
|
-
add("domainMonitor.lookupMethod", "Domain lookup method");
|
|
65
|
-
add("domainMonitor.timeout", "Lookup timeout");
|
|
66
|
-
add("domainMonitor.retries", "Lookup retries");
|
|
70
|
+
add("domainMonitor.domainName", (0, Translator_1.translationKey)("Domain name"));
|
|
71
|
+
add("domainMonitor.lookupMethod", (0, Translator_1.translationKey)("Domain lookup method"));
|
|
72
|
+
add("domainMonitor.timeout", (0, Translator_1.translationKey)("Lookup timeout"));
|
|
73
|
+
add("domainMonitor.retries", (0, Translator_1.translationKey)("Lookup retries"));
|
|
67
74
|
}
|
|
68
75
|
if (monitorType === MonitorType_1.default.DNSSEC) {
|
|
69
|
-
add("dnssecMonitor.domainName", "Domain name");
|
|
70
|
-
add("dnssecMonitor.resolvers", "DNS resolvers");
|
|
71
|
-
add("dnssecMonitor.checkNameserverConsistency", "Nameserver consistency check");
|
|
72
|
-
add("dnssecMonitor.signatureExpiryWarningDays", "Signature expiry warning");
|
|
73
|
-
add("dnssecMonitor.timeout", "DNSSEC timeout");
|
|
74
|
-
add("dnssecMonitor.retries", "DNSSEC retries");
|
|
76
|
+
add("dnssecMonitor.domainName", (0, Translator_1.translationKey)("Domain name"));
|
|
77
|
+
add("dnssecMonitor.resolvers", (0, Translator_1.translationKey)("DNS resolvers"));
|
|
78
|
+
add("dnssecMonitor.checkNameserverConsistency", (0, Translator_1.translationKey)("Nameserver consistency check"));
|
|
79
|
+
add("dnssecMonitor.signatureExpiryWarningDays", (0, Translator_1.translationKey)("Signature expiry warning"));
|
|
80
|
+
add("dnssecMonitor.timeout", (0, Translator_1.translationKey)("DNSSEC timeout"));
|
|
81
|
+
add("dnssecMonitor.retries", (0, Translator_1.translationKey)("DNSSEC retries"));
|
|
75
82
|
}
|
|
76
83
|
if ([MonitorType_1.default.SQLQuery, MonitorType_1.default.Database].includes(monitorType)) {
|
|
77
84
|
const prefix = monitorType === MonitorType_1.default.SQLQuery ? "sqlMonitor" : "databaseMonitor";
|
|
78
|
-
add(`${prefix}.connection`, "Database connection", "Keep the database engine, host, port, database name, credentials, and TLS settings together.");
|
|
79
|
-
add(`${prefix}.connectionTimeoutInMs`, "Connection timeout");
|
|
80
|
-
add(`${prefix}.statementTimeoutInMs`, "Statement timeout");
|
|
85
|
+
add(`${prefix}.connection`, (0, Translator_1.translationKey)("Database connection"), (0, Translator_1.translationKey)("Keep the database engine, host, port, database name, credentials, and TLS settings together."));
|
|
86
|
+
add(`${prefix}.connectionTimeoutInMs`, (0, Translator_1.translationKey)("Connection timeout"));
|
|
87
|
+
add(`${prefix}.statementTimeoutInMs`, (0, Translator_1.translationKey)("Statement timeout"));
|
|
81
88
|
if (monitorType === MonitorType_1.default.SQLQuery) {
|
|
82
|
-
add("sqlMonitor.query", "SQL query");
|
|
83
|
-
add("sqlMonitor.maxRows", "Maximum result rows");
|
|
89
|
+
add("sqlMonitor.query", (0, Translator_1.translationKey)("SQL query"));
|
|
90
|
+
add("sqlMonitor.maxRows", (0, Translator_1.translationKey)("Maximum result rows"));
|
|
84
91
|
}
|
|
85
92
|
else {
|
|
86
|
-
add("databaseMonitor.enabledMetricGroups", "Collected metric groups");
|
|
93
|
+
add("databaseMonitor.enabledMetricGroups", (0, Translator_1.translationKey)("Collected metric groups"));
|
|
87
94
|
}
|
|
88
95
|
}
|
|
89
96
|
if (monitorType === MonitorType_1.default.ExternalStatusPage) {
|
|
90
|
-
add("externalStatusPageMonitor.statusPageUrl", "Status page URL");
|
|
91
|
-
add("externalStatusPageMonitor.provider", "Status page provider");
|
|
92
|
-
add("externalStatusPageMonitor.components", "Status page components", "Keep the component group and the chosen components together.");
|
|
93
|
-
add("externalStatusPageMonitor.timeout", "Status page timeout");
|
|
94
|
-
add("externalStatusPageMonitor.retries", "Status page retries");
|
|
97
|
+
add("externalStatusPageMonitor.statusPageUrl", (0, Translator_1.translationKey)("Status page URL"));
|
|
98
|
+
add("externalStatusPageMonitor.provider", (0, Translator_1.translationKey)("Status page provider"));
|
|
99
|
+
add("externalStatusPageMonitor.components", (0, Translator_1.translationKey)("Status page components"), (0, Translator_1.translationKey)("Keep the component group and the chosen components together."));
|
|
100
|
+
add("externalStatusPageMonitor.timeout", (0, Translator_1.translationKey)("Status page timeout"));
|
|
101
|
+
add("externalStatusPageMonitor.retries", (0, Translator_1.translationKey)("Status page retries"));
|
|
95
102
|
}
|
|
96
103
|
// The probes each monitor made from a Probe Status template watches.
|
|
97
104
|
if (monitorType === MonitorType_1.default.ProbeStatus) {
|
|
98
|
-
add("probeStatusMonitor.probeIds", "Probes to watch");
|
|
105
|
+
add("probeStatusMonitor.probeIds", (0, Translator_1.translationKey)("Probes to watch"));
|
|
99
106
|
}
|
|
100
107
|
const infrastructure = {
|
|
101
108
|
[MonitorType_1.default.Kubernetes]: [
|
|
102
109
|
"kubernetesMonitor",
|
|
103
110
|
"clusterIdentifier",
|
|
104
|
-
"Kubernetes cluster",
|
|
111
|
+
(0, Translator_1.translationKey)("Kubernetes cluster"),
|
|
112
|
+
],
|
|
113
|
+
[MonitorType_1.default.Docker]: [
|
|
114
|
+
"dockerMonitor",
|
|
115
|
+
"hostIdentifier",
|
|
116
|
+
(0, Translator_1.translationKey)("Docker host"),
|
|
117
|
+
],
|
|
118
|
+
[MonitorType_1.default.Host]: [
|
|
119
|
+
"hostMonitor",
|
|
120
|
+
"hostIdentifier",
|
|
121
|
+
(0, Translator_1.translationKey)("Host"),
|
|
122
|
+
],
|
|
123
|
+
[MonitorType_1.default.Podman]: [
|
|
124
|
+
"podmanMonitor",
|
|
125
|
+
"hostIdentifier",
|
|
126
|
+
(0, Translator_1.translationKey)("Podman host"),
|
|
105
127
|
],
|
|
106
|
-
[MonitorType_1.default.Docker]: ["dockerMonitor", "hostIdentifier", "Docker host"],
|
|
107
|
-
[MonitorType_1.default.Host]: ["hostMonitor", "hostIdentifier", "Host"],
|
|
108
|
-
[MonitorType_1.default.Podman]: ["podmanMonitor", "hostIdentifier", "Podman host"],
|
|
109
128
|
[MonitorType_1.default.Proxmox]: [
|
|
110
129
|
"proxmoxMonitor",
|
|
111
130
|
"clusterIdentifier",
|
|
112
|
-
"Proxmox cluster",
|
|
131
|
+
(0, Translator_1.translationKey)("Proxmox cluster"),
|
|
113
132
|
],
|
|
114
133
|
[MonitorType_1.default.OpenStack]: [
|
|
115
134
|
"openstackMonitor",
|
|
116
135
|
"cloudIdentifier",
|
|
117
|
-
"OpenStack cloud",
|
|
136
|
+
(0, Translator_1.translationKey)("OpenStack cloud"),
|
|
118
137
|
],
|
|
119
138
|
[MonitorType_1.default.DockerSwarm]: [
|
|
120
139
|
"dockerSwarmMonitor",
|
|
121
140
|
"clusterIdentifier",
|
|
122
|
-
"Docker Swarm cluster",
|
|
141
|
+
(0, Translator_1.translationKey)("Docker Swarm cluster"),
|
|
142
|
+
],
|
|
143
|
+
[MonitorType_1.default.Ceph]: [
|
|
144
|
+
"cephMonitor",
|
|
145
|
+
"clusterIdentifier",
|
|
146
|
+
(0, Translator_1.translationKey)("Ceph cluster"),
|
|
123
147
|
],
|
|
124
|
-
[MonitorType_1.default.Ceph]: ["cephMonitor", "clusterIdentifier", "Ceph cluster"],
|
|
125
148
|
[MonitorType_1.default.StorageArray]: [
|
|
126
149
|
"storageArrayMonitor",
|
|
127
150
|
"arrayIdentifier",
|
|
128
|
-
"Storage array",
|
|
151
|
+
(0, Translator_1.translationKey)("Storage array"),
|
|
152
|
+
],
|
|
153
|
+
[MonitorType_1.default.IoTDevice]: [
|
|
154
|
+
"iotMonitor",
|
|
155
|
+
"fleetIdentifier",
|
|
156
|
+
(0, Translator_1.translationKey)("IoT fleet"),
|
|
129
157
|
],
|
|
130
|
-
[MonitorType_1.default.IoTDevice]: ["iotMonitor", "fleetIdentifier", "IoT fleet"],
|
|
131
158
|
};
|
|
132
159
|
const infrastructureConfig = infrastructure[monitorType];
|
|
133
160
|
if (infrastructureConfig) {
|
|
134
161
|
const [prefix, identity, label] = infrastructureConfig;
|
|
135
162
|
add(`${prefix}.${identity}`, label, monitorType === MonitorType_1.default.StorageArray
|
|
136
|
-
? "Keep the array and its storage platform together."
|
|
163
|
+
? (0, Translator_1.translationKey)("Keep the array and its storage platform together.")
|
|
137
164
|
: undefined);
|
|
138
165
|
if (monitorType === MonitorType_1.default.Kubernetes) {
|
|
139
|
-
add(`${prefix}.resources`, "Resource scope and filters");
|
|
166
|
+
add(`${prefix}.resources`, (0, Translator_1.translationKey)("Resource scope and filters"));
|
|
140
167
|
}
|
|
141
168
|
else if ([MonitorType_1.default.Docker, MonitorType_1.default.Podman].includes(monitorType)) {
|
|
142
|
-
add(`${prefix}.containerFilters`, "Container filters");
|
|
169
|
+
add(`${prefix}.containerFilters`, (0, Translator_1.translationKey)("Container filters"));
|
|
143
170
|
}
|
|
144
171
|
else if (monitorType !== MonitorType_1.default.Host) {
|
|
145
|
-
add(`${prefix}.resourceFilters`, "Resource filters");
|
|
172
|
+
add(`${prefix}.resourceFilters`, (0, Translator_1.translationKey)("Resource filters"));
|
|
146
173
|
}
|
|
147
|
-
add(`${prefix}.metricViewConfig`, "Metric queries");
|
|
148
|
-
add(`${prefix}.rollingTime`, "Query time window");
|
|
174
|
+
add(`${prefix}.metricViewConfig`, (0, Translator_1.translationKey)("Metric queries"));
|
|
175
|
+
add(`${prefix}.rollingTime`, (0, Translator_1.translationKey)("Query time window"));
|
|
149
176
|
}
|
|
150
177
|
const telemetry = {
|
|
151
|
-
[MonitorType_1.default.Logs]: [
|
|
178
|
+
[MonitorType_1.default.Logs]: [
|
|
179
|
+
"logMonitor",
|
|
180
|
+
(0, Translator_1.translationKey)("Log query configuration"),
|
|
181
|
+
],
|
|
152
182
|
[MonitorType_1.default.SecurityEvents]: [
|
|
153
183
|
"securityEventsMonitor",
|
|
154
|
-
"Security event query configuration",
|
|
184
|
+
(0, Translator_1.translationKey)("Security event query configuration"),
|
|
185
|
+
],
|
|
186
|
+
[MonitorType_1.default.Traces]: [
|
|
187
|
+
"traceMonitor",
|
|
188
|
+
(0, Translator_1.translationKey)("Trace query configuration"),
|
|
189
|
+
],
|
|
190
|
+
[MonitorType_1.default.Llm]: [
|
|
191
|
+
"llmMonitor",
|
|
192
|
+
(0, Translator_1.translationKey)("AI / LLM answer configuration"),
|
|
193
|
+
],
|
|
194
|
+
[MonitorType_1.default.Metrics]: [
|
|
195
|
+
"metricMonitor",
|
|
196
|
+
(0, Translator_1.translationKey)("Metric query configuration"),
|
|
155
197
|
],
|
|
156
|
-
[MonitorType_1.default.Traces]: ["traceMonitor", "Trace query configuration"],
|
|
157
|
-
[MonitorType_1.default.Llm]: ["llmMonitor", "AI / LLM answer configuration"],
|
|
158
|
-
[MonitorType_1.default.Metrics]: ["metricMonitor", "Metric query configuration"],
|
|
159
198
|
[MonitorType_1.default.Exceptions]: [
|
|
160
199
|
"exceptionMonitor",
|
|
161
|
-
"Exception query configuration",
|
|
200
|
+
(0, Translator_1.translationKey)("Exception query configuration"),
|
|
201
|
+
],
|
|
202
|
+
[MonitorType_1.default.Profiles]: [
|
|
203
|
+
"profileMonitor",
|
|
204
|
+
(0, Translator_1.translationKey)("Profile query configuration"),
|
|
162
205
|
],
|
|
163
|
-
[MonitorType_1.default.Profiles]: ["profileMonitor", "Profile query configuration"],
|
|
164
206
|
};
|
|
165
207
|
const telemetryConfig = telemetry[monitorType];
|
|
166
208
|
if (telemetryConfig) {
|
|
@@ -17,6 +17,7 @@ export default class NtpMonitorUtil {
|
|
|
17
17
|
static describeKissCode(code: string | undefined): string;
|
|
18
18
|
static describeLeapIndicator(leapIndicator: number | undefined): string;
|
|
19
19
|
static describeStratum(stratum: number | undefined, kissCode?: string | undefined): string;
|
|
20
|
+
static getMillisecondsFractionDigits(value: number): number;
|
|
20
21
|
static formatMilliseconds(value: number): string;
|
|
21
22
|
static describeClockOffset(clockOffsetInMs: number): string;
|
|
22
23
|
static describeWhyNotSynchronized(response: Pick<NtpMonitorResponse, "isSynchronized" | "stratum" | "kissCode" | "leapIndicator">, hasUsableTime: boolean): string;
|
|
@@ -17,6 +17,7 @@ export default class NtpMonitorUtil {
|
|
|
17
17
|
static describeKissCode(code: string | undefined): string;
|
|
18
18
|
static describeLeapIndicator(leapIndicator: number | undefined): string;
|
|
19
19
|
static describeStratum(stratum: number | undefined, kissCode?: string | undefined): string;
|
|
20
|
+
static getMillisecondsFractionDigits(value: number): number;
|
|
20
21
|
static formatMilliseconds(value: number): string;
|
|
21
22
|
static describeClockOffset(clockOffsetInMs: number): string;
|
|
22
23
|
static describeWhyNotSynchronized(response: Pick<NtpMonitorResponse, "isSynchronized" | "stratum" | "kissCode" | "leapIndicator">, hasUsableTime: boolean): string;
|
|
@@ -149,12 +149,20 @@ class NtpMonitorUtil {
|
|
|
149
149
|
}
|
|
150
150
|
return `${stratum} (not synchronized)`;
|
|
151
151
|
}
|
|
152
|
+
/*
|
|
153
|
+
* The decimals an NTP reading in milliseconds is written with: three
|
|
154
|
+
* significant digits at most below 1 s (0.042, 12.3, 1,532). The
|
|
155
|
+
* Dashboard's summary writes the same figure in the reader's language
|
|
156
|
+
* with it.
|
|
157
|
+
*/
|
|
158
|
+
static getMillisecondsFractionDigits(value) {
|
|
159
|
+
const absolute = Math.abs(value);
|
|
160
|
+
return absolute >= 100 ? 0 : absolute >= 10 ? 1 : absolute >= 1 ? 2 : 3;
|
|
161
|
+
}
|
|
152
162
|
// 0.042 ms, 12.3 ms, 1,532 ms: three significant digits at most below 1 s.
|
|
153
163
|
static formatMilliseconds(value) {
|
|
154
|
-
const absolute = Math.abs(value);
|
|
155
|
-
const maximumFractionDigits = absolute >= 100 ? 0 : absolute >= 10 ? 1 : absolute >= 1 ? 2 : 3;
|
|
156
164
|
return `${value.toLocaleString("en-US", {
|
|
157
|
-
maximumFractionDigits:
|
|
165
|
+
maximumFractionDigits: NtpMonitorUtil.getMillisecondsFractionDigits(value),
|
|
158
166
|
})} ms`;
|
|
159
167
|
}
|
|
160
168
|
// "12.3 ms ahead of the probe", "1,532 ms behind the probe".
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnCallPageChannel } from "../OnCallDutyPolicy/OnCallPageChannel.mjs";
|
|
2
|
-
import { OnCallTestPageRecordKind } from "../OnCallDutyPolicy/OnCallTestPage.mjs";
|
|
2
|
+
import { OnCallTestPageNotPaged, OnCallTestPageReachedThrough, OnCallTestPageRecordKind } from "../OnCallDutyPolicy/OnCallTestPage.mjs";
|
|
3
3
|
export declare enum WhoIsToldOwnersSource {
|
|
4
4
|
Named = "Named",
|
|
5
5
|
OwnerRules = "OwnerRules",
|
|
@@ -21,6 +21,7 @@ export interface WhoIsToldPerson {
|
|
|
21
21
|
userId: string;
|
|
22
22
|
name: string;
|
|
23
23
|
reachedThrough?: string | undefined;
|
|
24
|
+
reachedThroughCode?: OnCallTestPageReachedThrough | undefined;
|
|
24
25
|
channels: Array<OnCallPageChannel>;
|
|
25
26
|
isFallback: boolean;
|
|
26
27
|
isReachable: boolean;
|
|
@@ -35,6 +36,7 @@ export interface WhoIsToldPolicy {
|
|
|
35
36
|
levelCount: number;
|
|
36
37
|
people: Array<WhoIsToldPerson>;
|
|
37
38
|
notPaged: Array<string>;
|
|
39
|
+
notPagedCodes?: Array<OnCallTestPageNotPaged> | undefined;
|
|
38
40
|
}
|
|
39
41
|
export interface WhoIsToldRule {
|
|
40
42
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnCallPageChannel } from "../OnCallDutyPolicy/OnCallPageChannel";
|
|
2
|
-
import { OnCallTestPageRecordKind } from "../OnCallDutyPolicy/OnCallTestPage";
|
|
2
|
+
import { OnCallTestPageNotPaged, OnCallTestPageReachedThrough, OnCallTestPageRecordKind } from "../OnCallDutyPolicy/OnCallTestPage";
|
|
3
3
|
export declare enum WhoIsToldOwnersSource {
|
|
4
4
|
Named = "Named",
|
|
5
5
|
OwnerRules = "OwnerRules",
|
|
@@ -21,6 +21,7 @@ export interface WhoIsToldPerson {
|
|
|
21
21
|
userId: string;
|
|
22
22
|
name: string;
|
|
23
23
|
reachedThrough?: string | undefined;
|
|
24
|
+
reachedThroughCode?: OnCallTestPageReachedThrough | undefined;
|
|
24
25
|
channels: Array<OnCallPageChannel>;
|
|
25
26
|
isFallback: boolean;
|
|
26
27
|
isReachable: boolean;
|
|
@@ -35,6 +36,7 @@ export interface WhoIsToldPolicy {
|
|
|
35
36
|
levelCount: number;
|
|
36
37
|
people: Array<WhoIsToldPerson>;
|
|
37
38
|
notPaged: Array<string>;
|
|
39
|
+
notPagedCodes?: Array<OnCallTestPageNotPaged> | undefined;
|
|
38
40
|
}
|
|
39
41
|
export interface WhoIsToldRule {
|
|
40
42
|
id: string;
|