@oneuptime/common 12.0.31 → 12.0.33
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/Span.ts +14 -0
- package/Models/DatabaseModels/AlertState.ts +0 -2
- package/Models/DatabaseModels/Domain.ts +1 -1
- package/Models/DatabaseModels/EnterpriseLicense.ts +56 -0
- package/Models/DatabaseModels/Incident.ts +1 -1
- package/Models/DatabaseModels/IncidentTemplate.ts +1 -1
- package/Models/DatabaseModels/Index.ts +12 -0
- package/Models/DatabaseModels/MetricType.ts +0 -2
- package/Models/DatabaseModels/Monitor.ts +76 -0
- package/Models/DatabaseModels/MonitorStatusTimeline.ts +0 -2
- package/Models/DatabaseModels/MonitorTest.ts +0 -2
- package/Models/DatabaseModels/NetworkAlertPolicy.ts +690 -0
- package/Models/DatabaseModels/NetworkDevice.ts +297 -3
- package/Models/DatabaseModels/NetworkDeviceOidTemplate.ts +3 -1
- package/Models/DatabaseModels/NetworkDeviceRole.ts +648 -0
- package/Models/DatabaseModels/NetworkSite.ts +201 -2
- package/Models/DatabaseModels/NetworkSiteType.ts +102 -3
- package/Models/DatabaseModels/NetworkSnmpCredentialProfile.ts +841 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.ts +1 -1
- package/Models/DatabaseModels/StatusPageAnnouncement.ts +0 -2
- package/Models/DatabaseModels/StatusPageAnnouncementTemplate.ts +0 -2
- package/Models/DatabaseModels/StatusPagePrivateUser.ts +0 -2
- package/Models/DatabaseModels/StatusPageResource.ts +0 -2
- package/Models/DatabaseModels/StatusPageSubscriber.ts +0 -2
- package/Models/DatabaseModels/TelemetryException.ts +119 -0
- package/Models/DatabaseModels/UserNotificationEmailRollupBatch.ts +334 -0
- package/Models/DatabaseModels/UserNotificationEmailRollupItem.ts +370 -0
- package/Models/DatabaseModels/UserNotificationEmailRollupSetting.ts +282 -0
- package/Server/API/EnterpriseLicenseAPI.ts +391 -64
- package/Server/API/LlmProviderAPI.ts +137 -22
- package/Server/EnvironmentConfig.ts +14 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790700000000-AddNetworkSiteTypeParentHierarchy.ts +55 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790800000000-AddNetworkDeviceRoleTable.ts +72 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddEnterpriseLicenseUsageProvenance.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddTelemetryExceptionErrorClass.ts +124 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791000000000-AddUserNotificationEmailRollup.ts +132 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791100000000-AddUserNotificationEmailRollupSetting.ts +79 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1791200000000-AddNetworkSnmpCredentialProfilesAndAlertPolicies.ts +191 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +14 -0
- package/Server/Infrastructure/QueueWorker.ts +38 -8
- package/Server/Middleware/BearerTokenAuthorization.ts +12 -0
- package/Server/Middleware/ProjectAuthorization.ts +11 -0
- package/Server/Middleware/SCIMAuthorization.ts +12 -0
- package/Server/Middleware/TelemetryIngest.ts +11 -0
- package/Server/Services/AIBillingService.ts +101 -27
- package/Server/Services/DatabaseService.ts +39 -9
- package/Server/Services/EnterpriseLicenseInstanceService.ts +197 -0
- package/Server/Services/EnterpriseLicenseService.ts +55 -0
- package/Server/Services/Index.ts +12 -0
- package/Server/Services/MonitorService.ts +143 -21
- package/Server/Services/MonitorStatusTimelineService.ts +150 -8
- package/Server/Services/MonitorTemplateService.ts +217 -1
- package/Server/Services/NetworkAlertPolicyEngineService.ts +2159 -0
- package/Server/Services/NetworkAlertPolicyService.ts +944 -0
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +9 -10
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +60 -15
- package/Server/Services/NetworkDeviceRoleService.ts +90 -0
- package/Server/Services/NetworkDeviceService.ts +1032 -73
- package/Server/Services/NetworkSiteService.ts +1502 -129
- package/Server/Services/NetworkSiteTypeService.ts +1216 -0
- package/Server/Services/NetworkSnmpCredentialProfileService.ts +238 -0
- package/Server/Services/NotificationService.ts +118 -28
- package/Server/Services/ProjectService.ts +186 -44
- package/Server/Services/StatusPagePrivateUserService.ts +103 -3
- package/Server/Services/UserNotificationEmailRollupBatchService.ts +78 -0
- package/Server/Services/UserNotificationEmailRollupItemService.ts +79 -0
- package/Server/Services/UserNotificationEmailRollupSettingService.ts +113 -0
- package/Server/Services/UserNotificationSettingService.ts +62 -31
- package/Server/Services/UserService.ts +95 -0
- package/Server/Types/Database/QueryHelper.ts +2 -2
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +14 -3
- package/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.ts +10 -0
- package/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.ts +10 -0
- package/Server/Utils/AI/SRE/Insights/InsightTriageRunner.ts +62 -1
- package/Server/Utils/AI/Toolbox/AlertTools.ts +15 -1
- package/Server/Utils/Billing/BillingFailureNoticeThrottle.ts +80 -0
- package/Server/Utils/DataSource/HttpFetch.ts +9 -2
- package/Server/Utils/EmailRollup/EmailRollupConstants.ts +98 -0
- package/Server/Utils/EmailRollup/EmailRollupFlushRunner.ts +872 -0
- package/Server/Utils/EmailRollup/EmailRollupRenderer.ts +781 -0
- package/Server/Utils/EmailRollup/EmailRollupWriter.ts +368 -0
- package/Server/Utils/LLM/LLMService.ts +78 -0
- package/Server/Utils/LogRedaction.ts +8 -0
- package/Server/Utils/Logger.ts +79 -1
- package/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.ts +190 -0
- package/Server/Utils/Monitor/Criteria/EvaluateOverTime.ts +9 -2
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +61 -1
- package/Server/Utils/Monitor/MonitorCriteriaDataExtractor.ts +14 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +49 -0
- package/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.ts +255 -4
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +41 -0
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +43 -0
- package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +499 -19
- package/Server/Utils/Monitor/NetworkDeviceMetricUtil.ts +66 -10
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +238 -44
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +146 -39
- package/Server/Utils/NetworkDevice/DeviceHealthAggregation.ts +31 -18
- package/Server/Utils/NetworkSite/NetworkSiteHierarchyLock.ts +213 -0
- package/Server/Utils/OutboundUserAgent.ts +152 -0
- package/Server/Utils/StartServer.ts +51 -19
- package/Server/Utils/Telemetry/CaptureSpan.ts +32 -8
- package/Server/Utils/Telemetry/ErrorClassResolver.ts +120 -0
- package/Server/Utils/Telemetry/SpanUtil.ts +33 -0
- package/Server/Utils/Telemetry.ts +198 -51
- package/Server/Views/Partials/SensitiveUrlToken.ejs +140 -0
- package/Tests/App/Dashboard/AddNeighborToMonitoringModal.test.tsx +158 -27
- package/Tests/App/Dashboard/AskAiSuggestedPrompts.test.ts +279 -0
- package/Tests/App/Dashboard/DashboardChartWidgetZoom.test.tsx +35 -8
- package/Tests/App/Dashboard/DashboardCommandPalette.test.tsx +107 -3
- package/Tests/App/Dashboard/DashboardEditPermissions.test.tsx +517 -0
- package/Tests/App/Dashboard/DashboardVariablesDiscard.test.tsx +26 -0
- package/Tests/App/Dashboard/DashboardWideChartZoom.test.tsx +401 -0
- package/Tests/App/Dashboard/DeviceStatusHero.test.tsx +588 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +18 -9
- package/Tests/App/Dashboard/MonitorCreateFromMonitorBackedDevice.test.tsx +632 -0
- package/Tests/App/Dashboard/MonitorRecommendationCreateProgress.test.tsx +682 -0
- package/Tests/App/Dashboard/MonitorTemplateColumnAndFacet.test.tsx +318 -0
- package/Tests/App/Dashboard/MonitorTypePicker.test.tsx +4 -2
- package/Tests/App/Dashboard/NetworkDeviceBulkDelete.test.tsx +357 -0
- package/Tests/App/Dashboard/NetworkDeviceCreateFormMonitorBinding.test.tsx +676 -0
- package/Tests/App/Dashboard/NetworkDeviceCreateFormPingMonitor.test.tsx +791 -0
- package/Tests/App/Dashboard/NetworkDeviceCreateFormProbeAndSnmp.test.tsx +833 -0
- package/Tests/App/Dashboard/NetworkDeviceCriteriaFilter.test.ts +161 -0
- package/Tests/App/Dashboard/NetworkDeviceSettingsMonitoringSection.test.tsx +458 -0
- package/Tests/App/Dashboard/NetworkSideMenu.test.tsx +626 -0
- package/Tests/App/Dashboard/PingMonitorProvisioning.test.ts +368 -0
- package/Tests/App/Dashboard/RecommendationCard.test.tsx +796 -0
- package/Tests/App/Dashboard/RecommendationToolbar.test.tsx +519 -0
- package/Tests/App/Dashboard/RecommendationsList.test.tsx +661 -0
- package/Tests/App/Dashboard/SideMenuHarness.tsx +11 -3
- package/Tests/App/Dashboard/UseBulkCreatePingMonitors.test.tsx +899 -0
- package/Tests/App/Dashboard/UseBulkSnmpCredentialProfileActions.test.tsx +732 -0
- package/Tests/App/SensitiveUrlTokenBootstrap.test.ts +256 -0
- package/Tests/App/StatusPage/StatusPageIndexPageRobotsMeta.test.ts +11 -1
- package/Tests/App/StatusPage/StatusPageLoginCodeBootstrap.test.ts +9 -4
- package/Tests/Models/DatabaseModels/ModelRegistryInvariants.test.ts +115 -41
- package/Tests/Models/NetworkSiteHierarchy.test.ts +41 -4
- package/Tests/Server/API/EnterpriseLicenseReportUserCount.test.ts +951 -7
- package/Tests/Server/API/LlmProviderConnectionTest.test.ts +522 -0
- package/Tests/Server/Infrastructure/Postgres/NetworkDeviceRoleTableMigration.test.ts +476 -0
- package/Tests/Server/Infrastructure/Postgres/NetworkSnmpCredentialProfilesAndAlertPoliciesMigration.test.ts +854 -0
- package/Tests/Server/Infrastructure/Postgres/SchemaMigrationsOrdering.test.ts +18 -0
- package/Tests/Server/Infrastructure/Postgres/UserNotificationEmailRollupTableMigration.test.ts +535 -0
- package/Tests/Server/Services/AIChatPrivacyPin.test.ts +560 -0
- package/Tests/Server/Services/BillingRechargeOwnerEmailGuards.test.ts +783 -0
- package/Tests/Server/Services/DatabaseServiceGenerateSlug.test.ts +215 -0
- package/Tests/Server/Services/EnterpriseLicenseInstanceServiceDeletionUsage.test.ts +707 -0
- package/Tests/Server/Services/EnterpriseLicenseServiceUsageAggregationLock.test.ts +329 -0
- package/Tests/Server/Services/MonitorServiceDeleteNetworkDeviceCleanup.test.ts +294 -0
- package/Tests/Server/Services/MonitorStatusBridgeProbePath.test.ts +802 -0
- package/Tests/Server/Services/MonitorStatusTimelineService.test.ts +72 -2
- package/Tests/Server/Services/NetworkAlertPolicyEngineHooks.test.ts +752 -0
- package/Tests/Server/Services/NetworkAlertPolicyEngineService.test.ts +1849 -0
- package/Tests/Server/Services/NetworkAlertPolicyModel.test.ts +1793 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +47 -4
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleService.test.ts +97 -12
- package/Tests/Server/Services/NetworkDeviceAutoMonitorLifecycle.test.ts +148 -3
- package/Tests/Server/Services/NetworkDeviceMonitorBindingUpdateGuard.test.ts +514 -0
- package/Tests/Server/Services/NetworkDeviceMonitorStatusStamp.test.ts +447 -58
- package/Tests/Server/Services/NetworkDeviceMonitoringMethodTransition.test.ts +739 -0
- package/Tests/Server/Services/NetworkDevicePollingTenancy.test.ts +501 -0
- package/Tests/Server/Services/NetworkDeviceRoleModel.test.ts +672 -0
- package/Tests/Server/Services/NetworkDeviceRuleEngines.test.ts +1 -1
- package/Tests/Server/Services/NetworkDeviceSiteDefaultProbe.test.ts +432 -0
- package/Tests/Server/Services/NetworkSiteMonitoringDefaults.test.ts +498 -0
- package/Tests/Server/Services/NetworkSiteRollupPolicyAndMaintenance.test.ts +337 -55
- package/Tests/Server/Services/NetworkSiteService.test.ts +1868 -131
- package/Tests/Server/Services/NetworkSiteTypeService.test.ts +1109 -0
- package/Tests/Server/Services/NetworkSnmpCredentialProfileModel.test.ts +926 -0
- package/Tests/Server/Services/NetworkSnmpCredentialProfileService.test.ts +796 -0
- package/Tests/Server/Services/ProjectServiceCreateSubscriptionStarted.test.ts +67 -4
- package/Tests/Server/Services/ProjectServiceNetworkSiteTypeDefaults.test.ts +214 -0
- package/Tests/Server/Services/ScheduledMaintenanceSubscriberEndTime.test.ts +369 -0
- package/Tests/Server/Services/StatusPagePrivateUserEmailChangePasswordResetExpiry.test.ts +269 -0
- package/Tests/Server/Services/UserEmailChangePasswordResetExpiry.test.ts +472 -0
- package/Tests/Server/Services/UserNotificationEmailRollupModels.test.ts +569 -0
- package/Tests/Server/Services/UserNotificationEmailRollupSettingModel.test.ts +314 -0
- package/Tests/Server/Services/UserNotificationEmailRollupSettingService.test.ts +409 -0
- package/Tests/Server/Services/UserNotificationSettingMonitorDefaults.test.ts +248 -0
- package/Tests/Server/Services/UserNotificationSettingRollupRouting.test.ts +856 -0
- package/Tests/Server/Services/UserNotificationSettingWorkspaceChannels.test.ts +145 -3
- package/Tests/Server/Types/Database/Permissions/DashboardAccessPermission.test.ts +321 -0
- package/Tests/Server/Types/Database/QueryHelperOperators.test.ts +17 -0
- package/Tests/Server/Utils/AI/AlertMonitorFilters.test.ts +124 -0
- package/Tests/Server/Utils/AI/Insights/InsightTriageRunner.test.ts +208 -0
- package/Tests/Server/Utils/AI/LLMServiceToolCalling.test.ts +235 -0
- package/Tests/Server/Utils/AI/ObservabilityChatPrompt.test.ts +253 -0
- package/Tests/Server/Utils/BasicCron.test.ts +283 -0
- package/Tests/Server/Utils/Captcha.test.ts +422 -0
- package/Tests/Server/Utils/DataSource/HttpFetch.test.ts +96 -2
- package/Tests/Server/Utils/Database/MigrationFailureLog.test.ts +466 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupFlushRunnerBehaviour.test.ts +1096 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupFlushRunnerClaim.test.ts +466 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupRenderer.test.ts +1428 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupTestHarness.ts +752 -0
- package/Tests/Server/Utils/EmailRollup/EmailRollupWriter.test.ts +864 -0
- package/Tests/Server/Utils/IncomingCallPhoneNumber.test.ts +174 -0
- package/Tests/Server/Utils/LoggerFaultDemotion.test.ts +346 -0
- package/Tests/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.test.ts +633 -0
- package/Tests/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.test.ts +196 -0
- package/Tests/Server/Utils/Monitor/DatabaseMetricWrite.test.ts +367 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaObservationBuilderUnits.test.ts +100 -0
- package/Tests/Server/Utils/Monitor/MonitorStepResourceIdentity.test.ts +5 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceHydrationUtil.test.ts +512 -31
- package/Tests/Server/Utils/Monitor/NetworkDeviceMetricUtil.test.ts +252 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +479 -42
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +351 -5
- package/Tests/Server/Utils/NetworkDevice/DeviceHealthAggregation.test.ts +136 -12
- package/Tests/Server/Utils/NetworkSite/NetworkSiteHierarchyLock.test.ts +306 -0
- package/Tests/Server/Utils/OutboundUserAgent.test.ts +266 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClientUserAgent.test.ts +141 -0
- package/Tests/Server/Utils/Telemetry/ErrorClassResolver.test.ts +298 -0
- package/Tests/Server/Utils/Telemetry.test.ts +456 -66
- package/Tests/Types/Monitor/DatabaseMetricCatalog.test.ts +388 -0
- package/Tests/Types/Monitor/MonitorStepDatabaseMonitor.test.ts +243 -0
- package/Tests/Types/Monitor/MonitorStepDefaultTelemetryConfig.test.ts +1 -0
- package/Tests/Types/Monitor/MonitorType.test.ts +1 -0
- package/Tests/Types/Monitor/MonitorTypeKeywords.test.ts +16 -7
- package/Tests/Types/Monitor/NetworkDeviceAlertPack.test.ts +60 -0
- package/Tests/Types/NetworkDevice/DefaultNetworkDeviceRole.test.ts +417 -0
- package/Tests/Types/NetworkDevice/NetworkAlertPolicyScope.test.ts +655 -0
- package/Tests/Types/NetworkDevice/NetworkDeviceMonitoringMethod.test.ts +115 -26
- package/Tests/Types/NetworkSite/DefaultNetworkSiteType.test.ts +39 -0
- package/Tests/Types/NotificationSetting/NotificationEmailRollupPolicy.test.ts +299 -0
- package/Tests/Types/Telemetry/ErrorClass.test.ts +483 -0
- package/Tests/UI/Components/BasicRadioButtons.test.tsx +336 -0
- package/Tests/UI/Components/Charts/ChartClickDoubleClickDisambiguation.test.tsx +221 -0
- package/Tests/UI/Components/Charts/ChartDoubleClickReset.test.tsx +220 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableBulkDelete.test.tsx +751 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableColumnCustomization.test.tsx +475 -43
- package/Tests/UI/Components/ModelTable/ColumnPreference.test.ts +89 -0
- package/Tests/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.test.ts +15 -0
- package/Tests/UI/Components/NavBarCommandKGating.test.tsx +103 -8
- package/Tests/UI/Components/ProgressBar.test.tsx +38 -2
- package/Tests/UI/Components/SideMenuItem.test.tsx +256 -4
- package/Tests/UI/Components/SideMenuSection.test.tsx +310 -0
- package/Tests/UI/Components/SideOverSubmitState.test.tsx +335 -0
- package/Tests/UI/Utils/PageScrollLock.test.tsx +377 -0
- package/Tests/UI/Utils/PermissionGate.test.ts +78 -0
- package/Tests/UI/Utils/SensitiveUrlToken.test.ts +140 -0
- package/Tests/UI/Utils/TableColumnsToCsv.test.ts +30 -0
- package/Tests/UI/Utils/UseDashboardTimeRangeZoom.test.tsx +187 -0
- package/Tests/Utils/Dashboard/DashboardResourceListSharedArgs.test.ts +302 -0
- package/Tests/Utils/Dashboard/DashboardTimeRangeZoom.test.ts +242 -0
- package/Tests/Utils/EnterpriseLicenseSeats.test.ts +69 -0
- package/Tests/Utils/EnterpriseLicenseSync.test.ts +7 -1
- package/Tests/Utils/EnterpriseLicenseUsage.test.ts +433 -2
- package/Tests/Utils/Monitor/MonitorMetricType.test.ts +280 -1
- package/Tests/Utils/Monitor/MonitorSummarySnapshotUtil.test.ts +1 -0
- package/Tests/Utils/Monitor/NetworkDeviceRoleCatalog.test.ts +981 -0
- package/Tests/Utils/Monitor/NetworkTopologyRoleCatalog.test.ts +865 -0
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +38 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +284 -23
- package/Tests/Utils/NetworkDevice/DeviceReachabilityUtil.test.ts +177 -0
- package/Tests/Utils/NetworkDevice/DeviceRoleKeyUtil.test.ts +538 -0
- package/Tests/Utils/NetworkDevice/MonitoringMethodThreadedClassifiers.test.ts +992 -0
- package/Tests/Utils/NetworkDevice/NetworkAlertPolicyBootstrapUtil.test.ts +427 -0
- package/Tests/Utils/NetworkDevice/ReachabilityStampConsistency.test.ts +185 -0
- package/Tests/Utils/NetworkDevice/SnmpCredentialUtil.test.ts +268 -0
- package/Tests/Utils/NetworkDiscovery/AutoImportRuleMatcher.test.ts +55 -5
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +98 -21
- package/Tests/Utils/NetworkDiscovery/DiscoveryImportEligibility.test.ts +98 -20
- package/Tests/Utils/NetworkDiscovery/DiscoveryReverseDnsChain.test.ts +8 -7
- package/Tests/Utils/NetworkDiscovery/PingMonitorBuilderForAddress.test.ts +274 -0
- package/Tests/Utils/NetworkSite/SiteStatusRollupUtil.test.ts +230 -51
- package/Tests/Utils/NetworkSite/TypeHierarchyUtil.test.ts +209 -0
- package/Tests/Utils/Slo/SloEvaluation.test.ts +171 -0
- package/Tests/Utils/Slug.test.ts +61 -1
- package/Tests/Utils/Telemetry/CaptureSpanExportGating.test.ts +145 -0
- package/Tests/jest.setup.ts +19 -0
- package/Types/AI/ExceptionAIClassification.ts +10 -24
- package/Types/Email/EmailTemplateType.ts +2 -0
- package/Types/EnterpriseLicense/EnterpriseLicenseInstanceSummary.ts +5 -0
- package/Types/EnterpriseLicense/EnterpriseLicenseUsageSnapshot.ts +13 -0
- package/Types/EnterpriseLicense/EnterpriseLicenseUserCountSource.ts +6 -0
- package/Types/Exception/ApiException.ts +10 -0
- package/Types/Exception/BadDataException.ts +11 -0
- package/Types/Exception/BadRequestException.ts +11 -0
- package/Types/Exception/Exception.ts +65 -0
- package/Types/Exception/ForbiddenException.ts +10 -0
- package/Types/Exception/NotAuthenticatedException.ts +10 -0
- package/Types/Exception/NotAuthorizedException.ts +10 -0
- package/Types/Exception/NotFoundException.ts +11 -0
- package/Types/Exception/PayloadTooLargeException.ts +11 -0
- package/Types/Exception/PaymentRequiredException.ts +10 -0
- package/Types/Exception/ServiceUnavailableException.ts +10 -0
- package/Types/Exception/SsoAuthorizationException.ts +10 -0
- package/Types/Exception/TenantNotFoundException.ts +11 -0
- package/Types/Exception/TimeoutException.ts +10 -0
- package/Types/Exception/TooManyRequestsException.ts +10 -0
- package/Types/Exception/UnableToReachServer.ts +10 -0
- package/Types/Exception/WebsiteRequestException.ts +10 -0
- package/Types/Monitor/CriteriaFilter.ts +60 -2
- package/Types/Monitor/DatabaseMetricCatalog.ts +693 -0
- package/Types/Monitor/DatabaseMonitor/DatabaseMonitorResponse.ts +83 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +76 -0
- package/Types/Monitor/MonitorMetricType.ts +71 -0
- package/Types/Monitor/MonitorStep.ts +76 -0
- package/Types/Monitor/MonitorStepDatabaseMonitor.ts +171 -0
- package/Types/Monitor/MonitorStepSqlMonitor.ts +2 -20
- package/Types/Monitor/MonitorType.ts +47 -1
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.ts +22 -1
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +61 -0
- package/Types/Monitor/SqlConnectionConfig.ts +31 -0
- package/Types/NetworkDevice/DefaultNetworkDeviceRole.ts +145 -0
- package/Types/NetworkDevice/NetworkAlertPolicyScope.ts +343 -0
- package/Types/NetworkDevice/NetworkDeviceMonitoringMethod.ts +42 -22
- package/Types/NetworkSite/DefaultNetworkSiteTypeHierarchy.ts +30 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.ts +255 -0
- package/Types/NotificationSetting/NotificationEmailRollupPolicy.ts +104 -0
- package/Types/Permission.ts +135 -0
- package/Types/Probe/ProbeMonitorResponse.ts +16 -0
- package/Types/Telemetry/ErrorClass.ts +274 -0
- package/Types/Telemetry/UnitOfWork.ts +59 -0
- package/UI/Components/Charts/Area/AreaChart.tsx +7 -0
- package/UI/Components/Charts/Bar/BarChart.tsx +6 -0
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +9 -1
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +97 -35
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +14 -0
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +97 -35
- package/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.ts +13 -0
- package/UI/Components/Charts/Line/LineChart.tsx +7 -0
- package/UI/Components/CommandPalette/CommandPalette.tsx +2 -8
- package/UI/Components/EditionLabel/EditionLabel.tsx +4 -0
- package/UI/Components/Modal/Modal.tsx +2 -8
- package/UI/Components/ModelTable/BaseModelTable.tsx +50 -15
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +44 -0
- package/UI/Components/Navbar/NavBar.tsx +62 -13
- package/UI/Components/Navbar/NavBarMenuModal.tsx +7 -2
- package/UI/Components/ProgressBar/ProgressBar.tsx +12 -1
- package/UI/Components/RadioButtons/BasicRadioButtons.tsx +37 -7
- package/UI/Components/SideMenu/CountModelSideMenuItem.tsx +2 -0
- package/UI/Components/SideMenu/SideMenu.tsx +135 -7
- package/UI/Components/SideMenu/SideMenuItem.tsx +80 -85
- package/UI/Components/SideMenu/SideMenuSection.tsx +69 -25
- package/UI/Components/SideOver/SideOver.tsx +21 -20
- package/UI/Utils/PageScrollLock.ts +79 -3
- package/UI/Utils/PermissionGate.ts +61 -0
- package/UI/Utils/SensitiveUrlToken.ts +112 -0
- package/UI/Utils/TestLLMProvider.ts +11 -0
- package/UI/Utils/UseDashboardTimeRangeZoom.ts +77 -0
- package/Utils/Dashboard/DashboardTimeRangeZoom.ts +118 -0
- package/Utils/EnterpriseLicense/EnterpriseLicenseSeats.ts +16 -0
- package/Utils/EnterpriseLicense/EnterpriseLicenseUsage.ts +191 -11
- package/Utils/Monitor/MonitorMetricType.ts +153 -1
- package/Utils/Monitor/NetworkDeviceRoleCatalog.ts +232 -0
- package/Utils/Monitor/NetworkDeviceRoleUtil.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.ts +139 -36
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +65 -14
- package/Utils/NetworkDevice/DeviceReachabilityUtil.ts +43 -14
- package/Utils/NetworkDevice/DeviceRoleKeyUtil.ts +137 -0
- package/Utils/NetworkDevice/NetworkAlertPolicyBootstrapUtil.ts +247 -0
- package/Utils/NetworkDevice/SnmpCredentialUtil.ts +68 -0
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +15 -7
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +52 -17
- package/Utils/NetworkDiscovery/DiscoveryImportEligibility.ts +55 -23
- package/Utils/NetworkDiscovery/PingMonitorBuilder.ts +115 -13
- package/Utils/NetworkSite/SiteStatusRollupUtil.ts +66 -20
- package/Utils/NetworkSite/TypeHierarchyUtil.ts +313 -0
- package/Utils/Rules/RulePatternMatchUtil.ts +1 -1
- package/Utils/Slug.ts +34 -1
- package/build/dist/Models/AnalyticsModels/Span.js +14 -0
- package/build/dist/Models/AnalyticsModels/Span.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertState.js +0 -2
- package/build/dist/Models/DatabaseModels/AlertState.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Domain.js +1 -1
- package/build/dist/Models/DatabaseModels/Domain.js.map +1 -1
- package/build/dist/Models/DatabaseModels/EnterpriseLicense.js +59 -0
- package/build/dist/Models/DatabaseModels/EnterpriseLicense.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js +1 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +12 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MetricType.js +0 -2
- package/build/dist/Models/DatabaseModels/MetricType.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Monitor.js +75 -0
- package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MonitorStatusTimeline.js +0 -2
- package/build/dist/Models/DatabaseModels/MonitorStatusTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MonitorTest.js +0 -2
- package/build/dist/Models/DatabaseModels/MonitorTest.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkAlertPolicy.js +713 -0
- package/build/dist/Models/DatabaseModels/NetworkAlertPolicy.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +304 -4
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceOidTemplate.js +3 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceOidTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceRole.js +677 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceRole.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkSite.js +200 -2
- package/build/dist/Models/DatabaseModels/NetworkSite.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSiteType.js +102 -3
- package/build/dist/Models/DatabaseModels/NetworkSiteType.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSnmpCredentialProfile.js +878 -0
- package/build/dist/Models/DatabaseModels/NetworkSnmpCredentialProfile.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncement.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncement.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncementTemplate.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncementTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPagePrivateUser.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPagePrivateUser.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageResource.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPageResource.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageSubscriber.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPageSubscriber.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryException.js +123 -0
- package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupBatch.js +363 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupBatch.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupItem.js +402 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupItem.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupSetting.js +296 -0
- package/build/dist/Models/DatabaseModels/UserNotificationEmailRollupSetting.js.map +1 -0
- package/build/dist/Server/API/EnterpriseLicenseAPI.js +273 -60
- package/build/dist/Server/API/EnterpriseLicenseAPI.js.map +1 -1
- package/build/dist/Server/API/LlmProviderAPI.js +108 -13
- package/build/dist/Server/API/LlmProviderAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +12 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790700000000-AddNetworkSiteTypeParentHierarchy.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790700000000-AddNetworkSiteTypeParentHierarchy.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790800000000-AddNetworkDeviceRoleTable.js +39 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790800000000-AddNetworkDeviceRoleTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddEnterpriseLicenseUsageProvenance.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddEnterpriseLicenseUsageProvenance.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddTelemetryExceptionErrorClass.js +111 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790900000000-AddTelemetryExceptionErrorClass.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791000000000-AddUserNotificationEmailRollup.js +77 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791000000000-AddUserNotificationEmailRollup.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791100000000-AddUserNotificationEmailRollupSetting.js +50 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791100000000-AddUserNotificationEmailRollupSetting.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791200000000-AddNetworkSnmpCredentialProfilesAndAlertPolicies.js +83 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1791200000000-AddNetworkSnmpCredentialProfilesAndAlertPolicies.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/QueueWorker.js +33 -5
- package/build/dist/Server/Infrastructure/QueueWorker.js.map +1 -1
- package/build/dist/Server/Middleware/BearerTokenAuthorization.js +12 -0
- package/build/dist/Server/Middleware/BearerTokenAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/ProjectAuthorization.js +11 -0
- package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/SCIMAuthorization.js +12 -0
- package/build/dist/Server/Middleware/SCIMAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +11 -0
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Services/AIBillingService.js +70 -16
- package/build/dist/Server/Services/AIBillingService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +31 -5
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseInstanceService.js +167 -0
- package/build/dist/Server/Services/EnterpriseLicenseInstanceService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseService.js +39 -0
- package/build/dist/Server/Services/EnterpriseLicenseService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +12 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +119 -21
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorStatusTimelineService.js +127 -8
- package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorTemplateService.js +162 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Services/NetworkAlertPolicyEngineService.js +1683 -0
- package/build/dist/Server/Services/NetworkAlertPolicyEngineService.js.map +1 -0
- package/build/dist/Server/Services/NetworkAlertPolicyService.js +732 -0
- package/build/dist/Server/Services/NetworkAlertPolicyService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +10 -9
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +54 -11
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceRoleService.js +70 -0
- package/build/dist/Server/Services/NetworkDeviceRoleService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceService.js +841 -70
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +1145 -107
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteTypeService.js +863 -0
- package/build/dist/Server/Services/NetworkSiteTypeService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSnmpCredentialProfileService.js +217 -0
- package/build/dist/Server/Services/NetworkSnmpCredentialProfileService.js.map +1 -0
- package/build/dist/Server/Services/NotificationService.js +80 -17
- package/build/dist/Server/Services/NotificationService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +131 -30
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/StatusPagePrivateUserService.js +92 -2
- package/build/dist/Server/Services/StatusPagePrivateUserService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationEmailRollupBatchService.js +76 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupBatchService.js.map +1 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupItemService.js +77 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupItemService.js.map +1 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupSettingService.js +111 -0
- package/build/dist/Server/Services/UserNotificationEmailRollupSettingService.js.map +1 -0
- package/build/dist/Server/Services/UserNotificationSettingService.js +46 -21
- package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +90 -0
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +14 -3
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.js +10 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.js +10 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightTriageRunner.js +54 -1
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightTriageRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js +18 -4
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js.map +1 -1
- package/build/dist/Server/Utils/Billing/BillingFailureNoticeThrottle.js +59 -0
- package/build/dist/Server/Utils/Billing/BillingFailureNoticeThrottle.js.map +1 -0
- package/build/dist/Server/Utils/DataSource/HttpFetch.js +2 -1
- package/build/dist/Server/Utils/DataSource/HttpFetch.js.map +1 -1
- package/build/dist/Server/Utils/EmailRollup/EmailRollupConstants.js +91 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupConstants.js.map +1 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupFlushRunner.js +691 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupFlushRunner.js.map +1 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupRenderer.js +497 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupRenderer.js.map +1 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupWriter.js +257 -0
- package/build/dist/Server/Utils/EmailRollup/EmailRollupWriter.js.map +1 -0
- package/build/dist/Server/Utils/LLM/LLMService.js +64 -1
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/LogRedaction.js +8 -0
- package/build/dist/Server/Utils/LogRedaction.js.map +1 -1
- package/build/dist/Server/Utils/Logger.js +63 -1
- package/build/dist/Server/Utils/Logger.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.js +141 -0
- package/build/dist/Server/Utils/Monitor/Criteria/DatabaseMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js +8 -1
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +51 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js +7 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +37 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js +158 -6
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +33 -0
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +32 -0
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +330 -21
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js +55 -10
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +178 -49
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +119 -29
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js +30 -17
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js.map +1 -1
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteHierarchyLock.js +158 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteHierarchyLock.js.map +1 -0
- package/build/dist/Server/Utils/OutboundUserAgent.js +123 -0
- package/build/dist/Server/Utils/OutboundUserAgent.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +38 -14
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/CaptureSpan.js +28 -8
- package/build/dist/Server/Utils/Telemetry/CaptureSpan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ErrorClassResolver.js +95 -0
- package/build/dist/Server/Utils/Telemetry/ErrorClassResolver.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/SpanUtil.js +29 -0
- package/build/dist/Server/Utils/Telemetry/SpanUtil.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry.js +162 -46
- package/build/dist/Server/Utils/Telemetry.js.map +1 -1
- package/build/dist/Types/AI/ExceptionAIClassification.js +10 -24
- package/build/dist/Types/AI/ExceptionAIClassification.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +1 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/EnterpriseLicense/EnterpriseLicenseUsageSnapshot.js +2 -0
- package/build/dist/Types/EnterpriseLicense/EnterpriseLicenseUsageSnapshot.js.map +1 -0
- package/build/dist/Types/EnterpriseLicense/EnterpriseLicenseUserCountSource.js +7 -0
- package/build/dist/Types/EnterpriseLicense/EnterpriseLicenseUserCountSource.js.map +1 -0
- package/build/dist/Types/Exception/ApiException.js +9 -0
- package/build/dist/Types/Exception/ApiException.js.map +1 -1
- package/build/dist/Types/Exception/BadDataException.js +10 -0
- package/build/dist/Types/Exception/BadDataException.js.map +1 -1
- package/build/dist/Types/Exception/BadRequestException.js +10 -0
- package/build/dist/Types/Exception/BadRequestException.js.map +1 -1
- package/build/dist/Types/Exception/Exception.js +56 -0
- package/build/dist/Types/Exception/Exception.js.map +1 -1
- package/build/dist/Types/Exception/ForbiddenException.js +9 -0
- package/build/dist/Types/Exception/ForbiddenException.js.map +1 -1
- package/build/dist/Types/Exception/NotAuthenticatedException.js +9 -0
- package/build/dist/Types/Exception/NotAuthenticatedException.js.map +1 -1
- package/build/dist/Types/Exception/NotAuthorizedException.js +9 -0
- package/build/dist/Types/Exception/NotAuthorizedException.js.map +1 -1
- package/build/dist/Types/Exception/NotFoundException.js +10 -0
- package/build/dist/Types/Exception/NotFoundException.js.map +1 -1
- package/build/dist/Types/Exception/PayloadTooLargeException.js +10 -0
- package/build/dist/Types/Exception/PayloadTooLargeException.js.map +1 -1
- package/build/dist/Types/Exception/PaymentRequiredException.js +9 -0
- package/build/dist/Types/Exception/PaymentRequiredException.js.map +1 -1
- package/build/dist/Types/Exception/ServiceUnavailableException.js +9 -0
- package/build/dist/Types/Exception/ServiceUnavailableException.js.map +1 -1
- package/build/dist/Types/Exception/SsoAuthorizationException.js +9 -0
- package/build/dist/Types/Exception/SsoAuthorizationException.js.map +1 -1
- package/build/dist/Types/Exception/TenantNotFoundException.js +10 -0
- package/build/dist/Types/Exception/TenantNotFoundException.js.map +1 -1
- package/build/dist/Types/Exception/TimeoutException.js +9 -0
- package/build/dist/Types/Exception/TimeoutException.js.map +1 -1
- package/build/dist/Types/Exception/TooManyRequestsException.js +9 -0
- package/build/dist/Types/Exception/TooManyRequestsException.js.map +1 -1
- package/build/dist/Types/Exception/UnableToReachServer.js +9 -0
- package/build/dist/Types/Exception/UnableToReachServer.js.map +1 -1
- package/build/dist/Types/Exception/WebsiteRequestException.js +9 -0
- package/build/dist/Types/Exception/WebsiteRequestException.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +45 -2
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/DatabaseMetricCatalog.js +594 -0
- package/build/dist/Types/Monitor/DatabaseMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/DatabaseMonitor/DatabaseMonitorResponse.js +21 -0
- package/build/dist/Types/Monitor/DatabaseMonitor/DatabaseMonitorResponse.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +70 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorMetricType.js +61 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +54 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepDatabaseMonitor.js +122 -0
- package/build/dist/Types/Monitor/MonitorStepDatabaseMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorType.js +45 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +21 -1
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js.map +1 -1
- package/build/dist/Types/Monitor/SqlConnectionConfig.js +2 -0
- package/build/dist/Types/Monitor/SqlConnectionConfig.js.map +1 -0
- package/build/dist/Types/NetworkDevice/DefaultNetworkDeviceRole.js +105 -0
- package/build/dist/Types/NetworkDevice/DefaultNetworkDeviceRole.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkAlertPolicyScope.js +172 -0
- package/build/dist/Types/NetworkDevice/NetworkAlertPolicyScope.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceMonitoringMethod.js +40 -22
- package/build/dist/Types/NetworkDevice/NetworkDeviceMonitoringMethod.js.map +1 -1
- package/build/dist/Types/NetworkSite/DefaultNetworkSiteTypeHierarchy.js +26 -0
- package/build/dist/Types/NetworkSite/DefaultNetworkSiteTypeHierarchy.js.map +1 -0
- package/build/dist/Types/NotificationSetting/NotificationEmailRollupCategory.js +186 -0
- package/build/dist/Types/NotificationSetting/NotificationEmailRollupCategory.js.map +1 -0
- package/build/dist/Types/NotificationSetting/NotificationEmailRollupPolicy.js +87 -0
- package/build/dist/Types/NotificationSetting/NotificationEmailRollupPolicy.js.map +1 -0
- package/build/dist/Types/Permission.js +120 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Telemetry/ErrorClass.js +216 -0
- package/build/dist/Types/Telemetry/ErrorClass.js.map +1 -0
- package/build/dist/Types/Telemetry/UnitOfWork.js +59 -0
- package/build/dist/Types/Telemetry/UnitOfWork.js.map +1 -0
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +6 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +79 -31
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +7 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +79 -31
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.js +14 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +1 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/CommandPalette/CommandPalette.js +2 -7
- package/build/dist/UI/Components/CommandPalette/CommandPalette.js.map +1 -1
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js +3 -0
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
- package/build/dist/UI/Components/Modal/Modal.js +2 -7
- package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +39 -13
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +39 -0
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBar.js +44 -9
- package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js +2 -2
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js.map +1 -1
- package/build/dist/UI/Components/ProgressBar/ProgressBar.js +12 -1
- package/build/dist/UI/Components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/dist/UI/Components/RadioButtons/BasicRadioButtons.js +6 -6
- package/build/dist/UI/Components/RadioButtons/BasicRadioButtons.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js +1 -1
- package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenu.js +76 -11
- package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js +50 -54
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuSection.js +32 -9
- package/build/dist/UI/Components/SideMenu/SideMenuSection.js.map +1 -1
- package/build/dist/UI/Components/SideOver/SideOver.js +5 -20
- package/build/dist/UI/Components/SideOver/SideOver.js.map +1 -1
- package/build/dist/UI/Utils/PageScrollLock.js +31 -3
- package/build/dist/UI/Utils/PageScrollLock.js.map +1 -1
- package/build/dist/UI/Utils/PermissionGate.js +42 -1
- package/build/dist/UI/Utils/PermissionGate.js.map +1 -1
- package/build/dist/UI/Utils/SensitiveUrlToken.js +97 -0
- package/build/dist/UI/Utils/SensitiveUrlToken.js.map +1 -0
- package/build/dist/UI/Utils/TestLLMProvider.js +4 -5
- package/build/dist/UI/Utils/TestLLMProvider.js.map +1 -1
- package/build/dist/UI/Utils/UseDashboardTimeRangeZoom.js +42 -0
- package/build/dist/UI/Utils/UseDashboardTimeRangeZoom.js.map +1 -0
- package/build/dist/Utils/Dashboard/DashboardTimeRangeZoom.js +74 -0
- package/build/dist/Utils/Dashboard/DashboardTimeRangeZoom.js.map +1 -0
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseSeats.js +15 -0
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseSeats.js.map +1 -1
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js +111 -9
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js.map +1 -1
- package/build/dist/Utils/Monitor/MonitorMetricType.js +109 -1
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkDeviceRoleCatalog.js +126 -0
- package/build/dist/Utils/Monitor/NetworkDeviceRoleCatalog.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceRoleUtil.js +2 -1
- package/build/dist/Utils/Monitor/NetworkDeviceRoleUtil.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +75 -35
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +27 -7
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceReachabilityUtil.js +7 -5
- package/build/dist/Utils/NetworkDevice/DeviceReachabilityUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceRoleKeyUtil.js +114 -0
- package/build/dist/Utils/NetworkDevice/DeviceRoleKeyUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDevice/NetworkAlertPolicyBootstrapUtil.js +180 -0
- package/build/dist/Utils/NetworkDevice/NetworkAlertPolicyBootstrapUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDevice/SnmpCredentialUtil.js +12 -0
- package/build/dist/Utils/NetworkDevice/SnmpCredentialUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js +15 -5
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +44 -15
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveryImportEligibility.js +52 -23
- package/build/dist/Utils/NetworkDiscovery/DiscoveryImportEligibility.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js +85 -13
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js +30 -15
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js.map +1 -1
- package/build/dist/Utils/NetworkSite/TypeHierarchyUtil.js +191 -0
- package/build/dist/Utils/NetworkSite/TypeHierarchyUtil.js.map +1 -0
- package/build/dist/Utils/Rules/RulePatternMatchUtil.js +1 -1
- package/build/dist/Utils/Slug.js +31 -1
- package/build/dist/Utils/Slug.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The fault domain of a thrown value: whose problem is it?
|
|
3
|
+
*
|
|
4
|
+
* This is the canonical vocabulary for the whole platform. It was originally
|
|
5
|
+
* introduced as `ExceptionAIClassification` — an after-the-fact LLM verdict on
|
|
6
|
+
* an already-ingested exception group — but the same five values are what the
|
|
7
|
+
* emitting code needs in order to decide, at the moment an error is thrown,
|
|
8
|
+
* whether it is worth waking anyone up. That file now re-exports this one so
|
|
9
|
+
* there is exactly ONE answer to "what kind of failure is this" in the
|
|
10
|
+
* codebase, with several possible sources (declared > human > AI > default).
|
|
11
|
+
*
|
|
12
|
+
* - CodeFault: a defect in the monitored code — the only class the automatic
|
|
13
|
+
* fix lane opens pull requests for. This is the BASE DEFAULT on purpose:
|
|
14
|
+
* forgetting to classify an exception must leave it noisy, never silent.
|
|
15
|
+
* - UserError: expected consequence of invalid end-user input (bad
|
|
16
|
+
* parameters, malformed values). The right change, if any, is earlier
|
|
17
|
+
* validation and clearer error UX — routed to a human, never auto-fixed.
|
|
18
|
+
* - ExpectedDenial: an intentional check doing its job (auth failure,
|
|
19
|
+
* plan/paywall denial, scanner/fuzzer probe tripping validation).
|
|
20
|
+
* Never auto-fixed; optionally auto-archived.
|
|
21
|
+
* - Infrastructure: environmental conditions (timeouts, connection resets,
|
|
22
|
+
* resource exhaustion) where a code "fix" is usually tuning — routed to a
|
|
23
|
+
* human. NOTE: this stays an Issue. It is a real failure, just not one to
|
|
24
|
+
* auto-fix.
|
|
25
|
+
* - Unknown: triage could not decide — treated conservatively (no automatic
|
|
26
|
+
* fix, and still shown).
|
|
27
|
+
*/
|
|
28
|
+
var ErrorClass;
|
|
29
|
+
(function (ErrorClass) {
|
|
30
|
+
ErrorClass["CodeFault"] = "code-fault";
|
|
31
|
+
ErrorClass["UserError"] = "user-error";
|
|
32
|
+
ErrorClass["ExpectedDenial"] = "expected-denial";
|
|
33
|
+
ErrorClass["Infrastructure"] = "infrastructure";
|
|
34
|
+
ErrorClass["Unknown"] = "unknown";
|
|
35
|
+
})(ErrorClass || (ErrorClass = {}));
|
|
36
|
+
/*
|
|
37
|
+
* The classes that do NOT warrant an Issue. Everything else — including
|
|
38
|
+
* Infrastructure and Unknown — stays loud.
|
|
39
|
+
*
|
|
40
|
+
* Exported as the single list so the emit path, the ingest path, the Issues
|
|
41
|
+
* list default scope and the AI detectors can never drift apart on which
|
|
42
|
+
* classes are suppressed.
|
|
43
|
+
*/
|
|
44
|
+
export const NON_ACTIONABLE_ERROR_CLASSES = [
|
|
45
|
+
ErrorClass.UserError,
|
|
46
|
+
ErrorClass.ExpectedDenial,
|
|
47
|
+
];
|
|
48
|
+
export function isNonActionableErrorClass(value) {
|
|
49
|
+
return NON_ACTIONABLE_ERROR_CLASSES.includes(value);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Every value the enum can take, for validating strings that arrive from
|
|
53
|
+
* outside (an OTLP attribute, a database column written by an older release).
|
|
54
|
+
*/
|
|
55
|
+
export function toErrorClass(value) {
|
|
56
|
+
if (typeof value !== "string") {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const match = Object.values(ErrorClass).find((candidate) => {
|
|
60
|
+
return candidate === value;
|
|
61
|
+
});
|
|
62
|
+
return match !== null && match !== void 0 ? match : null;
|
|
63
|
+
}
|
|
64
|
+
/*
|
|
65
|
+
* `Symbol.for` rather than `Symbol()`: Common/ ships its own node_modules and
|
|
66
|
+
* is consumed by App/, Probe/, Runner/ and others, so this module can be
|
|
67
|
+
* instantiated more than once in a single process. A unique symbol would not
|
|
68
|
+
* match across those instances and a tag written by one copy would be
|
|
69
|
+
* invisible to another. The global symbol registry is keyed by string, so all
|
|
70
|
+
* copies agree.
|
|
71
|
+
*/
|
|
72
|
+
const ERROR_CLASS_SYMBOL = Symbol.for("oneuptime.error.class");
|
|
73
|
+
const ERROR_CLASS_AUTHORITATIVE_SYMBOL = Symbol.for("oneuptime.error.class.authoritative");
|
|
74
|
+
const ERROR_REPORTED_SYMBOL = Symbol.for("oneuptime.error.reported");
|
|
75
|
+
function canTag(value) {
|
|
76
|
+
return (value !== null && (typeof value === "object" || typeof value === "function"));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Attach a fault domain to a thrown value.
|
|
80
|
+
*
|
|
81
|
+
* `enumerable: false` keeps it invisible to `JSON.stringify`,
|
|
82
|
+
* `Logger.redactBody` and `Telemetry.getExceptionAttributes`, so tagging can
|
|
83
|
+
* never change what a log line or a span attribute bag looks like.
|
|
84
|
+
*
|
|
85
|
+
* Never throws: this runs from the `Exception` constructor and from catch
|
|
86
|
+
* blocks, where a frozen object or a hostile Proxy must not take down the
|
|
87
|
+
* error path. Returns the value so it can be tagged inline.
|
|
88
|
+
*/
|
|
89
|
+
export function tagErrorClass(value, errorClass, authoritative = false) {
|
|
90
|
+
if (!canTag(value)) {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
Object.defineProperty(value, ERROR_CLASS_SYMBOL, {
|
|
95
|
+
value: errorClass,
|
|
96
|
+
enumerable: false,
|
|
97
|
+
writable: true,
|
|
98
|
+
configurable: true,
|
|
99
|
+
});
|
|
100
|
+
if (authoritative) {
|
|
101
|
+
Object.defineProperty(value, ERROR_CLASS_AUTHORITATIVE_SYMBOL, {
|
|
102
|
+
value: true,
|
|
103
|
+
enumerable: false,
|
|
104
|
+
writable: true,
|
|
105
|
+
configurable: true,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
catch (_a) {
|
|
110
|
+
// Frozen / sealed / exotic object — the resolver falls back to CodeFault.
|
|
111
|
+
}
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Declare the fault domain for ONE specific throw or log line, overriding the
|
|
116
|
+
* class-level default and exempting it from the unit-of-work promotion.
|
|
117
|
+
*/
|
|
118
|
+
export function tagErrorClassAuthoritative(value, errorClass) {
|
|
119
|
+
return tagErrorClass(value, errorClass, true);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Read the fault domain a thrown value declared for itself, or null when it
|
|
123
|
+
* declared none.
|
|
124
|
+
*
|
|
125
|
+
* A null return is meaningful and must stay distinct from
|
|
126
|
+
* `ErrorClass.Unknown`: "nobody predicted this" is the strongest possible
|
|
127
|
+
* signal that it is a bug, whereas Unknown means "we looked and could not
|
|
128
|
+
* tell". Callers turn null into CodeFault.
|
|
129
|
+
*
|
|
130
|
+
* Also duck-types off a plain `errorClass` property so an error crossing a
|
|
131
|
+
* process or module boundary (where the symbol is lost) can still declare
|
|
132
|
+
* itself.
|
|
133
|
+
*/
|
|
134
|
+
export function declaredErrorClass(value) {
|
|
135
|
+
if (!canTag(value)) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
try {
|
|
139
|
+
const authoritative = value[ERROR_CLASS_AUTHORITATIVE_SYMBOL] === true;
|
|
140
|
+
const tagged = toErrorClass(value[ERROR_CLASS_SYMBOL]);
|
|
141
|
+
if (tagged !== null) {
|
|
142
|
+
return { errorClass: tagged, authoritative: authoritative };
|
|
143
|
+
}
|
|
144
|
+
/*
|
|
145
|
+
* Duck-type off a plain property too, so an error that crossed a process
|
|
146
|
+
* or module boundary (where the symbol is lost) can still declare itself.
|
|
147
|
+
* A property survives serialization, so treat it as a deliberate
|
|
148
|
+
* declaration.
|
|
149
|
+
*/
|
|
150
|
+
const ducked = toErrorClass(value.errorClass);
|
|
151
|
+
if (ducked !== null) {
|
|
152
|
+
return { errorClass: ducked, authoritative: true };
|
|
153
|
+
}
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
catch (_a) {
|
|
157
|
+
// Throwing getter on an exotic thrown value.
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Mark a thrown value as already reported, returning whether it had ALREADY
|
|
163
|
+
* been marked.
|
|
164
|
+
*
|
|
165
|
+
* This is what stops one thrown error from filing N exception events as it
|
|
166
|
+
* propagates through N `@CaptureSpan` frames. The fingerprint hashes no spanId
|
|
167
|
+
* and no span name, so without this every frame's event lands in the same
|
|
168
|
+
* group and `occuranceCount` jumps by the depth of the call stack — measured
|
|
169
|
+
* at 3 for a create with a missing field and 6 for a permission-denied
|
|
170
|
+
* get-list.
|
|
171
|
+
*
|
|
172
|
+
* Untaggable values (a thrown string, a frozen object) always report `false`,
|
|
173
|
+
* i.e. they are reported every time. Over-reporting is the safe direction.
|
|
174
|
+
*/
|
|
175
|
+
export function markErrorReported(value) {
|
|
176
|
+
if (!canTag(value)) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
try {
|
|
180
|
+
const alreadyReported = value[ERROR_REPORTED_SYMBOL] === true;
|
|
181
|
+
if (!alreadyReported) {
|
|
182
|
+
Object.defineProperty(value, ERROR_REPORTED_SYMBOL, {
|
|
183
|
+
value: true,
|
|
184
|
+
enumerable: false,
|
|
185
|
+
writable: true,
|
|
186
|
+
configurable: true,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
return alreadyReported;
|
|
190
|
+
}
|
|
191
|
+
catch (_a) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Test seam: forget that a value was reported. Only used by tests that reuse
|
|
197
|
+
* one error object across cases.
|
|
198
|
+
*/
|
|
199
|
+
export function clearErrorReported(value) {
|
|
200
|
+
if (!canTag(value)) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
try {
|
|
204
|
+
Object.defineProperty(value, ERROR_REPORTED_SYMBOL, {
|
|
205
|
+
value: false,
|
|
206
|
+
enumerable: false,
|
|
207
|
+
writable: true,
|
|
208
|
+
configurable: true,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
catch (_a) {
|
|
212
|
+
// Nothing to clear.
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
export default ErrorClass;
|
|
216
|
+
//# sourceMappingURL=ErrorClass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorClass.js","sourceRoot":"","sources":["../../../../Types/Telemetry/ErrorClass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,IAAK,UAMJ;AAND,WAAK,UAAU;IACb,sCAAwB,CAAA;IACxB,sCAAwB,CAAA;IACxB,gDAAkC,CAAA;IAClC,+CAAiC,CAAA;IACjC,iCAAmB,CAAA;AACrB,CAAC,EANI,UAAU,KAAV,UAAU,QAMd;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAA8B;IACrE,UAAU,CAAC,SAAS;IACpB,UAAU,CAAC,cAAc;CAC1B,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,KAAc;IACtD,OAAO,4BAA4B,CAAC,QAAQ,CAAC,KAAmB,CAAC,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,KAAK,GAA2B,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAClE,CAAC,SAAqB,EAAE,EAAE;QACxB,OAAO,SAAS,KAAK,KAAK,CAAC;IAC7B,CAAC,CACF,CAAC;IAEF,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC;AACvB,CAAC;AAED;;;;;;;GAOG;A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M,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,qBAAqB,EAAE;YAClD,KAAK,EAAE,KAAK;YACZ,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;IACL,CAAC;IAAC,WAAM,CAAC;QACP,oBAAoB;IACtB,CAAC;AACH,CAAC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* What kind of work was in flight when something happened.
|
|
3
|
+
*
|
|
4
|
+
* This is the axis that makes class-based fault classification safe. The same
|
|
5
|
+
* exception class means different things depending on who asked for the work:
|
|
6
|
+
*
|
|
7
|
+
* throw new BadDataException("Monitor type required to create monitor.")
|
|
8
|
+
* -> inside an HTTP request: the caller sent a bad request. Not our bug.
|
|
9
|
+
*
|
|
10
|
+
* throw new BadDataException("No job found with name: " + name)
|
|
11
|
+
* -> inside a cron registration: an internal invariant we violated.
|
|
12
|
+
* Very much our bug.
|
|
13
|
+
*
|
|
14
|
+
* They are indistinguishable at the throw site and perfectly distinguishable
|
|
15
|
+
* by unit of work, so ErrorClassResolver promotes user-error and
|
|
16
|
+
* expected-denial back to code-fault everywhere except an HTTP request.
|
|
17
|
+
*
|
|
18
|
+
* Seed this EXPLICITLY at every entry point. TelemetryContext.runWithContext
|
|
19
|
+
* inherits the enclosing scope's attributes, so an unset value would let a
|
|
20
|
+
* request's "http-request" marker leak into background work started from
|
|
21
|
+
* inside that request.
|
|
22
|
+
*/
|
|
23
|
+
export var UnitOfWork;
|
|
24
|
+
(function (UnitOfWork) {
|
|
25
|
+
UnitOfWork["HttpRequest"] = "http-request";
|
|
26
|
+
UnitOfWork["WorkerJob"] = "worker-job";
|
|
27
|
+
UnitOfWork["CronJob"] = "cron-job";
|
|
28
|
+
UnitOfWork["ProbeCheck"] = "probe-check";
|
|
29
|
+
UnitOfWork["Notification"] = "notification";
|
|
30
|
+
UnitOfWork["Startup"] = "startup";
|
|
31
|
+
})(UnitOfWork || (UnitOfWork = {}));
|
|
32
|
+
/**
|
|
33
|
+
* Which deployment role produced this telemetry.
|
|
34
|
+
*
|
|
35
|
+
* Distinct from UnitOfWork, and distinct from `service.name`: the Helm chart
|
|
36
|
+
* runs the worker as a separate Deployment but from the same image and the
|
|
37
|
+
* same entrypoint (it only flips DISABLE_QUEUE_WORKERS), so worker pods report
|
|
38
|
+
* `service.name = "api"`. Until that changes — which re-keys every worker
|
|
39
|
+
* exception fingerprint and therefore needs its own release — this attribute
|
|
40
|
+
* is how "which component" becomes filterable.
|
|
41
|
+
*/
|
|
42
|
+
export var TelemetryComponent;
|
|
43
|
+
(function (TelemetryComponent) {
|
|
44
|
+
TelemetryComponent["Api"] = "api";
|
|
45
|
+
TelemetryComponent["Worker"] = "worker";
|
|
46
|
+
TelemetryComponent["Cron"] = "cron";
|
|
47
|
+
TelemetryComponent["Probe"] = "probe";
|
|
48
|
+
TelemetryComponent["Notification"] = "notification";
|
|
49
|
+
})(TelemetryComponent || (TelemetryComponent = {}));
|
|
50
|
+
/**
|
|
51
|
+
* Ambient TelemetryContext / span attribute keys. String constants rather than
|
|
52
|
+
* inline literals so the emit path, drop filters, dashboards and tests cannot
|
|
53
|
+
* drift apart on spelling.
|
|
54
|
+
*/
|
|
55
|
+
export const UNIT_OF_WORK_ATTRIBUTE_KEY = "oneuptime.unit_of_work";
|
|
56
|
+
export const COMPONENT_ATTRIBUTE_KEY = "oneuptime.component";
|
|
57
|
+
/** Span/log attribute carrying the resolved fault domain. */
|
|
58
|
+
export const ERROR_CLASS_ATTRIBUTE_KEY = "error.class";
|
|
59
|
+
//# sourceMappingURL=UnitOfWork.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnitOfWork.js","sourceRoot":"","sources":["../../../../Types/Telemetry/UnitOfWork.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,0CAA4B,CAAA;IAC5B,sCAAwB,CAAA;IACxB,kCAAoB,CAAA;IACpB,wCAA0B,CAAA;IAC1B,2CAA6B,CAAA;IAC7B,iCAAmB,CAAA;AACrB,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB;AAED;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;IACf,mDAA6B,CAAA;AAC/B,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAW,wBAAwB,CAAC;AAC3E,MAAM,CAAC,MAAM,uBAAuB,GAAW,qBAAqB,CAAC;AAErE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,yBAAyB,GAAW,aAAa,CAAC"}
|
|
@@ -108,7 +108,7 @@ const AreaChartElement = (props) => {
|
|
|
108
108
|
? formattedTimeReferenceLines
|
|
109
109
|
: undefined, formattedReferenceRegions: formattedReferenceRegions.length > 0
|
|
110
110
|
? formattedReferenceRegions
|
|
111
|
-
: undefined, formattedExemplarPoints: formattedExemplars.length > 0 ? formattedExemplars : undefined, onExemplarClick: props.onExemplarClick, onTimeRangeSelect: props.onTimeRangeSelect, onBucketClick: props.onBucketClick, ghostCategories: props.ghostSeriesNames, anomalyBandLowerKey: bandLower, anomalyBandUpperKey: bandUpper })),
|
|
111
|
+
: undefined, formattedExemplarPoints: formattedExemplars.length > 0 ? formattedExemplars : undefined, onExemplarClick: props.onExemplarClick, onTimeRangeSelect: props.onTimeRangeSelect, onTimeRangeReset: props.onTimeRangeReset, onBucketClick: props.onBucketClick, ghostCategories: props.ghostSeriesNames, anomalyBandLowerKey: bandLower, anomalyBandUpperKey: bandUpper })),
|
|
112
112
|
hasNoData && React.createElement(NoDataMessage, null)));
|
|
113
113
|
};
|
|
114
114
|
export default AreaChartElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaChart.js","sourceRoot":"","sources":["../../../../../../UI/Components/Charts/Area/AreaChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAKhE,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,OAAO,GACR,MAAM,OAAO,CAAC;AAIf,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAuB,EACrB,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAI9C,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAKzD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,aAAa,MAAM,6BAA6B,CAAC;AAExD,MAAM,CAAC,MAAM,gBAAgB,GAAoC;IAC/D,MAAM;IACN,SAAS;IACT,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;IACT,QAAQ;IACR,MAAM;CACP,CAAC;
|
|
1
|
+
{"version":3,"file":"AreaChart.js","sourceRoot":"","sources":["../../../../../../UI/Components/Charts/Area/AreaChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAKhE,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,OAAO,GACR,MAAM,OAAO,CAAC;AAIf,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAuB,EACrB,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAI9C,OAAO,aAAa,MAAM,oBAAoB,C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oBAAC,aAAa,OAAG,CAC3B,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -67,7 +67,7 @@ const BarChartElement = (props) => {
|
|
|
67
67
|
? formattedTimeReferenceLines
|
|
68
68
|
: undefined, formattedReferenceRegions: formattedReferenceRegions.length > 0
|
|
69
69
|
? formattedReferenceRegions
|
|
70
|
-
: undefined }),
|
|
70
|
+
: undefined, onTimeRangeReset: props.onTimeRangeReset }),
|
|
71
71
|
hasNoData && React.createElement(NoDataMessage, null)));
|
|
72
72
|
};
|
|
73
73
|
export default BarChartElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarChart.js","sourceRoot":"","sources":["../../../../../../UI/Components/Charts/Bar/BarChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAK7D,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,OAAO,GACR,MAAM,OAAO,CAAC;AAIf,OAAuB,EACrB,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAG9C,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAIzD,OAAO,aAAa,MAAM,6BAA6B,CAAC;AAExD,MAAM,CAAC,MAAM,eAAe,GAAoC;IAC9D,QAAQ;IACR,MAAM;IACN,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;CACV,CAAC;
|
|
1
|
+
{"version":3,"file":"BarChart.js","sourceRoot":"","sources":["../../../../../../UI/Components/Charts/Bar/BarChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAK7D,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,OAAO,GACR,MAAM,OAAO,CAAC;AAIf,OAAuB,EACrB,2BAA2B,GAC5B,MAAM,sCAAsC,CAAC;AAG9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AAS,IAAI,SAAS,EAC1D,WAAW,EAAE,IAAI,EACjB,UAAU,EAAE,KAAK,CAAC,UAAU,KAAK,KAAK,EACtC,UAAU,EAAE,EAAE,EACd,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC7C,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC,EACvB,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,2BAA2B,EACzB,2BAA2B,CAAC,MAAM,GAAG,CAAC;gBACpC,CAAC,CAAC,2BAA2B;gBAC7B,CAAC,CAAC,SAAS,EAEf,yBAAyB,EACvB,yBAAyB,CAAC,MAAM,GAAG,CAAC;gBAClC,CAAC,CAAC,yBAAyB;gBAC3B,CAAC,CAAC,SAAS,EAEf,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,GACxC;QACD,SAAS,IAAI,oBAAC,aAAa,OAAG,CAC3B,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -49,7 +49,12 @@ const ChartGroup = (props) => {
|
|
|
49
49
|
if (!supportsTimeRangeSelect) {
|
|
50
50
|
return React.createElement(React.Fragment, null);
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
/*
|
|
53
|
+
* The way back out is only worth naming while there is something to
|
|
54
|
+
* reset — the host supplies onTimeRangeReset exactly then.
|
|
55
|
+
*/
|
|
56
|
+
const canReset = Boolean(chart.props.onTimeRangeReset);
|
|
57
|
+
return (React.createElement("span", { className: "ml-auto shrink-0 whitespace-nowrap text-[10px] text-gray-400" }, canReset ? "Drag to zoom · double-click to reset" : "Drag to zoom"));
|
|
53
58
|
};
|
|
54
59
|
const getInfoIcon = (chart) => {
|
|
55
60
|
if (!chart.metricInfo) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartGroup.js","sourceRoot":"","sources":["../../../../../../UI/Components/Charts/ChartGroup/ChartGroup.tsx"],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AM,EAAE,MAAM,EACd,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,UAAU,EAAE,UAAU,IACtB,CACH,CAAC;YACJ,KAAK,SAAS,CAAC,GAAG;gBAChB,OAAO,CACL,oBAAC,eAAe,kBACd,GAAG,EAAE,KAAK,IACL,KAAK,CAAC,KAAuB,IAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,IACtB,CACH,CAAC;YACJ,KAAK,SAAS,CAAC,IAAI;gBACjB,OAAO,CACL,oBAAC,gBAAgB,kBACf,GAAG,EAAE,KAAK,IACL,KAAK,CAAC,KAAwB,IACnC,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,eAAe,EAAE,KAAK,CAAC,eAAe,EACtC,UAAU,EAAE,UAAU,IACtB,CACH,CAAC;YACJ;gBACE,OAAO,yCAAK,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;IAIF,uEAAuE;IACvE,MAAM,iBAAiB,GAA8B,CACnD,KAAY,EACE,EAAE;QAChB,MAAM,uBAAuB,GAC3B,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC;YAChE,OAAO,CACJ,KAAK,CAAC,KAAyC,CAAC,iBAAiB,CACnE,CAAC;QAEJ,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAC7B,OAAO,yCAAK,CAAC;QACf,CAAC;QAED,OAAO,CACL,8BAAM,SAAS,EAAC,8DAA8D,
|
|
1
|
+
{"version":3,"file":"ChartGroup.js","sourceRoot":"","sources":["../../../../../../UI/Components/Charts/ChartGroup/ChartGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAE1C,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9D,OAAO,SAA+C,MAAM,mBAAmB,CAAC;AAChF,OAAO,eAEN,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eAAe,UAAU,CAAC"}
|
|
@@ -19,6 +19,7 @@ import { useOnWindowResize } from "../Utils/UseWindowOnResize";
|
|
|
19
19
|
import { AvailableChartColors, constructCategoryColors, getColorClassName, getColorHex, isHexColorValue, } from "../Utils/ChartColors";
|
|
20
20
|
import useChartAnnotations from "../Annotations/UseChartAnnotations";
|
|
21
21
|
import { cx } from "../Utils/Cx";
|
|
22
|
+
import { DOUBLE_CLICK_DISAMBIGUATION_MS } from "../Utils/DoubleClick";
|
|
22
23
|
import { getYAxisDomain } from "../Utils/GetYAxisDomain";
|
|
23
24
|
import { hasOnlyOneValueForKey } from "../Utils/HasOnlyOneValueForKey";
|
|
24
25
|
import { prepareTooltipEntries, } from "../Utils/TooltipEntries";
|
|
@@ -247,7 +248,7 @@ const AreaChart = React.forwardRef((props, ref) => {
|
|
|
247
248
|
var _a, _b;
|
|
248
249
|
const { data = [], categories = [], index, colors = AvailableChartColors, valueFormatter = (value) => {
|
|
249
250
|
return value.toString();
|
|
250
|
-
}, startEndOnly = false, showXAxis = true, showYAxis = true, showGridLines = true, yAxisWidth = 56, intervalType = "equidistantPreserveStart", showTooltip = true, showLegend = true, autoMinValue = false, minValue, maxValue, allowDecimals = true, connectNulls = false, className, onValueChange, enableLegendSlider = false, tickGap = 5, xAxisLabel, yAxisLabel, legendPosition = "right", tooltipCallback, customTooltip, formattedTimeReferenceLines, formattedReferenceRegions, onTimeRangeSelect, onBucketClick, ghostCategories } = props, other = __rest(props, ["data", "categories", "index", "colors", "valueFormatter", "startEndOnly", "showXAxis", "showYAxis", "showGridLines", "yAxisWidth", "intervalType", "showTooltip", "showLegend", "autoMinValue", "minValue", "maxValue", "allowDecimals", "connectNulls", "className", "onValueChange", "enableLegendSlider", "tickGap", "xAxisLabel", "yAxisLabel", "legendPosition", "tooltipCallback", "customTooltip", "formattedTimeReferenceLines", "formattedReferenceRegions", "onTimeRangeSelect", "onBucketClick", "ghostCategories"]);
|
|
251
|
+
}, startEndOnly = false, showXAxis = true, showYAxis = true, showGridLines = true, yAxisWidth = 56, intervalType = "equidistantPreserveStart", showTooltip = true, showLegend = true, autoMinValue = false, minValue, maxValue, allowDecimals = true, connectNulls = false, className, onValueChange, enableLegendSlider = false, tickGap = 5, xAxisLabel, yAxisLabel, legendPosition = "right", tooltipCallback, customTooltip, formattedTimeReferenceLines, formattedReferenceRegions, onTimeRangeSelect, onTimeRangeReset, onBucketClick, ghostCategories } = props, other = __rest(props, ["data", "categories", "index", "colors", "valueFormatter", "startEndOnly", "showXAxis", "showYAxis", "showGridLines", "yAxisWidth", "intervalType", "showTooltip", "showLegend", "autoMinValue", "minValue", "maxValue", "allowDecimals", "connectNulls", "className", "onValueChange", "enableLegendSlider", "tickGap", "xAxisLabel", "yAxisLabel", "legendPosition", "tooltipCallback", "customTooltip", "formattedTimeReferenceLines", "formattedReferenceRegions", "onTimeRangeSelect", "onTimeRangeReset", "onBucketClick", "ghostCategories"]);
|
|
251
252
|
const CustomTooltip = customTooltip;
|
|
252
253
|
const paddingValue = (!showXAxis && !showYAxis) || (startEndOnly && !showYAxis) ? 0 : 20;
|
|
253
254
|
const [legendHeight, setLegendHeight] = React.useState(60);
|
|
@@ -260,7 +261,21 @@ const AreaChart = React.forwardRef((props, ref) => {
|
|
|
260
261
|
const rangeSelectionStartIndexRef = React.useRef(null);
|
|
261
262
|
const rangeSelectionEndIndexRef = React.useRef(null);
|
|
262
263
|
const suppressNextClickRef = React.useRef(false);
|
|
264
|
+
const hasOnTimeRangeReset = Boolean(onTimeRangeReset);
|
|
265
|
+
/*
|
|
266
|
+
* A pending single-click, held open long enough for a second click to
|
|
267
|
+
* cancel it. Only armed when onTimeRangeReset is supplied.
|
|
268
|
+
*/
|
|
269
|
+
const pendingClickTimeoutRef = React.useRef(null);
|
|
263
270
|
const categoryColors = constructCategoryColors(categories, colors);
|
|
271
|
+
React.useEffect(() => {
|
|
272
|
+
return () => {
|
|
273
|
+
if (pendingClickTimeoutRef.current !== null) {
|
|
274
|
+
clearTimeout(pendingClickTimeoutRef.current);
|
|
275
|
+
pendingClickTimeoutRef.current = null;
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
}, []);
|
|
264
279
|
/*
|
|
265
280
|
* Annotations are drawn onto the categorical axis, so the layer needs
|
|
266
281
|
* the same x values recharts is drawing — not the source dates.
|
|
@@ -459,6 +474,45 @@ const AreaChart = React.forwardRef((props, ref) => {
|
|
|
459
474
|
const endDate = new Date(lastBucketDate.getTime() + bucketWidthInMs);
|
|
460
475
|
onTimeRangeSelect(startDate, endDate);
|
|
461
476
|
}
|
|
477
|
+
/*
|
|
478
|
+
* The plain-click path, split out so it can either run inline (no
|
|
479
|
+
* reset handler) or be deferred behind the double-click window.
|
|
480
|
+
*/
|
|
481
|
+
function handleChartClick(chartState) {
|
|
482
|
+
/*
|
|
483
|
+
* A click while a legend/dot selection is active keeps its
|
|
484
|
+
* long-standing meaning — clear the selection — and never
|
|
485
|
+
* also pins a bucket.
|
|
486
|
+
*/
|
|
487
|
+
if (hasOnValueChange && (activeLegend || activeDot)) {
|
|
488
|
+
setActiveDot(undefined);
|
|
489
|
+
setActiveLegend(undefined);
|
|
490
|
+
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(null);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
if (!onBucketClick) {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
const rowIndex = getRowIndexFromChartState(chartState);
|
|
497
|
+
if (rowIndex === null) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
const bucketStart = getBucketDateAtIndex(rowIndex);
|
|
501
|
+
if (!bucketStart) {
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
/*
|
|
505
|
+
* Cover the full bucket: width from adjacent row dates, the
|
|
506
|
+
* same derivation drag-to-select uses.
|
|
507
|
+
*/
|
|
508
|
+
const adjacentBucketDate = rowIndex > 0
|
|
509
|
+
? getBucketDateAtIndex(rowIndex - 1)
|
|
510
|
+
: getBucketDateAtIndex(rowIndex + 1);
|
|
511
|
+
const clickedBucketWidthInMs = adjacentBucketDate
|
|
512
|
+
? Math.abs(bucketStart.getTime() - adjacentBucketDate.getTime())
|
|
513
|
+
: 0;
|
|
514
|
+
onBucketClick(bucketStart, new Date(bucketStart.getTime() + clickedBucketWidthInMs), (data[rowIndex] || {}));
|
|
515
|
+
}
|
|
462
516
|
return (React.createElement("div", Object.assign({ ref: ref, className: cx("flex-1 w-full", hasOnTimeRangeSelect && "cursor-crosshair", className) }, other),
|
|
463
517
|
React.createElement("div", { className: cx("relative isolate h-full w-full") },
|
|
464
518
|
React.createElement(ResponsiveContainer, null,
|
|
@@ -473,40 +527,34 @@ const AreaChart = React.forwardRef((props, ref) => {
|
|
|
473
527
|
if (suppressNextClickRef.current) {
|
|
474
528
|
return;
|
|
475
529
|
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
* long-standing meaning — clear the selection — and never
|
|
479
|
-
* also pins a bucket.
|
|
480
|
-
*/
|
|
481
|
-
if (hasOnValueChange && (activeLegend || activeDot)) {
|
|
482
|
-
setActiveDot(undefined);
|
|
483
|
-
setActiveLegend(undefined);
|
|
484
|
-
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(null);
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
if (!onBucketClick) {
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
490
|
-
const rowIndex = getRowIndexFromChartState(chartState);
|
|
491
|
-
if (rowIndex === null) {
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
const bucketStart = getBucketDateAtIndex(rowIndex);
|
|
495
|
-
if (!bucketStart) {
|
|
530
|
+
if (!hasOnTimeRangeReset) {
|
|
531
|
+
handleChartClick(chartState);
|
|
496
532
|
return;
|
|
497
533
|
}
|
|
498
534
|
/*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
535
|
+
* Reset is on, so hold the click open: both clicks of a
|
|
536
|
+
* double-click arrive before dblclick does, and neither
|
|
537
|
+
* may pin a bucket. The second click re-arms the timer,
|
|
538
|
+
* dblclick clears it.
|
|
501
539
|
*/
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
},
|
|
540
|
+
if (pendingClickTimeoutRef.current !== null) {
|
|
541
|
+
clearTimeout(pendingClickTimeoutRef.current);
|
|
542
|
+
}
|
|
543
|
+
pendingClickTimeoutRef.current = setTimeout(() => {
|
|
544
|
+
pendingClickTimeoutRef.current = null;
|
|
545
|
+
handleChartClick(chartState);
|
|
546
|
+
}, DOUBLE_CLICK_DISAMBIGUATION_MS);
|
|
547
|
+
} }, (hasOnTimeRangeReset
|
|
548
|
+
? {
|
|
549
|
+
onDoubleClick: () => {
|
|
550
|
+
if (pendingClickTimeoutRef.current !== null) {
|
|
551
|
+
clearTimeout(pendingClickTimeoutRef.current);
|
|
552
|
+
pendingClickTimeoutRef.current = null;
|
|
553
|
+
}
|
|
554
|
+
onTimeRangeReset === null || onTimeRangeReset === void 0 ? void 0 : onTimeRangeReset();
|
|
555
|
+
},
|
|
556
|
+
}
|
|
557
|
+
: {}), { margin: {
|
|
510
558
|
bottom: (xAxisLabel
|
|
511
559
|
? 40
|
|
512
560
|
: showXAxis
|