@oneuptime/common 12.0.25 → 12.0.27
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/Index.ts +2 -0
- package/Models/AnalyticsModels/ThreatIntelIndicator.ts +413 -0
- package/Models/DatabaseModels/AlertSeverity.ts +4 -1
- package/Models/DatabaseModels/CephClusterFeed.ts +625 -0
- package/Models/DatabaseModels/CloudResourceFeed.ts +625 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.ts +13 -0
- package/Models/DatabaseModels/DetectionRule.ts +9 -3
- package/Models/DatabaseModels/DockerHostFeed.ts +625 -0
- package/Models/DatabaseModels/DockerSwarmClusterFeed.ts +628 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +9 -3
- package/Models/DatabaseModels/HostFeed.ts +625 -0
- package/Models/DatabaseModels/IncidentSeverity.ts +4 -1
- package/Models/DatabaseModels/Index.ts +22 -0
- package/Models/DatabaseModels/KubernetesClusterFeed.ts +628 -0
- package/Models/DatabaseModels/Monitor.ts +87 -0
- package/Models/DatabaseModels/NetworkDevice.ts +96 -5
- package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +92 -6
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +301 -31
- package/Models/DatabaseModels/NetworkSite.ts +120 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +1 -0
- package/Models/DatabaseModels/PodmanHostFeed.ts +625 -0
- package/Models/DatabaseModels/ProxmoxClusterFeed.ts +626 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +67 -0
- package/Models/DatabaseModels/ServiceFeed.ts +625 -0
- package/Models/DatabaseModels/TelemetrySourceMap.ts +474 -0
- package/Models/DatabaseModels/ThreatIntelFeed.ts +758 -0
- package/Models/DatabaseModels/UserOnCallLog.ts +1 -0
- package/Models/DatabaseModels/UserTotpAuth.ts +1 -0
- package/Models/DatabaseModels/UserWebAuthn.ts +1 -0
- package/Server/API/AlertAPI.ts +23 -1
- package/Server/API/BaseAPI.ts +14 -3
- package/Server/API/IncidentAPI.ts +41 -1
- package/Server/API/IncidentEpisodeAPI.ts +23 -1
- package/Server/API/MicrosoftTeamsAPI.ts +31 -2
- package/Server/API/ScheduledMaintenanceAPI.ts +23 -1
- package/Server/API/SlackAPI.ts +48 -0
- package/Server/API/TelemetryAPI.ts +167 -42
- package/Server/API/UserOnCallLogTimelineAPI.ts +75 -61
- package/Server/API/UserTotpAuthAPI.ts +67 -1
- package/Server/API/UserWebAuthnAPI.ts +44 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.ts +57 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.ts +129 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.ts +54 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.ts +72 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.ts +489 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +18 -0
- package/Server/Middleware/IdentityRateLimit.ts +53 -3
- package/Server/Services/AIService.ts +181 -41
- package/Server/Services/CephClusterFeedService.ts +99 -0
- package/Server/Services/CephClusterLabelRuleEngineService.ts +29 -0
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +23 -0
- package/Server/Services/CephClusterOwnerTeamService.ts +129 -0
- package/Server/Services/CephClusterOwnerUserService.ts +123 -0
- package/Server/Services/CephClusterService.ts +223 -2
- package/Server/Services/CloudResourceFeedService.ts +99 -0
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +30 -0
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +33 -0
- package/Server/Services/CloudResourceOwnerTeamService.ts +129 -0
- package/Server/Services/CloudResourceOwnerUserService.ts +123 -0
- package/Server/Services/CloudResourceService.ts +227 -2
- package/Server/Services/DatabaseService.ts +265 -0
- package/Server/Services/DockerHostFeedService.ts +99 -0
- package/Server/Services/DockerHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/DockerHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/DockerHostOwnerTeamService.ts +129 -0
- package/Server/Services/DockerHostOwnerUserService.ts +123 -0
- package/Server/Services/DockerHostService.ts +227 -2
- package/Server/Services/DockerSwarmClusterFeedService.ts +102 -0
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/DockerSwarmClusterOwnerTeamService.ts +133 -0
- package/Server/Services/DockerSwarmClusterOwnerUserService.ts +127 -0
- package/Server/Services/DockerSwarmClusterService.ts +229 -2
- package/Server/Services/EnterpriseLicenseService.ts +15 -7
- package/Server/Services/ExceptionAggregationService.ts +12 -2
- package/Server/Services/HostFeedService.ts +99 -0
- package/Server/Services/HostLabelRuleEngineService.ts +29 -0
- package/Server/Services/HostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/HostOwnerTeamService.ts +129 -0
- package/Server/Services/HostOwnerUserService.ts +123 -0
- package/Server/Services/HostService.ts +215 -2
- package/Server/Services/IncidentService.ts +11 -0
- package/Server/Services/Index.ts +24 -0
- package/Server/Services/KubernetesClusterFeedService.ts +99 -0
- package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/KubernetesClusterOwnerTeamService.ts +133 -0
- package/Server/Services/KubernetesClusterOwnerUserService.ts +127 -0
- package/Server/Services/KubernetesClusterService.ts +231 -2
- package/Server/Services/LogAggregationService.ts +23 -280
- package/Server/Services/MetricAggregationService.ts +98 -1
- package/Server/Services/MonitorService.ts +177 -13
- package/Server/Services/MonitorTemplateService.ts +111 -0
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +777 -86
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +199 -16
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +1055 -14
- package/Server/Services/NetworkDeviceService.ts +750 -4
- package/Server/Services/NetworkInterfaceService.ts +415 -0
- package/Server/Services/NetworkSiteService.ts +485 -52
- package/Server/Services/PodmanHostFeedService.ts +99 -0
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/PodmanHostOwnerTeamService.ts +129 -0
- package/Server/Services/PodmanHostOwnerUserService.ts +123 -0
- package/Server/Services/PodmanHostService.ts +227 -2
- package/Server/Services/ProjectService.ts +16 -10
- package/Server/Services/ProxmoxClusterFeedService.ts +99 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/ProxmoxClusterOwnerTeamService.ts +131 -0
- package/Server/Services/ProxmoxClusterOwnerUserService.ts +124 -0
- package/Server/Services/ProxmoxClusterService.ts +225 -2
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +61 -0
- package/Server/Services/ServiceFeedService.ts +99 -0
- package/Server/Services/ServiceLabelRuleEngineService.ts +29 -0
- package/Server/Services/ServiceOwnerRuleEngineService.ts +26 -0
- package/Server/Services/ServiceOwnerTeamService.ts +129 -0
- package/Server/Services/ServiceOwnerUserService.ts +123 -0
- package/Server/Services/ServiceService.ts +227 -3
- package/Server/Services/StatusPageSubscriberService.ts +7 -0
- package/Server/Services/TelemetryAttributeService.ts +13 -3
- package/Server/Services/TelemetrySourceMapService.ts +307 -0
- package/Server/Services/ThreatIntelFeedService.ts +222 -0
- package/Server/Services/ThreatIntelIndicatorService.ts +428 -0
- package/Server/Services/TraceAggregationService.ts +101 -11
- package/Server/Services/UserService.ts +13 -6
- package/Server/Services/UserTwoFactorBackupCodeService.ts +127 -0
- package/Server/Services/UserWebhookService.ts +11 -2
- package/Server/Static/Brand/README.md +38 -0
- package/Server/Static/Brand/favicons/apple-touch-icon.png +0 -0
- package/Server/Static/Brand/favicons/favicon-16x16.png +0 -0
- package/Server/Static/Brand/favicons/favicon-32x32.png +0 -0
- package/Server/Static/Brand/favicons/favicon.ico +0 -0
- package/Server/Static/Brand/favicons/safari-pinned-tab.svg +31 -0
- package/Server/Static/Brand/hou-wb.svg +1 -0
- package/Server/Static/Brand/oneuptime-logo.svg +1 -0
- package/Server/Static/Brand/ou-wb.svg +1 -0
- package/Server/Static/Vendor/README.md +4 -0
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +13 -3
- package/Server/Types/Database/AggregateBy.ts +83 -0
- package/Server/Types/Database/AggregateResultUtil.ts +126 -0
- package/Server/Types/Database/JSONColumnQuery.ts +18 -0
- package/Server/Types/Database/QueryHelper.ts +40 -0
- package/Server/Types/Database/QueryUtil.ts +26 -0
- package/Server/Types/Workflow/Components/API/Utils.ts +10 -1
- package/Server/Types/Workflow/Components/JavaScript.ts +8 -0
- package/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.ts +9 -0
- package/Server/Utils/AI/SRE/InvestigationGrader.ts +18 -0
- package/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.ts +422 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +176 -0
- package/Server/Utils/DataSource/HttpFetch.ts +18 -0
- package/Server/Utils/Database/RelationIdUtil.ts +42 -0
- package/Server/Utils/Marketing/MarketingEventUtil.ts +38 -9
- package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +34 -3
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +9 -1
- package/Server/Utils/Monitor/Criteria/SyntheticMonitor.ts +28 -10
- package/Server/Utils/Monitor/MonitorAlert.ts +541 -332
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +330 -64
- package/Server/Utils/Monitor/MonitorIncident.ts +640 -434
- package/Server/Utils/Monitor/MonitorResource.ts +226 -49
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +46 -3
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +23 -102
- package/Server/Utils/Monitor/PerEntityCriteriaFanOut.ts +329 -0
- package/Server/Utils/NetworkDevice/DeviceHealthAggregation.ts +427 -0
- package/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.ts +310 -0
- package/Server/Utils/OnCallNotificationContext.ts +686 -0
- package/Server/Utils/PrivateNetworkWebhookConfig.ts +549 -0
- package/Server/Utils/ResourceFeed/ResourceFeedUtil.ts +139 -0
- package/Server/Utils/Response.ts +11 -1
- package/Server/Utils/SSRFProtection.ts +230 -60
- package/Server/Utils/SecurityEvent/ConnectorErrorMessage.ts +106 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +84 -284
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +47 -20
- package/Server/Utils/SecurityEvent/SecurityEventAlerting.ts +318 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.ts +199 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.ts +252 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.ts +739 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.ts +533 -0
- package/Server/Utils/StartServer.ts +83 -56
- package/Server/Utils/StatusPageSubscriberWebhook.ts +3 -0
- package/Server/Utils/Telemetry/SourceMapResolver.ts +480 -0
- package/Server/Utils/TwoFactorBackupCodeNotification.ts +106 -0
- package/Server/Utils/VM/VMAPI.ts +3 -0
- package/Server/Utils/VM/VMRunner.ts +27 -1
- package/Server/Utils/VendorAssets.ts +42 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +136 -6
- package/Server/Views/AcknowledgeUserOnCallNotification.ejs +11 -9
- package/Server/Views/Partials/Head.ejs +9 -9
- package/Server/Views/Partials/OnCallNotificationDetails.ejs +48 -0
- package/Server/Views/ViewMessage.ejs +11 -9
- package/Tests/App/Accounts/LoginTwoFactorRecovery.test.tsx +972 -0
- package/Tests/App/Dashboard/AddNeighborToMonitoringModal.test.tsx +401 -0
- package/Tests/App/Dashboard/DiscoveryScanEditForm.test.tsx +707 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +1908 -18
- package/Tests/App/Dashboard/ResourceFeed.test.tsx +230 -0
- package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +216 -0
- package/Tests/App/Dashboard/TopologyAddToMonitoring.test.tsx +192 -0
- package/Tests/App/Dashboard/WorkspaceNotificationRuleConditions.test.tsx +439 -0
- package/Tests/Models/DatabaseModels/DateColumnDeserialization.test.ts +182 -0
- package/Tests/Models/DatabaseModels/RelationColumnModelTypeCoverage.test.ts +82 -0
- package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +398 -0
- package/Tests/Models/DiscoveryScanNameColumn.test.ts +151 -16
- package/Tests/Models/DiscoveryScanSnmpEnabledColumn.test.ts +593 -0
- package/Tests/Models/NetworkDeviceCreateContract.test.ts +102 -0
- package/Tests/Server/API/AIGenerationProjectAIToggle.test.ts +607 -0
- package/Tests/Server/API/AIGenerationRequestBudget.test.ts +355 -0
- package/Tests/Server/API/AIKillSwitchBackstop.test.ts +602 -0
- package/Tests/Server/API/BaseAPIUpdateDateColumns.test.ts +154 -0
- package/Tests/Server/API/MicrosoftTeamsBotTestEndpoint.test.ts +335 -0
- package/Tests/Server/API/UserOnCallLogTimelineAcknowledgePage.test.ts +611 -0
- package/Tests/Server/API/UserTotpAuthAPI.test.ts +498 -4
- package/Tests/Server/API/UserWebAuthnBackupCodeMinting.test.ts +682 -0
- package/Tests/Server/Infrastructure/ExampleDockerfiles.test.ts +595 -0
- package/Tests/Server/Services/AIServiceDailyBudget.test.ts +9 -0
- package/Tests/Server/Services/AIServiceProjectAccess.test.ts +6 -0
- package/Tests/Server/Services/AutoImportScanCredentialSelect.test.ts +18 -0
- package/Tests/Server/Services/DatabaseServiceAggregateBy.test.ts +590 -0
- package/Tests/Server/Services/DatabaseServiceUpdateWriteRouting.test.ts +12 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +162 -26
- package/Tests/Server/Services/EnterpriseLicenseServiceCreate.test.ts +292 -0
- package/Tests/Server/Services/FeedRetentionConsistency.test.ts +119 -12
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +109 -0
- package/Tests/Server/Services/MetricAggregationAttributeOperators.test.ts +170 -0
- package/Tests/Server/Services/MonitorTemplateServiceNetworkDeviceSync.test.ts +383 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +997 -3
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleService.test.ts +830 -0
- package/Tests/Server/Services/NetworkDeviceAutoMonitorLifecycle.test.ts +528 -0
- package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +3141 -1
- package/Tests/Server/Services/NetworkDeviceRegisteredHostnames.test.ts +1023 -0
- package/Tests/Server/Services/NetworkDeviceSiteAssignmentRuleSkip.test.ts +728 -0
- package/Tests/Server/Services/NetworkInterfaceServiceUpsert.test.ts +795 -0
- package/Tests/Server/Services/NetworkSiteRollupPolicyAndMaintenance.test.ts +903 -0
- package/Tests/Server/Services/NetworkSiteService.test.ts +165 -24
- package/Tests/Server/Services/ProjectServiceChangePlan.test.ts +5 -3
- package/Tests/Server/Services/ProjectServiceCreateSubscriptionStarted.test.ts +5 -2
- package/Tests/Server/Services/ResourceCreationFeedWrites.test.ts +304 -0
- package/Tests/Server/Services/ResourceFeedServices.test.ts +269 -0
- package/Tests/Server/Services/ResourceOwnerFeedWrites.test.ts +245 -0
- package/Tests/Server/Services/SecurityEventLastErrorColumnWidth.test.ts +792 -0
- package/Tests/Server/Services/TelemetrySourceMapService.test.ts +483 -0
- package/Tests/Server/Services/ThreatIntelFeedService.test.ts +351 -0
- package/Tests/Server/Services/ThreatIntelIndicatorService.test.ts +366 -0
- package/Tests/Server/Services/TraceAggregationAttributeOperators.test.ts +507 -0
- package/Tests/Server/Services/UserTwoFactorBackupCodeGenerateIfNone.test.ts +705 -0
- package/Tests/Server/Services/WorkspaceNotificationRuleOnCallDutyPolicy.test.ts +306 -0
- package/Tests/Server/Types/Database/AggregateResultUtil.test.ts +386 -0
- package/Tests/Server/Types/Database/Permissions/SelectRejectionMessageContract.test.ts +424 -0
- package/Tests/Server/Types/Database/QueryHelperWildcard.test.ts +142 -0
- package/Tests/Server/Types/Workflow/Components/ApiComponentPrivateNetwork.test.ts +163 -0
- package/Tests/Server/Types/Workflow/Components/JavaScriptPrivateNetwork.test.ts +124 -0
- package/Tests/Server/Utils/AI/CodeFixAgentCompletion.test.ts +5 -0
- package/Tests/Server/Utils/AI/InvestigationGrader.test.ts +39 -1
- package/Tests/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.test.ts +338 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGeneratorWildcard.test.ts +383 -0
- package/Tests/Server/Utils/Marketing/EmittedMarketingEvent.ts +23 -0
- package/Tests/Server/Utils/Marketing/MarketingEventUtil.test.ts +51 -0
- package/Tests/Server/Utils/Monitor/Criteria/SyntheticMonitorCriteria.test.ts +259 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPerSeriesFanout.test.ts +557 -0
- package/Tests/Server/Utils/Monitor/MonitorDependencySuppressionCreatorSkip.test.ts +12 -2
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkLogWritePath.test.ts +404 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +8 -2
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +125 -98
- package/Tests/Server/Utils/Monitor/PerEntityCriteriaFanOut.test.ts +444 -0
- package/Tests/Server/Utils/Monitor/PerSeriesSecondEntityAlerting.test.ts +1112 -0
- package/Tests/Server/Utils/NetworkDevice/DeviceHealthAggregation.test.ts +717 -0
- package/Tests/Server/Utils/NetworkDevice/RulePatternValidator.test.ts +78 -0
- package/Tests/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.test.ts +363 -0
- package/Tests/Server/Utils/OfflineAssetHygiene.test.ts +35 -0
- package/Tests/Server/Utils/OnCallNotificationContext.test.ts +908 -0
- package/Tests/Server/Utils/PrivateNetworkWebhookConfig.test.ts +423 -0
- package/Tests/Server/Utils/ResourceFeed/ResourceFeedUtil.test.ts +191 -0
- package/Tests/Server/Utils/SSRFProtectionPrivateNetwork.test.ts +597 -0
- package/Tests/Server/Utils/SecurityEvent/ConnectorErrorMessage.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +381 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +417 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerFailureTaxonomy.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventAlerting.test.ts +246 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.test.ts +282 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.test.ts +312 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.test.ts +854 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.test.ts +437 -0
- package/Tests/Server/Utils/StartServerErrorStatus.test.ts +225 -0
- package/Tests/Server/Utils/StatusPage/MonitorRulePatternValidator.test.ts +62 -0
- package/Tests/Server/Utils/StatusPageSubscriberWebhookPrivateNetwork.test.ts +119 -0
- package/Tests/Server/Utils/Telemetry/SourceMapResolver.test.ts +542 -0
- package/Tests/Server/Utils/TwoFactorBackupCodeNotification.test.ts +272 -0
- package/Tests/Server/Utils/VM/VMRunnerPrivateNetworkWiring.test.ts +111 -0
- package/Tests/Server/Utils/VendorAssets.test.ts +117 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsChannelSend.test.ts +101 -4
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsInstallStateDiagnostics.test.ts +922 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsRosterDiagnosticMessages.test.ts +642 -0
- package/Tests/Server/Views/OnCallAcknowledgePage.test.ts +430 -0
- package/Tests/Types/API/HostnameAuthorityParsing.test.ts +1 -0
- package/Tests/Types/API/URLMailtoQueryString.test.ts +439 -0
- package/Tests/Types/API/URLQueryString.test.ts +481 -0
- package/Tests/Types/API/URLRouteQuerySeparation.test.ts +491 -0
- package/Tests/Types/BaseDatabase/Wildcard.test.ts +163 -0
- package/Tests/Types/BaseDatabase/WildcardPattern.test.ts +149 -0
- package/Tests/Types/Database/DateColumnValue.test.ts +265 -0
- package/Tests/Types/DateToIsoStringOrNull.test.ts +67 -0
- package/Tests/Types/Log/LogQueryToFilter.test.ts +218 -43
- package/Tests/Types/Monitor/KubernetesTemplateGroupByKeys.test.ts +225 -0
- package/Tests/Types/Monitor/TemplateGroupByKeys.test.ts +296 -0
- package/Tests/Types/NetworkAutomation/RuleRunResult.test.ts +102 -0
- package/Tests/Types/NetworkAutomation/RuleRunResultDescribe.test.ts +145 -0
- package/Tests/Types/NetworkSite/SiteHealthRollupPolicy.test.ts +58 -0
- package/Tests/Types/SerializableObjectDictionaryImportCycle.test.ts +15 -0
- package/Tests/Types/Telemetry/TelemetrySearchQuery.test.ts +620 -0
- package/Tests/Types/WhatsApp/WhatsAppTemplates.test.ts +110 -0
- package/Tests/Types/Workspace/NotificationRuleConditionUtil.test.ts +76 -6
- package/Tests/Types/Workspace/NotificationRules/NotificationRuleCondition.test.ts +16 -4
- package/Tests/Types/Workspace/NotificationRules/OnCallDutyPolicyConditions.test.ts +669 -0
- package/Tests/UI/Components/DictionaryFilterOperatorWildcard.test.ts +175 -0
- package/Tests/UI/Components/IconOpticalSize.test.tsx +377 -0
- package/Tests/UI/Components/LogsHistogramDragTooltip.test.tsx +393 -0
- package/Tests/UI/Components/LogsViewerHistogramZoom.test.tsx +248 -0
- package/Tests/UI/Components/TelemetryHistogramDragTooltip.test.tsx +205 -0
- package/Tests/UI/Components/UseHistogramZoom.test.tsx +262 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsChatsCardInstallGuidance.test.tsx +332 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsInstallGuidanceContent.test.tsx +643 -0
- package/Tests/Utils/Monitor/InterfaceInventoryUtil.test.ts +824 -0
- package/Tests/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.test.ts +626 -0
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +718 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +59 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +287 -2
- package/Tests/Utils/NetworkDiscovery/DiscoveryImportEligibility.test.ts +73 -0
- package/Tests/Utils/NetworkDiscovery/PingMonitorBuilder.test.ts +317 -0
- package/Tests/Utils/NetworkDiscovery/RescanIntervalUtil.test.ts +262 -0
- package/Tests/Utils/NetworkDiscovery/ScanModeUtil.test.ts +474 -0
- package/Tests/Utils/NetworkDiscovery/SnmpScanConfigUtil.test.ts +2442 -0
- package/Tests/Utils/NetworkSite/SiteMaintenanceUtil.test.ts +188 -0
- package/Tests/Utils/NetworkSite/SiteStatusRollupUtil.test.ts +522 -0
- package/Tests/Utils/NetworkSite/SiteUptimeUtil.test.ts +694 -0
- package/Tests/Utils/SecurityEvent/ThreatIntel/StixPatternParser.test.ts +281 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +87 -67
- package/Types/API/URL.ts +100 -28
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +8 -0
- package/Types/BaseDatabase/NotWildcard.ts +86 -0
- package/Types/BaseDatabase/Wildcard.ts +89 -0
- package/Types/BaseDatabase/WildcardPattern.ts +176 -0
- package/Types/Database/DateColumnValue.ts +184 -0
- package/Types/Database/TableColumn.ts +40 -5
- package/Types/Date.ts +37 -0
- package/Types/Email/EmailTemplateType.ts +1 -0
- package/Types/JSON.ts +8 -0
- package/Types/Log/LogQueryToFilter.ts +167 -129
- package/Types/Monitor/DockerAlertTemplates.ts +43 -12
- package/Types/Monitor/HostAlertTemplates.ts +31 -3
- package/Types/Monitor/KubernetesAlertTemplates.ts +98 -0
- package/Types/Monitor/MonitorStep.ts +49 -0
- package/Types/Monitor/PodmanAlertTemplates.ts +39 -12
- package/Types/Monitor/SnmpMonitor/CdpNeighbor.ts +14 -0
- package/Types/Monitor/SnmpMonitor/LldpNeighbor.ts +11 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +11 -4
- package/Types/NetworkAutomation/RuleRunResult.ts +191 -2
- package/Types/NetworkSite/SiteHealthRollupPolicy.ts +96 -0
- package/Types/Permission.ts +411 -0
- package/Types/Probe/ProbeApiIngestResponse.ts +42 -0
- package/Types/SecurityEvent/ThreatIntelConstants.ts +118 -0
- package/Types/SerializableObjectDictionary.ts +8 -0
- package/Types/Telemetry/SourceMap.ts +56 -0
- package/Types/Telemetry/TelemetrySearchQuery.ts +949 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +12 -1
- package/UI/Components/Charts/Utils/useHistogramZoom.ts +101 -0
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +83 -0
- package/UI/Components/Icon/Icon.tsx +28 -1
- package/UI/Components/LogsViewer/LogsViewer.tsx +19 -3
- package/UI/Components/LogsViewer/components/LogSearchBar.tsx +26 -4
- package/UI/Components/LogsViewer/components/LogSearchHelp.tsx +34 -16
- package/UI/Components/LogsViewer/components/LogsHistogram.tsx +52 -1
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +18 -2
- package/UI/Components/TelemetryViewer/components/TelemetryHistogram.tsx +52 -1
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +15 -2
- package/Utils/Metrics/MetricExplorerUrl.ts +77 -15
- package/Utils/Monitor/InterfaceInventoryUtil.ts +251 -0
- package/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.ts +333 -0
- package/Utils/Monitor/NetworkTopologyUtil.ts +249 -28
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +14 -6
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +2 -0
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +49 -18
- package/Utils/NetworkDiscovery/PingMonitorBuilder.ts +215 -0
- package/Utils/NetworkDiscovery/RescanIntervalUtil.ts +148 -0
- package/Utils/NetworkDiscovery/ScanModeUtil.ts +105 -0
- package/Utils/NetworkDiscovery/SnmpScanConfigUtil.ts +827 -0
- package/Utils/NetworkSite/SiteMaintenanceUtil.ts +110 -0
- package/Utils/NetworkSite/SiteStatusRollupUtil.ts +350 -19
- package/Utils/NetworkSite/SiteUptimeUtil.ts +422 -21
- package/Utils/SecurityEvent/ThreatIntel/StixPatternParser.ts +383 -0
- package/Utils/Telemetry/CrossSignalScope.ts +37 -39
- package/build/dist/Models/AnalyticsModels/Index.js +2 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js +325 -0
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +11 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +9 -3
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +9 -3
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -1
- package/build/dist/Models/DatabaseModels/HostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/HostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +22 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Monitor.js +81 -0
- package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +103 -7
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +91 -6
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +276 -31
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js +124 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +66 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ServiceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ServiceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js +496 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +800 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js +1 -0
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js +1 -0
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +18 -1
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +8 -1
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +35 -1
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +18 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +30 -2
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +18 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +45 -0
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +100 -35
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +64 -59
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js +65 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js +42 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js +88 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js +39 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js +32 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js +61 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js +179 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +40 -3
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +177 -30
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterFeedService.js +89 -0
- package/build/dist/Server/Services/CephClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterService.js +175 -1
- package/build/dist/Server/Services/CephClusterService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceFeedService.js +89 -0
- package/build/dist/Server/Services/CloudResourceFeedService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +28 -3
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceService.js +177 -1
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +201 -0
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostFeedService.js +89 -0
- package/build/dist/Server/Services/DockerHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +177 -1
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js +90 -0
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js +175 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseService.js +40 -30
- package/build/dist/Server/Services/EnterpriseLicenseService.js.map +1 -1
- package/build/dist/Server/Services/ExceptionAggregationService.js +8 -2
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostFeedService.js +89 -0
- package/build/dist/Server/Services/HostFeedService.js.map +1 -0
- package/build/dist/Server/Services/HostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/HostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/HostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +175 -1
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +10 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +24 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterFeedService.js +89 -0
- package/build/dist/Server/Services/KubernetesClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +177 -1
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +19 -196
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +59 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +115 -13
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorTemplateService.js +86 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +561 -67
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +130 -16
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +850 -8
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceService.js +594 -5
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkInterfaceService.js +306 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +408 -47
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostFeedService.js +89 -0
- package/build/dist/Server/Services/PodmanHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostService.js +177 -1
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +40 -30
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js +89 -0
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js +175 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +56 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceFeedService.js +89 -0
- package/build/dist/Server/Services/ServiceFeedService.js.map +1 -0
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +24 -0
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ServiceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ServiceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ServiceService.js +173 -2
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +7 -0
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryAttributeService.js +9 -3
- package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
- package/build/dist/Server/Services/TelemetrySourceMapService.js +265 -0
- package/build/dist/Server/Services/TelemetrySourceMapService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js +157 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js +276 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js.map +1 -0
- package/build/dist/Server/Services/TraceAggregationService.js +62 -6
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +22 -13
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js +120 -0
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js.map +1 -1
- package/build/dist/Server/Services/UserWebhookService.js +11 -2
- package/build/dist/Server/Services/UserWebhookService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +12 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/AggregateBy.js +2 -0
- package/build/dist/Server/Types/Database/AggregateBy.js.map +1 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js +90 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js.map +1 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js +14 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +42 -0
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryUtil.js +18 -0
- package/build/dist/Server/Types/Database/QueryUtil.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js +10 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js +8 -0
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js +8 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js +15 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js +266 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +134 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/DataSource/HttpFetch.js +8 -0
- package/build/dist/Server/Utils/DataSource/HttpFetch.js.map +1 -1
- package/build/dist/Server/Utils/Database/RelationIdUtil.js +31 -0
- package/build/dist/Server/Utils/Database/RelationIdUtil.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js +26 -8
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +42 -17
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +9 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js +15 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +386 -271
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +278 -64
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +469 -350
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +183 -44
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +46 -3
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +18 -91
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js +194 -0
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js.map +1 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js +332 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js.map +1 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js +279 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js.map +1 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js +415 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js.map +1 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js +424 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js.map +1 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js +108 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js.map +1 -0
- package/build/dist/Server/Utils/Response.js +12 -1
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/SSRFProtection.js +160 -58
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js +89 -0
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +75 -234
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +41 -16
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js +217 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js +103 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js +168 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js +527 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js +376 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +70 -44
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js +3 -0
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js +327 -0
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js.map +1 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js +84 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js.map +1 -0
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +10 -1
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Server/Utils/VendorAssets.js +29 -0
- package/build/dist/Server/Utils/VendorAssets.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +121 -6
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Types/API/URL.js +88 -27
- package/build/dist/Types/API/URL.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +8 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/BaseDatabase/NotWildcard.js +72 -0
- package/build/dist/Types/BaseDatabase/NotWildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js +75 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js +137 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js.map +1 -0
- package/build/dist/Types/Database/DateColumnValue.js +125 -0
- package/build/dist/Types/Database/DateColumnValue.js.map +1 -0
- package/build/dist/Types/Database/TableColumn.js +18 -2
- package/build/dist/Types/Database/TableColumn.js.map +1 -1
- package/build/dist/Types/Date.js +31 -0
- package/build/dist/Types/Date.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/JSON.js +2 -0
- package/build/dist/Types/JSON.js.map +1 -1
- package/build/dist/Types/Log/LogQueryToFilter.js +111 -108
- package/build/dist/Types/Log/LogQueryToFilter.js.map +1 -1
- package/build/dist/Types/Monitor/DockerAlertTemplates.js +40 -16
- package/build/dist/Types/Monitor/DockerAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/HostAlertTemplates.js +29 -7
- package/build/dist/Types/Monitor/HostAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +98 -4
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +40 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js +36 -16
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js.map +1 -1
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js +90 -0
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js.map +1 -1
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js +84 -0
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js.map +1 -0
- package/build/dist/Types/Permission.js +354 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js +100 -0
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js.map +1 -0
- package/build/dist/Types/SerializableObjectDictionary.js +8 -0
- package/build/dist/Types/SerializableObjectDictionary.js.map +1 -1
- package/build/dist/Types/Telemetry/SourceMap.js +9 -0
- package/build/dist/Types/Telemetry/SourceMap.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js +661 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +12 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/useHistogramZoom.js +47 -0
- package/build/dist/UI/Components/Charts/Utils/useHistogramZoom.js.map +1 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +67 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +28 -1
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +15 -3
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js +25 -4
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js +36 -16
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js +33 -5
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +14 -2
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js +33 -5
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +14 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -1
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js +54 -9
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js.map +1 -1
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js +128 -0
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js +190 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +206 -28
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +14 -7
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +34 -18
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js +163 -0
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js +99 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js +85 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js +560 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js +56 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js +185 -10
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js.map +1 -1
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js +248 -21
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js.map +1 -1
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js +255 -0
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +27 -30
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/package.json +2 -1
- package/Tests/Types/Log/LogQueryParser.test.ts +0 -186
- package/Types/Log/LogQueryParser.ts +0 -252
- package/build/dist/Types/Log/LogQueryParser.js +0 -200
- package/build/dist/Types/Log/LogQueryParser.js.map +0 -1
|
@@ -0,0 +1,707 @@
|
|
|
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 { act, cleanup, render, waitFor } from "@testing-library/react";
|
|
11
|
+
import * as React from "react";
|
|
12
|
+
import { MemoryRouter } from "react-router-dom";
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* The wiring half of OneUptime issue #3444.
|
|
16
|
+
*
|
|
17
|
+
* A discovery scan's settings used to be fixed at creation. A typo'd subnet, a
|
|
18
|
+
* probe on the wrong side of a firewall, a community string the devices
|
|
19
|
+
* reject, a one-time scan that should have repeated — each of them could only
|
|
20
|
+
* be fixed by deleting the scan, losing its results, and building it again.
|
|
21
|
+
* The row actions were Rename, Review Results and Delete, and none of them
|
|
22
|
+
* touched the sweep.
|
|
23
|
+
*
|
|
24
|
+
* The dialog that fixes this is configuration, not markup: an action button
|
|
25
|
+
* whose onClick opens a ModelFormModal whose formProps carry the field set.
|
|
26
|
+
* Every way of getting it wrong is silent — a field dropped from the array
|
|
27
|
+
* simply cannot be edited, a validator dropped from a field simply stops
|
|
28
|
+
* being enforced, `formType` left at Create posts a new scan instead of
|
|
29
|
+
* saving this one — so the modal is mocked to capture those props and they
|
|
30
|
+
* are asserted directly. Same approach as
|
|
31
|
+
* DiscoveryScanWizardValidation.test.tsx, which does this for the create
|
|
32
|
+
* wizard on the same page.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
type CapturedFormField = {
|
|
36
|
+
field: Record<string, boolean>;
|
|
37
|
+
title?: string | undefined;
|
|
38
|
+
stepId?: string | undefined;
|
|
39
|
+
sectionTitle?: string | undefined;
|
|
40
|
+
required?: boolean | undefined;
|
|
41
|
+
customValidation?:
|
|
42
|
+
| ((values: Record<string, unknown>) => string | null)
|
|
43
|
+
| undefined;
|
|
44
|
+
showIf?: ((values: Record<string, unknown>) => boolean) | undefined;
|
|
45
|
+
dropdownOptions?: Array<{ label: string; value: string }> | undefined;
|
|
46
|
+
/*
|
|
47
|
+
* The scan-method toggle's handler. Captured because hiding the credential
|
|
48
|
+
* fields is only half of turning SNMP off — the other half is clearing the
|
|
49
|
+
* values already typed into them, and that happens here.
|
|
50
|
+
*/
|
|
51
|
+
onChange?:
|
|
52
|
+
| ((
|
|
53
|
+
value: boolean,
|
|
54
|
+
currentFormValues: Record<string, unknown>,
|
|
55
|
+
setNewFormValues: (values: Record<string, unknown>) => void,
|
|
56
|
+
) => void)
|
|
57
|
+
| undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type CapturedActionButton = {
|
|
61
|
+
title?: string | undefined;
|
|
62
|
+
icon?: unknown;
|
|
63
|
+
isVisible?: ((item: NetworkDeviceDiscoveryScan) => boolean) | undefined;
|
|
64
|
+
onClick?:
|
|
65
|
+
| ((
|
|
66
|
+
item: NetworkDeviceDiscoveryScan,
|
|
67
|
+
onCompleteAction: VoidFunction,
|
|
68
|
+
) => Promise<void>)
|
|
69
|
+
| undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type CapturedTableProps = {
|
|
73
|
+
formFields?: Array<CapturedFormField>;
|
|
74
|
+
formSteps?: Array<{ id: string; title: string }>;
|
|
75
|
+
actionButtons?: Array<CapturedActionButton>;
|
|
76
|
+
isEditable?: boolean | undefined;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
type CapturedModalProps = {
|
|
80
|
+
title?: string | undefined;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
footer?: React.ReactElement | undefined;
|
|
83
|
+
submitButtonText?: string | undefined;
|
|
84
|
+
modelIdToEdit?: { toString: () => string } | undefined;
|
|
85
|
+
formProps?:
|
|
86
|
+
| {
|
|
87
|
+
formType?: unknown;
|
|
88
|
+
fields?: Array<CapturedFormField>;
|
|
89
|
+
steps?: Array<{ id: string; title: string }> | undefined;
|
|
90
|
+
id?: string | undefined;
|
|
91
|
+
}
|
|
92
|
+
| undefined;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
let capturedTableProps: CapturedTableProps | null = null;
|
|
96
|
+
let capturedModalProps: CapturedModalProps | null = null;
|
|
97
|
+
|
|
98
|
+
jest.mock("../../../UI/Components/ModelTable/ModelTable", () => {
|
|
99
|
+
return {
|
|
100
|
+
__esModule: true,
|
|
101
|
+
default: (props: CapturedTableProps) => {
|
|
102
|
+
capturedTableProps = props;
|
|
103
|
+
return null;
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
jest.mock("../../../UI/Components/ModelFormModal/ModelFormModal", () => {
|
|
109
|
+
return {
|
|
110
|
+
__esModule: true,
|
|
111
|
+
default: (props: CapturedModalProps) => {
|
|
112
|
+
capturedModalProps = props;
|
|
113
|
+
return null;
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
import DiscoveryPage from "../../../../App/FeatureSet/Dashboard/src/Pages/NetworkDevice/Discovery";
|
|
119
|
+
import ProbeUtil from "../../../../App/FeatureSet/Dashboard/src/Utils/Probe";
|
|
120
|
+
import { FormType } from "../../../UI/Components/Forms/ModelForm";
|
|
121
|
+
import Project from "../../../Models/DatabaseModels/Project";
|
|
122
|
+
import Probe from "../../../Models/DatabaseModels/Probe";
|
|
123
|
+
import ProjectUtil from "../../../UI/Utils/Project";
|
|
124
|
+
import PermissionUtil from "../../../UI/Utils/Permission";
|
|
125
|
+
import Permission from "../../../Types/Permission";
|
|
126
|
+
import ScanTargetUtil from "../../../Utils/NetworkDiscovery/ScanTargetUtil";
|
|
127
|
+
import SnmpScanConfigUtil from "../../../Utils/NetworkDiscovery/SnmpScanConfigUtil";
|
|
128
|
+
import NetworkDeviceDiscoveryScan from "../../../Models/DatabaseModels/NetworkDeviceDiscoveryScan";
|
|
129
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
130
|
+
import Route from "../../../Types/API/Route";
|
|
131
|
+
|
|
132
|
+
const PROJECT_ID: ObjectID = new ObjectID(
|
|
133
|
+
"11111111-1111-4111-8111-111111111111",
|
|
134
|
+
);
|
|
135
|
+
const PROBE_ID: ObjectID = new ObjectID("22222222-2222-4222-8222-222222222222");
|
|
136
|
+
const SCAN_ID: ObjectID = new ObjectID("33333333-3333-4333-8333-333333333333");
|
|
137
|
+
|
|
138
|
+
function editFields(): Array<CapturedFormField> {
|
|
139
|
+
return capturedModalProps?.formProps?.fields || [];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function fieldKeyOf(field: CapturedFormField): string {
|
|
143
|
+
return Object.keys(field.field || {})[0] as string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function editFieldKeys(): Array<string> {
|
|
147
|
+
return editFields().map(fieldKeyOf);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function editFieldNamed(key: string): CapturedFormField {
|
|
151
|
+
const field: CapturedFormField | undefined = editFields().find(
|
|
152
|
+
(candidate: CapturedFormField): boolean => {
|
|
153
|
+
return fieldKeyOf(candidate) === key;
|
|
154
|
+
},
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
if (!field) {
|
|
158
|
+
throw new Error(`Edit dialog field "${key}" not found`);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return field;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function editAction(): CapturedActionButton {
|
|
165
|
+
const action: CapturedActionButton | undefined = (
|
|
166
|
+
capturedTableProps?.actionButtons || []
|
|
167
|
+
).find((button: CapturedActionButton): boolean => {
|
|
168
|
+
return button.title === "Edit";
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
if (!action) {
|
|
172
|
+
throw new Error("The scans table has no Edit action");
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return action;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function storedScan(): NetworkDeviceDiscoveryScan {
|
|
179
|
+
const scan: NetworkDeviceDiscoveryScan = new NetworkDeviceDiscoveryScan();
|
|
180
|
+
|
|
181
|
+
scan.id = SCAN_ID;
|
|
182
|
+
scan.cidr = "192.168.1.0/24";
|
|
183
|
+
scan.status = "Completed";
|
|
184
|
+
|
|
185
|
+
return scan;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
async function renderPage(): Promise<void> {
|
|
189
|
+
const project: Project = new Project();
|
|
190
|
+
project.id = PROJECT_ID;
|
|
191
|
+
|
|
192
|
+
render(
|
|
193
|
+
<MemoryRouter>
|
|
194
|
+
<DiscoveryPage
|
|
195
|
+
pageRoute={new Route("/dashboard/network-devices/discovery")}
|
|
196
|
+
currentProject={project}
|
|
197
|
+
hasPaymentMethod={true}
|
|
198
|
+
/>
|
|
199
|
+
</MemoryRouter>,
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
// The page renders a loader until its probe fetch settles.
|
|
203
|
+
await waitFor(() => {
|
|
204
|
+
expect(capturedTableProps).not.toBeNull();
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Open the dialog the way the operator does: press the row's Edit button.
|
|
209
|
+
async function openEditDialog(): Promise<void> {
|
|
210
|
+
await renderPage();
|
|
211
|
+
|
|
212
|
+
const onClick: CapturedActionButton["onClick"] = editAction().onClick;
|
|
213
|
+
|
|
214
|
+
if (!onClick) {
|
|
215
|
+
throw new Error("The Edit action does nothing when clicked");
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
await act(async () => {
|
|
219
|
+
await onClick(storedScan(), () => {});
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
await waitFor(() => {
|
|
223
|
+
expect(capturedModalProps).not.toBeNull();
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
describe("Editing a discovery scan after it was created", () => {
|
|
228
|
+
beforeEach(() => {
|
|
229
|
+
capturedTableProps = null;
|
|
230
|
+
capturedModalProps = null;
|
|
231
|
+
|
|
232
|
+
jest.spyOn(ProjectUtil, "getCurrentProjectId").mockReturnValue(PROJECT_ID);
|
|
233
|
+
|
|
234
|
+
const probe: Probe = new Probe();
|
|
235
|
+
probe._id = PROBE_ID.toString();
|
|
236
|
+
probe.name = "Region 1100 probe";
|
|
237
|
+
|
|
238
|
+
jest.spyOn(ProbeUtil, "getAllProbes").mockResolvedValue([probe] as never);
|
|
239
|
+
|
|
240
|
+
jest
|
|
241
|
+
.spyOn(PermissionUtil, "getAllPermissions")
|
|
242
|
+
.mockReturnValue([Permission.ProjectAdmin]);
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
afterEach(() => {
|
|
246
|
+
cleanup();
|
|
247
|
+
jest.restoreAllMocks();
|
|
248
|
+
capturedTableProps = null;
|
|
249
|
+
capturedModalProps = null;
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
test("nothing opens until the operator asks for it", async () => {
|
|
253
|
+
await renderPage();
|
|
254
|
+
|
|
255
|
+
expect(capturedModalProps).toBeNull();
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
test("the dialog edits the scan that was clicked, rather than creating one", async () => {
|
|
259
|
+
await openEditDialog();
|
|
260
|
+
|
|
261
|
+
expect(capturedModalProps?.formProps?.formType).toBe(FormType.Update);
|
|
262
|
+
expect(capturedModalProps?.modelIdToEdit?.toString()).toBe(
|
|
263
|
+
SCAN_ID.toString(),
|
|
264
|
+
);
|
|
265
|
+
expect(capturedModalProps?.submitButtonText).toBe("Save Changes");
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
/*
|
|
269
|
+
* The issue's actual complaint, field by field: the target, the probe, the
|
|
270
|
+
* credentials and the schedule. Asserted as a set rather than a count, so a
|
|
271
|
+
* new field on the create wizard that is not offered for editing is a
|
|
272
|
+
* failure here rather than a discovery months later.
|
|
273
|
+
*
|
|
274
|
+
* The credentials are ONE key now, not nine. The SNMP step used to spread
|
|
275
|
+
* getSnmpConfigFormFields — snmpVersion, snmpCommunityString, snmpPort and
|
|
276
|
+
* the six v3 fields, flat — which allowed exactly one credential set per
|
|
277
|
+
* scan. A scan now carries an ORDERED LIST of them and tries each in turn
|
|
278
|
+
* (OneUptime issue #3458), and a repeated block cannot be expressed as
|
|
279
|
+
* Fields, so the nine are replaced by a single CustomComponent field bound
|
|
280
|
+
* to the `snmpConfigs` column. The list still has to be editable after
|
|
281
|
+
* creation — a rejected community string is exactly the kind of thing this
|
|
282
|
+
* dialog exists to correct — so it is named here like every other setting.
|
|
283
|
+
*
|
|
284
|
+
* `isSnmpEnabled` is named here for the same reason and a sharper one
|
|
285
|
+
* (OneUptime issue #3445): it is the scan's METHOD, and a scan created as
|
|
286
|
+
* ICMP-only with no way to turn SNMP back on is the delete-and-recreate loop
|
|
287
|
+
* this dialog was built to end, one field further along. Asserted as an
|
|
288
|
+
* exact list rather than a set of `toContain` calls, so a tenth flat field
|
|
289
|
+
* creeping back onto the wizard fails here too.
|
|
290
|
+
*/
|
|
291
|
+
test("offers every setting the create wizard collects", async () => {
|
|
292
|
+
await openEditDialog();
|
|
293
|
+
|
|
294
|
+
const wizardKeys: Array<string> = (
|
|
295
|
+
capturedTableProps?.formFields || []
|
|
296
|
+
).map(fieldKeyOf);
|
|
297
|
+
|
|
298
|
+
expect(editFieldKeys()).toEqual(wizardKeys);
|
|
299
|
+
|
|
300
|
+
expect(editFieldKeys()).toEqual([
|
|
301
|
+
"name",
|
|
302
|
+
"cidr",
|
|
303
|
+
"probe",
|
|
304
|
+
"isSnmpEnabled",
|
|
305
|
+
"snmpConfigs",
|
|
306
|
+
"isRecurring",
|
|
307
|
+
"rescanIntervalInMinutes",
|
|
308
|
+
]);
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
/*
|
|
312
|
+
* Where the two changes meet, and the case neither of them can state alone.
|
|
313
|
+
*
|
|
314
|
+
* An ICMP-only scan (issue #3445) stores no credentials, and the credential
|
|
315
|
+
* list (issue #3458) is `required: true` with a validator of its own. Those
|
|
316
|
+
* two facts collide in exactly one place: a scan whose method is off must
|
|
317
|
+
* not be judged by the credential rules, or the Edit dialog refuses to save
|
|
318
|
+
* a ping sweep because it is missing credentials it will never send.
|
|
319
|
+
*
|
|
320
|
+
* Validation.validate skips a field whose `showIf` says it is hidden, so
|
|
321
|
+
* that gate is the whole mechanism — and it is asserted here against the
|
|
322
|
+
* EDIT dialog specifically. The wizard has a second line of defence in the
|
|
323
|
+
* step-level showIf on the SNMP step, which filters the step out entirely;
|
|
324
|
+
* the edit dialog has no steps at all, so the field-level `showIf` is the
|
|
325
|
+
* only thing standing between an ICMP-only scan and an unsavable form.
|
|
326
|
+
*/
|
|
327
|
+
test("stops asking for credentials once the scan is ICMP-only", async () => {
|
|
328
|
+
await openEditDialog();
|
|
329
|
+
|
|
330
|
+
const snmpConfigs: CapturedFormField = editFieldNamed("snmpConfigs");
|
|
331
|
+
|
|
332
|
+
expect(snmpConfigs.required).toBe(true);
|
|
333
|
+
expect(snmpConfigs.showIf).toBeDefined();
|
|
334
|
+
|
|
335
|
+
// The method is on: the list is shown, and its rules apply.
|
|
336
|
+
expect(snmpConfigs.showIf?.({ isSnmpEnabled: true })).toBe(true);
|
|
337
|
+
|
|
338
|
+
// Turned off: hidden, so neither `required` nor the validator can speak.
|
|
339
|
+
expect(snmpConfigs.showIf?.({ isSnmpEnabled: false })).toBe(false);
|
|
340
|
+
|
|
341
|
+
/*
|
|
342
|
+
* And ABSENT means shown. A scan row written before the column existed,
|
|
343
|
+
* or one whose `select` did not ask for it, arrives here as undefined —
|
|
344
|
+
* and every one of those scans is an SNMP scan, so hiding the editor for
|
|
345
|
+
* them would blank a credential list the scan is really carrying. This is
|
|
346
|
+
* ScanModeUtil's `!== false` read, reaching the form through
|
|
347
|
+
* isIcmpOnlyScan.
|
|
348
|
+
*/
|
|
349
|
+
expect(snmpConfigs.showIf?.({})).toBe(true);
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
/*
|
|
353
|
+
* The same interaction from the other end: turning the method off has to
|
|
354
|
+
* take the credentials with it.
|
|
355
|
+
*
|
|
356
|
+
* Hiding the editor is not enough on its own. ModelForm builds the request
|
|
357
|
+
* body from every DECLARED field without asking whether it was visible, so a
|
|
358
|
+
* list of v3 passphrases typed before the operator changed their mind would
|
|
359
|
+
* be posted — and stored — on a scan that will never send one. The toggle's
|
|
360
|
+
* own onChange is what clears it, and this is the edit dialog's copy of that
|
|
361
|
+
* toggle, so the guarantee is pinned on the form the operator uses to make
|
|
362
|
+
* exactly this change to an EXISTING scan.
|
|
363
|
+
*/
|
|
364
|
+
test("clears the credential list when the method is turned off", async () => {
|
|
365
|
+
await openEditDialog();
|
|
366
|
+
|
|
367
|
+
const isSnmpEnabled: CapturedFormField = editFieldNamed("isSnmpEnabled");
|
|
368
|
+
|
|
369
|
+
expect(isSnmpEnabled.onChange).toBeDefined();
|
|
370
|
+
|
|
371
|
+
const before: Record<string, unknown> = {
|
|
372
|
+
cidr: "192.168.1.0/24",
|
|
373
|
+
isSnmpEnabled: true,
|
|
374
|
+
snmpConfigs: [
|
|
375
|
+
{ id: "config-1", snmpVersion: "V2c", snmpCommunityString: "public" },
|
|
376
|
+
],
|
|
377
|
+
snmpCommunityString: "public",
|
|
378
|
+
snmpV3AuthKey: "auth-key",
|
|
379
|
+
snmpV3PrivKey: "priv-key",
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
let after: Record<string, unknown> | null = null;
|
|
383
|
+
|
|
384
|
+
isSnmpEnabled.onChange?.(
|
|
385
|
+
false,
|
|
386
|
+
before,
|
|
387
|
+
(values: Record<string, unknown>) => {
|
|
388
|
+
after = values;
|
|
389
|
+
},
|
|
390
|
+
);
|
|
391
|
+
|
|
392
|
+
const cleared: Record<string, unknown> = after as unknown as Record<
|
|
393
|
+
string,
|
|
394
|
+
unknown
|
|
395
|
+
>;
|
|
396
|
+
|
|
397
|
+
expect(cleared).not.toBeNull();
|
|
398
|
+
expect(cleared["isSnmpEnabled"]).toBe(false);
|
|
399
|
+
expect(cleared["snmpConfigs"]).toBeUndefined();
|
|
400
|
+
/*
|
|
401
|
+
* The flattened columns go too. This form no longer collects them — the
|
|
402
|
+
* server mirrors them from the list's first entry — but a value that
|
|
403
|
+
* reached the form some other way must not ride along on a scan that will
|
|
404
|
+
* never send SNMP.
|
|
405
|
+
*/
|
|
406
|
+
expect(cleared["snmpCommunityString"]).toBeUndefined();
|
|
407
|
+
expect(cleared["snmpV3AuthKey"]).toBeUndefined();
|
|
408
|
+
expect(cleared["snmpV3PrivKey"]).toBeUndefined();
|
|
409
|
+
/*
|
|
410
|
+
* With ONE exception: the version is RESET to its default rather than
|
|
411
|
+
* cleared. Clearing it leaves a required Dropdown holding nothing, which
|
|
412
|
+
* then fails with "SNMP Version is required" against a control that
|
|
413
|
+
* visibly reads V2c the moment the operator turns SNMP back on — issue
|
|
414
|
+
* #3445's own symptom, reintroduced on the way out of it.
|
|
415
|
+
*/
|
|
416
|
+
expect(cleared["snmpVersion"]).toBeDefined();
|
|
417
|
+
// ...and the rest of the scan is untouched.
|
|
418
|
+
expect(cleared["cidr"]).toBe("192.168.1.0/24");
|
|
419
|
+
|
|
420
|
+
/*
|
|
421
|
+
* Turning it back ON changes nothing by itself: the editor seeds its own
|
|
422
|
+
* first card, and a handler that rewrote values here would fight it.
|
|
423
|
+
*/
|
|
424
|
+
let touchedOnEnable: boolean = false;
|
|
425
|
+
|
|
426
|
+
isSnmpEnabled.onChange?.(true, before, () => {
|
|
427
|
+
touchedOnEnable = true;
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
expect(touchedOnEnable).toBe(false);
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
/*
|
|
434
|
+
* The other half of that change, stated as its own guarantee: the flattened
|
|
435
|
+
* columns are no longer collected ANYWHERE on this dialog.
|
|
436
|
+
*
|
|
437
|
+
* They still exist on the model — the server mirrors the first config onto
|
|
438
|
+
* them so that a probe a version behind keeps working — but they are derived
|
|
439
|
+
* now, not typed. Offering one of them here would give the operator a box
|
|
440
|
+
* whose value the next save silently overwrites from the list, which is
|
|
441
|
+
* worse than not offering it at all.
|
|
442
|
+
*/
|
|
443
|
+
test("no longer offers the flattened SNMP columns the list replaced", async () => {
|
|
444
|
+
await openEditDialog();
|
|
445
|
+
|
|
446
|
+
for (const key of [
|
|
447
|
+
"snmpVersion",
|
|
448
|
+
"snmpCommunityString",
|
|
449
|
+
"snmpPort",
|
|
450
|
+
"snmpV3SecurityLevel",
|
|
451
|
+
"snmpV3Username",
|
|
452
|
+
"snmpV3AuthProtocol",
|
|
453
|
+
"snmpV3AuthKey",
|
|
454
|
+
"snmpV3PrivProtocol",
|
|
455
|
+
"snmpV3PrivKey",
|
|
456
|
+
]) {
|
|
457
|
+
expect(editFieldKeys()).not.toContain(key);
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
/*
|
|
462
|
+
* "Repeat this scan" is the setting named in the issue title, and the one
|
|
463
|
+
* whose absence sent people to delete-and-recreate.
|
|
464
|
+
*/
|
|
465
|
+
test("offers recurrence, which is what the report was about", async () => {
|
|
466
|
+
await openEditDialog();
|
|
467
|
+
|
|
468
|
+
const isRecurring: CapturedFormField = editFieldNamed("isRecurring");
|
|
469
|
+
const interval: CapturedFormField = editFieldNamed(
|
|
470
|
+
"rescanIntervalInMinutes",
|
|
471
|
+
);
|
|
472
|
+
|
|
473
|
+
expect(isRecurring.title).toBe("Repeat this scan");
|
|
474
|
+
// The interval reveals itself off the toggle, exactly as in the wizard.
|
|
475
|
+
expect(interval.showIf?.({ isRecurring: true })).toBe(true);
|
|
476
|
+
expect(interval.showIf?.({ isRecurring: false })).toBe(false);
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
/*
|
|
480
|
+
* One definition, two layouts. A second copy of the field array would be a
|
|
481
|
+
* second set of descriptions, validators and reveal rules to keep in step,
|
|
482
|
+
* and the copy that drifted would be this one — the one nobody exercises
|
|
483
|
+
* until they are already trying to fix a scan that is not working.
|
|
484
|
+
*
|
|
485
|
+
* Compared field by field rather than by object identity: the factory builds
|
|
486
|
+
* fresh objects for each form, deliberately, because ModelForm mutates the
|
|
487
|
+
* field objects it is handed (it writes an inferred maxLength onto them) and
|
|
488
|
+
* two forms must not share one mutable object.
|
|
489
|
+
*/
|
|
490
|
+
test("describes every field exactly as the create wizard does", async () => {
|
|
491
|
+
await openEditDialog();
|
|
492
|
+
|
|
493
|
+
const wizardFields: Array<CapturedFormField> =
|
|
494
|
+
capturedTableProps?.formFields || [];
|
|
495
|
+
const formSteps: Array<{ id: string; title: string }> =
|
|
496
|
+
capturedTableProps?.formSteps || [];
|
|
497
|
+
|
|
498
|
+
expect(editFields()).toHaveLength(wizardFields.length);
|
|
499
|
+
|
|
500
|
+
let headed: number = 0;
|
|
501
|
+
const titledStepIds: Set<string> = new Set<string>();
|
|
502
|
+
|
|
503
|
+
editFields().forEach((field: CapturedFormField, index: number) => {
|
|
504
|
+
const wizardField: CapturedFormField = wizardFields[
|
|
505
|
+
index
|
|
506
|
+
] as CapturedFormField;
|
|
507
|
+
|
|
508
|
+
expect({
|
|
509
|
+
key: fieldKeyOf(field),
|
|
510
|
+
title: field.title,
|
|
511
|
+
stepId: field.stepId,
|
|
512
|
+
required: field.required,
|
|
513
|
+
// Module-level functions, so identity is the right comparison here.
|
|
514
|
+
customValidation: field.customValidation,
|
|
515
|
+
hasShowIf: Boolean(field.showIf),
|
|
516
|
+
}).toEqual({
|
|
517
|
+
key: fieldKeyOf(wizardField),
|
|
518
|
+
title: wizardField.title,
|
|
519
|
+
stepId: wizardField.stepId,
|
|
520
|
+
required: wizardField.required,
|
|
521
|
+
customValidation: wizardField.customValidation,
|
|
522
|
+
hasShowIf: Boolean(wizardField.showIf),
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
let expectedSectionTitle: string | undefined = wizardField.sectionTitle;
|
|
526
|
+
|
|
527
|
+
/*
|
|
528
|
+
* The edit layout adds each wizard step's title to the first field in
|
|
529
|
+
* that step. Field-level subsection titles are part of the shared field
|
|
530
|
+
* definition, though, and must survive unchanged in both layouts. The
|
|
531
|
+
* scan-method toggle's "What to check" heading is one such subsection.
|
|
532
|
+
*/
|
|
533
|
+
if (wizardField.stepId && !titledStepIds.has(wizardField.stepId)) {
|
|
534
|
+
expectedSectionTitle = formSteps.find(
|
|
535
|
+
(step: { id: string; title: string }): boolean => {
|
|
536
|
+
return step.id === wizardField.stepId;
|
|
537
|
+
},
|
|
538
|
+
)?.title;
|
|
539
|
+
|
|
540
|
+
expect(expectedSectionTitle).toBeDefined();
|
|
541
|
+
titledStepIds.add(wizardField.stepId);
|
|
542
|
+
headed++;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
expect(field.sectionTitle).toBe(expectedSectionTitle);
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
expect(headed).toBe(formSteps.length);
|
|
549
|
+
expect(
|
|
550
|
+
wizardFields.find((field: CapturedFormField): boolean => {
|
|
551
|
+
return fieldKeyOf(field) === "isSnmpEnabled";
|
|
552
|
+
})?.sectionTitle,
|
|
553
|
+
).toBe("What to check");
|
|
554
|
+
|
|
555
|
+
// And the validators are really wired, not merely identical undefineds.
|
|
556
|
+
expect(
|
|
557
|
+
editFieldNamed("cidr").customValidation?.({ cidr: "10.0.0.0/33" }),
|
|
558
|
+
).toBe(ScanTargetUtil.getValidationError("10.0.0.0/33"));
|
|
559
|
+
expect(
|
|
560
|
+
editFieldNamed("rescanIntervalInMinutes").customValidation,
|
|
561
|
+
).toBeDefined();
|
|
562
|
+
expect(editFieldNamed("name").customValidation).toBeDefined();
|
|
563
|
+
|
|
564
|
+
/*
|
|
565
|
+
* The credential list included. Its validator is `validateSnmpConfigs`, a
|
|
566
|
+
* MODULE-LEVEL const in DiscoveryScanFormValidation rather than an arrow
|
|
567
|
+
* written inline in the field factory — which is what makes the identity
|
|
568
|
+
* comparison above meaningful for it. An inline closure would be a fresh
|
|
569
|
+
* function object on each of the two calls the page makes to the factory,
|
|
570
|
+
* so this test would fail even though both forms enforced the same rule;
|
|
571
|
+
* the const is the fix, and this assertion is what would notice it being
|
|
572
|
+
* inlined again.
|
|
573
|
+
*/
|
|
574
|
+
expect(
|
|
575
|
+
editFieldNamed("snmpConfigs").customValidation?.({ snmpConfigs: [] }),
|
|
576
|
+
).toBe(SnmpScanConfigUtil.getValidationError([]));
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
test("offers the probes that were fetched for the create wizard", async () => {
|
|
580
|
+
await openEditDialog();
|
|
581
|
+
|
|
582
|
+
expect(editFieldNamed("probe").dropdownOptions).toEqual([
|
|
583
|
+
{ label: "Region 1100 probe", value: PROBE_ID.toString() },
|
|
584
|
+
]);
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
/*
|
|
588
|
+
* Not a wizard. A stepped form has no Back button — the only way backwards
|
|
589
|
+
* is the step rail, which BasicForm hides below the `lg` breakpoint — and
|
|
590
|
+
* three "Next" clicks to reach the toggle you came to flip is the wrong
|
|
591
|
+
* shape for a repair. The wizard's step titles survive as section headings
|
|
592
|
+
* so the grouping is not lost with the steps.
|
|
593
|
+
*/
|
|
594
|
+
test("lays the settings out on one page, under the wizard's own headings", async () => {
|
|
595
|
+
await openEditDialog();
|
|
596
|
+
|
|
597
|
+
expect(capturedModalProps?.formProps?.steps).toBeUndefined();
|
|
598
|
+
|
|
599
|
+
const headings: Array<string> = editFields()
|
|
600
|
+
.map((field: CapturedFormField): string | undefined => {
|
|
601
|
+
return field.sectionTitle;
|
|
602
|
+
})
|
|
603
|
+
.filter((title: string | undefined): boolean => {
|
|
604
|
+
return Boolean(title);
|
|
605
|
+
}) as Array<string>;
|
|
606
|
+
|
|
607
|
+
/*
|
|
608
|
+
* NOT simply the step titles in order any more, which is what this
|
|
609
|
+
* assertion used to be. The scan-method toggle carries a subsection
|
|
610
|
+
* heading of its own ("What to check") in the middle of the Scan Target
|
|
611
|
+
* group, so the edit dialog's headings are the step titles INTERLEAVED
|
|
612
|
+
* with the field-level ones — and an assertion that only knew about steps
|
|
613
|
+
* would have to be relaxed to accommodate that, which would stop it
|
|
614
|
+
* noticing a step heading going missing.
|
|
615
|
+
*
|
|
616
|
+
* Rebuilt from the wizard's own fields instead: first field of a step
|
|
617
|
+
* contributes that step's title (the edit layout overwrites its
|
|
618
|
+
* sectionTitle with it), every other field contributes whatever
|
|
619
|
+
* sectionTitle it declares. That keeps the assertion exact while staying
|
|
620
|
+
* true for both kinds of heading.
|
|
621
|
+
*/
|
|
622
|
+
const wizardFields: Array<CapturedFormField> =
|
|
623
|
+
capturedTableProps?.formFields || [];
|
|
624
|
+
const formSteps: Array<{ id: string; title: string }> =
|
|
625
|
+
capturedTableProps?.formSteps || [];
|
|
626
|
+
const titledStepIds: Set<string> = new Set<string>();
|
|
627
|
+
const expectedHeadings: Array<string> = [];
|
|
628
|
+
|
|
629
|
+
wizardFields.forEach((field: CapturedFormField): void => {
|
|
630
|
+
if (field.stepId && !titledStepIds.has(field.stepId)) {
|
|
631
|
+
const stepTitle: string | undefined = formSteps.find(
|
|
632
|
+
(step: { id: string; title: string }): boolean => {
|
|
633
|
+
return step.id === field.stepId;
|
|
634
|
+
},
|
|
635
|
+
)?.title;
|
|
636
|
+
|
|
637
|
+
expect(stepTitle).toBeDefined();
|
|
638
|
+
expectedHeadings.push(stepTitle as string);
|
|
639
|
+
titledStepIds.add(field.stepId);
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
if (field.sectionTitle) {
|
|
644
|
+
expectedHeadings.push(field.sectionTitle);
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
expect(headings).toEqual(expectedHeadings);
|
|
649
|
+
expect(headings).toContain("What to check");
|
|
650
|
+
|
|
651
|
+
/*
|
|
652
|
+
* A heading is carried by the FIRST field of its group, so which field
|
|
653
|
+
* carries it is not decoration — it is where the group begins. The SNMP
|
|
654
|
+
* group used to begin at `snmpVersion`, the first of nine flat fields;
|
|
655
|
+
* it now begins at `snmpConfigs`, which is the only field on that step.
|
|
656
|
+
* Pinned because the heading silently moves to whatever field happens to
|
|
657
|
+
* come first, and a group that begins in the wrong place puts the
|
|
658
|
+
* credentials under the schedule's heading with no other symptom.
|
|
659
|
+
*/
|
|
660
|
+
expect(editFieldNamed("snmpConfigs").sectionTitle).toBe("SNMP Credentials");
|
|
661
|
+
|
|
662
|
+
/*
|
|
663
|
+
* And the toggle keeps its own heading rather than being promoted to a
|
|
664
|
+
* group start. It sits in the MIDDLE of the Scan Target step, so if the
|
|
665
|
+
* edit layout ever headed every field instead of the first of each step,
|
|
666
|
+
* "What to check" would be replaced by a second "Scan Target" and the two
|
|
667
|
+
* questions the step asks would read as one.
|
|
668
|
+
*/
|
|
669
|
+
expect(editFieldNamed("isSnmpEnabled").sectionTitle).toBe("What to check");
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
/*
|
|
673
|
+
* Changing the sweep clears the last run's hosts, and that is not something
|
|
674
|
+
* to find out afterwards in an empty Review Results dialog.
|
|
675
|
+
*/
|
|
676
|
+
test("says what changing the sweep will cost before it is saved", async () => {
|
|
677
|
+
await openEditDialog();
|
|
678
|
+
|
|
679
|
+
const footerElement: React.ReactElement | undefined =
|
|
680
|
+
capturedModalProps?.footer;
|
|
681
|
+
|
|
682
|
+
expect(footerElement).toBeDefined();
|
|
683
|
+
|
|
684
|
+
/*
|
|
685
|
+
* Rendered rather than inspected: what matters is the sentence the
|
|
686
|
+
* operator reads, not which component carries it.
|
|
687
|
+
*/
|
|
688
|
+
const { container } = render(<MemoryRouter>{footerElement}</MemoryRouter>);
|
|
689
|
+
const warning: string = container.textContent || "";
|
|
690
|
+
|
|
691
|
+
expect(warning).toContain("re-runs the scan");
|
|
692
|
+
expect(warning).toContain("cleared");
|
|
693
|
+
// ...and that a rename or a schedule change costs nothing.
|
|
694
|
+
expect(warning).toContain("name or the schedule");
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
/*
|
|
698
|
+
* The table itself must stay non-editable, or the operator gets two Edit
|
|
699
|
+
* buttons: this one, and ModelTable's own — which has no room for the
|
|
700
|
+
* warning above and no per-row visibility hook.
|
|
701
|
+
*/
|
|
702
|
+
test("does not also turn on the table's built-in edit button", async () => {
|
|
703
|
+
await renderPage();
|
|
704
|
+
|
|
705
|
+
expect(capturedTableProps?.isEditable).toBe(false);
|
|
706
|
+
});
|
|
707
|
+
});
|