@oneuptime/common 14.0.6 → 14.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/Incident.ts +267 -1
- package/Models/DatabaseModels/IncidentCustomField.ts +202 -0
- package/Models/DatabaseModels/IncidentEpisode.ts +30 -0
- package/Models/DatabaseModels/IncidentTemplate.ts +126 -1
- package/Models/DatabaseModels/InventoryItem.ts +23 -12
- package/Models/DatabaseModels/StatusPage.ts +55 -0
- package/Models/DatabaseModels/StatusPageSubscriber.ts +128 -0
- package/Server/API/IncidentAPI.ts +162 -0
- package/Server/API/StatusPageAPI.ts +487 -171
- package/Server/API/StatusPageSubscriberAPI.ts +63 -15
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795200000000-AddInventoryItemProjectEntityKeyIndex.ts +217 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795300000000-SkipHiddenIncidentCreatedNotifications.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795400000000-AddIncidentStatusPageScope.ts +108 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795500000000-AddIncidentTemplateStatusPageScopeFlag.ts +33 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795600000000-AddStatusPageSubscriberUnsubscribeToken.ts +51 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795700000000-AddStatusPageSubscriberIsAddedByTeam.ts +33 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795800000000-AddIncidentCustomFieldCreateAndNotificationSettings.ts +168 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795900000000-AddSubscriberNotificationClaimedAt.ts +44 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +16 -0
- package/Server/Infrastructure/Semaphore.ts +10 -0
- package/Server/Middleware/IdentityRateLimit.ts +108 -3
- package/Server/Middleware/SubscriberNotificationPreviewRateLimit.ts +237 -0
- package/Server/Middleware/SubscriberNotificationTestSendRateLimit.ts +304 -0
- package/Server/Services/AlertService.ts +32 -36
- package/Server/Services/DatabaseService.ts +93 -10
- package/Server/Services/IncidentAlertService.ts +609 -2
- package/Server/Services/IncidentCustomFieldService.ts +276 -1
- package/Server/Services/IncidentEpisodePublicNoteService.ts +28 -0
- package/Server/Services/IncidentEpisodeService.ts +15 -0
- package/Server/Services/IncidentEpisodeStateTimelineService.ts +27 -1
- package/Server/Services/IncidentPublicNoteService.ts +30 -1
- package/Server/Services/IncidentService.ts +1663 -103
- package/Server/Services/IncidentStateTimelineService.ts +13 -0
- package/Server/Services/IncidentTemplateService.ts +109 -0
- package/Server/Services/InventoryItemService.ts +38 -0
- package/Server/Services/IoTDeviceCredentialService.ts +13 -4
- package/Server/Services/ScheduledMaintenancePublicNoteService.ts +30 -1
- package/Server/Services/ScheduledMaintenanceService.ts +118 -64
- package/Server/Services/SmsService.ts +10 -0
- package/Server/Services/StatusPageService.ts +65 -8
- package/Server/Services/StatusPageSubscriberNotificationTemplateService.ts +299 -37
- package/Server/Services/StatusPageSubscriberNotificationTemplateStatusPageService.ts +129 -0
- package/Server/Services/StatusPageSubscriberService.ts +1161 -64
- package/Server/Services/UserNotificationRuleService.ts +55 -53
- package/Server/Services/WorkspaceNotificationSummaryService.ts +38 -20
- package/Server/Types/Markdown.ts +153 -6
- package/Server/Types/Workflow/Components/Email.ts +61 -2
- package/Server/Utils/AffectedResources/LinkedAffectedResources.ts +576 -0
- package/Server/Utils/Alert/AlertStateChangeAuthorization.ts +129 -0
- package/Server/Utils/CustomField/CustomFieldRename.ts +378 -0
- package/Server/Utils/DataSource/EgressGuard.ts +66 -21
- package/Server/Utils/Inventory/InventoryOverviewAggregation.ts +111 -0
- package/Server/Utils/Mail/PinnedSmtpSocket.ts +130 -0
- package/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.ts +10 -0
- package/Server/Utils/Response.ts +31 -0
- package/Server/Utils/SSRFProtection.ts +76 -16
- package/Server/Utils/StatusPage/IncidentStatusPageScope.ts +948 -0
- package/Server/Utils/StatusPage/IncidentSubscriberAudienceBuilder.ts +656 -0
- package/Server/Utils/StatusPage/IncidentTemplateVariableBuilder.ts +805 -0
- package/Server/Utils/StatusPage/StatusPageExclusion.ts +18 -0
- package/Server/Utils/StatusPage/StatusPageReadAccess.ts +125 -0
- package/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeNotice.ts +151 -0
- package/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeToken.ts +70 -0
- package/Server/Utils/StatusPage/SubscriberIncidentEmailBuilder.ts +421 -0
- package/Server/Utils/StatusPage/SubscriberNotificationClaim.ts +107 -0
- package/Server/Utils/StatusPage/SubscriberNotificationDeliveryRecord.ts +1049 -0
- package/Server/Utils/StatusPage/SubscriberNotificationFanOut.ts +180 -0
- package/Server/Utils/StatusPage/SubscriberNotificationPreviewBuilder.ts +839 -0
- package/Server/Utils/StatusPage/SubscriberNotificationResendAccess.ts +393 -0
- package/Server/Utils/StatusPage/SubscriberNotificationRunLimit.ts +246 -0
- package/Server/Utils/StatusPage/SubscriberNotificationTiming.ts +133 -0
- package/Server/Utils/StatusPage/SubscriberTemplateIncidentRecordAccess.ts +215 -0
- package/Server/Utils/StatusPageResource.ts +51 -20
- package/Server/Utils/Topology/TopologyConcurrencyLimiter.ts +229 -0
- package/Server/Utils/Topology/TopologyQueries.ts +1350 -0
- package/Server/Utils/Topology/TopologyRequest.ts +463 -0
- package/Server/Utils/Topology/TopologyResponseCache.ts +183 -0
- package/Server/Utils/Topology/TopologySql.ts +1024 -0
- package/Server/Utils/VM/VMAPI.ts +1 -0
- package/Server/Utils/VM/VMRunner.ts +10 -0
- package/Server/Utils/Workflow/OAuth2TokenClient.ts +10 -0
- package/Server/Views/Partials/SensitiveUrlToken.ejs +8 -5
- package/Tests/App/Accounts/RegisterVerifyEmail.test.tsx +748 -0
- package/Tests/App/Accounts/ResendVerificationEmail.test.tsx +1222 -0
- package/Tests/App/Accounts/VerificationEmailResendUtils.test.ts +797 -0
- package/Tests/App/Accounts/VerifyEmailPending.test.tsx +538 -0
- package/Tests/App/Accounts/VerifyEmailResend.test.tsx +779 -0
- package/Tests/App/Dashboard/AcknowledgeAlertsOnDeclare.test.ts +369 -0
- package/Tests/App/Dashboard/AffectedResourcesSlo.test.tsx +1 -1
- package/Tests/App/Dashboard/AffectedResourcesSummaryStep.test.tsx +510 -123
- package/Tests/App/Dashboard/AlertsTableAffectedResources.test.tsx +490 -0
- package/Tests/App/Dashboard/ChangeAlertStateDeclareIncident.test.tsx +886 -0
- package/Tests/App/Dashboard/CreateReviewStepRoleSummary.test.tsx +1250 -0
- package/Tests/App/Dashboard/CreateReviewStepSelectionSummary.test.tsx +738 -0
- package/Tests/App/Dashboard/CustomFieldsSettingsIncidentOptions.test.tsx +357 -0
- package/Tests/App/Dashboard/DeclareIncidentFromAlert.test.ts +417 -0
- package/Tests/App/Dashboard/EntityDetailPanel.test.tsx +1948 -229
- package/Tests/App/Dashboard/EntityDetailPanelLifecycle.test.tsx +493 -0
- package/Tests/App/Dashboard/EntityDetailPanelNavigation.test.tsx +439 -0
- package/Tests/App/Dashboard/EventNotes.test.tsx +776 -0
- package/Tests/App/Dashboard/EventNotesPages.test.tsx +119 -0
- package/Tests/App/Dashboard/EventNotesUtil.test.ts +116 -17
- package/Tests/App/Dashboard/EventOverviewPages.test.tsx +534 -6
- package/Tests/App/Dashboard/EventStatusPanel.test.tsx +798 -2
- package/Tests/App/Dashboard/FetchStateAndSeverityElements.test.tsx +669 -0
- package/Tests/App/Dashboard/FetchUsers.test.tsx +230 -0
- package/Tests/App/Dashboard/IncidentChangeStateNotifyDefault.test.tsx +91 -1
- package/Tests/App/Dashboard/IncidentCreateAcknowledgeAlerts.test.tsx +1611 -0
- package/Tests/App/Dashboard/IncidentCreateDetailsStep.test.tsx +643 -0
- package/Tests/App/Dashboard/IncidentCreateFromAlerts.test.tsx +8 -1
- package/Tests/App/Dashboard/IncidentCreateStatusPageScope.test.tsx +601 -0
- package/Tests/App/Dashboard/IncidentCustomFieldTemplateVariables.test.tsx +386 -0
- package/Tests/App/Dashboard/IncidentNoteTemplatePlaceholders.test.tsx +124 -0
- package/Tests/App/Dashboard/IncidentNoteTemplateVariablesLoader.test.ts +305 -0
- package/Tests/App/Dashboard/IncidentOverviewNotifyDefault.test.tsx +112 -0
- package/Tests/App/Dashboard/IncidentSettingsRenotifyOnPublish.test.tsx +674 -0
- package/Tests/App/Dashboard/IncidentSettingsStatusPageScope.test.tsx +1051 -0
- package/Tests/App/Dashboard/IncidentTemplateCustomFields.test.tsx +384 -0
- package/Tests/App/Dashboard/IncidentTemplateStatusPageScopeCard.test.tsx +215 -0
- package/Tests/App/Dashboard/InfrastructureExplorer.test.tsx +1365 -57
- package/Tests/App/Dashboard/InfrastructureGraph.test.tsx +964 -23
- package/Tests/App/Dashboard/InventoryRelationships.test.tsx +885 -0
- package/Tests/App/Dashboard/PublicNotePagesNotifyDefault.test.tsx +113 -1
- package/Tests/App/Dashboard/ServiceMapDatabaseLink.test.tsx +201 -15
- package/Tests/App/Dashboard/ServiceMapGraph.test.tsx +508 -36
- package/Tests/App/Dashboard/SubscriberAudienceSummary.test.tsx +512 -0
- package/Tests/App/Dashboard/SubscriberNotificationPreviewModal.test.tsx +837 -0
- package/Tests/App/Dashboard/SubscriberNotificationStatusLabel.test.tsx +88 -0
- package/Tests/App/Dashboard/SubscriberNotificationStatusResend.test.tsx +473 -0
- package/Tests/App/Dashboard/SubscriberTemplateLivePreview.test.tsx +196 -0
- package/Tests/App/Dashboard/TeamAddedSubscribersUnsubscribedNotice.test.tsx +248 -0
- package/Tests/App/Dashboard/TopologyDataLifecycle.test.tsx +583 -0
- package/Tests/App/Dashboard/TopologyDataLoading.test.tsx +982 -218
- package/Tests/App/Dashboard/TopologyPageNavigation.test.tsx +818 -114
- package/Tests/App/SensitiveUrlTokenBootstrap.test.ts +64 -3
- package/Tests/App/StatusPage/StatusPageUnsubscribePage.test.tsx +412 -0
- package/Tests/Models/IncidentCustomFieldApiSchemaContract.test.ts +217 -0
- package/Tests/Models/IncidentCustomFieldCreateSettingsColumns.test.ts +252 -0
- package/Tests/Models/StatusPageSubscriberUnsubscribeColumns.test.ts +218 -0
- package/Tests/Server/API/ExpiredSessionRouteGuards.test.ts +7 -0
- package/Tests/Server/API/IncidentSubscriberAudienceAPI.test.ts +1408 -0
- package/Tests/Server/API/StatusPageIncidentScope.test.ts +1868 -0
- package/Tests/Server/API/StatusPageIncidentScopePostgres.test.ts +790 -0
- package/Tests/Server/API/StatusPageManageSubscriptionRecipient.test.ts +10 -1
- package/Tests/Server/API/StatusPageManageSubscriptionTemplateVariables.test.ts +206 -18
- package/Tests/Server/API/StatusPagePostmortemVisibility.test.ts +14 -2
- package/Tests/Server/API/StatusPageSubscriberCreateResponse.test.ts +217 -0
- package/Tests/Server/API/StatusPageSubscriberOwnership.test.ts +103 -2
- package/Tests/Server/API/StatusPageUnsubscribeAPI.test.ts +396 -0
- package/Tests/Server/Infrastructure/Postgres/AddIncidentStatusPageScopeMigration.test.ts +395 -0
- package/Tests/Server/Infrastructure/Postgres/AddIncidentTemplateStatusPageScopeFlagMigration.test.ts +150 -0
- package/Tests/Server/Infrastructure/Postgres/AddSubscriberNotificationClaimedAtMigration.test.ts +156 -0
- package/Tests/Server/Infrastructure/Postgres/RenameInventoryItemMigration.test.ts +90 -21
- package/Tests/Server/Infrastructure/Postgres/SkipHiddenIncidentCreatedNotificationsMigration.test.ts +410 -0
- package/Tests/Server/Middleware/IdentityRateLimit.test.ts +551 -1
- package/Tests/Server/Middleware/SubscriberNotificationPreviewRateLimit.test.ts +238 -0
- package/Tests/Server/Middleware/SubscriberNotificationTestSendRateLimit.test.ts +245 -0
- package/Tests/Server/Services/AddStatusPageSubscriberUnsubscribeTokenMigration.test.ts +152 -0
- package/Tests/Server/Services/CrossProjectRelationWriteGuard.test.ts +221 -36
- package/Tests/Server/Services/DatabaseServiceCompareAndSetColumns.test.ts +191 -0
- package/Tests/Server/Services/DomainService.test.ts +525 -0
- package/Tests/Server/Services/IncidentAlertAcknowledgeOnDeclare.test.ts +2630 -0
- package/Tests/Server/Services/IncidentAlertPostgres.test.ts +1625 -1
- package/Tests/Server/Services/IncidentCreatedRenotifyOnPublish.test.ts +681 -0
- package/Tests/Server/Services/IncidentCreatedResend.test.ts +775 -0
- package/Tests/Server/Services/IncidentCustomFieldRenamePostgres.test.ts +713 -0
- package/Tests/Server/Services/IncidentCustomFieldService.test.ts +751 -0
- package/Tests/Server/Services/IncidentCustomFieldValueValidation.test.ts +556 -0
- package/Tests/Server/Services/IncidentDeclareAcknowledgeAlerts.test.ts +2189 -0
- package/Tests/Server/Services/IncidentStatusPageScope.test.ts +2971 -0
- package/Tests/Server/Services/IncidentStatusPageScopeFeed.test.ts +131 -0
- package/Tests/Server/Services/IncidentStatusPageScopePostgres.test.ts +625 -0
- package/Tests/Server/Services/IncidentTemplateCustomFieldsCopy.test.ts +311 -0
- package/Tests/Server/Services/IncidentTemplateStatusPageScope.test.ts +363 -0
- package/Tests/Server/Services/InventoryItemServiceOverviewCounts.test.ts +345 -0
- package/Tests/Server/Services/InventoryOverviewPostgres.test.ts +254 -0
- package/Tests/Server/Services/IoTDeviceCredentialService.test.ts +819 -0
- package/Tests/Server/Services/LinkedAffectedResourcesCreatedFeed.test.ts +420 -0
- package/Tests/Server/Services/PublicNoteEditFeedEventType.test.ts +213 -0
- package/Tests/Server/Services/PublicNoteResendAccess.test.ts +994 -0
- package/Tests/Server/Services/ScheduledMaintenanceSubscriberTemplateFormats.test.ts +289 -9
- package/Tests/Server/Services/SloAffectedResourceCreatedFeed.test.ts +92 -36
- package/Tests/Server/Services/SmsServiceFailIfNotSent.test.ts +67 -0
- package/Tests/Server/Services/StatusPageReportIncidentCounts.test.ts +610 -0
- package/Tests/Server/Services/StatusPageSubscriberAudienceCounts.test.ts +201 -0
- package/Tests/Server/Services/StatusPageSubscriberAudienceCountsPostgres.test.ts +271 -0
- package/Tests/Server/Services/StatusPageSubscriberConfirmationTemplateEscaping.test.ts +200 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationLogRedaction.test.ts +54 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateCompile.test.ts +37 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateIncidentRecordAccess.test.ts +772 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateLookup.test.ts +506 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateLookupPostgres.test.ts +261 -0
- package/Tests/Server/Services/StatusPageSubscriberReport.test.ts +21 -5
- package/Tests/Server/Services/StatusPageSubscriberUnsubscribe.test.ts +1618 -0
- package/Tests/Server/Services/StatusPageSubscriberUnsubscribeLinkSenders.test.ts +373 -0
- package/Tests/Server/Services/StatusPageSubscriberUnsubscribePostgres.test.ts +388 -0
- package/Tests/Server/Services/SubscriberNotificationInFlightRequeue.test.ts +500 -0
- package/Tests/Server/Types/MarkdownEmailLinks.test.ts +320 -0
- package/Tests/Server/Types/Workflow/Components/Email.test.ts +491 -1
- package/Tests/Server/Types/Workflow/Components/EmailSmtpPinning.test.ts +398 -0
- package/Tests/Server/Utils/AffectedResources/LinkedAffectedResources.test.ts +858 -0
- package/Tests/Server/Utils/Alert/AlertStateChangeAuthorization.test.ts +1172 -0
- package/Tests/Server/Utils/CustomField/CustomFieldRename.test.ts +586 -0
- package/Tests/Server/Utils/DataSource/EgressGuard.test.ts +246 -10
- package/Tests/Server/Utils/DataSource/EgressGuardDeploymentConfig.test.ts +226 -0
- package/Tests/Server/Utils/DataSource/EgressGuardPinning.test.ts +131 -0
- package/Tests/Server/Utils/DataSource/HttpFetch.test.ts +4 -0
- package/Tests/Server/Utils/EgressPolicyEnvironment.ts +45 -0
- package/Tests/Server/Utils/Mail/PinnedSmtpSocket.test.ts +409 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaObservationBuilderUnits.test.ts +23 -0
- package/Tests/Server/Utils/SSRFProtection.test.ts +4 -0
- package/Tests/Server/Utils/SSRFProtectionCloudServiceAddresses.test.ts +4 -0
- package/Tests/Server/Utils/SSRFProtectionPrivateNetwork.test.ts +4 -0
- package/Tests/Server/Utils/SSRFProtectionResolutionDetail.test.ts +314 -0
- package/Tests/Server/Utils/StatusPage/IncidentStatusPageScope.test.ts +1699 -0
- package/Tests/Server/Utils/StatusPage/IncidentStatusPageScopeQueriesPostgres.test.ts +508 -0
- package/Tests/Server/Utils/StatusPage/IncidentSubscriberAudienceCallerPermission.test.ts +246 -0
- package/Tests/Server/Utils/StatusPage/IncidentTemplateVariableBuilder.test.ts +1348 -0
- package/Tests/Server/Utils/StatusPage/StatusPageReadAccess.test.ts +221 -0
- package/Tests/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeNotice.test.ts +132 -0
- package/Tests/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeToken.test.ts +155 -0
- package/Tests/Server/Utils/StatusPage/SubscriberIncidentEmailBuilder.test.ts +708 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationClaim.test.ts +255 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationClaimPostgres.test.ts +528 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationDeliveryRecord.test.ts +1238 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationFanOut.test.ts +472 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationPreviewBuilder.test.ts +1168 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationRunLimit.test.ts +275 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationTiming.test.ts +131 -0
- package/Tests/Server/Utils/StatusPageResource.test.ts +98 -0
- package/Tests/Server/Utils/Topology/InventoryItemEntityKeyIndexMigration.test.ts +386 -0
- package/Tests/Server/Utils/Topology/InventoryItemEntityKeyIndexMigrationPostgres.test.ts +430 -0
- package/Tests/Server/Utils/Topology/TopologyActivityParityPostgres.test.ts +279 -0
- package/Tests/Server/Utils/Topology/TopologyConcurrencyLimiter.test.ts +534 -0
- package/Tests/Server/Utils/Topology/TopologyEstateGenerator.ts +624 -0
- package/Tests/Server/Utils/Topology/TopologyJsonResponse.test.ts +90 -0
- package/Tests/Server/Utils/Topology/TopologyQueries.test.ts +1634 -0
- package/Tests/Server/Utils/Topology/TopologyQueriesDifferentialPostgres.test.ts +683 -0
- package/Tests/Server/Utils/Topology/TopologyQueriesPostgres.test.ts +2624 -0
- package/Tests/Server/Utils/Topology/TopologyReference.ts +1018 -0
- package/Tests/Server/Utils/Topology/TopologyRequest.test.ts +643 -0
- package/Tests/Server/Utils/Topology/TopologyResponseCache.test.ts +305 -0
- package/Tests/Server/Utils/Topology/TopologySql.test.ts +973 -0
- package/Tests/Server/Utils/VM/VMRunnerPrivateNetworkWiring.test.ts +17 -0
- package/Tests/Server/Utils/VM/VMRunnerSsrf.test.ts +75 -0
- package/Tests/Types/CustomField/CustomFieldSavedViews.test.ts +247 -0
- package/Tests/Types/CustomField/CustomFieldTemplateValues.test.ts +186 -0
- package/Tests/Types/CustomField/CustomFieldTypeCorrespondence.test.ts +48 -0
- package/Tests/Types/CustomField/CustomFieldValueFormat.test.ts +215 -0
- package/Tests/Types/CustomField/CustomFieldValueValidator.test.ts +343 -0
- package/Tests/Types/CustomField/CustomFieldVariableKey.test.ts +364 -0
- package/Tests/Types/SafeHtml.test.ts +102 -0
- package/Tests/Types/StatusPage/IncidentCreatedRenotify.test.ts +419 -0
- package/Tests/Types/StatusPage/IncidentCreatedResend.test.ts +118 -0
- package/Tests/Types/StatusPage/IncidentScopeAddedPagesNotification.test.ts +558 -0
- package/Tests/Types/StatusPage/IncidentSubscriberAudience.test.ts +284 -0
- package/Tests/Types/StatusPage/StatusPageSubscriberUnsubscribe.test.ts +341 -0
- package/Tests/Types/StatusPage/SubscriberNotificationPreview.test.ts +196 -0
- package/Tests/Types/StatusPage/SubscriberNotificationResend.test.ts +201 -0
- package/Tests/Types/StatusPage/SubscriberNotificationTemplateCompiler.test.ts +277 -0
- package/Tests/Types/StatusPage/SubscriberNotificationTemplatePreview.test.ts +179 -0
- package/Tests/Types/StatusPage/SubscriberNotificationTemplateVariables.test.ts +324 -0
- package/Tests/Types/StatusPage/SubscriberUpdateNotification.test.ts +60 -13
- package/Tests/Types/Topology/TopologyTypeRules.test.ts +176 -0
- package/Tests/UI/Components/CustomFields/CustomFieldFormFields.test.ts +432 -0
- package/Tests/UI/Components/CustomFields/CustomFieldModelFormFields.test.tsx +685 -0
- package/Tests/UI/Components/CustomFields/CustomFieldsDetailOrder.test.tsx +469 -0
- package/Tests/UI/Components/Forms/ModelFormCustomFieldInputs.test.tsx +325 -0
- package/Tests/UI/Components/Forms/ModelFormDropdownOptionsRefused.test.tsx +358 -0
- package/Tests/UI/Components/ModelTable/CustomFieldColumns.test.tsx +22 -0
- package/Tests/UI/Monitor/NetworkPathView.test.tsx +289 -0
- package/Tests/Utils/Incident/IncidentFromAlerts.test.ts +302 -0
- package/Tests/Utils/Incident/IncidentNoteTemplateVariables.test.ts +623 -0
- package/Tests/Utils/Markdown/MarkdownEscape.test.ts +89 -0
- package/Tests/Utils/ProbeNetworkFailureUtil.test.ts +992 -0
- package/Tests/Utils/RequestFailedDetails.test.ts +575 -0
- package/Types/CustomField/CustomFieldOrder.ts +55 -0
- package/Types/CustomField/CustomFieldSavedViews.ts +225 -0
- package/Types/CustomField/CustomFieldTemplateMerge.ts +71 -0
- package/Types/CustomField/CustomFieldType.ts +14 -0
- package/Types/CustomField/CustomFieldValueFormat.ts +161 -0
- package/Types/CustomField/CustomFieldValueValidator.ts +488 -0
- package/Types/CustomField/CustomFieldVariableKey.ts +211 -0
- package/Types/Incident/IncidentAlertLink.ts +19 -0
- package/Types/SafeHtml.ts +93 -0
- package/Types/StatusPage/IncidentCreatedRenotify.ts +224 -0
- package/Types/StatusPage/IncidentCreatedResend.ts +108 -0
- package/Types/StatusPage/IncidentScopeAddedPagesNotification.ts +343 -0
- package/Types/StatusPage/IncidentSubscriberAudience.ts +332 -0
- package/Types/StatusPage/StatusPageSubscriberUnsubscribe.ts +405 -0
- package/Types/StatusPage/SubscriberNotificationInterruption.ts +32 -0
- package/Types/StatusPage/SubscriberNotificationPreview.ts +322 -0
- package/Types/StatusPage/SubscriberNotificationResend.ts +132 -0
- package/Types/StatusPage/SubscriberNotificationTemplateCompiler.ts +180 -0
- package/Types/StatusPage/SubscriberNotificationTemplatePreview.ts +301 -0
- package/Types/StatusPage/SubscriberNotificationTemplateVariables.ts +217 -4
- package/Types/StatusPage/SubscriberUpdateNotification.ts +32 -11
- package/Types/Telemetry/InventoryLiveness.ts +26 -0
- package/Types/Topology/TopologyApi.ts +428 -0
- package/Types/Topology/TopologyTypeRules.ts +191 -0
- package/UI/Components/CustomFields/CustomFieldFormFields.ts +317 -0
- package/UI/Components/CustomFields/CustomFieldModelFormFields.tsx +395 -0
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +95 -55
- package/UI/Components/Forms/ModelForm.tsx +70 -8
- package/UI/Components/Forms/Validation.ts +1 -1
- package/UI/Components/ModelFormModal/ModelFormModal.tsx +2 -4
- package/UI/Components/ModelTable/AnalyticsModelTable.tsx +2 -6
- package/UI/Components/ModelTable/BaseModelTable.tsx +9 -8
- package/UI/Components/ModelTable/CustomFieldColumns.tsx +14 -1
- package/UI/Components/ModelTable/ModelTable.tsx +6 -7
- package/UI/Utils/SensitiveUrlToken.ts +10 -5
- package/Utils/API.ts +247 -2
- package/Utils/Incident/IncidentFromAlerts.ts +78 -0
- package/Utils/Incident/IncidentNoteTemplateVariables.ts +304 -0
- package/Utils/Markdown/MarkdownEscape.ts +65 -0
- package/Utils/ProbeNetworkFailureUtil.ts +673 -0
- package/build/dist/Models/DatabaseModels/Incident.js +267 -1
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentCustomField.js +207 -1
- package/build/dist/Models/DatabaseModels/IncidentCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentEpisode.js +31 -0
- package/build/dist/Models/DatabaseModels/IncidentEpisode.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js +124 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/InventoryItem.js +20 -11
- package/build/dist/Models/DatabaseModels/InventoryItem.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +56 -0
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageSubscriber.js +131 -0
- package/build/dist/Models/DatabaseModels/StatusPageSubscriber.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +100 -1
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +417 -176
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageSubscriberAPI.js +52 -13
- package/build/dist/Server/API/StatusPageSubscriberAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795200000000-AddInventoryItemProjectEntityKeyIndex.js +165 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795200000000-AddInventoryItemProjectEntityKeyIndex.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795300000000-SkipHiddenIncidentCreatedNotifications.js +41 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795300000000-SkipHiddenIncidentCreatedNotifications.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795400000000-AddIncidentStatusPageScope.js +57 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795400000000-AddIncidentStatusPageScope.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795500000000-AddIncidentTemplateStatusPageScopeFlag.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795500000000-AddIncidentTemplateStatusPageScopeFlag.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795600000000-AddStatusPageSubscriberUnsubscribeToken.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795600000000-AddStatusPageSubscriberUnsubscribeToken.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795700000000-AddStatusPageSubscriberIsAddedByTeam.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795700000000-AddStatusPageSubscriberIsAddedByTeam.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795800000000-AddIncidentCustomFieldCreateAndNotificationSettings.js +89 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795800000000-AddIncidentCustomFieldCreateAndNotificationSettings.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795900000000-AddSubscriberNotificationClaimedAt.js +29 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795900000000-AddSubscriberNotificationClaimedAt.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Semaphore.js +3 -0
- package/build/dist/Server/Infrastructure/Semaphore.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +89 -3
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -1
- package/build/dist/Server/Middleware/SubscriberNotificationPreviewRateLimit.js +149 -0
- package/build/dist/Server/Middleware/SubscriberNotificationPreviewRateLimit.js.map +1 -0
- package/build/dist/Server/Middleware/SubscriberNotificationTestSendRateLimit.js +190 -0
- package/build/dist/Server/Middleware/SubscriberNotificationTestSendRateLimit.js.map +1 -0
- package/build/dist/Server/Services/AlertService.js +21 -33
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +56 -7
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentAlertService.js +457 -3
- package/build/dist/Server/Services/IncidentAlertService.js.map +1 -1
- package/build/dist/Server/Services/IncidentCustomFieldService.js +204 -8
- package/build/dist/Server/Services/IncidentCustomFieldService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js +24 -0
- package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeService.js +14 -0
- package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js +26 -0
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentPublicNoteService.js +26 -1
- package/build/dist/Server/Services/IncidentPublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +1148 -42
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +12 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentTemplateService.js +83 -0
- package/build/dist/Server/Services/IncidentTemplateService.js.map +1 -1
- package/build/dist/Server/Services/InventoryItemService.js +31 -0
- package/build/dist/Server/Services/InventoryItemService.js.map +1 -1
- package/build/dist/Server/Services/IoTDeviceCredentialService.js +12 -5
- package/build/dist/Server/Services/IoTDeviceCredentialService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js +26 -1
- package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +84 -57
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/SmsService.js +2 -22
- package/build/dist/Server/Services/SmsService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +47 -9
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js +237 -32
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateStatusPageService.js +109 -0
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateStatusPageService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +925 -99
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationRuleService.js +55 -51
- package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js +42 -25
- package/build/dist/Server/Services/WorkspaceNotificationSummaryService.js.map +1 -1
- package/build/dist/Server/Types/Markdown.js +110 -6
- package/build/dist/Server/Types/Markdown.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Email.js +55 -6
- package/build/dist/Server/Types/Workflow/Components/Email.js.map +1 -1
- package/build/dist/Server/Utils/AffectedResources/LinkedAffectedResources.js +405 -0
- package/build/dist/Server/Utils/AffectedResources/LinkedAffectedResources.js.map +1 -0
- package/build/dist/Server/Utils/Alert/AlertStateChangeAuthorization.js +112 -0
- package/build/dist/Server/Utils/Alert/AlertStateChangeAuthorization.js.map +1 -0
- package/build/dist/Server/Utils/CustomField/CustomFieldRename.js +211 -0
- package/build/dist/Server/Utils/CustomField/CustomFieldRename.js.map +1 -0
- package/build/dist/Server/Utils/DataSource/EgressGuard.js +41 -12
- package/build/dist/Server/Utils/DataSource/EgressGuard.js.map +1 -1
- package/build/dist/Server/Utils/Inventory/InventoryOverviewAggregation.js +81 -0
- package/build/dist/Server/Utils/Inventory/InventoryOverviewAggregation.js.map +1 -0
- package/build/dist/Server/Utils/Mail/PinnedSmtpSocket.js +101 -0
- package/build/dist/Server/Utils/Mail/PinnedSmtpSocket.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js +9 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/Response.js +30 -0
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/SSRFProtection.js +48 -6
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/StatusPage/IncidentStatusPageScope.js +631 -0
- package/build/dist/Server/Utils/StatusPage/IncidentStatusPageScope.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/IncidentSubscriberAudienceBuilder.js +403 -0
- package/build/dist/Server/Utils/StatusPage/IncidentSubscriberAudienceBuilder.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/IncidentTemplateVariableBuilder.js +451 -0
- package/build/dist/Server/Utils/StatusPage/IncidentTemplateVariableBuilder.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageExclusion.js +13 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageExclusion.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageReadAccess.js +91 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageReadAccess.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeNotice.js +101 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeNotice.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeToken.js +47 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeToken.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberIncidentEmailBuilder.js +273 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberIncidentEmailBuilder.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationClaim.js +73 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationClaim.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationDeliveryRecord.js +722 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationDeliveryRecord.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationFanOut.js +102 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationFanOut.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationPreviewBuilder.js +527 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationPreviewBuilder.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationResendAccess.js +278 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationResendAccess.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationRunLimit.js +137 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationRunLimit.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationTiming.js +103 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationTiming.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberTemplateIncidentRecordAccess.js +114 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberTemplateIncidentRecordAccess.js.map +1 -0
- package/build/dist/Server/Utils/StatusPageResource.js +39 -7
- package/build/dist/Server/Utils/StatusPageResource.js.map +1 -1
- package/build/dist/Server/Utils/Topology/TopologyConcurrencyLimiter.js +178 -0
- package/build/dist/Server/Utils/Topology/TopologyConcurrencyLimiter.js.map +1 -0
- package/build/dist/Server/Utils/Topology/TopologyQueries.js +884 -0
- package/build/dist/Server/Utils/Topology/TopologyQueries.js.map +1 -0
- package/build/dist/Server/Utils/Topology/TopologyRequest.js +275 -0
- package/build/dist/Server/Utils/Topology/TopologyRequest.js.map +1 -0
- package/build/dist/Server/Utils/Topology/TopologyResponseCache.js +146 -0
- package/build/dist/Server/Utils/Topology/TopologyResponseCache.js.map +1 -0
- package/build/dist/Server/Utils/Topology/TopologySql.js +688 -0
- package/build/dist/Server/Utils/Topology/TopologySql.js.map +1 -0
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +1 -0
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Server/Utils/Workflow/OAuth2TokenClient.js +3 -0
- package/build/dist/Server/Utils/Workflow/OAuth2TokenClient.js.map +1 -1
- package/build/dist/Types/CustomField/CustomFieldOrder.js +36 -0
- package/build/dist/Types/CustomField/CustomFieldOrder.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldSavedViews.js +135 -0
- package/build/dist/Types/CustomField/CustomFieldSavedViews.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldTemplateMerge.js +27 -0
- package/build/dist/Types/CustomField/CustomFieldTemplateMerge.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldType.js +12 -0
- package/build/dist/Types/CustomField/CustomFieldType.js.map +1 -1
- package/build/dist/Types/CustomField/CustomFieldValueFormat.js +126 -0
- package/build/dist/Types/CustomField/CustomFieldValueFormat.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldValueValidator.js +280 -0
- package/build/dist/Types/CustomField/CustomFieldValueValidator.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldVariableKey.js +150 -0
- package/build/dist/Types/CustomField/CustomFieldVariableKey.js.map +1 -0
- package/build/dist/Types/Incident/IncidentAlertLink.js +17 -0
- package/build/dist/Types/Incident/IncidentAlertLink.js.map +1 -1
- package/build/dist/Types/SafeHtml.js +84 -0
- package/build/dist/Types/SafeHtml.js.map +1 -0
- package/build/dist/Types/StatusPage/IncidentCreatedRenotify.js +117 -0
- package/build/dist/Types/StatusPage/IncidentCreatedRenotify.js.map +1 -0
- package/build/dist/Types/StatusPage/IncidentCreatedResend.js +86 -0
- package/build/dist/Types/StatusPage/IncidentCreatedResend.js.map +1 -0
- package/build/dist/Types/StatusPage/IncidentScopeAddedPagesNotification.js +246 -0
- package/build/dist/Types/StatusPage/IncidentScopeAddedPagesNotification.js.map +1 -0
- package/build/dist/Types/StatusPage/IncidentSubscriberAudience.js +183 -0
- package/build/dist/Types/StatusPage/IncidentSubscriberAudience.js.map +1 -0
- package/build/dist/Types/StatusPage/StatusPageSubscriberUnsubscribe.js +277 -0
- package/build/dist/Types/StatusPage/StatusPageSubscriberUnsubscribe.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationInterruption.js +27 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationInterruption.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationPreview.js +190 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationPreview.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationResend.js +102 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationResend.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateCompiler.js +97 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateCompiler.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplatePreview.js +175 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplatePreview.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateVariables.js +144 -4
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateVariables.js.map +1 -1
- package/build/dist/Types/StatusPage/SubscriberUpdateNotification.js +29 -9
- package/build/dist/Types/StatusPage/SubscriberUpdateNotification.js.map +1 -1
- package/build/dist/Types/Telemetry/InventoryLiveness.js +23 -0
- package/build/dist/Types/Telemetry/InventoryLiveness.js.map +1 -1
- package/build/dist/Types/Topology/TopologyApi.js +55 -0
- package/build/dist/Types/Topology/TopologyApi.js.map +1 -0
- package/build/dist/Types/Topology/TopologyTypeRules.js +165 -0
- package/build/dist/Types/Topology/TopologyTypeRules.js.map +1 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldFormFields.js +169 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldFormFields.js.map +1 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldModelFormFields.js +212 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldModelFormFields.js.map +1 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +64 -49
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/Forms/ModelForm.js +39 -5
- package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/Validation.js +1 -1
- package/build/dist/UI/Components/Forms/Validation.js.map +1 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/AnalyticsModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +2 -2
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/CustomFieldColumns.js +13 -1
- package/build/dist/UI/Components/ModelTable/CustomFieldColumns.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/ModelTable.js +1 -1
- package/build/dist/UI/Components/ModelTable/ModelTable.js.map +1 -1
- package/build/dist/UI/Utils/SensitiveUrlToken.js +10 -5
- package/build/dist/UI/Utils/SensitiveUrlToken.js.map +1 -1
- package/build/dist/Utils/API.js +177 -1
- package/build/dist/Utils/API.js.map +1 -1
- package/build/dist/Utils/Incident/IncidentFromAlerts.js +38 -0
- package/build/dist/Utils/Incident/IncidentFromAlerts.js.map +1 -1
- package/build/dist/Utils/Incident/IncidentNoteTemplateVariables.js +155 -0
- package/build/dist/Utils/Incident/IncidentNoteTemplateVariables.js.map +1 -0
- package/build/dist/Utils/Markdown/MarkdownEscape.js +48 -0
- package/build/dist/Utils/Markdown/MarkdownEscape.js.map +1 -1
- package/build/dist/Utils/ProbeNetworkFailureUtil.js +460 -0
- package/build/dist/Utils/ProbeNetworkFailureUtil.js.map +1 -0
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ import IoTFleet from "./IoTFleet";
|
|
|
23
23
|
import DockerSwarmCluster from "./DockerSwarmCluster";
|
|
24
24
|
import Service from "./Service";
|
|
25
25
|
import ServiceLevelObjective from "./ServiceLevelObjective";
|
|
26
|
+
import StatusPage from "./StatusPage";
|
|
26
27
|
import User from "./User";
|
|
27
28
|
import File from "./File";
|
|
28
29
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
@@ -1947,6 +1948,37 @@ export default class Incident extends BaseModel {
|
|
|
1947
1948
|
})
|
|
1948
1949
|
public subscriberNotificationStatusMessage?: string = undefined;
|
|
1949
1950
|
|
|
1951
|
+
/*
|
|
1952
|
+
* When a subscriber job last claimed the 'incident created' notification
|
|
1953
|
+
* (SubscriberNotificationClaim), which the sweeper
|
|
1954
|
+
* (StatusPageSubscriber:TimeoutStuckNotifications) times a notification
|
|
1955
|
+
* still In progress from. Not updatedAt: other code writes this row on a
|
|
1956
|
+
* schedule while the incident is open - the owners' reminders, state
|
|
1957
|
+
* changes, scope and field edits - so updatedAt could keep an interrupted
|
|
1958
|
+
* send from ever looking stuck, and Retry, Resend and the added-pages
|
|
1959
|
+
* notification all wait for it to settle. Written by the claim only;
|
|
1960
|
+
* nobody reads or writes it through the API.
|
|
1961
|
+
*/
|
|
1962
|
+
@ColumnAccessControl({
|
|
1963
|
+
create: [],
|
|
1964
|
+
read: [],
|
|
1965
|
+
update: [],
|
|
1966
|
+
})
|
|
1967
|
+
@TableColumn({
|
|
1968
|
+
computed: true,
|
|
1969
|
+
hideColumnInDocumentation: true,
|
|
1970
|
+
required: false,
|
|
1971
|
+
type: TableColumnType.Date,
|
|
1972
|
+
title: "Subscriber Notification Claimed At on Incident Created",
|
|
1973
|
+
description:
|
|
1974
|
+
"When a subscriber notification job last started sending the notification that this incident was created.",
|
|
1975
|
+
})
|
|
1976
|
+
@Column({
|
|
1977
|
+
type: ColumnType.Date,
|
|
1978
|
+
nullable: true,
|
|
1979
|
+
})
|
|
1980
|
+
public subscriberNotificationClaimedAtOnIncidentCreated?: Date = undefined;
|
|
1981
|
+
|
|
1950
1982
|
@ColumnAccessControl({
|
|
1951
1983
|
create: [
|
|
1952
1984
|
Permission.ProjectOwner,
|
|
@@ -2036,6 +2068,38 @@ export default class Incident extends BaseModel {
|
|
|
2036
2068
|
public subscriberNotificationStatusMessageOnPostmortemPublished?: string =
|
|
2037
2069
|
undefined;
|
|
2038
2070
|
|
|
2071
|
+
/*
|
|
2072
|
+
* When a subscriber job last claimed the postmortem notification
|
|
2073
|
+
* (SubscriberNotificationClaim), which the sweeper
|
|
2074
|
+
* (StatusPageSubscriber:TimeoutStuckNotifications) times a notification
|
|
2075
|
+
* still In progress from. Not updatedAt: other code writes this row on a
|
|
2076
|
+
* schedule while the incident is open - the owners' reminders, state
|
|
2077
|
+
* changes, scope and field edits - so updatedAt could keep an interrupted
|
|
2078
|
+
* send from ever looking stuck, and Retry, Resend and the added-pages
|
|
2079
|
+
* notification all wait for it to settle. Written by the claim only;
|
|
2080
|
+
* nobody reads or writes it through the API.
|
|
2081
|
+
*/
|
|
2082
|
+
@ColumnAccessControl({
|
|
2083
|
+
create: [],
|
|
2084
|
+
read: [],
|
|
2085
|
+
update: [],
|
|
2086
|
+
})
|
|
2087
|
+
@TableColumn({
|
|
2088
|
+
computed: true,
|
|
2089
|
+
hideColumnInDocumentation: true,
|
|
2090
|
+
required: false,
|
|
2091
|
+
type: TableColumnType.Date,
|
|
2092
|
+
title: "Subscriber Notification Claimed At on Postmortem Published",
|
|
2093
|
+
description:
|
|
2094
|
+
"When a subscriber notification job last started sending the notification about this incident's postmortem.",
|
|
2095
|
+
})
|
|
2096
|
+
@Column({
|
|
2097
|
+
type: ColumnType.Date,
|
|
2098
|
+
nullable: true,
|
|
2099
|
+
})
|
|
2100
|
+
public subscriberNotificationClaimedAtOnPostmortemPublished?: Date =
|
|
2101
|
+
undefined;
|
|
2102
|
+
|
|
2039
2103
|
@ColumnAccessControl({
|
|
2040
2104
|
create: [
|
|
2041
2105
|
Permission.ProjectOwner,
|
|
@@ -2104,7 +2168,8 @@ export default class Incident extends BaseModel {
|
|
|
2104
2168
|
required: false,
|
|
2105
2169
|
type: TableColumnType.JSON,
|
|
2106
2170
|
title: "Custom Fields",
|
|
2107
|
-
description:
|
|
2171
|
+
description:
|
|
2172
|
+
"The incident's custom field values, keyed by each incident custom field's name. When a user or an API key creates or updates an incident, each value it sets or changes must fit its field - a number for a Number field, true or false for a Boolean, one of the options for a Dropdown, and so on - or the request is refused. Values left as they were, keys that are not the name of a field and empty values are not checked. Required on Create is not enforced here: it applies to the dashboard's Declare Incident form only.",
|
|
2108
2173
|
})
|
|
2109
2174
|
@Column({
|
|
2110
2175
|
type: ColumnType.JSON,
|
|
@@ -2882,6 +2947,207 @@ export default class Incident extends BaseModel {
|
|
|
2882
2947
|
})
|
|
2883
2948
|
public isVisibleOnStatusPage?: boolean = undefined;
|
|
2884
2949
|
|
|
2950
|
+
/*
|
|
2951
|
+
* The status pages this incident is limited to. An incident reaches a
|
|
2952
|
+
* status page through its monitors: every page that lists one of them shows
|
|
2953
|
+
* it and notifies its subscribers. So a monitor shared by ten site pages
|
|
2954
|
+
* used to tell all ten sites about an outage that affects two. Picking
|
|
2955
|
+
* pages here narrows that: a scoped incident shows on, and notifies, only
|
|
2956
|
+
* the selected pages among those its monitors already reach (the two sets
|
|
2957
|
+
* intersect - a scope never puts an incident on a page that does not list
|
|
2958
|
+
* its monitors). Empty means unscoped: every page its monitors reach, as
|
|
2959
|
+
* before. Status pages that only show scoped incidents
|
|
2960
|
+
* (StatusPage.onlyShowScopedIncidents) never show an unscoped one.
|
|
2961
|
+
*
|
|
2962
|
+
* Shaped like ScheduledMaintenance.statusPages, with the access control of
|
|
2963
|
+
* the monitors list above. Whether an incident is scoped is kept separately
|
|
2964
|
+
* in isScopedToStatusPages, so the status page queries can filter on it.
|
|
2965
|
+
*
|
|
2966
|
+
* Like the monitors list, the pages are part of the incident: anyone who
|
|
2967
|
+
* can read it sees their names (StatusPage.name is readable on a relation
|
|
2968
|
+
* query), whether or not they can read those status pages. Picking a page
|
|
2969
|
+
* needs read access to it (StatusPageReadAccess).
|
|
2970
|
+
*/
|
|
2971
|
+
@ColumnAccessControl({
|
|
2972
|
+
create: [
|
|
2973
|
+
Permission.ProjectOwner,
|
|
2974
|
+
Permission.ProjectAdmin,
|
|
2975
|
+
Permission.ProjectMember,
|
|
2976
|
+
Permission.IncidentAdmin,
|
|
2977
|
+
Permission.IncidentMember,
|
|
2978
|
+
Permission.CreateProjectIncident,
|
|
2979
|
+
],
|
|
2980
|
+
read: [
|
|
2981
|
+
Permission.ProjectOwner,
|
|
2982
|
+
Permission.ProjectAdmin,
|
|
2983
|
+
Permission.ProjectMember,
|
|
2984
|
+
Permission.Viewer,
|
|
2985
|
+
Permission.IncidentAdmin,
|
|
2986
|
+
Permission.IncidentMember,
|
|
2987
|
+
Permission.IncidentViewer,
|
|
2988
|
+
Permission.ReadProjectIncident,
|
|
2989
|
+
],
|
|
2990
|
+
update: [
|
|
2991
|
+
Permission.ProjectOwner,
|
|
2992
|
+
Permission.ProjectAdmin,
|
|
2993
|
+
Permission.ProjectMember,
|
|
2994
|
+
Permission.IncidentAdmin,
|
|
2995
|
+
Permission.IncidentMember,
|
|
2996
|
+
Permission.EditProjectIncident,
|
|
2997
|
+
],
|
|
2998
|
+
})
|
|
2999
|
+
@TableColumn({
|
|
3000
|
+
required: false,
|
|
3001
|
+
type: TableColumnType.EntityArray,
|
|
3002
|
+
modelType: StatusPage,
|
|
3003
|
+
title: "Status Pages",
|
|
3004
|
+
description:
|
|
3005
|
+
"Limit this incident to these status pages. When set, the incident is shown on, and notifies the subscribers of, only these pages among the status pages that list its monitors. Leave empty to reach every status page that lists its monitors.",
|
|
3006
|
+
})
|
|
3007
|
+
@ManyToMany(
|
|
3008
|
+
() => {
|
|
3009
|
+
return StatusPage;
|
|
3010
|
+
},
|
|
3011
|
+
{ eager: false },
|
|
3012
|
+
)
|
|
3013
|
+
@JoinTable({
|
|
3014
|
+
name: "IncidentStatusPage",
|
|
3015
|
+
inverseJoinColumn: {
|
|
3016
|
+
name: "statusPageId",
|
|
3017
|
+
referencedColumnName: "_id",
|
|
3018
|
+
},
|
|
3019
|
+
joinColumn: {
|
|
3020
|
+
name: "incidentId",
|
|
3021
|
+
referencedColumnName: "_id",
|
|
3022
|
+
},
|
|
3023
|
+
})
|
|
3024
|
+
public statusPages?: Array<StatusPage> = undefined;
|
|
3025
|
+
|
|
3026
|
+
/*
|
|
3027
|
+
* Whether this incident is limited to the status pages in statusPages. The
|
|
3028
|
+
* status page queries split on it (unscoped incidents by monitor, scoped
|
|
3029
|
+
* ones by monitor AND page), which keeps the scope in SQL rather than in a
|
|
3030
|
+
* post-filter that a LIMIT could silently cut.
|
|
3031
|
+
*
|
|
3032
|
+
* IncidentService derives it from writes to statusPages and ignores any
|
|
3033
|
+
* value a client sends. It is deliberately never recomputed when join rows
|
|
3034
|
+
* disappear: deleting the only status page an incident is scoped to
|
|
3035
|
+
* cascades its join row away, and the incident stays scoped - to nothing -
|
|
3036
|
+
* so it is hidden everywhere rather than widened to every page its monitors
|
|
3037
|
+
* reach.
|
|
3038
|
+
*
|
|
3039
|
+
* Computed, so a client cannot set it on create. Its update access control
|
|
3040
|
+
* matches statusPages all the same: the service writes it into the caller's
|
|
3041
|
+
* own update, and the column check that runs after the hook exempts computed
|
|
3042
|
+
* columns only on create.
|
|
3043
|
+
*
|
|
3044
|
+
* Not indexed. It is false on nearly every row, so an index cannot help the
|
|
3045
|
+
* unscoped half of those queries, and the scoped half reaches its incidents
|
|
3046
|
+
* through the IncidentStatusPage join table's statusPageId index. Building
|
|
3047
|
+
* one would also have held the lock of the migration's ALTER TABLE on
|
|
3048
|
+
* Incident - reads included - for as long as it took on a large table.
|
|
3049
|
+
*/
|
|
3050
|
+
@ColumnAccessControl({
|
|
3051
|
+
create: [
|
|
3052
|
+
Permission.ProjectOwner,
|
|
3053
|
+
Permission.ProjectAdmin,
|
|
3054
|
+
Permission.ProjectMember,
|
|
3055
|
+
Permission.IncidentAdmin,
|
|
3056
|
+
Permission.IncidentMember,
|
|
3057
|
+
Permission.CreateProjectIncident,
|
|
3058
|
+
],
|
|
3059
|
+
read: [
|
|
3060
|
+
Permission.ProjectOwner,
|
|
3061
|
+
Permission.ProjectAdmin,
|
|
3062
|
+
Permission.ProjectMember,
|
|
3063
|
+
Permission.Viewer,
|
|
3064
|
+
Permission.IncidentAdmin,
|
|
3065
|
+
Permission.IncidentMember,
|
|
3066
|
+
Permission.IncidentViewer,
|
|
3067
|
+
Permission.ReadProjectIncident,
|
|
3068
|
+
],
|
|
3069
|
+
update: [
|
|
3070
|
+
Permission.ProjectOwner,
|
|
3071
|
+
Permission.ProjectAdmin,
|
|
3072
|
+
Permission.ProjectMember,
|
|
3073
|
+
Permission.IncidentAdmin,
|
|
3074
|
+
Permission.IncidentMember,
|
|
3075
|
+
Permission.EditProjectIncident,
|
|
3076
|
+
],
|
|
3077
|
+
})
|
|
3078
|
+
@TableColumn({
|
|
3079
|
+
isDefaultValueColumn: true,
|
|
3080
|
+
computed: true,
|
|
3081
|
+
hideColumnInDocumentation: true,
|
|
3082
|
+
required: true,
|
|
3083
|
+
type: TableColumnType.Boolean,
|
|
3084
|
+
title: "Is Scoped To Status Pages",
|
|
3085
|
+
description:
|
|
3086
|
+
"Whether this incident is limited to the status pages in Status Pages. Derived from Status Pages; any value sent for it is ignored.",
|
|
3087
|
+
defaultValue: false,
|
|
3088
|
+
})
|
|
3089
|
+
@Column({
|
|
3090
|
+
type: ColumnType.Boolean,
|
|
3091
|
+
nullable: false,
|
|
3092
|
+
default: false,
|
|
3093
|
+
})
|
|
3094
|
+
public isScopedToStatusPages?: boolean = undefined;
|
|
3095
|
+
|
|
3096
|
+
/*
|
|
3097
|
+
* The ids of the status pages whose subscribers were sent this incident's
|
|
3098
|
+
* 'created' notification. A status page added to the scope later can then
|
|
3099
|
+
* be told exactly once, without telling the pages that already heard.
|
|
3100
|
+
*
|
|
3101
|
+
* The Incident:SendNotificationToSubscribers job writes it as root, once per
|
|
3102
|
+
* send, with the status it settles on. It is computed and never taken from
|
|
3103
|
+
* a client; its update access control matches
|
|
3104
|
+
* subscriberNotificationStatusOnIncidentCreated so IncidentService can write
|
|
3105
|
+
* it inside the caller's own update: it empties it when the update resends
|
|
3106
|
+
* the notification to every page (the status set back to Pending), and when
|
|
3107
|
+
* pages are added to an incident whose notification was skipped, it lists
|
|
3108
|
+
* the pages the incident was limited to before, which were deliberately not
|
|
3109
|
+
* told, so only the added ones are (see IncidentScopeAddedPagesNotification).
|
|
3110
|
+
*
|
|
3111
|
+
* Null means no send has settled since the column was added: an incident
|
|
3112
|
+
* whose notification went out before then has no record, and pages added to
|
|
3113
|
+
* it are not sent the notification again.
|
|
3114
|
+
*/
|
|
3115
|
+
@ColumnAccessControl({
|
|
3116
|
+
create: [],
|
|
3117
|
+
read: [
|
|
3118
|
+
Permission.ProjectOwner,
|
|
3119
|
+
Permission.ProjectAdmin,
|
|
3120
|
+
Permission.ProjectMember,
|
|
3121
|
+
Permission.Viewer,
|
|
3122
|
+
Permission.IncidentAdmin,
|
|
3123
|
+
Permission.IncidentMember,
|
|
3124
|
+
Permission.IncidentViewer,
|
|
3125
|
+
Permission.ReadProjectIncident,
|
|
3126
|
+
],
|
|
3127
|
+
update: [
|
|
3128
|
+
Permission.ProjectOwner,
|
|
3129
|
+
Permission.ProjectAdmin,
|
|
3130
|
+
Permission.ProjectMember,
|
|
3131
|
+
Permission.IncidentAdmin,
|
|
3132
|
+
Permission.IncidentMember,
|
|
3133
|
+
Permission.EditProjectIncident,
|
|
3134
|
+
],
|
|
3135
|
+
})
|
|
3136
|
+
@TableColumn({
|
|
3137
|
+
required: false,
|
|
3138
|
+
computed: true,
|
|
3139
|
+
hideColumnInDocumentation: true,
|
|
3140
|
+
type: TableColumnType.JSON,
|
|
3141
|
+
title: "Status Pages Notified On Creation",
|
|
3142
|
+
description:
|
|
3143
|
+
"IDs of the status pages whose subscribers were sent the notification that this incident was created.",
|
|
3144
|
+
})
|
|
3145
|
+
@Column({
|
|
3146
|
+
type: ColumnType.JSON,
|
|
3147
|
+
nullable: true,
|
|
3148
|
+
})
|
|
3149
|
+
public statusPagesNotifiedOnCreation?: Array<string> = undefined;
|
|
3150
|
+
|
|
2885
3151
|
@ColumnAccessControl({
|
|
2886
3152
|
create: [
|
|
2887
3153
|
Permission.ProjectOwner,
|
|
@@ -68,6 +68,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
|
68
68
|
@Entity({
|
|
69
69
|
name: "IncidentCustomField",
|
|
70
70
|
})
|
|
71
|
+
@Index(["projectId", "variableKey"], { unique: true })
|
|
71
72
|
export default class IncidentCustomField extends BaseModel {
|
|
72
73
|
@ColumnAccessControl({
|
|
73
74
|
create: [
|
|
@@ -360,6 +361,207 @@ export default class IncidentCustomField extends BaseModel {
|
|
|
360
361
|
})
|
|
361
362
|
public mapFromCustomFieldName?: string = undefined;
|
|
362
363
|
|
|
364
|
+
/*
|
|
365
|
+
* The four columns below are incident-only on purpose: the other eight
|
|
366
|
+
* custom field definition tables do not have them, and the shared settings
|
|
367
|
+
* page and Custom Fields card offer them only for a definition model that
|
|
368
|
+
* has the column (DatabaseBaseModel.hasColumn).
|
|
369
|
+
*/
|
|
370
|
+
|
|
371
|
+
@ColumnAccessControl({
|
|
372
|
+
create: [
|
|
373
|
+
Permission.ProjectOwner,
|
|
374
|
+
Permission.ProjectAdmin,
|
|
375
|
+
Permission.CreateIncidentCustomField,
|
|
376
|
+
],
|
|
377
|
+
read: [
|
|
378
|
+
Permission.ProjectOwner,
|
|
379
|
+
Permission.ProjectAdmin,
|
|
380
|
+
Permission.ProjectMember,
|
|
381
|
+
Permission.Viewer,
|
|
382
|
+
Permission.IncidentAdmin,
|
|
383
|
+
Permission.IncidentMember,
|
|
384
|
+
Permission.IncidentViewer,
|
|
385
|
+
Permission.ReadIncidentCustomField,
|
|
386
|
+
],
|
|
387
|
+
update: [
|
|
388
|
+
Permission.ProjectOwner,
|
|
389
|
+
Permission.ProjectAdmin,
|
|
390
|
+
Permission.EditIncidentCustomField,
|
|
391
|
+
],
|
|
392
|
+
})
|
|
393
|
+
@TableColumn({
|
|
394
|
+
isDefaultValueColumn: true,
|
|
395
|
+
type: TableColumnType.Boolean,
|
|
396
|
+
title: "Required on Create",
|
|
397
|
+
description:
|
|
398
|
+
"When on, an incident declared from the dashboard cannot be created until this field is filled in (a Boolean field must be ticked). It applies only to fields shown on create. Incidents created by monitors, the API, Slack, Microsoft Teams or AI can leave it empty, and it stays optional when an incident is edited later.",
|
|
399
|
+
defaultValue: false,
|
|
400
|
+
example: false,
|
|
401
|
+
})
|
|
402
|
+
@Column({
|
|
403
|
+
type: ColumnType.Boolean,
|
|
404
|
+
nullable: false,
|
|
405
|
+
default: false,
|
|
406
|
+
})
|
|
407
|
+
public isRequiredOnCreate?: boolean = undefined;
|
|
408
|
+
|
|
409
|
+
@ColumnAccessControl({
|
|
410
|
+
create: [
|
|
411
|
+
Permission.ProjectOwner,
|
|
412
|
+
Permission.ProjectAdmin,
|
|
413
|
+
Permission.CreateIncidentCustomField,
|
|
414
|
+
],
|
|
415
|
+
read: [
|
|
416
|
+
Permission.ProjectOwner,
|
|
417
|
+
Permission.ProjectAdmin,
|
|
418
|
+
Permission.ProjectMember,
|
|
419
|
+
Permission.Viewer,
|
|
420
|
+
Permission.IncidentAdmin,
|
|
421
|
+
Permission.IncidentMember,
|
|
422
|
+
Permission.IncidentViewer,
|
|
423
|
+
Permission.ReadIncidentCustomField,
|
|
424
|
+
],
|
|
425
|
+
update: [
|
|
426
|
+
Permission.ProjectOwner,
|
|
427
|
+
Permission.ProjectAdmin,
|
|
428
|
+
Permission.EditIncidentCustomField,
|
|
429
|
+
],
|
|
430
|
+
})
|
|
431
|
+
@TableColumn({
|
|
432
|
+
required: false,
|
|
433
|
+
type: TableColumnType.Number,
|
|
434
|
+
title: "Order",
|
|
435
|
+
description:
|
|
436
|
+
"Where this field appears among the incident's custom fields, lowest first. Fields with no order come after the ones that have one.",
|
|
437
|
+
example: 1,
|
|
438
|
+
})
|
|
439
|
+
@Column({
|
|
440
|
+
type: ColumnType.Number,
|
|
441
|
+
nullable: true,
|
|
442
|
+
})
|
|
443
|
+
public sortOrder?: number = undefined;
|
|
444
|
+
|
|
445
|
+
@ColumnAccessControl({
|
|
446
|
+
create: [
|
|
447
|
+
Permission.ProjectOwner,
|
|
448
|
+
Permission.ProjectAdmin,
|
|
449
|
+
Permission.CreateIncidentCustomField,
|
|
450
|
+
],
|
|
451
|
+
read: [
|
|
452
|
+
Permission.ProjectOwner,
|
|
453
|
+
Permission.ProjectAdmin,
|
|
454
|
+
Permission.ProjectMember,
|
|
455
|
+
Permission.Viewer,
|
|
456
|
+
Permission.IncidentAdmin,
|
|
457
|
+
Permission.IncidentMember,
|
|
458
|
+
Permission.IncidentViewer,
|
|
459
|
+
Permission.ReadIncidentCustomField,
|
|
460
|
+
],
|
|
461
|
+
update: [
|
|
462
|
+
Permission.ProjectOwner,
|
|
463
|
+
Permission.ProjectAdmin,
|
|
464
|
+
Permission.EditIncidentCustomField,
|
|
465
|
+
],
|
|
466
|
+
})
|
|
467
|
+
@TableColumn({
|
|
468
|
+
isDefaultValueColumn: true,
|
|
469
|
+
type: TableColumnType.Boolean,
|
|
470
|
+
title: "Show on Create",
|
|
471
|
+
description:
|
|
472
|
+
"When on, this field is asked for in a Details step when an incident is declared from the dashboard, and incident templates can fill it in.",
|
|
473
|
+
defaultValue: false,
|
|
474
|
+
example: true,
|
|
475
|
+
})
|
|
476
|
+
@Column({
|
|
477
|
+
type: ColumnType.Boolean,
|
|
478
|
+
nullable: false,
|
|
479
|
+
default: false,
|
|
480
|
+
})
|
|
481
|
+
public showOnCreate?: boolean = undefined;
|
|
482
|
+
|
|
483
|
+
@ColumnAccessControl({
|
|
484
|
+
create: [
|
|
485
|
+
Permission.ProjectOwner,
|
|
486
|
+
Permission.ProjectAdmin,
|
|
487
|
+
Permission.CreateIncidentCustomField,
|
|
488
|
+
],
|
|
489
|
+
read: [
|
|
490
|
+
Permission.ProjectOwner,
|
|
491
|
+
Permission.ProjectAdmin,
|
|
492
|
+
Permission.ProjectMember,
|
|
493
|
+
Permission.Viewer,
|
|
494
|
+
Permission.IncidentAdmin,
|
|
495
|
+
Permission.IncidentMember,
|
|
496
|
+
Permission.IncidentViewer,
|
|
497
|
+
Permission.ReadIncidentCustomField,
|
|
498
|
+
],
|
|
499
|
+
update: [
|
|
500
|
+
Permission.ProjectOwner,
|
|
501
|
+
Permission.ProjectAdmin,
|
|
502
|
+
Permission.EditIncidentCustomField,
|
|
503
|
+
],
|
|
504
|
+
})
|
|
505
|
+
@TableColumn({
|
|
506
|
+
isDefaultValueColumn: true,
|
|
507
|
+
type: TableColumnType.Boolean,
|
|
508
|
+
title: "Include in Subscriber Notifications",
|
|
509
|
+
description:
|
|
510
|
+
"When on, this field and its value appear in the messages status page subscribers get about an incident: the default email, Slack and Microsoft Teams messages, and webhooks (under customFields, by the field's template variable key). The default SMS is kept short and leaves it out. Subscribers are usually people outside your team, so turn this on only for fields that are safe to share with them.",
|
|
511
|
+
defaultValue: false,
|
|
512
|
+
example: false,
|
|
513
|
+
})
|
|
514
|
+
@Column({
|
|
515
|
+
type: ColumnType.Boolean,
|
|
516
|
+
nullable: false,
|
|
517
|
+
default: false,
|
|
518
|
+
})
|
|
519
|
+
public includeInSubscriberNotifications?: boolean = undefined;
|
|
520
|
+
|
|
521
|
+
/*
|
|
522
|
+
* The key templates reach this field by, {{customFields.<variableKey>}}.
|
|
523
|
+
* Made from the name when the field is created
|
|
524
|
+
* (IncidentCustomFieldService.onBeforeCreate, with
|
|
525
|
+
* generateCustomFieldVariableKey) and never changed afterwards, so renaming
|
|
526
|
+
* a field does not break the templates that use it.
|
|
527
|
+
*
|
|
528
|
+
* Computed with an empty create and update access control: whatever a
|
|
529
|
+
* client sends for it is replaced on create and dropped on update. Unique
|
|
530
|
+
* per project, which the index below holds even against two fields created
|
|
531
|
+
* at the same moment. Nullable only so the column could be added to a table
|
|
532
|
+
* that already had rows; the migration that added it gave every one a key.
|
|
533
|
+
*/
|
|
534
|
+
@ColumnAccessControl({
|
|
535
|
+
create: [],
|
|
536
|
+
read: [
|
|
537
|
+
Permission.ProjectOwner,
|
|
538
|
+
Permission.ProjectAdmin,
|
|
539
|
+
Permission.ProjectMember,
|
|
540
|
+
Permission.Viewer,
|
|
541
|
+
Permission.IncidentAdmin,
|
|
542
|
+
Permission.IncidentMember,
|
|
543
|
+
Permission.IncidentViewer,
|
|
544
|
+
Permission.ReadIncidentCustomField,
|
|
545
|
+
],
|
|
546
|
+
update: [],
|
|
547
|
+
})
|
|
548
|
+
@TableColumn({
|
|
549
|
+
computed: true,
|
|
550
|
+
required: false,
|
|
551
|
+
type: TableColumnType.ShortText,
|
|
552
|
+
canReadOnRelationQuery: true,
|
|
553
|
+
title: "Template Variable Key",
|
|
554
|
+
description:
|
|
555
|
+
"The key this field is reached by in templates, as {{customFields.<key>}}. Made from the field's name when it is created - lowercase letters, digits and underscores, with _2, _3 and so on added when another field already has it - and never changed afterwards, so renaming the field does not break templates that use it.",
|
|
556
|
+
example: "expected_resolution",
|
|
557
|
+
})
|
|
558
|
+
@Column({
|
|
559
|
+
nullable: true,
|
|
560
|
+
type: ColumnType.ShortText,
|
|
561
|
+
length: ColumnLength.ShortText,
|
|
562
|
+
})
|
|
563
|
+
public variableKey?: string = undefined;
|
|
564
|
+
|
|
363
565
|
@ColumnAccessControl({
|
|
364
566
|
create: [
|
|
365
567
|
Permission.ProjectOwner,
|
|
@@ -1693,6 +1693,36 @@ export default class IncidentEpisode extends BaseModel {
|
|
|
1693
1693
|
})
|
|
1694
1694
|
public subscriberNotificationStatusMessage?: string = undefined;
|
|
1695
1695
|
|
|
1696
|
+
/*
|
|
1697
|
+
* When a subscriber job last claimed the 'episode created' notification
|
|
1698
|
+
* (SubscriberNotificationClaim), which the sweeper
|
|
1699
|
+
* (StatusPageSubscriber:TimeoutStuckNotifications) times a notification
|
|
1700
|
+
* still In progress from. Not updatedAt: other code writes this row all
|
|
1701
|
+
* the time while it is open - incidents joining it, its severity and
|
|
1702
|
+
* state, edits - so updatedAt could keep an interrupted send from ever
|
|
1703
|
+
* looking stuck, and Retry waits for it to settle. Written by the claim
|
|
1704
|
+
* only; nobody reads or writes it through the API.
|
|
1705
|
+
*/
|
|
1706
|
+
@ColumnAccessControl({
|
|
1707
|
+
create: [],
|
|
1708
|
+
read: [],
|
|
1709
|
+
update: [],
|
|
1710
|
+
})
|
|
1711
|
+
@TableColumn({
|
|
1712
|
+
computed: true,
|
|
1713
|
+
hideColumnInDocumentation: true,
|
|
1714
|
+
required: false,
|
|
1715
|
+
type: TableColumnType.Date,
|
|
1716
|
+
title: "Subscriber Notification Claimed At on Episode Created",
|
|
1717
|
+
description:
|
|
1718
|
+
"When a subscriber notification job last started sending the notification that this episode was created.",
|
|
1719
|
+
})
|
|
1720
|
+
@Column({
|
|
1721
|
+
type: ColumnType.Date,
|
|
1722
|
+
nullable: true,
|
|
1723
|
+
})
|
|
1724
|
+
public subscriberNotificationClaimedAtOnEpisodeCreated?: Date = undefined;
|
|
1725
|
+
|
|
1696
1726
|
@ColumnAccessControl({
|
|
1697
1727
|
create: [
|
|
1698
1728
|
Permission.ProjectOwner,
|
|
@@ -10,6 +10,7 @@ import MonitorStatus from "./MonitorStatus";
|
|
|
10
10
|
import OnCallDutyPolicy from "./OnCallDutyPolicy";
|
|
11
11
|
import Project from "./Project";
|
|
12
12
|
import Service from "./Service";
|
|
13
|
+
import StatusPage from "./StatusPage";
|
|
13
14
|
import User from "./User";
|
|
14
15
|
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
15
16
|
import Route from "../../Types/API/Route";
|
|
@@ -900,6 +901,129 @@ export default class IncidentTemplate extends BaseModel {
|
|
|
900
901
|
})
|
|
901
902
|
public onCallDutyPolicies?: Array<OnCallDutyPolicy> = undefined; // on-call duty policies affected by this incident template.
|
|
902
903
|
|
|
904
|
+
/*
|
|
905
|
+
* The status pages an incident declared from this template is limited to
|
|
906
|
+
* (see Incident.statusPages). A 'Region East outage' template can carry the
|
|
907
|
+
* East site pages, so declaring from it scopes the incident in one step.
|
|
908
|
+
*/
|
|
909
|
+
@ColumnAccessControl({
|
|
910
|
+
create: [
|
|
911
|
+
Permission.ProjectOwner,
|
|
912
|
+
Permission.ProjectAdmin,
|
|
913
|
+
Permission.ProjectMember,
|
|
914
|
+
Permission.IncidentAdmin,
|
|
915
|
+
Permission.IncidentMember,
|
|
916
|
+
Permission.CreateIncidentTemplate,
|
|
917
|
+
],
|
|
918
|
+
read: [
|
|
919
|
+
Permission.ProjectOwner,
|
|
920
|
+
Permission.ProjectAdmin,
|
|
921
|
+
Permission.ProjectMember,
|
|
922
|
+
Permission.Viewer,
|
|
923
|
+
Permission.IncidentAdmin,
|
|
924
|
+
Permission.IncidentMember,
|
|
925
|
+
Permission.IncidentViewer,
|
|
926
|
+
Permission.ReadIncidentTemplate,
|
|
927
|
+
],
|
|
928
|
+
update: [
|
|
929
|
+
Permission.ProjectOwner,
|
|
930
|
+
Permission.ProjectAdmin,
|
|
931
|
+
Permission.ProjectMember,
|
|
932
|
+
Permission.IncidentAdmin,
|
|
933
|
+
Permission.IncidentMember,
|
|
934
|
+
Permission.EditIncidentTemplate,
|
|
935
|
+
],
|
|
936
|
+
})
|
|
937
|
+
@TableColumn({
|
|
938
|
+
required: false,
|
|
939
|
+
type: TableColumnType.EntityArray,
|
|
940
|
+
modelType: StatusPage,
|
|
941
|
+
title: "Status Pages",
|
|
942
|
+
description:
|
|
943
|
+
"Limit incidents declared from this template to these status pages. Leave empty to reach every status page that lists the incident's monitors.",
|
|
944
|
+
})
|
|
945
|
+
@ManyToMany(
|
|
946
|
+
() => {
|
|
947
|
+
return StatusPage;
|
|
948
|
+
},
|
|
949
|
+
{ eager: false },
|
|
950
|
+
)
|
|
951
|
+
@JoinTable({
|
|
952
|
+
name: "IncidentTemplateStatusPage",
|
|
953
|
+
inverseJoinColumn: {
|
|
954
|
+
name: "statusPageId",
|
|
955
|
+
referencedColumnName: "_id",
|
|
956
|
+
},
|
|
957
|
+
joinColumn: {
|
|
958
|
+
name: "incidentTemplateId",
|
|
959
|
+
referencedColumnName: "_id",
|
|
960
|
+
},
|
|
961
|
+
})
|
|
962
|
+
public statusPages?: Array<StatusPage> = undefined;
|
|
963
|
+
|
|
964
|
+
/*
|
|
965
|
+
* Whether this template limits the incidents declared from it to status
|
|
966
|
+
* pages - kept apart from statusPages for the same reason as
|
|
967
|
+
* Incident.isScopedToStatusPages. Deleting a status page cascades its row
|
|
968
|
+
* in IncidentTemplateStatusPage away, and a template whose every page was
|
|
969
|
+
* deleted would otherwise look unscoped, so its incidents would reach
|
|
970
|
+
* every status page that lists their monitors - exactly the audience the
|
|
971
|
+
* template was set up to avoid. With the flag, IncidentService declares
|
|
972
|
+
* such an incident scoped to nothing (hidden from every status page), and
|
|
973
|
+
* the dashboard warns about the template.
|
|
974
|
+
*
|
|
975
|
+
* IncidentTemplateService derives it from writes to statusPages and ignores
|
|
976
|
+
* any value a client sends; it is never recomputed when join rows
|
|
977
|
+
* disappear. Computed, so a client cannot set it on create; its update
|
|
978
|
+
* access control matches statusPages because the service writes it into
|
|
979
|
+
* the caller's own update.
|
|
980
|
+
*/
|
|
981
|
+
@ColumnAccessControl({
|
|
982
|
+
create: [
|
|
983
|
+
Permission.ProjectOwner,
|
|
984
|
+
Permission.ProjectAdmin,
|
|
985
|
+
Permission.ProjectMember,
|
|
986
|
+
Permission.IncidentAdmin,
|
|
987
|
+
Permission.IncidentMember,
|
|
988
|
+
Permission.CreateIncidentTemplate,
|
|
989
|
+
],
|
|
990
|
+
read: [
|
|
991
|
+
Permission.ProjectOwner,
|
|
992
|
+
Permission.ProjectAdmin,
|
|
993
|
+
Permission.ProjectMember,
|
|
994
|
+
Permission.Viewer,
|
|
995
|
+
Permission.IncidentAdmin,
|
|
996
|
+
Permission.IncidentMember,
|
|
997
|
+
Permission.IncidentViewer,
|
|
998
|
+
Permission.ReadIncidentTemplate,
|
|
999
|
+
],
|
|
1000
|
+
update: [
|
|
1001
|
+
Permission.ProjectOwner,
|
|
1002
|
+
Permission.ProjectAdmin,
|
|
1003
|
+
Permission.ProjectMember,
|
|
1004
|
+
Permission.IncidentAdmin,
|
|
1005
|
+
Permission.IncidentMember,
|
|
1006
|
+
Permission.EditIncidentTemplate,
|
|
1007
|
+
],
|
|
1008
|
+
})
|
|
1009
|
+
@TableColumn({
|
|
1010
|
+
isDefaultValueColumn: true,
|
|
1011
|
+
computed: true,
|
|
1012
|
+
hideColumnInDocumentation: true,
|
|
1013
|
+
required: true,
|
|
1014
|
+
type: TableColumnType.Boolean,
|
|
1015
|
+
title: "Is Scoped To Status Pages",
|
|
1016
|
+
description:
|
|
1017
|
+
"Whether incidents declared from this template are limited to the status pages in Status Pages. Derived from Status Pages; any value sent for it is ignored.",
|
|
1018
|
+
defaultValue: false,
|
|
1019
|
+
})
|
|
1020
|
+
@Column({
|
|
1021
|
+
type: ColumnType.Boolean,
|
|
1022
|
+
nullable: false,
|
|
1023
|
+
default: false,
|
|
1024
|
+
})
|
|
1025
|
+
public isScopedToStatusPages?: boolean = undefined;
|
|
1026
|
+
|
|
903
1027
|
@ColumnAccessControl({
|
|
904
1028
|
create: [
|
|
905
1029
|
Permission.ProjectOwner,
|
|
@@ -1252,7 +1376,8 @@ export default class IncidentTemplate extends BaseModel {
|
|
|
1252
1376
|
required: false,
|
|
1253
1377
|
type: TableColumnType.JSON,
|
|
1254
1378
|
title: "Custom Fields",
|
|
1255
|
-
description:
|
|
1379
|
+
description:
|
|
1380
|
+
"The custom field values incidents declared from this template start with, keyed by each incident custom field's name. They are merged one field at a time under the values the request or the Declare Incident form supplies.",
|
|
1256
1381
|
example: {
|
|
1257
1382
|
priority: "high",
|
|
1258
1383
|
category: "infrastructure",
|