@oneuptime/common 11.7.2 → 11.7.4
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/KubernetesCostAllocation.ts +103 -0
- package/Models/DatabaseModels/AlertEpisodeStateTimeline.ts +1 -0
- package/Models/DatabaseModels/AlertStateTimeline.ts +1 -0
- package/Models/DatabaseModels/IncidentEpisodeStateTimeline.ts +1 -0
- package/Models/DatabaseModels/IncidentStateTimeline.ts +1 -0
- package/Models/DatabaseModels/Index.ts +5 -0
- package/Models/DatabaseModels/LogDropFilter.ts +89 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +13 -3
- package/Models/DatabaseModels/RecommendationDismissal.ts +463 -0
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.ts +1 -0
- package/Models/DatabaseModels/StatusPageGroup.ts +95 -0
- package/Models/DatabaseModels/TableView.ts +40 -0
- package/Models/DatabaseModels/TraceDropFilter.ts +89 -0
- package/Models/DatabaseModels/WorkflowVariable.ts +5 -1
- package/Server/API/AlertAPI.ts +32 -17
- package/Server/API/BaseAPI.ts +31 -2
- package/Server/API/BaseAnalyticsAPI.ts +36 -2
- package/Server/API/CommonAPI.ts +57 -0
- package/Server/API/IncidentAPI.ts +60 -33
- package/Server/API/IncidentEpisodeAPI.ts +31 -16
- package/Server/API/MonitorAPI.ts +30 -0
- package/Server/API/MonitorTemplateAPI.ts +8 -0
- package/Server/API/ProbeAPI.ts +196 -15
- package/Server/API/ProjectAPI.ts +79 -1
- package/Server/API/ScheduledMaintenanceAPI.ts +33 -18
- package/Server/API/StatusPageAPI.ts +74 -37
- package/Server/API/WorkspaceNotificationRuleAPI.ts +34 -4
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785241000000-AddColumnsToTableView.ts +13 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785320000000-RepairCrossProjectIncidentReferences.ts +527 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785329453269-AddParentGroupToStatusPageGroup.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785397674289-AddRecommendationDismissalTable.ts +55 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1785405581596-AddDroppedCountersToDropFilters.ts +53 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +10 -0
- package/Server/Services/AlertEpisodeService.ts +47 -0
- package/Server/Services/AlertService.ts +125 -0
- package/Server/Services/BillingService.ts +98 -0
- package/Server/Services/DatabaseService.ts +184 -20
- package/Server/Services/IncidentEpisodeService.ts +47 -0
- package/Server/Services/IncidentService.ts +123 -0
- package/Server/Services/IncidentTemplateService.ts +123 -1
- package/Server/Services/Index.ts +2 -0
- package/Server/Services/LogDropFilterService.ts +133 -0
- package/Server/Services/MonitorProbeService.ts +94 -4
- package/Server/Services/MonitorService.ts +48 -43
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +70 -0
- package/Server/Services/ProbeService.ts +66 -0
- package/Server/Services/ProjectService.ts +131 -7
- package/Server/Services/RecommendationDismissalService.ts +52 -0
- package/Server/Services/RunbookAgentJobService.ts +68 -7
- package/Server/Services/ScheduledMaintenanceService.ts +103 -0
- package/Server/Services/ScheduledMaintenanceTemplateService.ts +90 -0
- package/Server/Services/StatusPageGroupService.ts +186 -0
- package/Server/Services/TraceDropFilterService.ts +133 -0
- package/Server/Types/Workflow/Components/API/Delete.ts +12 -0
- package/Server/Types/Workflow/Components/API/Get.ts +12 -0
- package/Server/Types/Workflow/Components/API/Patch.ts +12 -0
- package/Server/Types/Workflow/Components/API/Post.ts +12 -0
- package/Server/Types/Workflow/Components/API/Put.ts +13 -0
- package/Server/Utils/Database/ProjectScopedReferenceValidator.ts +212 -0
- package/Server/Utils/DropFilterValidation.ts +127 -0
- package/Server/Utils/Errors.ts +5 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +28 -1
- package/Server/Utils/Monitor/MonitorIncident.ts +31 -2
- package/Server/Utils/Telemetry/AppMetrics.ts +31 -0
- package/Tests/Models/AnalyticsModels/KubernetesCostAllocation.test.ts +16 -0
- package/Tests/Models/DatabaseModels/MonitorProbeColumnAccessControl.test.ts +196 -0
- package/Tests/Models/RecommendationDismissalModel.test.ts +269 -0
- package/Tests/Server/API/BaseAPIUpdatePayloadValidation.test.ts +320 -0
- package/Tests/Server/API/BaseAnalyticsAPIUpdatePayloadValidation.test.ts +293 -0
- package/Tests/Server/API/CommonAPIAuthGuard.test.ts +164 -0
- package/Tests/Server/API/ProbeAPI.test.ts +422 -53
- package/Tests/Server/API/ProjectAPI.test.ts +180 -0
- package/Tests/Server/API/ProjectAPIExtendTrialBillingDisabled.test.ts +138 -0
- package/Tests/Server/API/ProjectScopedCustomRouteAuth.test.ts +458 -0
- package/Tests/Server/Infrastructure/ContainerBootConfiguration.test.ts +359 -0
- package/Tests/Server/Infrastructure/ProcessSignalDelivery.test.ts +427 -0
- package/Tests/Server/Services/BillingServiceExtendTrial.test.ts +439 -0
- package/Tests/Server/Services/CrossProjectReferenceWriteGuard.test.ts +810 -0
- package/Tests/Server/Services/DatabaseServiceAtomicAddToColumns.test.ts +269 -0
- package/Tests/Server/Services/DatabaseServiceEmptyUpdate.test.ts +277 -0
- package/Tests/Server/Services/DatabaseServiceSortColumnSelect.test.ts +201 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +81 -23
- package/Tests/Server/Services/DropFilterSaveValidation.test.ts +398 -0
- package/Tests/Server/Services/MonitorProbeDeleteHooks.test.ts +280 -0
- package/Tests/Server/Services/MonitorProbeServiceProbeTenancy.test.ts +304 -0
- package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +262 -0
- package/Tests/Server/Services/ProjectServiceExtendTrial.test.ts +614 -0
- package/Tests/Server/Services/RecommendationDismissalService.test.ts +306 -0
- package/Tests/Server/Services/RepairCrossProjectIncidentReferencesMigration.test.ts +528 -0
- package/Tests/Server/Services/StatusPageGroupNesting.test.ts +395 -0
- package/Tests/Server/TestingUtils/Services/BillingServiceHelper.ts +26 -21
- package/Tests/Server/Types/Database/Permissions/WorkflowVariableColumnPermission.test.ts +227 -0
- package/Tests/Server/Types/Workflow/Components/ApiComponentErrorPort.test.ts +285 -0
- package/Tests/Server/Utils/Database/ProjectScopedReferenceValidator.test.ts +463 -0
- package/Tests/Server/Utils/DropFilterValidation.test.ts +269 -0
- package/Tests/Server/Utils/Telemetry/SpanUtil.test.ts +94 -0
- package/Tests/Types/DateUserTimezone.test.ts +52 -0
- package/Tests/Types/JSONFunctions.test.ts +103 -1
- package/Tests/Types/Monitor/KubernetesAlertTemplates.test.ts +177 -9
- package/Tests/Types/Monitor/MonitorStepDnsMonitor.test.ts +105 -0
- package/Tests/Types/Monitor/MonitorStepDnssecMonitor.test.ts +131 -0
- package/Tests/Types/Monitor/MonitorStepDomainMonitor.test.ts +60 -0
- package/Tests/Types/Monitor/MonitorStepExternalStatusPageMonitor.test.ts +82 -0
- package/Tests/Types/Monitor/MonitorStepInfrastructureMonitors.test.ts +268 -0
- package/Tests/Types/Monitor/MonitorStepMetricMonitor.test.ts +386 -0
- package/Tests/Types/Monitor/MonitorStepProfileMonitor.test.ts +185 -0
- package/Tests/Types/Monitor/MonitorStepSnmpMonitor.test.ts +156 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCatalog.test.ts +371 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCoverage.test.ts +901 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationNotificationMode.test.ts +607 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.test.ts +754 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationUtil.test.ts +960 -0
- package/Tests/Types/RollingTime/RollingTimeUtil.test.ts +186 -0
- package/Tests/Types/Runbook/RunbookStepTimeout.test.ts +410 -0
- package/Tests/Types/Telemetry/DropFilterSampling.test.ts +241 -0
- package/Tests/Types/Workspace/NotificationRuleConditionUtil.test.ts +353 -0
- package/Tests/Types/Workspace/NotificationRuleUtil.test.ts +566 -0
- package/Tests/UI/Components/CodeEditor.test.tsx +174 -0
- package/Tests/UI/Components/ErrorBoundary.test.tsx +555 -24
- package/Tests/UI/Components/InfoCard.test.tsx +358 -0
- package/Tests/UI/Components/LogTimeRangePicker.test.tsx +138 -0
- package/Tests/UI/Components/Modal.test.tsx +43 -5
- package/Tests/UI/Components/ModelTable/BaseModelTableColumnCustomization.test.tsx +679 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableSearchLabels.test.tsx +397 -0
- package/Tests/UI/Components/ModelTable/ColumnCustomizationModal.test.tsx +999 -0
- package/Tests/UI/Components/ModelTable/ColumnPreference.test.ts +1678 -0
- package/Tests/UI/Components/ModelTable/CustomFieldColumns.test.tsx +1094 -0
- package/Tests/UI/Components/Runbook/StepTimeoutInput.test.tsx +386 -0
- package/Tests/UI/Components/StatusPage/ResourceGroupSection.test.tsx +671 -0
- package/Tests/UI/Components/TelemetryTimeRangePicker.test.tsx +404 -0
- package/Tests/UI/Utils/DropdownAlignment.test.ts +306 -0
- package/Tests/UI/Utils/TableFilterUrlState.test.ts +292 -0
- package/Tests/Utils/Monitor/MonitorSummaryProbeUtil.test.ts +263 -0
- package/Tests/Utils/NetworkDiscovery/ScanTargetUtil.test.ts +583 -0
- package/Tests/Utils/StatusPage/GroupNestingLayout.test.ts +1072 -0
- package/Tests/Utils/StatusPage/GroupTree.test.ts +583 -0
- package/Tests/Utils/StatusPage/ResourceUptime.test.ts +411 -0
- package/Tests/Utils/UserPreferences.test.ts +563 -0
- package/Types/Date.ts +15 -6
- package/Types/JSONFunctions.ts +7 -2
- package/Types/Kubernetes/KubernetesCostIngest.ts +37 -1
- package/Types/Monitor/KubernetesAlertTemplates.ts +205 -0
- package/Types/Monitor/MonitorStep.ts +10 -1
- package/Types/Monitor/MonitorStepMetricMonitor.ts +46 -1
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.ts +413 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.ts +168 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationTypes.ts +175 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationUtil.ts +743 -0
- package/Types/Permission.ts +45 -0
- package/Types/Recommendation/RecommendationType.ts +20 -0
- package/Types/Runbook/RunbookExecutionDeadline.ts +129 -0
- package/Types/Runbook/RunbookStepTimeout.ts +202 -0
- package/Types/Telemetry/DropFilterSampling.ts +92 -0
- package/UI/Components/AI/GenerateFromAIModal.tsx +0 -2
- package/UI/Components/Accordion/Accordion.tsx +10 -2
- package/UI/Components/BulkUpdate/BulkLabelActions.tsx +0 -1
- package/UI/Components/CodeEditor/CodeEditor.tsx +34 -20
- package/UI/Components/Date/RangeStartAndEndDateView.tsx +0 -1
- package/UI/Components/EditionLabel/EditionLabel.tsx +1 -27
- package/UI/Components/Error/PageError.tsx +0 -4
- package/UI/Components/ErrorBoundary.tsx +252 -15
- package/UI/Components/InfoCard/InfoCard.tsx +58 -1
- package/UI/Components/LogsViewer/components/LogTimeRangePicker.tsx +34 -1
- package/UI/Components/MasterPage/MasterPage.tsx +65 -0
- package/UI/Components/Modal/Modal.tsx +16 -60
- package/UI/Components/ModelFormModal/ModelFormModal.tsx +0 -8
- package/UI/Components/ModelTable/BaseModelTable.tsx +503 -71
- package/UI/Components/ModelTable/Column.ts +17 -0
- package/UI/Components/ModelTable/ColumnCustomizationModal.tsx +523 -0
- package/UI/Components/ModelTable/ColumnPreference.ts +482 -0
- package/UI/Components/ModelTable/CustomFieldColumns.tsx +326 -0
- package/UI/Components/ModelTable/TableView.tsx +24 -2
- package/UI/Components/ModelTable/useCustomFieldColumns.ts +150 -0
- package/UI/Components/Runbook/StepTimeoutInput.tsx +173 -0
- package/UI/Components/SideMenu/SideMenu.tsx +24 -4
- package/UI/Components/StatusPage/ResourceGroupSection.tsx +231 -0
- package/UI/Components/Table/Table.tsx +14 -1
- package/UI/Components/Table/TableRow.tsx +180 -175
- package/UI/Components/Table/Types/Column.ts +2 -0
- package/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.tsx +34 -1
- package/UI/Utils/DropdownAlignment.ts +162 -0
- package/UI/Utils/TableFilterUrlState.ts +59 -20
- package/Utils/API.ts +106 -2
- package/Utils/Monitor/MonitorSummaryProbeUtil.ts +130 -0
- package/Utils/NetworkDiscovery/ScanTargetUtil.ts +434 -0
- package/Utils/StatusPage/GroupNestingLayout.ts +343 -0
- package/Utils/StatusPage/GroupTree.ts +307 -0
- package/Utils/StatusPage/ResourceUptime.ts +90 -17
- package/Utils/UserPreferences.ts +53 -0
- package/build/dist/Models/AnalyticsModels/KubernetesCostAllocation.js +86 -0
- package/build/dist/Models/AnalyticsModels/KubernetesCostAllocation.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentEpisodeStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/IncidentEpisodeStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LogDropFilter.js +91 -0
- package/build/dist/Models/DatabaseModels/LogDropFilter.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +14 -4
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RecommendationDismissal.js +484 -0
- package/build/dist/Models/DatabaseModels/RecommendationDismissal.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageGroup.js +94 -0
- package/build/dist/Models/DatabaseModels/StatusPageGroup.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TableView.js +40 -0
- package/build/dist/Models/DatabaseModels/TableView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TraceDropFilter.js +91 -0
- package/build/dist/Models/DatabaseModels/TraceDropFilter.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowVariable.js +5 -1
- package/build/dist/Models/DatabaseModels/WorkflowVariable.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +22 -13
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +22 -1
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAnalyticsAPI.js +24 -1
- package/build/dist/Server/API/BaseAnalyticsAPI.js.map +1 -1
- package/build/dist/Server/API/CommonAPI.js +42 -0
- package/build/dist/Server/API/CommonAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +43 -26
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +21 -12
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/MonitorAPI.js +23 -0
- package/build/dist/Server/API/MonitorAPI.js.map +1 -1
- package/build/dist/Server/API/MonitorTemplateAPI.js +4 -0
- package/build/dist/Server/API/MonitorTemplateAPI.js.map +1 -1
- package/build/dist/Server/API/ProbeAPI.js +131 -15
- package/build/dist/Server/API/ProbeAPI.js.map +1 -1
- package/build/dist/Server/API/ProjectAPI.js +62 -3
- package/build/dist/Server/API/ProjectAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +23 -14
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +61 -33
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/WorkspaceNotificationRuleAPI.js +26 -2
- package/build/dist/Server/API/WorkspaceNotificationRuleAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785241000000-AddColumnsToTableView.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785241000000-AddColumnsToTableView.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785320000000-RepairCrossProjectIncidentReferences.js +397 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785320000000-RepairCrossProjectIncidentReferences.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785329453269-AddParentGroupToStatusPageGroup.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785329453269-AddParentGroupToStatusPageGroup.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785397674289-AddRecommendationDismissalTable.js +30 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785397674289-AddRecommendationDismissalTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785405581596-AddDroppedCountersToDropFilters.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1785405581596-AddDroppedCountersToDropFilters.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +10 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeService.js +39 -0
- package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +95 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/BillingService.js +71 -0
- package/build/dist/Server/Services/BillingService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +140 -17
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeService.js +39 -0
- package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +100 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentTemplateService.js +97 -0
- package/build/dist/Server/Services/IncidentTemplateService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +2 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LogDropFilterService.js +93 -0
- package/build/dist/Server/Services/LogDropFilterService.js.map +1 -1
- package/build/dist/Server/Services/MonitorProbeService.js +73 -5
- package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +34 -39
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +71 -0
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -1
- package/build/dist/Server/Services/ProbeService.js +64 -0
- package/build/dist/Server/Services/ProbeService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +103 -7
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/RecommendationDismissalService.js +50 -0
- package/build/dist/Server/Services/RecommendationDismissalService.js.map +1 -0
- package/build/dist/Server/Services/RunbookAgentJobService.js +63 -5
- package/build/dist/Server/Services/RunbookAgentJobService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +83 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceTemplateService.js +65 -0
- package/build/dist/Server/Services/ScheduledMaintenanceTemplateService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageGroupService.js +136 -0
- package/build/dist/Server/Services/StatusPageGroupService.js.map +1 -1
- package/build/dist/Server/Services/TraceDropFilterService.js +93 -0
- package/build/dist/Server/Services/TraceDropFilterService.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Delete.js +11 -0
- package/build/dist/Server/Types/Workflow/Components/API/Delete.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Get.js +11 -0
- package/build/dist/Server/Types/Workflow/Components/API/Get.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Patch.js +11 -0
- package/build/dist/Server/Types/Workflow/Components/API/Patch.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Post.js +11 -0
- package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Put.js +12 -0
- package/build/dist/Server/Types/Workflow/Components/API/Put.js.map +1 -1
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js +132 -0
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js.map +1 -0
- package/build/dist/Server/Utils/DropFilterValidation.js +80 -0
- package/build/dist/Server/Utils/DropFilterValidation.js.map +1 -0
- package/build/dist/Server/Utils/Errors.js +3 -0
- package/build/dist/Server/Utils/Errors.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +30 -12
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +38 -18
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/AppMetrics.js +26 -0
- package/build/dist/Server/Utils/Telemetry/AppMetrics.js.map +1 -1
- package/build/dist/Types/Date.js +14 -4
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/JSONFunctions.js +8 -3
- package/build/dist/Types/JSONFunctions.js.map +1 -1
- package/build/dist/Types/Kubernetes/KubernetesCostIngest.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +192 -0
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +6 -1
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepMetricMonitor.js +32 -1
- package/build/dist/Types/Monitor/MonitorStepMetricMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +294 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.js +110 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationSeverityMapper.js.map +1 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js +58 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js.map +1 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js +451 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationUtil.js.map +1 -0
- package/build/dist/Types/Permission.js +40 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Recommendation/RecommendationType.js +21 -0
- package/build/dist/Types/Recommendation/RecommendationType.js.map +1 -0
- package/build/dist/Types/Runbook/RunbookExecutionDeadline.js +93 -0
- package/build/dist/Types/Runbook/RunbookExecutionDeadline.js.map +1 -0
- package/build/dist/Types/Runbook/RunbookStepTimeout.js +142 -0
- package/build/dist/Types/Runbook/RunbookStepTimeout.js.map +1 -0
- package/build/dist/Types/Telemetry/DropFilterSampling.js +75 -0
- package/build/dist/Types/Telemetry/DropFilterSampling.js.map +1 -0
- package/build/dist/UI/Components/AI/GenerateFromAIModal.js +1 -2
- package/build/dist/UI/Components/AI/GenerateFromAIModal.js.map +1 -1
- package/build/dist/UI/Components/Accordion/Accordion.js +9 -2
- package/build/dist/UI/Components/Accordion/Accordion.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js +27 -14
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/dist/UI/Components/Date/RangeStartAndEndDateView.js +1 -1
- package/build/dist/UI/Components/Date/RangeStartAndEndDateView.js.map +1 -1
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js +2 -20
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
- package/build/dist/UI/Components/Error/PageError.js +1 -3
- package/build/dist/UI/Components/Error/PageError.js.map +1 -1
- package/build/dist/UI/Components/ErrorBoundary.js +145 -11
- package/build/dist/UI/Components/ErrorBoundary.js.map +1 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js +28 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js +13 -2
- package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js.map +1 -1
- package/build/dist/UI/Components/MasterPage/MasterPage.js +50 -1
- package/build/dist/UI/Components/MasterPage/MasterPage.js.map +1 -1
- package/build/dist/UI/Components/Modal/Modal.js +4 -32
- package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +308 -40
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/ColumnCustomizationModal.js +230 -0
- package/build/dist/UI/Components/ModelTable/ColumnCustomizationModal.js.map +1 -0
- package/build/dist/UI/Components/ModelTable/ColumnPreference.js +258 -0
- package/build/dist/UI/Components/ModelTable/ColumnPreference.js.map +1 -0
- package/build/dist/UI/Components/ModelTable/CustomFieldColumns.js +168 -0
- package/build/dist/UI/Components/ModelTable/CustomFieldColumns.js.map +1 -0
- package/build/dist/UI/Components/ModelTable/TableView.js +13 -2
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/useCustomFieldColumns.js +84 -0
- package/build/dist/UI/Components/ModelTable/useCustomFieldColumns.js.map +1 -0
- package/build/dist/UI/Components/Runbook/StepTimeoutInput.js +101 -0
- package/build/dist/UI/Components/Runbook/StepTimeoutInput.js.map +1 -0
- package/build/dist/UI/Components/SideMenu/SideMenu.js +15 -5
- package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
- package/build/dist/UI/Components/StatusPage/ResourceGroupSection.js +73 -0
- package/build/dist/UI/Components/StatusPage/ResourceGroupSection.js.map +1 -0
- package/build/dist/UI/Components/Table/Table.js +15 -2
- package/build/dist/UI/Components/Table/Table.js.map +1 -1
- package/build/dist/UI/Components/Table/TableRow.js +11 -6
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js +13 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js.map +1 -1
- package/build/dist/UI/Utils/DropdownAlignment.js +98 -0
- package/build/dist/UI/Utils/DropdownAlignment.js.map +1 -0
- package/build/dist/UI/Utils/TableFilterUrlState.js +48 -15
- package/build/dist/UI/Utils/TableFilterUrlState.js.map +1 -1
- package/build/dist/Utils/API.js +39 -2
- package/build/dist/Utils/API.js.map +1 -1
- package/build/dist/Utils/Monitor/MonitorSummaryProbeUtil.js +97 -0
- package/build/dist/Utils/Monitor/MonitorSummaryProbeUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ScanTargetUtil.js +330 -0
- package/build/dist/Utils/NetworkDiscovery/ScanTargetUtil.js.map +1 -0
- package/build/dist/Utils/StatusPage/GroupNestingLayout.js +280 -0
- package/build/dist/Utils/StatusPage/GroupNestingLayout.js.map +1 -0
- package/build/dist/Utils/StatusPage/GroupTree.js +214 -0
- package/build/dist/Utils/StatusPage/GroupTree.js.map +1 -0
- package/build/dist/Utils/StatusPage/ResourceUptime.js +60 -16
- package/build/dist/Utils/StatusPage/ResourceUptime.js.map +1 -1
- package/build/dist/Utils/UserPreferences.js +33 -0
- package/build/dist/Utils/UserPreferences.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import logger from "../../../Utils/Logger";
|
|
2
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Deleting a project fails with "This item cannot be deleted because Incident
|
|
6
|
+
* records still reference it."
|
|
7
|
+
*
|
|
8
|
+
* An Incident stores the id of its state, its severity and the monitor status
|
|
9
|
+
* it switches monitors to. Nothing validated that those ids belong to the
|
|
10
|
+
* incident's own project — they arrive from an API call, an incident template
|
|
11
|
+
* or a monitor criteria — so an id from a *second* project could be persisted.
|
|
12
|
+
*
|
|
13
|
+
* Deleting a Project cascades into its IncidentState / IncidentSeverity /
|
|
14
|
+
* MonitorStatus rows, but the Incident row owned by the other project still
|
|
15
|
+
* points at them and those FKs are ON DELETE NO ACTION, so Postgres raises
|
|
16
|
+
* 23503 and the delete is refused. Same-project references are fine: they are
|
|
17
|
+
* removed by the same cascading statement, so the NO ACTION check passes.
|
|
18
|
+
*
|
|
19
|
+
* RepairCrossProjectMonitorStatusReferences1785240000000 fixed this shape for
|
|
20
|
+
* MonitorStatusTimeline. This migration finishes the job for every remaining
|
|
21
|
+
* ON DELETE NO ACTION reference that a project delete can trip over — the
|
|
22
|
+
* incident, alert and scheduled maintenance families, including their episodes
|
|
23
|
+
* and templates.
|
|
24
|
+
*
|
|
25
|
+
* It does two things:
|
|
26
|
+
* 1. repoints every cross-project reference at the equivalent record in the
|
|
27
|
+
* row's own project (matched by name, then by the state's role flags,
|
|
28
|
+
* then by nearest order/priority). Where the column is nullable and
|
|
29
|
+
* nothing could be matched, the reference is cleared instead.
|
|
30
|
+
* 2. switches the five state-timeline FKs to ON DELETE CASCADE, which is
|
|
31
|
+
* what they should always have been — a state timeline row is
|
|
32
|
+
* meaningless once its state is gone.
|
|
33
|
+
*
|
|
34
|
+
* Step 1 runs before step 2 on purpose: repairing first means the timeline
|
|
35
|
+
* history stays attached to the surviving project instead of being swept up by
|
|
36
|
+
* the new cascade.
|
|
37
|
+
*
|
|
38
|
+
* The cascade has a second, deliberate effect: deleting a *custom* state now
|
|
39
|
+
* removes that state's timeline rows project-wide instead of failing with
|
|
40
|
+
* 23503, and does so below IncidentStateTimelineService.onBeforeDelete, so the
|
|
41
|
+
* surrounding rows' `endsAt` is not stitched over the gap. The default
|
|
42
|
+
* created / acknowledged / resolved states cannot be deleted (the dashboard
|
|
43
|
+
* blocks it) and a state any incident is currently in is still protected by
|
|
44
|
+
* Incident.currentIncidentStateId, which keeps NO ACTION.
|
|
45
|
+
*
|
|
46
|
+
* Not covered on purpose:
|
|
47
|
+
* - Monitor.currentMonitorStatusId keeps NO ACTION: deleting a status that
|
|
48
|
+
* monitors are currently in should stay blocked, and its cross-project
|
|
49
|
+
* rows were already repaired by the 1785240000000 migration. Note that
|
|
50
|
+
* repair was one-shot — MonitorService now validates the column on write
|
|
51
|
+
* so the state cannot come back.
|
|
52
|
+
* - A row whose own project has no record of that kind at all cannot be
|
|
53
|
+
* repointed and, for the not-null columns, is left as is. This is
|
|
54
|
+
* reachable: nothing stops a project from deleting its last incident
|
|
55
|
+
* severity while its only incident references another project's. Those
|
|
56
|
+
* rows are counted and logged at the end of up() rather than skipped
|
|
57
|
+
* silently, because the project stays undeletable until someone acts.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
export interface CrossProjectReference {
|
|
61
|
+
// The table holding the reference, e.g. "Incident".
|
|
62
|
+
table: string;
|
|
63
|
+
// The referencing column, e.g. "currentIncidentStateId".
|
|
64
|
+
column: string;
|
|
65
|
+
// The project-scoped table it points at, e.g. "IncidentState".
|
|
66
|
+
referencedTable: string;
|
|
67
|
+
/*
|
|
68
|
+
* Column ordering the referenced table within a project — "order" for states
|
|
69
|
+
* and severities, "priority" for monitor statuses. Used for the last-resort
|
|
70
|
+
* "nearest equivalent" match.
|
|
71
|
+
*/
|
|
72
|
+
orderColumn: string;
|
|
73
|
+
/*
|
|
74
|
+
* Boolean role columns that identify the same record across projects when
|
|
75
|
+
* the names differ (a renamed "Created" state is still the created state).
|
|
76
|
+
* Severities have none.
|
|
77
|
+
*/
|
|
78
|
+
roleColumns: Array<string>;
|
|
79
|
+
/*
|
|
80
|
+
* Nullable columns get their leftover cross-project references cleared when
|
|
81
|
+
* no equivalent exists in the row's own project. Not-null columns cannot.
|
|
82
|
+
*/
|
|
83
|
+
isNullable: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const INCIDENT_STATE_ROLES: Array<string> = [
|
|
87
|
+
"isCreatedState",
|
|
88
|
+
"isAcknowledgedState",
|
|
89
|
+
"isResolvedState",
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
const ALERT_STATE_ROLES: Array<string> = [
|
|
93
|
+
"isCreatedState",
|
|
94
|
+
"isAcknowledgedState",
|
|
95
|
+
"isResolvedState",
|
|
96
|
+
];
|
|
97
|
+
|
|
98
|
+
const SCHEDULED_MAINTENANCE_STATE_ROLES: Array<string> = [
|
|
99
|
+
"isScheduledState",
|
|
100
|
+
"isOngoingState",
|
|
101
|
+
"isEndedState",
|
|
102
|
+
"isResolvedState",
|
|
103
|
+
];
|
|
104
|
+
|
|
105
|
+
const MONITOR_STATUS_ROLES: Array<string> = [
|
|
106
|
+
"isOperationalState",
|
|
107
|
+
"isOfflineState",
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
/*
|
|
111
|
+
* Every ON DELETE NO ACTION reference to a project-scoped state / severity /
|
|
112
|
+
* status that a project delete can trip over, as of this migration.
|
|
113
|
+
*/
|
|
114
|
+
export const CROSS_PROJECT_REFERENCES: Array<CrossProjectReference> = [
|
|
115
|
+
{
|
|
116
|
+
table: "Incident",
|
|
117
|
+
column: "currentIncidentStateId",
|
|
118
|
+
referencedTable: "IncidentState",
|
|
119
|
+
orderColumn: "order",
|
|
120
|
+
roleColumns: INCIDENT_STATE_ROLES,
|
|
121
|
+
isNullable: false,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
table: "Incident",
|
|
125
|
+
column: "incidentSeverityId",
|
|
126
|
+
referencedTable: "IncidentSeverity",
|
|
127
|
+
orderColumn: "order",
|
|
128
|
+
roleColumns: [],
|
|
129
|
+
isNullable: false,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
table: "Incident",
|
|
133
|
+
column: "changeMonitorStatusToId",
|
|
134
|
+
referencedTable: "MonitorStatus",
|
|
135
|
+
orderColumn: "priority",
|
|
136
|
+
roleColumns: MONITOR_STATUS_ROLES,
|
|
137
|
+
isNullable: true,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
table: "IncidentEpisode",
|
|
141
|
+
column: "currentIncidentStateId",
|
|
142
|
+
referencedTable: "IncidentState",
|
|
143
|
+
orderColumn: "order",
|
|
144
|
+
roleColumns: INCIDENT_STATE_ROLES,
|
|
145
|
+
isNullable: false,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
table: "IncidentEpisode",
|
|
149
|
+
column: "incidentSeverityId",
|
|
150
|
+
referencedTable: "IncidentSeverity",
|
|
151
|
+
orderColumn: "order",
|
|
152
|
+
roleColumns: [],
|
|
153
|
+
isNullable: true,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
table: "IncidentStateTimeline",
|
|
157
|
+
column: "incidentStateId",
|
|
158
|
+
referencedTable: "IncidentState",
|
|
159
|
+
orderColumn: "order",
|
|
160
|
+
roleColumns: INCIDENT_STATE_ROLES,
|
|
161
|
+
isNullable: false,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
table: "IncidentEpisodeStateTimeline",
|
|
165
|
+
column: "incidentStateId",
|
|
166
|
+
referencedTable: "IncidentState",
|
|
167
|
+
orderColumn: "order",
|
|
168
|
+
roleColumns: INCIDENT_STATE_ROLES,
|
|
169
|
+
isNullable: false,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
table: "IncidentTemplate",
|
|
173
|
+
column: "initialIncidentStateId",
|
|
174
|
+
referencedTable: "IncidentState",
|
|
175
|
+
orderColumn: "order",
|
|
176
|
+
roleColumns: INCIDENT_STATE_ROLES,
|
|
177
|
+
isNullable: true,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
table: "IncidentTemplate",
|
|
181
|
+
column: "incidentSeverityId",
|
|
182
|
+
referencedTable: "IncidentSeverity",
|
|
183
|
+
orderColumn: "order",
|
|
184
|
+
roleColumns: [],
|
|
185
|
+
isNullable: true,
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
table: "IncidentTemplate",
|
|
189
|
+
column: "changeMonitorStatusToId",
|
|
190
|
+
referencedTable: "MonitorStatus",
|
|
191
|
+
orderColumn: "priority",
|
|
192
|
+
roleColumns: MONITOR_STATUS_ROLES,
|
|
193
|
+
isNullable: true,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
table: "Alert",
|
|
197
|
+
column: "currentAlertStateId",
|
|
198
|
+
referencedTable: "AlertState",
|
|
199
|
+
orderColumn: "order",
|
|
200
|
+
roleColumns: ALERT_STATE_ROLES,
|
|
201
|
+
isNullable: false,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
table: "Alert",
|
|
205
|
+
column: "alertSeverityId",
|
|
206
|
+
referencedTable: "AlertSeverity",
|
|
207
|
+
orderColumn: "order",
|
|
208
|
+
roleColumns: [],
|
|
209
|
+
isNullable: false,
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
table: "Alert",
|
|
213
|
+
column: "monitorStatusWhenThisAlertWasCreatedId",
|
|
214
|
+
referencedTable: "MonitorStatus",
|
|
215
|
+
orderColumn: "priority",
|
|
216
|
+
roleColumns: MONITOR_STATUS_ROLES,
|
|
217
|
+
isNullable: true,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
table: "AlertEpisode",
|
|
221
|
+
column: "currentAlertStateId",
|
|
222
|
+
referencedTable: "AlertState",
|
|
223
|
+
orderColumn: "order",
|
|
224
|
+
roleColumns: ALERT_STATE_ROLES,
|
|
225
|
+
isNullable: false,
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
table: "AlertEpisode",
|
|
229
|
+
column: "alertSeverityId",
|
|
230
|
+
referencedTable: "AlertSeverity",
|
|
231
|
+
orderColumn: "order",
|
|
232
|
+
roleColumns: [],
|
|
233
|
+
isNullable: true,
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
table: "AlertStateTimeline",
|
|
237
|
+
column: "alertStateId",
|
|
238
|
+
referencedTable: "AlertState",
|
|
239
|
+
orderColumn: "order",
|
|
240
|
+
roleColumns: ALERT_STATE_ROLES,
|
|
241
|
+
isNullable: false,
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
table: "AlertEpisodeStateTimeline",
|
|
245
|
+
column: "alertStateId",
|
|
246
|
+
referencedTable: "AlertState",
|
|
247
|
+
orderColumn: "order",
|
|
248
|
+
roleColumns: ALERT_STATE_ROLES,
|
|
249
|
+
isNullable: false,
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
table: "ScheduledMaintenance",
|
|
253
|
+
column: "currentScheduledMaintenanceStateId",
|
|
254
|
+
referencedTable: "ScheduledMaintenanceState",
|
|
255
|
+
orderColumn: "order",
|
|
256
|
+
roleColumns: SCHEDULED_MAINTENANCE_STATE_ROLES,
|
|
257
|
+
isNullable: false,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
table: "ScheduledMaintenance",
|
|
261
|
+
column: "changeMonitorStatusToId",
|
|
262
|
+
referencedTable: "MonitorStatus",
|
|
263
|
+
orderColumn: "priority",
|
|
264
|
+
roleColumns: MONITOR_STATUS_ROLES,
|
|
265
|
+
isNullable: true,
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
table: "ScheduledMaintenanceStateTimeline",
|
|
269
|
+
column: "scheduledMaintenanceStateId",
|
|
270
|
+
referencedTable: "ScheduledMaintenanceState",
|
|
271
|
+
orderColumn: "order",
|
|
272
|
+
roleColumns: SCHEDULED_MAINTENANCE_STATE_ROLES,
|
|
273
|
+
isNullable: false,
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
table: "ScheduledMaintenanceTemplate",
|
|
277
|
+
column: "changeMonitorStatusToId",
|
|
278
|
+
referencedTable: "MonitorStatus",
|
|
279
|
+
orderColumn: "priority",
|
|
280
|
+
roleColumns: MONITOR_STATUS_ROLES,
|
|
281
|
+
isNullable: true,
|
|
282
|
+
},
|
|
283
|
+
];
|
|
284
|
+
|
|
285
|
+
interface TimelineForeignKey {
|
|
286
|
+
table: string;
|
|
287
|
+
column: string;
|
|
288
|
+
referencedTable: string;
|
|
289
|
+
constraintName: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/*
|
|
293
|
+
* A state timeline row records "this incident/alert/event was in this state at
|
|
294
|
+
* this time". Once the state is deleted the row cannot be read back, so it
|
|
295
|
+
* should go with it rather than block the delete. This mirrors what
|
|
296
|
+
* 1785240000000 did for MonitorStatusTimeline.
|
|
297
|
+
*/
|
|
298
|
+
export const TIMELINE_FOREIGN_KEYS: Array<TimelineForeignKey> = [
|
|
299
|
+
{
|
|
300
|
+
table: "IncidentStateTimeline",
|
|
301
|
+
column: "incidentStateId",
|
|
302
|
+
referencedTable: "IncidentState",
|
|
303
|
+
constraintName: "FK_ff0fca6570d47798771763533a9",
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
table: "IncidentEpisodeStateTimeline",
|
|
307
|
+
column: "incidentStateId",
|
|
308
|
+
referencedTable: "IncidentState",
|
|
309
|
+
constraintName: "FK_186ef9a3c668841b1286cbb18fc",
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
table: "AlertStateTimeline",
|
|
313
|
+
column: "alertStateId",
|
|
314
|
+
referencedTable: "AlertState",
|
|
315
|
+
constraintName: "FK_dbf0191a98672bcb73f65febac5",
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
table: "AlertEpisodeStateTimeline",
|
|
319
|
+
column: "alertStateId",
|
|
320
|
+
referencedTable: "AlertState",
|
|
321
|
+
constraintName: "FK_c787c0bc5a12b94976f28d0a12c",
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
table: "ScheduledMaintenanceStateTimeline",
|
|
325
|
+
column: "scheduledMaintenanceStateId",
|
|
326
|
+
referencedTable: "ScheduledMaintenanceState",
|
|
327
|
+
constraintName: "FK_7c0f750d3a964180d1e1efa16ea",
|
|
328
|
+
},
|
|
329
|
+
];
|
|
330
|
+
|
|
331
|
+
/*
|
|
332
|
+
* Repoints rows whose reference belongs to another project at the equivalent
|
|
333
|
+
* record in their own project.
|
|
334
|
+
*
|
|
335
|
+
* The ladder is: same name AND same role, then same role, then same name, then
|
|
336
|
+
* nearest order/priority. Role outranks a bare name match on purpose — a
|
|
337
|
+
* project is free to have a custom state literally called "Resolved" that is
|
|
338
|
+
* NOT its resolved state, and matching that one would quietly un-resolve a
|
|
339
|
+
* resolved incident. The 1785240000000 migration tried name before role; that
|
|
340
|
+
* ordering is only safe for records with no role at all (severities), which is
|
|
341
|
+
* why it never bit there.
|
|
342
|
+
*/
|
|
343
|
+
export function getRepairQuery(reference: CrossProjectReference): string {
|
|
344
|
+
const roleSelect: string = reference.roleColumns
|
|
345
|
+
.map((roleColumn: string) => {
|
|
346
|
+
return `,\n p."${roleColumn}" AS role_${roleColumn}`;
|
|
347
|
+
})
|
|
348
|
+
.join("");
|
|
349
|
+
|
|
350
|
+
const rolePredicate: string = reference.roleColumns
|
|
351
|
+
.map((roleColumn: string) => {
|
|
352
|
+
return `x."${roleColumn}" = b.role_${roleColumn}`;
|
|
353
|
+
})
|
|
354
|
+
.join("\n AND ");
|
|
355
|
+
|
|
356
|
+
const roleMatches: string =
|
|
357
|
+
reference.roleColumns.length > 0
|
|
358
|
+
? `
|
|
359
|
+
(SELECT x."_id" FROM "${reference.referencedTable}" x
|
|
360
|
+
WHERE x."projectId" = b.project_id
|
|
361
|
+
AND lower(x."name") = lower(b.ref_name)
|
|
362
|
+
AND ${rolePredicate}
|
|
363
|
+
ORDER BY x."${reference.orderColumn}" LIMIT 1),
|
|
364
|
+
(SELECT x."_id" FROM "${reference.referencedTable}" x
|
|
365
|
+
WHERE x."projectId" = b.project_id
|
|
366
|
+
AND ${rolePredicate}
|
|
367
|
+
ORDER BY x."${reference.orderColumn}" LIMIT 1),`
|
|
368
|
+
: "";
|
|
369
|
+
|
|
370
|
+
return `
|
|
371
|
+
WITH bad AS (
|
|
372
|
+
SELECT c."_id" AS row_id,
|
|
373
|
+
c."projectId" AS project_id,
|
|
374
|
+
p."name" AS ref_name,
|
|
375
|
+
p."${reference.orderColumn}" AS ref_order${roleSelect}
|
|
376
|
+
FROM "${reference.table}" c
|
|
377
|
+
JOIN "${reference.referencedTable}" p ON p."_id" = c."${reference.column}"
|
|
378
|
+
WHERE c."projectId" IS DISTINCT FROM p."projectId"
|
|
379
|
+
), resolved AS (
|
|
380
|
+
SELECT b.row_id, COALESCE(${roleMatches}
|
|
381
|
+
(SELECT x."_id" FROM "${reference.referencedTable}" x
|
|
382
|
+
WHERE x."projectId" = b.project_id AND lower(x."name") = lower(b.ref_name)
|
|
383
|
+
ORDER BY x."${reference.orderColumn}" LIMIT 1),
|
|
384
|
+
(SELECT x."_id" FROM "${reference.referencedTable}" x
|
|
385
|
+
WHERE x."projectId" = b.project_id
|
|
386
|
+
ORDER BY abs(x."${reference.orderColumn}" - b.ref_order), x."${reference.orderColumn}" LIMIT 1)
|
|
387
|
+
) AS good_id
|
|
388
|
+
FROM bad b
|
|
389
|
+
)
|
|
390
|
+
UPDATE "${reference.table}" c
|
|
391
|
+
SET "${reference.column}" = r.good_id
|
|
392
|
+
FROM resolved r
|
|
393
|
+
WHERE c."_id" = r.row_id AND r.good_id IS NOT NULL
|
|
394
|
+
`;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/*
|
|
398
|
+
* Counts what is still cross-project after the repair and the clear. A row
|
|
399
|
+
* only survives both when its own project has no record of that kind to point
|
|
400
|
+
* at — rare, but silent: the project stays undeletable and the user retries
|
|
401
|
+
* and sees the identical error with nothing to act on. Log it so an operator
|
|
402
|
+
* has a name to chase.
|
|
403
|
+
*/
|
|
404
|
+
export function getRemainingQuery(reference: CrossProjectReference): string {
|
|
405
|
+
return `
|
|
406
|
+
SELECT count(*)::int AS remaining
|
|
407
|
+
FROM "${reference.table}" c
|
|
408
|
+
JOIN "${reference.referencedTable}" p ON p."_id" = c."${reference.column}"
|
|
409
|
+
WHERE c."projectId" IS DISTINCT FROM p."projectId"
|
|
410
|
+
`;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/*
|
|
414
|
+
* Clears whatever the repair above could not repoint. Only runs for nullable
|
|
415
|
+
* columns; leaving a dangling cross-project id there would keep the referenced
|
|
416
|
+
* project undeletable for no benefit — the reference cannot be read by the
|
|
417
|
+
* project that owns the row anyway.
|
|
418
|
+
*/
|
|
419
|
+
export function getClearQuery(reference: CrossProjectReference): string {
|
|
420
|
+
return `
|
|
421
|
+
UPDATE "${reference.table}" c
|
|
422
|
+
SET "${reference.column}" = NULL
|
|
423
|
+
FROM "${reference.referencedTable}" p
|
|
424
|
+
WHERE p."_id" = c."${reference.column}"
|
|
425
|
+
AND c."projectId" IS DISTINCT FROM p."projectId"
|
|
426
|
+
`;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export class RepairCrossProjectIncidentReferences1785320000000
|
|
430
|
+
implements MigrationInterface
|
|
431
|
+
{
|
|
432
|
+
public name: string = "RepairCrossProjectIncidentReferences1785320000000";
|
|
433
|
+
|
|
434
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
435
|
+
/*
|
|
436
|
+
* The repairs below scan the incident/alert/timeline tables, which run to
|
|
437
|
+
* millions of rows. Raising the server-side statement_timeout only helps
|
|
438
|
+
* when the operator has also raised DATABASE_QUERY_TIMEOUT_MS: that one is
|
|
439
|
+
* a client-side deadline in node-postgres (DataSourceOptions passes it as
|
|
440
|
+
* `extra.query_timeout`) and no SET can lift it. When the client gives up
|
|
441
|
+
* first the server keeps executing, so the ceiling here is deliberately
|
|
442
|
+
* reset before the DDL below rather than left in place.
|
|
443
|
+
*/
|
|
444
|
+
await queryRunner.query(`SET LOCAL statement_timeout = '600s'`);
|
|
445
|
+
|
|
446
|
+
const unrepaired: Array<string> = [];
|
|
447
|
+
|
|
448
|
+
for (const reference of CROSS_PROJECT_REFERENCES) {
|
|
449
|
+
await queryRunner.query(getRepairQuery(reference));
|
|
450
|
+
|
|
451
|
+
if (reference.isNullable) {
|
|
452
|
+
await queryRunner.query(getClearQuery(reference));
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const remaining: Array<{ remaining: number }> = await queryRunner.query(
|
|
456
|
+
getRemainingQuery(reference),
|
|
457
|
+
);
|
|
458
|
+
|
|
459
|
+
const remainingCount: number = remaining?.[0]?.remaining || 0;
|
|
460
|
+
|
|
461
|
+
if (remainingCount > 0) {
|
|
462
|
+
unrepaired.push(
|
|
463
|
+
`${reference.table}.${reference.column} (${remainingCount})`,
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (unrepaired.length > 0) {
|
|
469
|
+
/*
|
|
470
|
+
* Not fatal: these rows keep their project undeletable, but failing the
|
|
471
|
+
* deploy over them would be worse than reporting them. Each one needs a
|
|
472
|
+
* record of that kind to exist in the row's own project before it can be
|
|
473
|
+
* repointed.
|
|
474
|
+
*/
|
|
475
|
+
logger.warn(
|
|
476
|
+
`RepairCrossProjectIncidentReferences: could not repoint every cross-project reference; the projects they point at stay undeletable until a matching record exists in the owning project. Remaining: ${unrepaired.join(
|
|
477
|
+
", ",
|
|
478
|
+
)}`,
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/*
|
|
483
|
+
* Back to the connection's configured ceiling before taking any lock. A
|
|
484
|
+
* slow ADD CONSTRAINT that outlives the client timeout would otherwise sit
|
|
485
|
+
* there holding ACCESS EXCLUSIVE — with the queued ROLLBACK timing out too
|
|
486
|
+
* — long after the deploy already reported failure. Aborting server-side
|
|
487
|
+
* is the cheaper failure.
|
|
488
|
+
*/
|
|
489
|
+
await queryRunner.query(`SET LOCAL statement_timeout = DEFAULT`);
|
|
490
|
+
|
|
491
|
+
/*
|
|
492
|
+
* Swapping a foreign key needs ACCESS EXCLUSIVE on the timeline table, and
|
|
493
|
+
* the lock is held until this migration commits. The server has no
|
|
494
|
+
* lock_timeout, so without the line below a single slow transaction
|
|
495
|
+
* holding one of these tables would make the statement queue *and* park
|
|
496
|
+
* every reader and writer behind it until the statement timeout fired.
|
|
497
|
+
* Failing fast and retrying the deploy is much cheaper than stalling the
|
|
498
|
+
* table.
|
|
499
|
+
*/
|
|
500
|
+
await queryRunner.query(`SET LOCAL lock_timeout = '5s'`);
|
|
501
|
+
|
|
502
|
+
for (const foreignKey of TIMELINE_FOREIGN_KEYS) {
|
|
503
|
+
await queryRunner.query(
|
|
504
|
+
`ALTER TABLE "${foreignKey.table}" DROP CONSTRAINT "${foreignKey.constraintName}"`,
|
|
505
|
+
);
|
|
506
|
+
await queryRunner.query(
|
|
507
|
+
`ALTER TABLE "${foreignKey.table}" ADD CONSTRAINT "${foreignKey.constraintName}" FOREIGN KEY ("${foreignKey.column}") REFERENCES "${foreignKey.referencedTable}"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/*
|
|
513
|
+
* Only the constraints are reversible. The repaired references are not: the
|
|
514
|
+
* previous values pointed at another project's records and there is nothing
|
|
515
|
+
* worth restoring them to.
|
|
516
|
+
*/
|
|
517
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
518
|
+
for (const foreignKey of TIMELINE_FOREIGN_KEYS) {
|
|
519
|
+
await queryRunner.query(
|
|
520
|
+
`ALTER TABLE "${foreignKey.table}" DROP CONSTRAINT "${foreignKey.constraintName}"`,
|
|
521
|
+
);
|
|
522
|
+
await queryRunner.query(
|
|
523
|
+
`ALTER TABLE "${foreignKey.table}" ADD CONSTRAINT "${foreignKey.constraintName}" FOREIGN KEY ("${foreignKey.column}") REFERENCES "${foreignKey.referencedTable}"("_id") ON DELETE NO ACTION ON UPDATE NO ACTION`,
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class AddParentGroupToStatusPageGroup1785329453269
|
|
4
|
+
implements MigrationInterface
|
|
5
|
+
{
|
|
6
|
+
public name: string = "AddParentGroupToStatusPageGroup1785329453269";
|
|
7
|
+
|
|
8
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
9
|
+
await queryRunner.query(
|
|
10
|
+
`ALTER TABLE "StatusPageGroup" ADD "parentStatusPageGroupId" uuid`,
|
|
11
|
+
);
|
|
12
|
+
await queryRunner.query(
|
|
13
|
+
`CREATE INDEX "IDX_9cf6ff1530c361e890856e80d7" ON "StatusPageGroup" ("parentStatusPageGroupId") `,
|
|
14
|
+
);
|
|
15
|
+
await queryRunner.query(
|
|
16
|
+
`ALTER TABLE "StatusPageGroup" ADD CONSTRAINT "FK_9cf6ff1530c361e890856e80d79" FOREIGN KEY ("parentStatusPageGroupId") REFERENCES "StatusPageGroup"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
21
|
+
await queryRunner.query(
|
|
22
|
+
`ALTER TABLE "StatusPageGroup" DROP CONSTRAINT "FK_9cf6ff1530c361e890856e80d79"`,
|
|
23
|
+
);
|
|
24
|
+
await queryRunner.query(
|
|
25
|
+
`DROP INDEX "public"."IDX_9cf6ff1530c361e890856e80d7"`,
|
|
26
|
+
);
|
|
27
|
+
await queryRunner.query(
|
|
28
|
+
`ALTER TABLE "StatusPageGroup" DROP COLUMN "parentStatusPageGroupId"`,
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Generated with `npm run generate-postgres-migration`. Two unrelated
|
|
5
|
+
* `OnCallDutyPolicyScheduleLayer` default-value statements the generator also
|
|
6
|
+
* emitted (whitespace-only drift between the entity's serialized JSON default
|
|
7
|
+
* and the one already in the database) were removed by hand — they belong to
|
|
8
|
+
* neither this feature nor this PR, and re-writing those defaults would churn
|
|
9
|
+
* every existing row's column default for no behavioural change.
|
|
10
|
+
*/
|
|
11
|
+
export class AddRecommendationDismissalTable1785397674289
|
|
12
|
+
implements MigrationInterface
|
|
13
|
+
{
|
|
14
|
+
public name = "AddRecommendationDismissalTable1785397674289";
|
|
15
|
+
|
|
16
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
17
|
+
await queryRunner.query(
|
|
18
|
+
`CREATE TABLE "RecommendationDismissal" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP WITH TIME ZONE, "version" integer NOT NULL, "projectId" uuid NOT NULL, "recommendationType" character varying(100) NOT NULL, "recommendationId" character varying(100) NOT NULL, "resourceType" character varying(100), "resourceId" uuid, "dismissalReason" character varying(500), "createdByUserId" uuid, "deletedByUserId" uuid, CONSTRAINT "PK_d36e7bc61a5ad3a4ce43d83f29d" PRIMARY KEY ("_id"))`,
|
|
19
|
+
);
|
|
20
|
+
await queryRunner.query(
|
|
21
|
+
`CREATE INDEX "IDX_b9b04eb32e1e2b49131fdf3dd6" ON "RecommendationDismissal" ("projectId") `,
|
|
22
|
+
);
|
|
23
|
+
await queryRunner.query(
|
|
24
|
+
`CREATE INDEX "IDX_119f2c4f157c931d3b11eb339d" ON "RecommendationDismissal" ("projectId", "recommendationType", "resourceType", "resourceId") `,
|
|
25
|
+
);
|
|
26
|
+
await queryRunner.query(
|
|
27
|
+
`ALTER TABLE "RecommendationDismissal" ADD CONSTRAINT "FK_b9b04eb32e1e2b49131fdf3dd67" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
28
|
+
);
|
|
29
|
+
await queryRunner.query(
|
|
30
|
+
`ALTER TABLE "RecommendationDismissal" ADD CONSTRAINT "FK_c81cd63783d39af4d9b690e3df0" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
31
|
+
);
|
|
32
|
+
await queryRunner.query(
|
|
33
|
+
`ALTER TABLE "RecommendationDismissal" ADD CONSTRAINT "FK_9c62a79e18419e3fba90d38a3db" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
38
|
+
await queryRunner.query(
|
|
39
|
+
`ALTER TABLE "RecommendationDismissal" DROP CONSTRAINT "FK_9c62a79e18419e3fba90d38a3db"`,
|
|
40
|
+
);
|
|
41
|
+
await queryRunner.query(
|
|
42
|
+
`ALTER TABLE "RecommendationDismissal" DROP CONSTRAINT "FK_c81cd63783d39af4d9b690e3df0"`,
|
|
43
|
+
);
|
|
44
|
+
await queryRunner.query(
|
|
45
|
+
`ALTER TABLE "RecommendationDismissal" DROP CONSTRAINT "FK_b9b04eb32e1e2b49131fdf3dd67"`,
|
|
46
|
+
);
|
|
47
|
+
await queryRunner.query(
|
|
48
|
+
`DROP INDEX "public"."IDX_119f2c4f157c931d3b11eb339d"`,
|
|
49
|
+
);
|
|
50
|
+
await queryRunner.query(
|
|
51
|
+
`DROP INDEX "public"."IDX_b9b04eb32e1e2b49131fdf3dd6"`,
|
|
52
|
+
);
|
|
53
|
+
await queryRunner.query(`DROP TABLE "RecommendationDismissal"`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Adds the drop-visibility counters to both drop-filter tables.
|
|
5
|
+
*
|
|
6
|
+
* A drop filter used to discard telemetry with no record anywhere — no log
|
|
7
|
+
* line, no metric, no counter — so a customer reporting missing logs could
|
|
8
|
+
* not be told whether their own filter was responsible. These columns are
|
|
9
|
+
* the customer-visible half of that fix; they are written by the ingest
|
|
10
|
+
* path via a throttled atomic UPDATE (see
|
|
11
|
+
* App/FeatureSet/Telemetry/Utils/DropFilterDropRecorder.ts) and surfaced on
|
|
12
|
+
* the Drop Filters list and view pages.
|
|
13
|
+
*
|
|
14
|
+
* `droppedCount` is bigint: a sample filter on a high-volume project can
|
|
15
|
+
* pass 2^31 well within a year, and silently wrapping a diagnostic counter
|
|
16
|
+
* would be worse than not having one. NOT NULL DEFAULT 0 so existing rows
|
|
17
|
+
* start at a meaningful zero rather than a null the UI has to special-case.
|
|
18
|
+
*/
|
|
19
|
+
export class AddDroppedCountersToDropFilters1785405581596
|
|
20
|
+
implements MigrationInterface
|
|
21
|
+
{
|
|
22
|
+
public name = "AddDroppedCountersToDropFilters1785405581596";
|
|
23
|
+
|
|
24
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
25
|
+
await queryRunner.query(
|
|
26
|
+
`ALTER TABLE "LogDropFilter" ADD "droppedCount" bigint NOT NULL DEFAULT '0'`,
|
|
27
|
+
);
|
|
28
|
+
await queryRunner.query(
|
|
29
|
+
`ALTER TABLE "LogDropFilter" ADD "lastDroppedAt" TIMESTAMP WITH TIME ZONE`,
|
|
30
|
+
);
|
|
31
|
+
await queryRunner.query(
|
|
32
|
+
`ALTER TABLE "TraceDropFilter" ADD "droppedCount" bigint NOT NULL DEFAULT '0'`,
|
|
33
|
+
);
|
|
34
|
+
await queryRunner.query(
|
|
35
|
+
`ALTER TABLE "TraceDropFilter" ADD "lastDroppedAt" TIMESTAMP WITH TIME ZONE`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
40
|
+
await queryRunner.query(
|
|
41
|
+
`ALTER TABLE "TraceDropFilter" DROP COLUMN "lastDroppedAt"`,
|
|
42
|
+
);
|
|
43
|
+
await queryRunner.query(
|
|
44
|
+
`ALTER TABLE "TraceDropFilter" DROP COLUMN "droppedCount"`,
|
|
45
|
+
);
|
|
46
|
+
await queryRunner.query(
|
|
47
|
+
`ALTER TABLE "LogDropFilter" DROP COLUMN "lastDroppedAt"`,
|
|
48
|
+
);
|
|
49
|
+
await queryRunner.query(
|
|
50
|
+
`ALTER TABLE "LogDropFilter" DROP COLUMN "droppedCount"`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -473,6 +473,11 @@ import { MigrationName1785066759532 } from "./1785066759532-MigrationName";
|
|
|
473
473
|
import { AddHotQueryIndexes1785140242697 } from "./1785140242697-AddHotQueryIndexes";
|
|
474
474
|
import { AddHotQueryIndexesSecondPass1785148065137 } from "./1785148065137-AddHotQueryIndexesSecondPass";
|
|
475
475
|
import { RepairCrossProjectMonitorStatusReferences1785240000000 } from "./1785240000000-RepairCrossProjectMonitorStatusReferences";
|
|
476
|
+
import { AddColumnsToTableView1785241000000 } from "./1785241000000-AddColumnsToTableView";
|
|
477
|
+
import { RepairCrossProjectIncidentReferences1785320000000 } from "./1785320000000-RepairCrossProjectIncidentReferences";
|
|
478
|
+
import { AddParentGroupToStatusPageGroup1785329453269 } from "./1785329453269-AddParentGroupToStatusPageGroup";
|
|
479
|
+
import { AddRecommendationDismissalTable1785397674289 } from "./1785397674289-AddRecommendationDismissalTable";
|
|
480
|
+
import { AddDroppedCountersToDropFilters1785405581596 } from "./1785405581596-AddDroppedCountersToDropFilters";
|
|
476
481
|
|
|
477
482
|
export default [
|
|
478
483
|
InitialMigration,
|
|
@@ -950,4 +955,9 @@ export default [
|
|
|
950
955
|
AddHotQueryIndexes1785140242697,
|
|
951
956
|
AddHotQueryIndexesSecondPass1785148065137,
|
|
952
957
|
RepairCrossProjectMonitorStatusReferences1785240000000,
|
|
958
|
+
AddColumnsToTableView1785241000000,
|
|
959
|
+
RepairCrossProjectIncidentReferences1785320000000,
|
|
960
|
+
AddParentGroupToStatusPageGroup1785329453269,
|
|
961
|
+
AddRecommendationDismissalTable1785397674289,
|
|
962
|
+
AddDroppedCountersToDropFilters1785405581596,
|
|
953
963
|
];
|