@oneuptime/common 12.0.32 → 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/EnterpriseLicense.ts +56 -0
- package/Models/DatabaseModels/Index.ts +10 -0
- package/Models/DatabaseModels/Monitor.ts +76 -0
- package/Models/DatabaseModels/NetworkAlertPolicy.ts +690 -0
- package/Models/DatabaseModels/NetworkDevice.ts +176 -1
- package/Models/DatabaseModels/NetworkSite.ts +201 -2
- package/Models/DatabaseModels/NetworkSiteType.ts +102 -3
- package/Models/DatabaseModels/NetworkSnmpCredentialProfile.ts +841 -0
- 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/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 +12 -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/EnterpriseLicenseInstanceService.ts +197 -0
- package/Server/Services/EnterpriseLicenseService.ts +55 -0
- package/Server/Services/Index.ts +10 -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/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 +105 -48
- 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 -25
- 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 +134 -33
- package/Tests/App/Dashboard/AskAiSuggestedPrompts.test.ts +279 -0
- package/Tests/App/Dashboard/DashboardEditPermissions.test.tsx +517 -0
- package/Tests/App/Dashboard/DashboardVariablesDiscard.test.tsx +26 -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/MonitorTypePicker.test.tsx +4 -2
- 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 +41 -5
- 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/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/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/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/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/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/ProjectServiceNetworkSiteTypeDefaults.test.ts +214 -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/UserNotificationSettingRollupRouting.test.ts +856 -0
- package/Tests/Server/Services/UserNotificationSettingWorkspaceChannels.test.ts +102 -1
- 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/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/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/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/MonitorTemplateVariables/TemplateVariablesCatalog.test.ts +15 -0
- package/Tests/UI/Components/ProgressBar.test.tsx +38 -2
- package/Tests/UI/Components/SideMenuItem.test.tsx +226 -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/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/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/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/Telemetry/CaptureSpanExportGating.test.ts +145 -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/SqlConnectionConfig.ts +31 -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 +90 -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/CommandPalette/CommandPalette.tsx +2 -8
- package/UI/Components/EditionLabel/EditionLabel.tsx +4 -0
- package/UI/Components/Modal/Modal.tsx +2 -8
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +44 -0
- package/UI/Components/ProgressBar/ProgressBar.tsx +12 -1
- package/UI/Components/RadioButtons/BasicRadioButtons.tsx +37 -7
- package/UI/Components/SideMenu/SideMenu.tsx +123 -5
- package/UI/Components/SideMenu/SideMenuItem.tsx +76 -84
- package/UI/Components/SideMenu/SideMenuSection.tsx +55 -23
- 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/Utils/EnterpriseLicense/EnterpriseLicenseSeats.ts +16 -0
- package/Utils/EnterpriseLicense/EnterpriseLicenseUsage.ts +191 -11
- package/Utils/Monitor/MonitorMetricType.ts +153 -1
- package/Utils/Monitor/NetworkTopologyUtil.ts +23 -3
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +65 -14
- package/Utils/NetworkDevice/DeviceReachabilityUtil.ts +43 -14
- 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/build/dist/Models/AnalyticsModels/Span.js +14 -0
- package/build/dist/Models/AnalyticsModels/Span.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/Index.js +10 -0
- package/build/dist/Models/DatabaseModels/Index.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/NetworkAlertPolicy.js +713 -0
- package/build/dist/Models/DatabaseModels/NetworkAlertPolicy.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +180 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- 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/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/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 +12 -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/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 +10 -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/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 +66 -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 -20
- 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/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 +80 -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/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/MonitorTemplateVariables/TemplateVariablesCatalog.js +39 -0
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.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/SideMenu.js +67 -5
- package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js +49 -53
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuSection.js +25 -7
- 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/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/NetworkTopologyUtil.js +8 -3
- 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/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/package.json +2 -2
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
2
|
+
import {
|
|
3
|
+
afterEach,
|
|
4
|
+
beforeEach,
|
|
5
|
+
describe,
|
|
6
|
+
expect,
|
|
7
|
+
jest,
|
|
8
|
+
test,
|
|
9
|
+
} from "@jest/globals";
|
|
10
|
+
import {
|
|
11
|
+
cleanup,
|
|
12
|
+
fireEvent,
|
|
13
|
+
render,
|
|
14
|
+
screen,
|
|
15
|
+
waitFor,
|
|
16
|
+
} from "@testing-library/react";
|
|
17
|
+
import * as React from "react";
|
|
18
|
+
import { MemoryRouter } from "react-router-dom";
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* The device Overview's status hero, RENDERED.
|
|
22
|
+
*
|
|
23
|
+
* A monitor-backed device with nothing bound is the one "Pending" that never
|
|
24
|
+
* resolves by itself, so the hero says so three ways: a gray "No monitor"
|
|
25
|
+
* qualifier beside the verdict, a caption that admits nothing is reporting,
|
|
26
|
+
* and a Monitor Status tile that turns into the two ways out — create a Ping
|
|
27
|
+
* monitor (seeded on this device, so it binds on save) or bind an existing
|
|
28
|
+
* one under Settings. A BOUND monitor-backed device that has simply not been
|
|
29
|
+
* evaluated yet gets none of that: it reads "Pending" with a different
|
|
30
|
+
* tooltip, its caption credits the monitor, and the tile says "Not
|
|
31
|
+
* monitored". A probe-polled device keeps the poll vocabulary, and has its own
|
|
32
|
+
* never-resolving Pending — no probe assigned, or polling switched off —
|
|
33
|
+
* qualified by "No probe" rather than by anything about binding.
|
|
34
|
+
*
|
|
35
|
+
* Until now every one of those sentences was pinned by a source-text match
|
|
36
|
+
* (DeviceStatusSurfaceInvariants, NetworkDeviceStatusCopyInvariants) plus a
|
|
37
|
+
* unit test of the `isUnboundMonitorBackedDevice` predicate. Nothing
|
|
38
|
+
* rendered the hero, so swapping `isUnbound` for `isMonitorBacked` in one
|
|
39
|
+
* branch — which puts "No monitor" and two dead-end links on a device whose
|
|
40
|
+
* monitor is bound and merely quiet — left every suite green. This renders
|
|
41
|
+
* the real component against a ModelAPI stub, one row per case, and asserts
|
|
42
|
+
* the DOM: which pills, which caption, which tile, which hrefs.
|
|
43
|
+
*
|
|
44
|
+
* Tooltips are tippy, portalled to document.body on mouseenter; the notes in
|
|
45
|
+
* DisabledButtonTooltip.test.tsx on asserting them under jsdom apply here.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
let deviceRow: NetworkDevice | null = null;
|
|
49
|
+
let getItemRequests: Array<{
|
|
50
|
+
modelType: unknown;
|
|
51
|
+
id: ObjectID;
|
|
52
|
+
select?: Record<string, unknown> | undefined;
|
|
53
|
+
}> = [];
|
|
54
|
+
|
|
55
|
+
jest.mock("../../../UI/Utils/ModelAPI/ModelAPI", () => {
|
|
56
|
+
return {
|
|
57
|
+
__esModule: true,
|
|
58
|
+
default: {
|
|
59
|
+
getItem: (request: {
|
|
60
|
+
modelType: unknown;
|
|
61
|
+
id: ObjectID;
|
|
62
|
+
select?: Record<string, unknown> | undefined;
|
|
63
|
+
}): Promise<unknown> => {
|
|
64
|
+
getItemRequests.push(request);
|
|
65
|
+
return Promise.resolve(deviceRow);
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
import DeviceStatusHero from "../../../../App/FeatureSet/Dashboard/src/Components/NetworkDevice/DeviceStatusHero";
|
|
72
|
+
import {
|
|
73
|
+
BOUND_MONITOR_PENDING_TOOLTIP,
|
|
74
|
+
NO_MONITOR_QUALIFIER,
|
|
75
|
+
NO_PROBE_QUALIFIER,
|
|
76
|
+
SNMP_FAILING_QUALIFIER,
|
|
77
|
+
UNBOUND_MONITOR_BACKED_PENDING_TOOLTIP,
|
|
78
|
+
} from "../../../../App/FeatureSet/Dashboard/src/Components/NetworkDevice/DeviceStatusUtil";
|
|
79
|
+
import PageMap from "../../../../App/FeatureSet/Dashboard/src/Utils/PageMap";
|
|
80
|
+
import RouteMap, {
|
|
81
|
+
RouteUtil,
|
|
82
|
+
} from "../../../../App/FeatureSet/Dashboard/src/Utils/RouteMap";
|
|
83
|
+
import MonitorStatus from "../../../Models/DatabaseModels/MonitorStatus";
|
|
84
|
+
import NetworkDevice from "../../../Models/DatabaseModels/NetworkDevice";
|
|
85
|
+
import Route from "../../../Types/API/Route";
|
|
86
|
+
import { Green } from "../../../Types/BrandColors";
|
|
87
|
+
import NetworkDeviceMonitoringMethod from "../../../Types/NetworkDevice/NetworkDeviceMonitoringMethod";
|
|
88
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
* Below the imports on purpose: the jest.mock factory above is hoisted, which
|
|
92
|
+
* leaves the imports evaluated after any module-level constant that precedes
|
|
93
|
+
* them, and constructing an ObjectID up there runs before the class exists.
|
|
94
|
+
*/
|
|
95
|
+
const DEVICE_ID: ObjectID = new ObjectID(
|
|
96
|
+
"22222222-2222-4222-8222-222222222222",
|
|
97
|
+
);
|
|
98
|
+
const MONITOR_ID: ObjectID = new ObjectID(
|
|
99
|
+
"33333333-3333-4333-8333-333333333333",
|
|
100
|
+
);
|
|
101
|
+
const PROBE_ID: ObjectID = new ObjectID("44444444-4444-4444-8444-444444444444");
|
|
102
|
+
|
|
103
|
+
/** The columns that decide everything under test, nothing else set. */
|
|
104
|
+
function device(data: {
|
|
105
|
+
monitoringMethod: string | undefined;
|
|
106
|
+
monitorId?: ObjectID | undefined;
|
|
107
|
+
probeId?: ObjectID | undefined;
|
|
108
|
+
isPollingEnabled?: boolean | undefined;
|
|
109
|
+
isReachable?: boolean | undefined;
|
|
110
|
+
isSnmpReachable?: boolean | undefined;
|
|
111
|
+
polledJustNow?: boolean | undefined;
|
|
112
|
+
status?: { name: string; isOfflineState: boolean } | undefined;
|
|
113
|
+
}): NetworkDevice {
|
|
114
|
+
const row: NetworkDevice = new NetworkDevice();
|
|
115
|
+
row.id = DEVICE_ID;
|
|
116
|
+
row.name = "Lobby AP";
|
|
117
|
+
row.hostname = "10.0.12.41";
|
|
118
|
+
|
|
119
|
+
if (data.monitoringMethod !== undefined) {
|
|
120
|
+
row.monitoringMethod = data.monitoringMethod;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (data.monitorId) {
|
|
124
|
+
row.monitorId = data.monitorId;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (data.probeId) {
|
|
128
|
+
row.probeId = data.probeId;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (data.isPollingEnabled !== undefined) {
|
|
132
|
+
row.isPollingEnabled = data.isPollingEnabled;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (data.isReachable !== undefined) {
|
|
136
|
+
row.isReachable = data.isReachable;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/*
|
|
140
|
+
* `isSnmpReachable` left unset is the NULL the column carries when no walk
|
|
141
|
+
* was attempted — a ping-only device — and it is a different state from
|
|
142
|
+
* `false`, which is a walk that ran and failed.
|
|
143
|
+
*/
|
|
144
|
+
if (data.isSnmpReachable !== undefined) {
|
|
145
|
+
row.isSnmpReachable = data.isSnmpReachable;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/*
|
|
149
|
+
* A poll that has just happened, so the shared rule's stale window cannot
|
|
150
|
+
* expire and add an amber pill the assertions below do not expect.
|
|
151
|
+
*/
|
|
152
|
+
if (data.polledJustNow) {
|
|
153
|
+
const now: Date = new Date();
|
|
154
|
+
row.lastPolledAt = now;
|
|
155
|
+
|
|
156
|
+
if (data.isReachable) {
|
|
157
|
+
row.lastSeenAt = now;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (data.status) {
|
|
162
|
+
const status: MonitorStatus = new MonitorStatus();
|
|
163
|
+
status.name = data.status.name;
|
|
164
|
+
status.color = Green;
|
|
165
|
+
status.isOfflineState = data.status.isOfflineState;
|
|
166
|
+
row.currentMonitorStatus = status;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return row;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** (a) Monitor-backed, nothing bound, nothing reported. */
|
|
173
|
+
function unboundMonitorBackedDevice(): NetworkDevice {
|
|
174
|
+
return device({ monitoringMethod: NetworkDeviceMonitoringMethod.Monitor });
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** (b) Monitor-backed, a monitor bound, nothing reported yet. */
|
|
178
|
+
function boundQuietMonitorBackedDevice(): NetworkDevice {
|
|
179
|
+
return device({
|
|
180
|
+
monitoringMethod: NetworkDeviceMonitoringMethod.Monitor,
|
|
181
|
+
monitorId: MONITOR_ID,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* (c) Probe-polled by way of the NULL column — the legacy spelling parses to
|
|
187
|
+
* Probe — with a probe assigned and polling on, and no poll reported yet.
|
|
188
|
+
*/
|
|
189
|
+
function neverPolledProbeDevice(): NetworkDevice {
|
|
190
|
+
return device({
|
|
191
|
+
monitoringMethod: undefined,
|
|
192
|
+
probeId: PROBE_ID,
|
|
193
|
+
isPollingEnabled: true,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* (e) Probe-polled with NO probe assigned: the Pending that never resolves by
|
|
199
|
+
* itself on this kind of device, the way an unbound monitor-backed one is.
|
|
200
|
+
*/
|
|
201
|
+
function unpolledProbeDevice(): NetworkDevice {
|
|
202
|
+
return device({ monitoringMethod: NetworkDeviceMonitoringMethod.Probe });
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** (d) Monitor-backed, bound, and the monitor has reported. */
|
|
206
|
+
function boundReportingMonitorBackedDevice(): NetworkDevice {
|
|
207
|
+
return device({
|
|
208
|
+
monitoringMethod: NetworkDeviceMonitoringMethod.Monitor,
|
|
209
|
+
monitorId: MONITOR_ID,
|
|
210
|
+
status: { name: "Operational", isOfflineState: false },
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
async function renderHero(row: NetworkDevice): Promise<void> {
|
|
215
|
+
deviceRow = row;
|
|
216
|
+
|
|
217
|
+
render(
|
|
218
|
+
<MemoryRouter>
|
|
219
|
+
<DeviceStatusHero modelId={DEVICE_ID} />
|
|
220
|
+
</MemoryRouter>,
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
await waitFor(() => {
|
|
224
|
+
expect(screen.queryByTestId("device-status-hero-skeleton")).toBeNull();
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
// Not the empty fragment the hero falls back to on a failed read.
|
|
228
|
+
expect(screen.getByTestId("device-status-hero")).toBeInTheDocument();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Every pill on the hero, in DOM order — verdict, qualifiers, tile. */
|
|
232
|
+
function pillTexts(): Array<string> {
|
|
233
|
+
return Array.from(
|
|
234
|
+
screen
|
|
235
|
+
.getByTestId("device-status-hero")
|
|
236
|
+
.querySelectorAll<HTMLElement>('[data-testid="pill"]'),
|
|
237
|
+
).map((pill: HTMLElement): string => {
|
|
238
|
+
return pill.textContent || "";
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function linkHref(text: string): string {
|
|
243
|
+
const anchor: HTMLAnchorElement | null = screen.getByText(text).closest("a");
|
|
244
|
+
|
|
245
|
+
expect(anchor).not.toBeNull();
|
|
246
|
+
|
|
247
|
+
return anchor!.getAttribute("href") || "";
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The pill carrying this text. Scoped to `[data-testid="pill"]` rather than
|
|
252
|
+
* matched on text anywhere in the hero, because "No probe" is also the "Polled
|
|
253
|
+
* By" tile's empty state — the qualifier and the tile say the same two words
|
|
254
|
+
* about two different things, and a bare text query would find both.
|
|
255
|
+
*/
|
|
256
|
+
function pillNamed(pillText: string): HTMLElement {
|
|
257
|
+
const pill: HTMLElement | undefined = Array.from(
|
|
258
|
+
screen
|
|
259
|
+
.getByTestId("device-status-hero")
|
|
260
|
+
.querySelectorAll<HTMLElement>('[data-testid="pill"]'),
|
|
261
|
+
).find((candidate: HTMLElement): boolean => {
|
|
262
|
+
return (candidate.textContent || "").trim() === pillText;
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
if (!pill) {
|
|
266
|
+
throw new Error(`No pill reading "${pillText}" was rendered.`);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return pill;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** Hover a pill and return the text of every tooltip tippy has mounted. */
|
|
273
|
+
function tooltipsAfterHovering(pillText: string): Array<string> {
|
|
274
|
+
fireEvent.mouseEnter(pillNamed(pillText));
|
|
275
|
+
|
|
276
|
+
return screen.getAllByRole("tooltip").map((tooltip: HTMLElement): string => {
|
|
277
|
+
return tooltip.textContent || "";
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const SETTINGS_HREF: string = RouteUtil.populateRouteParams(
|
|
282
|
+
RouteMap[PageMap.NETWORK_DEVICE_VIEW_SETTINGS] as Route,
|
|
283
|
+
{ modelId: DEVICE_ID },
|
|
284
|
+
).toString();
|
|
285
|
+
|
|
286
|
+
const MONITOR_CREATE_HREF: string = RouteUtil.populateRouteParams(
|
|
287
|
+
RouteMap[PageMap.MONITOR_CREATE] as Route,
|
|
288
|
+
).toString();
|
|
289
|
+
|
|
290
|
+
describe("the device Overview status hero", () => {
|
|
291
|
+
beforeEach(() => {
|
|
292
|
+
deviceRow = null;
|
|
293
|
+
getItemRequests = [];
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
afterEach(() => {
|
|
297
|
+
cleanup();
|
|
298
|
+
jest.clearAllMocks();
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
describe("a monitor-backed device with no monitor bound", () => {
|
|
302
|
+
test("reads Pending with the No monitor qualifier beside it", async () => {
|
|
303
|
+
await renderHero(unboundMonitorBackedDevice());
|
|
304
|
+
|
|
305
|
+
expect(pillTexts()).toEqual(["Pending", NO_MONITOR_QUALIFIER.text]);
|
|
306
|
+
expect(screen.getByText("No monitor")).toBeInTheDocument();
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
test("says nothing is bound to report on it", async () => {
|
|
310
|
+
await renderHero(unboundMonitorBackedDevice());
|
|
311
|
+
|
|
312
|
+
expect(
|
|
313
|
+
screen.getByText("Nothing is bound to report on it yet"),
|
|
314
|
+
).toBeInTheDocument();
|
|
315
|
+
expect(
|
|
316
|
+
screen.queryByText("Reported by the monitor bound to this device"),
|
|
317
|
+
).toBeNull();
|
|
318
|
+
// The poll vocabulary is for devices something polls.
|
|
319
|
+
expect(screen.queryByText("Never answered a poll")).toBeNull();
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
test("turns the Monitor Status tile into the two ways out", async () => {
|
|
323
|
+
await renderHero(unboundMonitorBackedDevice());
|
|
324
|
+
|
|
325
|
+
expect(screen.getByText("No monitor bound")).toBeInTheDocument();
|
|
326
|
+
expect(screen.queryByText("Not monitored")).toBeNull();
|
|
327
|
+
|
|
328
|
+
/*
|
|
329
|
+
* The create link carries the device id, which is what makes the
|
|
330
|
+
* monitor form seed a Ping monitor on this address and bind it on
|
|
331
|
+
* save — without it the form opens on a blank monitor.
|
|
332
|
+
*/
|
|
333
|
+
const createHref: string = linkHref("Create Ping monitor");
|
|
334
|
+
expect(createHref).toContain(MONITOR_CREATE_HREF);
|
|
335
|
+
expect(createHref).toContain(`networkDeviceId=${DEVICE_ID.toString()}`);
|
|
336
|
+
|
|
337
|
+
expect(linkHref("Bind a monitor")).toBe(SETTINGS_HREF);
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
test("explains Pending as the missing binding, and the qualifier as what to do", async () => {
|
|
341
|
+
await renderHero(unboundMonitorBackedDevice());
|
|
342
|
+
|
|
343
|
+
expect(tooltipsAfterHovering("Pending")).toContain(
|
|
344
|
+
UNBOUND_MONITOR_BACKED_PENDING_TOOLTIP,
|
|
345
|
+
);
|
|
346
|
+
expect(tooltipsAfterHovering(NO_MONITOR_QUALIFIER.text)).toContain(
|
|
347
|
+
NO_MONITOR_QUALIFIER.tooltip,
|
|
348
|
+
);
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
describe("a monitor-backed device whose bound monitor has not reported", () => {
|
|
353
|
+
test("reads Pending alone — the qualifier is for the unbound case", async () => {
|
|
354
|
+
await renderHero(boundQuietMonitorBackedDevice());
|
|
355
|
+
|
|
356
|
+
expect(pillTexts()).toEqual(["Pending"]);
|
|
357
|
+
expect(screen.queryByText(NO_MONITOR_QUALIFIER.text)).toBeNull();
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
test("credits the bound monitor and offers no links", async () => {
|
|
361
|
+
await renderHero(boundQuietMonitorBackedDevice());
|
|
362
|
+
|
|
363
|
+
expect(
|
|
364
|
+
screen.getByText("Reported by the monitor bound to this device"),
|
|
365
|
+
).toBeInTheDocument();
|
|
366
|
+
expect(
|
|
367
|
+
screen.queryByText("Nothing is bound to report on it yet"),
|
|
368
|
+
).toBeNull();
|
|
369
|
+
|
|
370
|
+
expect(screen.getByText("Not monitored")).toBeInTheDocument();
|
|
371
|
+
expect(screen.queryByText("No monitor bound")).toBeNull();
|
|
372
|
+
expect(screen.queryByText("Create Ping monitor")).toBeNull();
|
|
373
|
+
expect(screen.queryByText("Bind a monitor")).toBeNull();
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
test("explains Pending as a monitor that has not reported yet", async () => {
|
|
377
|
+
await renderHero(boundQuietMonitorBackedDevice());
|
|
378
|
+
|
|
379
|
+
const tooltips: Array<string> = tooltipsAfterHovering("Pending");
|
|
380
|
+
|
|
381
|
+
expect(tooltips).toContain(BOUND_MONITOR_PENDING_TOOLTIP);
|
|
382
|
+
expect(tooltips).not.toContain(UNBOUND_MONITOR_BACKED_PENDING_TOOLTIP);
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
describe("a monitor-backed device whose bound monitor has reported", () => {
|
|
387
|
+
test("shows the monitor's verdict and its own status word, and nothing about binding", async () => {
|
|
388
|
+
await renderHero(boundReportingMonitorBackedDevice());
|
|
389
|
+
|
|
390
|
+
expect(pillTexts()).toEqual(["Up", "Operational"]);
|
|
391
|
+
expect(screen.queryByText(NO_MONITOR_QUALIFIER.text)).toBeNull();
|
|
392
|
+
expect(screen.queryByText("No monitor bound")).toBeNull();
|
|
393
|
+
expect(screen.queryByText("Create Ping monitor")).toBeNull();
|
|
394
|
+
expect(screen.queryByText("Bind a monitor")).toBeNull();
|
|
395
|
+
expect(
|
|
396
|
+
screen.getByText("Reported by the monitor bound to this device"),
|
|
397
|
+
).toBeInTheDocument();
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
describe("a probe-polled device that has never been polled", () => {
|
|
402
|
+
/*
|
|
403
|
+
* A probe IS assigned here and polling is on, so the poll is coming: the
|
|
404
|
+
* verdict stands alone. Both qualifiers have to stay off — "No monitor"
|
|
405
|
+
* because nothing is meant to be bound to a probe-polled device, and "No
|
|
406
|
+
* probe" because a device that is merely waiting for its first cycle is
|
|
407
|
+
* not a device nothing can reach.
|
|
408
|
+
*/
|
|
409
|
+
test("reads Pending in the poll vocabulary, with no qualifier beside it", async () => {
|
|
410
|
+
await renderHero(neverPolledProbeDevice());
|
|
411
|
+
|
|
412
|
+
/*
|
|
413
|
+
* The equality is the assertion: it says the verdict stands alone, so
|
|
414
|
+
* neither qualifier and no "Stale" pill can appear beside it.
|
|
415
|
+
*/
|
|
416
|
+
expect(pillTexts()).toEqual(["Pending"]);
|
|
417
|
+
|
|
418
|
+
expect(screen.getByText("Never answered a poll")).toBeInTheDocument();
|
|
419
|
+
expect(
|
|
420
|
+
screen.queryByText("Nothing is bound to report on it yet"),
|
|
421
|
+
).toBeNull();
|
|
422
|
+
expect(
|
|
423
|
+
screen.queryByText("Reported by the monitor bound to this device"),
|
|
424
|
+
).toBeNull();
|
|
425
|
+
|
|
426
|
+
expect(screen.getByText("Not monitored")).toBeInTheDocument();
|
|
427
|
+
expect(screen.queryByText("No monitor bound")).toBeNull();
|
|
428
|
+
expect(screen.queryByText("Create Ping monitor")).toBeNull();
|
|
429
|
+
expect(screen.queryByText("Bind a monitor")).toBeNull();
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
test("explains Pending as a poll that has not happened", async () => {
|
|
433
|
+
await renderHero(neverPolledProbeDevice());
|
|
434
|
+
|
|
435
|
+
const tooltips: Array<string> = tooltipsAfterHovering("Pending");
|
|
436
|
+
|
|
437
|
+
expect(tooltips).toContain("This device has not been polled yet.");
|
|
438
|
+
expect(tooltips).not.toContain(UNBOUND_MONITOR_BACKED_PENDING_TOOLTIP);
|
|
439
|
+
expect(tooltips).not.toContain(BOUND_MONITOR_PENDING_TOOLTIP);
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
/*
|
|
444
|
+
* The probe-polled counterpart of the unbound monitor-backed case, and the
|
|
445
|
+
* reason it needs its own pill: every device is pinged by its probe now, so
|
|
446
|
+
* "Pending" on a device with no probe is not "the first cycle has not run" —
|
|
447
|
+
* it is "no cycle will ever run", and the operator has to be told which of
|
|
448
|
+
* the two they are looking at. The way out is a probe, never a monitor, so
|
|
449
|
+
* the binding vocabulary must stay off this device entirely.
|
|
450
|
+
*/
|
|
451
|
+
describe("a probe-polled device with no probe assigned", () => {
|
|
452
|
+
test("reads Pending with the No probe qualifier, and nothing about binding", async () => {
|
|
453
|
+
await renderHero(unpolledProbeDevice());
|
|
454
|
+
|
|
455
|
+
expect(pillTexts()).toEqual(["Pending", NO_PROBE_QUALIFIER.text]);
|
|
456
|
+
expect(screen.queryByText("No monitor bound")).toBeNull();
|
|
457
|
+
expect(screen.queryByText("Create Ping monitor")).toBeNull();
|
|
458
|
+
expect(screen.queryByText("Bind a monitor")).toBeNull();
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
test("says assigning a probe is what starts the pinging", async () => {
|
|
462
|
+
await renderHero(unpolledProbeDevice());
|
|
463
|
+
|
|
464
|
+
expect(tooltipsAfterHovering(NO_PROBE_QUALIFIER.text)).toContain(
|
|
465
|
+
NO_PROBE_QUALIFIER.tooltip,
|
|
466
|
+
);
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
/*
|
|
470
|
+
* Switching polling off reaches the same dead end by the other door, and
|
|
471
|
+
* the hero has to say so: a device nobody polls on purpose still reads
|
|
472
|
+
* Pending forever, and an operator who does not see the qualifier goes
|
|
473
|
+
* looking for a probe that is already assigned.
|
|
474
|
+
*/
|
|
475
|
+
test("says the same when a probe is assigned but polling is switched off", async () => {
|
|
476
|
+
await renderHero(
|
|
477
|
+
device({
|
|
478
|
+
monitoringMethod: NetworkDeviceMonitoringMethod.Probe,
|
|
479
|
+
probeId: PROBE_ID,
|
|
480
|
+
isPollingEnabled: false,
|
|
481
|
+
}),
|
|
482
|
+
);
|
|
483
|
+
|
|
484
|
+
expect(pillTexts()).toEqual(["Pending", NO_PROBE_QUALIFIER.text]);
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
/*
|
|
489
|
+
* The reason the walk needs a pill of its own. Ping and SNMP are two
|
|
490
|
+
* separate questions about a probe-polled device now: reachability is "ping
|
|
491
|
+
* answered OR the walk succeeded", so a device whose credentials are wrong
|
|
492
|
+
* answers ping and is CORRECTLY Up — while its interfaces, inventory and
|
|
493
|
+
* health OIDs quietly stop being refreshed. Without the qualifier the only
|
|
494
|
+
* signal is a green pill and numbers that never change.
|
|
495
|
+
*/
|
|
496
|
+
describe("a probe-polled device that answers ping while its walk fails", () => {
|
|
497
|
+
function pingingButNotWalking(): NetworkDevice {
|
|
498
|
+
return device({
|
|
499
|
+
monitoringMethod: NetworkDeviceMonitoringMethod.Probe,
|
|
500
|
+
probeId: PROBE_ID,
|
|
501
|
+
isPollingEnabled: true,
|
|
502
|
+
isReachable: true,
|
|
503
|
+
isSnmpReachable: false,
|
|
504
|
+
polledJustNow: true,
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
test("stays Up, and says so with SNMP failing beside it rather than a red pill", async () => {
|
|
509
|
+
await renderHero(pingingButNotWalking());
|
|
510
|
+
|
|
511
|
+
expect(pillTexts()).toEqual(["Up", SNMP_FAILING_QUALIFIER.text]);
|
|
512
|
+
expect(tooltipsAfterHovering(SNMP_FAILING_QUALIFIER.text)).toContain(
|
|
513
|
+
SNMP_FAILING_QUALIFIER.tooltip,
|
|
514
|
+
);
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
test("the SNMP line names the walk as what is broken", async () => {
|
|
518
|
+
await renderHero(pingingButNotWalking());
|
|
519
|
+
|
|
520
|
+
expect(
|
|
521
|
+
screen.getByTestId("device-status-hero-snmp").textContent,
|
|
522
|
+
).toContain("Failing");
|
|
523
|
+
});
|
|
524
|
+
});
|
|
525
|
+
|
|
526
|
+
/*
|
|
527
|
+
* The other half of that split, and the one the ping-first change exists
|
|
528
|
+
* for: a device with no credentials is pinged and never walked, so its
|
|
529
|
+
* `isSnmpReachable` is NULL rather than false. Calling that "SNMP failing"
|
|
530
|
+
* would send its operator hunting for credentials on a device nobody ever
|
|
531
|
+
* decided to walk — the hero says it is not configured instead, and points
|
|
532
|
+
* at where to configure it.
|
|
533
|
+
*/
|
|
534
|
+
describe("a probe-polled device that is pinged and never walked", () => {
|
|
535
|
+
function pingOnly(): NetworkDevice {
|
|
536
|
+
return device({
|
|
537
|
+
monitoringMethod: NetworkDeviceMonitoringMethod.Probe,
|
|
538
|
+
probeId: PROBE_ID,
|
|
539
|
+
isPollingEnabled: true,
|
|
540
|
+
isReachable: true,
|
|
541
|
+
polledJustNow: true,
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
test("reads Up alone — a device nobody walks is never SNMP failing", async () => {
|
|
546
|
+
await renderHero(pingOnly());
|
|
547
|
+
|
|
548
|
+
expect(pillTexts()).toEqual(["Up"]);
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
test("the SNMP line offers credentials instead of reporting a failure", async () => {
|
|
552
|
+
await renderHero(pingOnly());
|
|
553
|
+
|
|
554
|
+
const snmpLine: string =
|
|
555
|
+
screen.getByTestId("device-status-hero-snmp").textContent || "";
|
|
556
|
+
|
|
557
|
+
expect(snmpLine).toContain("Not configured");
|
|
558
|
+
expect(snmpLine).not.toContain("Failing");
|
|
559
|
+
});
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
/*
|
|
563
|
+
* "No monitor" is decided from `monitorId`, "No probe" from `probeId` and
|
|
564
|
+
* `isPollingEnabled`, and the verdict from `monitoringMethod` and the nested
|
|
565
|
+
* status. A hero that stopped selecting any of them would not fail to
|
|
566
|
+
* render — an unselected column arrives undefined, which reads as "not set",
|
|
567
|
+
* so it would hang "No monitor" on every monitor-backed device and "No
|
|
568
|
+
* probe" on every probe-polled one however well they are configured.
|
|
569
|
+
*/
|
|
570
|
+
test("selects the columns the qualifiers and the verdict are decided from", async () => {
|
|
571
|
+
await renderHero(boundReportingMonitorBackedDevice());
|
|
572
|
+
|
|
573
|
+
expect(getItemRequests).toHaveLength(1);
|
|
574
|
+
expect(getItemRequests[0]!.modelType).toBe(NetworkDevice);
|
|
575
|
+
expect(getItemRequests[0]!.id.toString()).toBe(DEVICE_ID.toString());
|
|
576
|
+
expect(getItemRequests[0]!.select).toMatchObject({
|
|
577
|
+
monitorId: true,
|
|
578
|
+
monitoringMethod: true,
|
|
579
|
+
probeId: true,
|
|
580
|
+
isPollingEnabled: true,
|
|
581
|
+
currentMonitorStatus: {
|
|
582
|
+
name: true,
|
|
583
|
+
color: true,
|
|
584
|
+
isOfflineState: true,
|
|
585
|
+
},
|
|
586
|
+
});
|
|
587
|
+
});
|
|
588
|
+
});
|
|
@@ -1907,11 +1907,13 @@ describe("The scan method decides whether the wizard asks about SNMP", () => {
|
|
|
1907
1907
|
});
|
|
1908
1908
|
|
|
1909
1909
|
/*
|
|
1910
|
-
* The copy IS the feature here. An ICMP-only scan
|
|
1911
|
-
* nothing else — no name, no model, no vendor —
|
|
1912
|
-
*
|
|
1913
|
-
*
|
|
1914
|
-
*
|
|
1910
|
+
* The copy IS the feature here, and it has two halves. An ICMP-only scan
|
|
1911
|
+
* finds addresses and nothing else — no name, no model, no vendor — but what
|
|
1912
|
+
* it imports is NOT inert: discovery brings every host in as a probe-polled
|
|
1913
|
+
* device, so the scan's own probe pings it on a schedule from the moment it
|
|
1914
|
+
* lands. An operator told only the first half reads an inventory-less device
|
|
1915
|
+
* page as a broken import; an operator told neither assumes an ICMP-only
|
|
1916
|
+
* scan leaves them with nothing being watched at all.
|
|
1915
1917
|
*/
|
|
1916
1918
|
test("the toggle says what an ICMP-only scan does and does not give you", async () => {
|
|
1917
1919
|
await renderPage();
|
|
@@ -1921,11 +1923,18 @@ describe("The scan method decides whether the wizard asks about SNMP", () => {
|
|
|
1921
1923
|
expect(description).toContain("ICMP-only");
|
|
1922
1924
|
expect(description).toContain("no credentials are asked for");
|
|
1923
1925
|
/*
|
|
1924
|
-
*
|
|
1925
|
-
*
|
|
1926
|
-
*
|
|
1926
|
+
* Ping-first import: there is no ping-only special case in discovery any
|
|
1927
|
+
* more, so the toggle has to name what the operator actually ends up with
|
|
1928
|
+
* — a device pinged by the probe that ran the scan — rather than pointing
|
|
1929
|
+
* at a monitor they would have to create by hand to get anything watched.
|
|
1927
1930
|
*/
|
|
1928
|
-
expect(description).toContain("
|
|
1931
|
+
expect(description).toContain("pinged by the scan's probe");
|
|
1932
|
+
/*
|
|
1933
|
+
* And the way out of an inventory-less device. Credentials are additive
|
|
1934
|
+
* rather than a choice the scan locked in, so turning SNMP off here is
|
|
1935
|
+
* never a decision the operator has to re-run a scan to undo.
|
|
1936
|
+
*/
|
|
1937
|
+
expect(description).toContain("add SNMP credentials later");
|
|
1929
1938
|
});
|
|
1930
1939
|
|
|
1931
1940
|
test("the SNMP step is removed for a scan that will send no SNMP", async () => {
|