@oneuptime/common 12.0.14 → 12.0.16
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 +10 -0
- package/Models/AnalyticsModels/LogCountBaseline.ts +174 -0
- package/Models/AnalyticsModels/SecurityEvent.ts +794 -0
- package/Models/AnalyticsModels/Span.ts +29 -1
- package/Models/AnalyticsModels/SpanCountBaseline.ts +198 -0
- package/Models/DatabaseModels/Alert.ts +42 -0
- package/Models/DatabaseModels/AlertMeasurement.ts +1114 -0
- package/Models/DatabaseModels/AlertMeasurementValue.ts +501 -0
- package/Models/DatabaseModels/AlertStateTimeline.ts +10 -2
- package/Models/DatabaseModels/BillingPaymentMethod.ts +8 -10
- package/Models/DatabaseModels/DetectionRule.ts +487 -0
- package/Models/DatabaseModels/GlobalOidc.ts +20 -0
- package/Models/DatabaseModels/GlobalSso.ts +20 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +382 -0
- package/Models/DatabaseModels/Incident.ts +42 -0
- package/Models/DatabaseModels/IncidentMeasurement.ts +1114 -0
- package/Models/DatabaseModels/IncidentMeasurementValue.ts +501 -0
- package/Models/DatabaseModels/IncidentStateTimeline.ts +10 -2
- package/Models/DatabaseModels/IncomingCallPolicyLabelRule.ts +36 -0
- package/Models/DatabaseModels/IncomingCallPolicyOwnerRule.ts +42 -0
- package/Models/DatabaseModels/Index.ts +20 -0
- package/Models/DatabaseModels/Label.ts +11 -0
- package/Models/DatabaseModels/LlmCostBudget.ts +655 -0
- package/Models/DatabaseModels/LlmModelPrice.ts +481 -0
- package/Models/DatabaseModels/LogSavedView.ts +87 -0
- package/Models/DatabaseModels/MarketingConversion.ts +222 -10
- package/Models/DatabaseModels/MetricSavedView.ts +59 -0
- package/Models/DatabaseModels/NetworkDeviceLinkRule.ts +46 -0
- package/Models/DatabaseModels/OnCallDutyPolicyLabelRule.ts +36 -0
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.ts +42 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.ts +36 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.ts +42 -0
- package/Models/DatabaseModels/Probe.ts +21 -0
- package/Models/DatabaseModels/RunbookLabelRule.ts +36 -0
- package/Models/DatabaseModels/RunbookOwnerRule.ts +42 -0
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.ts +1104 -0
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.ts +491 -0
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.ts +10 -2
- package/Models/DatabaseModels/StatusPage.ts +7 -4
- package/Models/DatabaseModels/StatusPageLabelRule.ts +36 -0
- package/Models/DatabaseModels/StatusPageOwnerRule.ts +42 -0
- package/Models/DatabaseModels/TableView.ts +15 -0
- package/Models/DatabaseModels/Team.ts +13 -0
- package/Models/DatabaseModels/TeamMember.ts +8 -0
- package/Models/DatabaseModels/TraceSavedView.ts +52 -0
- package/Models/DatabaseModels/WorkflowLabelRule.ts +36 -0
- package/Models/DatabaseModels/WorkflowOwnerRule.ts +42 -0
- package/Server/API/StatusPageAPI.ts +29 -4
- package/Server/API/TelemetryAPI.ts +252 -6
- package/Server/API/UserAPI.ts +88 -0
- package/Server/EnvironmentConfig.ts +43 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787800000000-AddScopeToNetworkDeviceLinkRule.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787900000000-AddRestrictToAttachedProjectsToGlobalSso.ts +40 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.ts +88 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.ts +457 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.ts +97 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.ts +45 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.ts +105 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.ts +77 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +16 -0
- package/Server/Middleware/IdentityRateLimit.ts +672 -0
- package/Server/Middleware/SlackAuthorization.ts +43 -6
- package/Server/Middleware/UserAuthorization.ts +236 -26
- package/Server/Middleware/WhatsAppAuthorization.ts +43 -3
- package/Server/Services/AccessTokenService.ts +15 -2
- package/Server/Services/AlertMeasurementService.ts +302 -0
- package/Server/Services/AlertMeasurementValueService.ts +508 -0
- package/Server/Services/AlertService.ts +50 -0
- package/Server/Services/AlertStateTimelineService.ts +54 -0
- package/Server/Services/DetectionRuleService.ts +74 -0
- package/Server/Services/GlobalOidcProjectService.ts +126 -1
- package/Server/Services/GlobalOidcService.ts +132 -0
- package/Server/Services/GlobalSsoProjectService.ts +126 -1
- package/Server/Services/GlobalSsoService.ts +132 -0
- package/Server/Services/GoogleSecOpsConnectionService.ts +89 -0
- package/Server/Services/IncidentMeasurementService.ts +304 -0
- package/Server/Services/IncidentMeasurementValueService.ts +523 -0
- package/Server/Services/IncidentService.ts +51 -0
- package/Server/Services/IncidentStateTimelineService.ts +54 -0
- package/Server/Services/Index.ts +30 -0
- package/Server/Services/LlmCostBudgetService.ts +93 -0
- package/Server/Services/LlmModelPriceService.ts +202 -0
- package/Server/Services/LogAggregationService.ts +1106 -2
- package/Server/Services/LogCountBaselineService.ts +163 -0
- package/Server/Services/MutableMetricService.ts +30 -9
- package/Server/Services/ScheduledMaintenanceMeasurementService.ts +311 -0
- package/Server/Services/ScheduledMaintenanceMeasurementValueService.ts +546 -0
- package/Server/Services/ScheduledMaintenanceService.ts +53 -0
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +188 -1
- package/Server/Services/SecurityEventService.ts +104 -0
- package/Server/Services/SpanCountBaselineService.ts +173 -0
- package/Server/Services/StatusPageService.ts +4 -3
- package/Server/Services/TelemetryUsageBillingService.ts +17 -2
- package/Server/Services/UserEmailService.ts +4 -4
- package/Server/Services/UserService.ts +284 -51
- package/Server/Services/UserTotpAuthService.ts +27 -86
- package/Server/Services/UserWebAuthnService.ts +26 -86
- package/Server/Types/Billing/MeteredPlan/AllMeteredPlans.ts +14 -0
- package/Server/Types/Database/Permissions/TenantPermission.ts +10 -0
- package/Server/Types/Database/QueryHelper.ts +1 -1
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +1 -1
- package/Server/Utils/AI/Toolbox/Index.ts +6 -0
- package/Server/Utils/AI/Toolbox/SecurityEventTools.ts +349 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +13 -4
- package/Server/Utils/Attribution.ts +130 -34
- package/Server/Utils/CronTab.ts +73 -0
- package/Server/Utils/GlobalSsoAuthorization.ts +175 -0
- package/Server/Utils/Marketing/ConversionUploadProvider.ts +123 -11
- package/Server/Utils/Marketing/Providers/GoogleAds.ts +71 -8
- package/Server/Utils/Marketing/Providers/LinkedIn.ts +55 -17
- package/Server/Utils/Marketing/Providers/Meta.ts +53 -19
- package/Server/Utils/Marketing/Providers/MicrosoftAds.ts +38 -11
- package/Server/Utils/Marketing/Providers/Reddit.ts +46 -16
- package/Server/Utils/Measurement/MeasurementDefinitionValidator.ts +209 -0
- package/Server/Utils/Measurement/MeasurementMetricWriter.ts +189 -0
- package/Server/Utils/Monitor/Criteria/APIRequestCriteria.ts +48 -33
- package/Server/Utils/Monitor/Criteria/CountAnomaly.ts +182 -0
- package/Server/Utils/Monitor/Criteria/DnsMonitorCriteria.ts +35 -30
- package/Server/Utils/Monitor/Criteria/DomainMonitorCriteria.ts +33 -28
- package/Server/Utils/Monitor/Criteria/EvaluateOverTime.ts +475 -47
- package/Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria.ts +35 -30
- package/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.ts +34 -28
- package/Server/Utils/Monitor/Criteria/LogMonitorCriteria.ts +132 -0
- package/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.ts +33 -28
- package/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.ts +35 -0
- package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +69 -40
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +35 -29
- package/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.ts +132 -0
- package/Server/Utils/Monitor/DataToProcess.ts +2 -0
- package/Server/Utils/Monitor/MonitorCriteriaDataExtractor.ts +14 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +23 -0
- package/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.ts +20 -0
- package/Server/Utils/Monitor/MonitorResource.ts +177 -21
- package/Server/Utils/Monitor/MonitorStepResourceIdentity.ts +1 -0
- package/Server/Utils/Monitor/MonitorStepsReferenceExtractor.ts +1 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +548 -0
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.ts +262 -0
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +212 -0
- package/Server/Utils/SecurityEvent/SecurityEventRow.ts +101 -0
- package/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.ts +635 -0
- package/Server/Utils/StatusPageContentSecurityPolicy.ts +56 -0
- package/Server/Utils/StatusPageCustomizationAccess.ts +117 -0
- package/Server/Utils/Telemetry/LlmCostBudgetEvaluator.ts +379 -0
- package/Server/Utils/Telemetry/LlmSpan.ts +83 -4
- package/Server/Utils/Telemetry/LogErrorPatternSql.ts +136 -0
- package/Server/Utils/UserPermission/UserPermission.ts +57 -1
- package/Tests/App/Dashboard/AlertsSideMenu.test.tsx +4 -0
- package/Tests/App/Dashboard/CreatePageEntryPointPermissions.test.tsx +306 -0
- package/Tests/App/Dashboard/DangerZone.test.tsx +11 -0
- package/Tests/App/Dashboard/IncidentsSideMenu.test.tsx +4 -0
- package/Tests/App/Dashboard/LogMonitorAttributeOperatorPreview.test.tsx +459 -0
- package/Tests/App/Dashboard/OverviewCustomFields.test.tsx +24 -0
- package/Tests/App/Dashboard/ScheduledMaintenanceSideMenu.test.tsx +6 -0
- package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +323 -0
- package/Tests/Models/DatabaseModels/ProjectSharedResources.test.ts +386 -0
- package/Tests/Server/API/LogErrorPatternAPI.test.ts +811 -0
- package/Tests/Server/API/StatusPageCustomizationOrigin.test.ts +348 -0
- package/Tests/Server/API/UserAuthenticationAPI.test.ts +11 -0
- package/Tests/Server/API/UserProjectsAPI.test.ts +11 -2
- package/Tests/Server/API/UserTwoFactorAuthAdminAPI.test.ts +918 -0
- package/Tests/Server/Infrastructure/LocalCache.test.ts +149 -0
- package/Tests/Server/Infrastructure/Postgres/FixTotpOtpUrlAlgorithmMigration.test.ts +9 -59
- package/Tests/Server/Infrastructure/Postgres/SchemaMigrationsOrdering.test.ts +227 -0
- package/Tests/Server/Middleware/SlackAuthorization.test.ts +149 -0
- package/Tests/Server/Middleware/UserAuthorization.test.ts +27 -13
- package/Tests/Server/Middleware/UserAuthorizationGlobalSsoGovernance.test.ts +1455 -0
- package/Tests/Server/Middleware/UserAuthorizationSSOProvider.test.ts +91 -2
- package/Tests/Server/Middleware/WhatsAppAuthorization.test.ts +233 -0
- package/Tests/Server/Services/AccessTokenProjectUserGrant.test.ts +249 -0
- package/Tests/Server/Services/AlertMeasurementService.test.ts +665 -0
- package/Tests/Server/Services/AlertMeasurementValueService.test.ts +389 -0
- package/Tests/Server/Services/DetectionRuleService.test.ts +254 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +21 -8
- package/Tests/Server/Services/GlobalSsoProviderAuthorization.test.ts +1242 -0
- package/Tests/Server/Services/IncidentMeasurementService.test.ts +394 -0
- package/Tests/Server/Services/IncidentMeasurementValueService.test.ts +816 -0
- package/Tests/Server/Services/LlmCostBudgetService.test.ts +104 -0
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +405 -0
- package/Tests/Server/Services/LogErrorPatternAggregation.test.ts +804 -0
- package/Tests/Server/Services/MonitorResourceProbeAgreementHydration.test.ts +459 -0
- package/Tests/Server/Services/MonitorResourceProbeAgreementReuse.test.ts +10 -0
- package/Tests/Server/Services/MutableMetricNameRouting.test.ts +83 -0
- package/Tests/Server/Services/ScheduledMaintenanceMeasurementService.test.ts +750 -0
- package/Tests/Server/Services/ScheduledMaintenanceMeasurementValueService.test.ts +478 -0
- package/Tests/Server/Services/UserAuthenticationService.test.ts +216 -4
- package/Tests/Server/Services/UserTwoFactorAuthAdmin.test.ts +1190 -0
- package/Tests/Server/Types/AnalyticsDatabase/AggregateUtilBucketTimestamp.test.ts +416 -0
- package/Tests/Server/Types/Database/Permissions/ScopedRoleSharedResourceAccess.test.ts +466 -0
- package/Tests/Server/Types/Database/QueryHelperManyToManyAndEmptyValues.test.ts +551 -0
- package/Tests/Server/Types/Database/QueryHelperOperators.test.ts +265 -0
- package/Tests/Server/Types/Database/QueryHelperTextAndStructuralOperators.test.ts +206 -0
- package/Tests/Server/Types/Database/SelectUtil.test.ts +348 -0
- package/Tests/Server/Utils/AnalyticsDatabase/ClusterAwareSchema.test.ts +6 -0
- package/Tests/Server/Utils/AnalyticsDatabase/FractionalAttributeThreshold.test.ts +224 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +172 -2
- package/Tests/Server/Utils/Attribution.test.ts +228 -1
- package/Tests/Server/Utils/CronTab.test.ts +116 -0
- package/Tests/Server/Utils/GlobalSSOToken.test.ts +581 -0
- package/Tests/Server/Utils/GlobalSsoAuthorization.test.ts +1401 -0
- package/Tests/Server/Utils/Marketing/AdUploadableConversionTypes.test.ts +315 -0
- package/Tests/Server/Utils/Marketing/ConversionUploadProvider.test.ts +124 -7
- package/Tests/Server/Utils/Marketing/GoogleAds.test.ts +253 -1
- package/Tests/Server/Utils/Marketing/LinkedIn.test.ts +282 -0
- package/Tests/Server/Utils/Marketing/Meta.test.ts +304 -0
- package/Tests/Server/Utils/Marketing/MicrosoftAds.test.ts +263 -0
- package/Tests/Server/Utils/Marketing/Reddit.test.ts +259 -0
- package/Tests/Server/Utils/Measurement/MeasurementDefinitionValidator.test.ts +322 -0
- package/Tests/Server/Utils/Measurement/MeasurementMetricWriter.test.ts +373 -0
- package/Tests/Server/Utils/Monitor/Criteria/APIRequestCriteriaEvaluateOverTime.test.ts +508 -0
- package/Tests/Server/Utils/Monitor/Criteria/APIRequestCriteriaPortTimings.test.ts +30 -9
- package/Tests/Server/Utils/Monitor/Criteria/CountAnomaly.test.ts +221 -0
- package/Tests/Server/Utils/Monitor/Criteria/EvaluateOverTime.test.ts +987 -0
- package/Tests/Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria.test.ts +916 -0
- package/Tests/Server/Utils/Monitor/Criteria/LogMonitorCriteria.test.ts +236 -0
- package/Tests/Server/Utils/Monitor/Criteria/ProfileMonitorCriteria.test.ts +382 -0
- package/Tests/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.test.ts +147 -0
- package/Tests/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.test.ts +1219 -0
- package/Tests/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.test.ts +274 -0
- package/Tests/Server/Utils/Monitor/MonitorResourceIngestedStepSelection.test.ts +86 -0
- package/Tests/Server/Utils/Monitor/SecurityEventsMonitorDataExtractor.test.ts +93 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +660 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsClient.test.ts +308 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +271 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventRow.test.ts +272 -0
- package/Tests/Server/Utils/SecurityEvent/SigmaClickhouseCompiler.test.ts +511 -0
- package/Tests/Server/Utils/StatusPageContentSecurityPolicy.test.ts +136 -0
- package/Tests/Server/Utils/StatusPageCustomizationAccess.test.ts +223 -0
- package/Tests/Server/Utils/Telemetry/LlmCostBudgetEvaluator.test.ts +497 -0
- package/Tests/Server/Utils/Telemetry/LlmSpan.test.ts +380 -0
- package/Tests/Server/Utils/Telemetry/LogErrorPatternSql.test.ts +207 -0
- package/Tests/Server/Utils/UserPermission/ProjectUserGrant.test.ts +293 -0
- package/Tests/Types/Monitor/MonitorStepConfigHelpers.test.ts +165 -0
- package/Tests/Types/Monitor/MonitorStepInfraMonitorUtils.test.ts +194 -0
- package/Tests/Types/Monitor/MonitorStepSecurityEventsMonitor.test.ts +201 -0
- package/Tests/Types/NetworkDevice/NetworkDeviceLinkRuleScope.test.ts +215 -0
- package/Tests/Types/SecurityEvent/OcsfEventClass.test.ts +105 -0
- package/Tests/Types/SecurityEvent/OcsfSeverity.test.ts +111 -0
- package/Tests/Types/Telemetry/LlmCostCatalog.test.ts +516 -0
- package/Tests/UI/Components/ActiveFilterChipsOperatorValues.test.tsx +222 -0
- package/Tests/UI/Components/BulkActionPermissionGating.test.tsx +296 -0
- package/Tests/UI/Components/CardModelDetailPermissionGating.test.tsx +305 -0
- package/Tests/UI/Components/CustomFields/CustomFieldsDetail.test.tsx +23 -0
- package/Tests/UI/Components/DictionaryFilterOperatorDisplay.test.ts +239 -0
- package/Tests/UI/Components/DisabledButtonTooltip.test.tsx +267 -0
- package/Tests/UI/Components/DuplicateModel.test.tsx +37 -0
- package/Tests/UI/Components/Forms/FormSubmitAnalytics.test.tsx +206 -0
- package/Tests/UI/Components/ModelCardPermissionGating.test.tsx +348 -0
- package/Tests/UI/Components/ModelDelete.test.tsx +25 -1
- package/Tests/UI/Components/ModelFormCreatePermission.test.tsx +342 -0
- package/Tests/UI/Components/ModelTable/BaseModelTablePermissionGating.test.tsx +680 -0
- package/Tests/UI/Components/OrderedStatesListCreateGate.test.tsx +174 -0
- package/Tests/UI/Components/SavedViewsDropdownSearch.test.tsx +1127 -0
- package/Tests/UI/Components/SavedViewsFacetSection.test.tsx +958 -0
- package/Tests/UI/Components/SavedViewsList.test.ts +699 -0
- package/Tests/UI/Components/SavedViewsSidebarIntegration.test.tsx +640 -0
- package/Tests/UI/Components/SavedViewsSurfaceParity.test.tsx +679 -0
- package/Tests/UI/Components/TableViewLoadFailure.test.tsx +248 -0
- package/Tests/UI/Types/UseComponentOutsideClick.test.tsx +226 -0
- package/Tests/UI/Utils/AIChatExport/ConversationMarkdown.test.ts +774 -0
- package/Tests/UI/Utils/AIChatExport/MarkdownBlocks.test.ts +791 -0
- package/Tests/UI/Utils/AIChatExport/MarkdownSafety.test.ts +544 -0
- package/Tests/UI/Utils/PermissionGate.test.ts +467 -0
- package/Tests/Utils/Analytics.test.ts +187 -0
- package/Tests/Utils/Measurement/MeasurementEvaluator.test.ts +639 -0
- package/Tests/Utils/Monitor/MonitorMetricType.test.ts +80 -0
- package/Tests/Utils/Monitor/MonitorSummarySnapshotUtil.test.ts +1 -0
- package/Tests/Utils/Monitor/NetworkDeviceLinkRuleUtil.test.ts +1576 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +433 -0
- package/Tests/Utils/NetworkDiscovery/UnclaimedScanDiagnosis.test.ts +214 -0
- package/Tests/Utils/SecurityEvent/GenericNormalizer.test.ts +204 -0
- package/Tests/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.test.ts +252 -0
- package/Tests/Utils/SecurityEvent/NormalizerHelpers.test.ts +274 -0
- package/Tests/Utils/SecurityEvent/OcsfNormalizer.test.ts +208 -0
- package/Tests/Utils/SecurityEvent/SecurityEventNormalizer.test.ts +172 -0
- package/Tests/Utils/SecurityEvent/SigmaRuleParser.test.ts +471 -0
- package/Tests/Utils/SecurityEvent/UdmNormalizer.test.ts +361 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +82 -0
- package/Tests/Utils/Telemetry/LogErrorPattern.test.ts +463 -0
- package/Types/AI/AIChatTypes.ts +1 -0
- package/Types/Alerts/AlertMeasurementAnchorType.ts +14 -0
- package/Types/Alerts/AlertStateRole.ts +11 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +16 -0
- package/Types/Dashboard/Chart/ChartType.ts +1 -0
- package/Types/Dashboard/DashboardComponentType.ts +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.ts +18 -0
- package/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.ts +16 -0
- package/Types/Incident/IncidentMeasurementAnchorType.ts +34 -0
- package/Types/Incident/IncidentStateRole.ts +14 -0
- package/Types/Marketing/Attribution.ts +75 -0
- package/Types/Marketing/MarketingConversion.ts +43 -1
- package/Types/Measurement/MeasurementAggregationType.ts +43 -0
- package/Types/Measurement/MeasurementAnchorKind.ts +23 -0
- package/Types/Measurement/MeasurementOccurrence.ts +14 -0
- package/Types/Measurement/MeasurementStatus.ts +34 -0
- package/Types/MeteredPlan/ProductType.ts +1 -0
- package/Types/Monitor/CriteriaFilter.ts +12 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +64 -0
- package/Types/Monitor/MonitorStep.ts +28 -0
- package/Types/Monitor/MonitorStepSecurityEventsMonitor.ts +100 -0
- package/Types/Monitor/MonitorType.ts +20 -0
- package/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.ts +17 -0
- package/Types/NetworkDevice/NetworkDeviceLinkRuleScope.ts +51 -0
- package/Types/Permission.ts +399 -2
- package/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.ts +20 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.ts +16 -0
- package/Types/SecurityEvent/NormalizedSecurityEvent.ts +92 -0
- package/Types/SecurityEvent/OcsfEventClass.ts +205 -0
- package/Types/SecurityEvent/OcsfSeverity.ts +88 -0
- package/Types/SecurityEvent/SecurityEventFormat.ts +23 -0
- package/Types/SecurityEvent/SigmaRule.ts +70 -0
- package/Types/Telemetry/LlmConventions.ts +20 -1
- package/Types/Telemetry/LlmCostCatalog.ts +557 -0
- package/Types/Telemetry/ServiceType.ts +1 -0
- package/Types/Telemetry/TelemetryRetentionConfig.ts +5 -1
- package/Types/Telemetry/TelemetryType.ts +1 -0
- package/Types/TwoFactorAuthStatus.ts +42 -0
- package/Types/UserAuthenticationStatus.ts +18 -0
- package/UI/Components/ActionButton/ActionButtonSchema.ts +7 -0
- package/UI/Components/BulkUpdate/BulkArchiveActions.tsx +35 -2
- package/UI/Components/BulkUpdate/BulkLabelActions.tsx +34 -1
- package/UI/Components/BulkUpdate/BulkOwnerActions.tsx +45 -1
- package/UI/Components/BulkUpdate/BulkUpdateForm.tsx +3 -0
- package/UI/Components/Button/Button.tsx +37 -2
- package/UI/Components/Card/Card.tsx +6 -0
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +24 -1
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +57 -0
- package/UI/Components/DuplicateModel/DuplicateModel.tsx +16 -0
- package/UI/Components/FormModal/BasicFormModal.tsx +12 -0
- package/UI/Components/Forms/BasicForm.tsx +13 -1
- package/UI/Components/Forms/BasicModelForm.tsx +2 -1
- package/UI/Components/Forms/ModelForm.tsx +64 -3
- package/UI/Components/Forms/Utils/FormAnalyticsName.ts +39 -0
- package/UI/Components/List/ListRow.tsx +6 -0
- package/UI/Components/LogsViewer/components/ActiveFilterChips.tsx +34 -7
- package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +7 -40
- package/UI/Components/LogsViewer/components/SavedViewsDropdown.tsx +155 -3
- package/UI/Components/ModelDelete/ModelDelete.tsx +20 -0
- package/UI/Components/ModelDetail/CardModelDetail.tsx +36 -23
- package/UI/Components/ModelFormModal/ModelFormModal.tsx +6 -1
- package/UI/Components/ModelList/ModelList.tsx +21 -2
- package/UI/Components/ModelList/StaticModelList.tsx +11 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +168 -62
- package/UI/Components/ModelTable/ModelTable.tsx +16 -10
- package/UI/Components/ModelTable/TableView.tsx +36 -4
- package/UI/Components/MoreMenu/MoreMenuItem.tsx +36 -4
- package/UI/Components/OrderedStatesList/Item.tsx +6 -0
- package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +81 -47
- package/UI/Components/ResetObjectID/ResetObjectID.tsx +16 -0
- package/UI/Components/SavedViews/SavedViewsFacetSection.tsx +242 -0
- package/UI/Components/SavedViews/SavedViewsList.ts +168 -0
- package/UI/Components/SavedViews/SavedViewsSearchInput.tsx +46 -0
- package/UI/Components/SavedViews/SavedViewsShowMoreButton.tsx +44 -0
- package/UI/Components/Table/TableRow.tsx +12 -0
- package/UI/Components/TelemetryViewer/components/SavedViewsDropdown.tsx +152 -2
- package/UI/Types/UseComponentOutsideClick.ts +47 -0
- package/UI/Utils/PermissionGate.ts +277 -0
- package/Utils/Analytics.ts +55 -2
- package/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.ts +84 -0
- package/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.ts +110 -0
- package/Utils/Dashboard/Components/Index.ts +14 -0
- package/Utils/Measurement/MeasurementEvaluator.ts +359 -0
- package/Utils/Monitor/MonitorMetricType.ts +40 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.ts +1 -0
- package/Utils/Monitor/NetworkDeviceLinkRuleUtil.ts +669 -37
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +231 -0
- package/Utils/NetworkDiscovery/UnclaimedScanDiagnosis.ts +115 -0
- package/Utils/SecurityEvent/GenericNormalizer.ts +208 -0
- package/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.ts +206 -0
- package/Utils/SecurityEvent/NormalizerHelpers.ts +263 -0
- package/Utils/SecurityEvent/OcsfNormalizer.ts +194 -0
- package/Utils/SecurityEvent/SecurityEventNormalizer.ts +82 -0
- package/Utils/SecurityEvent/Sigma/SigmaRuleParser.ts +579 -0
- package/Utils/SecurityEvent/UdmNormalizer.ts +442 -0
- package/Utils/Telemetry/CrossSignalScope.ts +46 -9
- package/Utils/Telemetry/LogErrorPattern.ts +350 -0
- package/build/dist/Models/AnalyticsModels/Index.js +10 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/LogCountBaseline.js +159 -0
- package/build/dist/Models/AnalyticsModels/LogCountBaseline.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js +596 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/Span.js +24 -1
- package/build/dist/Models/AnalyticsModels/Span.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/SpanCountBaseline.js +181 -0
- package/build/dist/Models/AnalyticsModels/SpanCountBaseline.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Alert.js +43 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertMeasurement.js +1143 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurementValue.js +523 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/BillingPaymentMethod.js +10 -11
- package/build/dist/Models/DatabaseModels/BillingPaymentMethod.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +517 -0
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GlobalOidc.js +21 -0
- package/build/dist/Models/DatabaseModels/GlobalOidc.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalSso.js +21 -0
- package/build/dist/Models/DatabaseModels/GlobalSso.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +410 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Incident.js +43 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentMeasurement.js +1143 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurementValue.js +523 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +20 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Label.js +11 -0
- package/build/dist/Models/DatabaseModels/Label.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LlmCostBudget.js +681 -0
- package/build/dist/Models/DatabaseModels/LlmCostBudget.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LlmModelPrice.js +503 -0
- package/build/dist/Models/DatabaseModels/LlmModelPrice.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LogSavedView.js +87 -0
- package/build/dist/Models/DatabaseModels/LogSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MarketingConversion.js +237 -11
- package/build/dist/Models/DatabaseModels/MarketingConversion.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MetricSavedView.js +59 -0
- package/build/dist/Models/DatabaseModels/MetricSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceLinkRule.js +47 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLinkRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Probe.js +21 -0
- package/build/dist/Models/DatabaseModels/Probe.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RunbookLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/RunbookLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +1133 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +515 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +4 -4
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TableView.js +15 -0
- package/build/dist/Models/DatabaseModels/TableView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Team.js +13 -0
- package/build/dist/Models/DatabaseModels/Team.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamMember.js +8 -0
- package/build/dist/Models/DatabaseModels/TeamMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TraceSavedView.js +52 -0
- package/build/dist/Models/DatabaseModels/TraceSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +25 -4
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +136 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserAPI.js +75 -2
- package/build/dist/Server/API/UserAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +35 -1
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787800000000-AddScopeToNetworkDeviceLinkRule.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787800000000-AddScopeToNetworkDeviceLinkRule.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787900000000-AddRestrictToAttachedProjectsToGlobalSso.js +29 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787900000000-AddRestrictToAttachedProjectsToGlobalSso.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.js +36 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.js +162 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.js +52 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.js +38 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +491 -0
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -0
- package/build/dist/Server/Middleware/SlackAuthorization.js +28 -4
- package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/UserAuthorization.js +197 -22
- package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
- package/build/dist/Server/Middleware/WhatsAppAuthorization.js +32 -2
- package/build/dist/Server/Middleware/WhatsAppAuthorization.js.map +1 -1
- package/build/dist/Server/Services/AccessTokenService.js +13 -2
- package/build/dist/Server/Services/AccessTokenService.js.map +1 -1
- package/build/dist/Server/Services/AlertMeasurementService.js +250 -0
- package/build/dist/Server/Services/AlertMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/AlertMeasurementValueService.js +400 -0
- package/build/dist/Server/Services/AlertMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/AlertService.js +37 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +48 -0
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/DetectionRuleService.js +50 -0
- package/build/dist/Server/Services/DetectionRuleService.js.map +1 -0
- package/build/dist/Server/Services/GlobalOidcProjectService.js +105 -0
- package/build/dist/Server/Services/GlobalOidcProjectService.js.map +1 -1
- package/build/dist/Server/Services/GlobalOidcService.js +127 -0
- package/build/dist/Server/Services/GlobalOidcService.js.map +1 -1
- package/build/dist/Server/Services/GlobalSsoProjectService.js +105 -0
- package/build/dist/Server/Services/GlobalSsoProjectService.js.map +1 -1
- package/build/dist/Server/Services/GlobalSsoService.js +127 -0
- package/build/dist/Server/Services/GlobalSsoService.js.map +1 -1
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js +55 -0
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js.map +1 -0
- package/build/dist/Server/Services/IncidentMeasurementService.js +252 -0
- package/build/dist/Server/Services/IncidentMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/IncidentMeasurementValueService.js +413 -0
- package/build/dist/Server/Services/IncidentMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/IncidentService.js +41 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +50 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +30 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LlmCostBudgetService.js +89 -0
- package/build/dist/Server/Services/LlmCostBudgetService.js.map +1 -0
- package/build/dist/Server/Services/LlmModelPriceService.js +163 -0
- package/build/dist/Server/Services/LlmModelPriceService.js.map +1 -0
- package/build/dist/Server/Services/LogAggregationService.js +709 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/LogCountBaselineService.js +112 -0
- package/build/dist/Server/Services/LogCountBaselineService.js.map +1 -0
- package/build/dist/Server/Services/MutableMetricService.js +28 -9
- package/build/dist/Server/Services/MutableMetricService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementService.js +254 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementValueService.js +434 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +37 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +134 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/SecurityEventService.js +64 -0
- package/build/dist/Server/Services/SecurityEventService.js.map +1 -0
- package/build/dist/Server/Services/SpanCountBaselineService.js +122 -0
- package/build/dist/Server/Services/SpanCountBaselineService.js.map +1 -0
- package/build/dist/Server/Services/StatusPageService.js +4 -3
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +15 -3
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/UserEmailService.js +4 -4
- package/build/dist/Server/Services/UserService.js +262 -42
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTotpAuthService.js +0 -73
- package/build/dist/Server/Services/UserTotpAuthService.js.map +1 -1
- package/build/dist/Server/Services/UserWebAuthnService.js +1 -73
- package/build/dist/Server/Services/UserWebAuthnService.js.map +1 -1
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js +13 -0
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +10 -0
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +3 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/SecurityEventTools.js +257 -0
- package/build/dist/Server/Utils/AI/Toolbox/SecurityEventTools.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +13 -4
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/Attribution.js +77 -33
- package/build/dist/Server/Utils/Attribution.js.map +1 -1
- package/build/dist/Server/Utils/CronTab.js +66 -0
- package/build/dist/Server/Utils/CronTab.js.map +1 -1
- package/build/dist/Server/Utils/GlobalSsoAuthorization.js +112 -0
- package/build/dist/Server/Utils/GlobalSsoAuthorization.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js +57 -4
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js +53 -9
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js +42 -18
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js +43 -19
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js +25 -12
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js +35 -16
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js.map +1 -1
- package/build/dist/Server/Utils/Measurement/MeasurementDefinitionValidator.js +109 -0
- package/build/dist/Server/Utils/Measurement/MeasurementDefinitionValidator.js.map +1 -0
- package/build/dist/Server/Utils/Measurement/MeasurementMetricWriter.js +131 -0
- package/build/dist/Server/Utils/Measurement/MeasurementMetricWriter.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js +37 -35
- package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/CountAnomaly.js +111 -0
- package/build/dist/Server/Utils/Monitor/Criteria/CountAnomaly.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/DnsMonitorCriteria.js +21 -25
- package/build/dist/Server/Utils/Monitor/Criteria/DnsMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/DomainMonitorCriteria.js +20 -22
- package/build/dist/Server/Utils/Monitor/Criteria/DomainMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js +370 -42
- package/build/dist/Server/Utils/Monitor/Criteria/EvaluateOverTime.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria.js +21 -25
- package/build/dist/Server/Utils/Monitor/Criteria/ExternalStatusPageMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.js +21 -25
- package/build/dist/Server/Utils/Monitor/Criteria/IncomingRequestCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js +84 -1
- package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.js +21 -25
- package/build/dist/Server/Utils/Monitor/Criteria/SSLMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.js +35 -0
- package/build/dist/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +64 -52
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +25 -29
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js +84 -1
- package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js +7 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +20 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js +9 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +133 -23
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js +6 -5
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +404 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js +145 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +176 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventRow.js +69 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventRow.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js +493 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js.map +1 -0
- package/build/dist/Server/Utils/StatusPageContentSecurityPolicy.js +39 -0
- package/build/dist/Server/Utils/StatusPageContentSecurityPolicy.js.map +1 -0
- package/build/dist/Server/Utils/StatusPageCustomizationAccess.js +85 -0
- package/build/dist/Server/Utils/StatusPageCustomizationAccess.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js +317 -0
- package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js +56 -4
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LogErrorPatternSql.js +112 -0
- package/build/dist/Server/Utils/Telemetry/LogErrorPatternSql.js.map +1 -0
- package/build/dist/Server/Utils/UserPermission/UserPermission.js +46 -1
- package/build/dist/Server/Utils/UserPermission/UserPermission.js.map +1 -1
- package/build/dist/Types/AI/AIChatTypes.js +1 -0
- package/build/dist/Types/AI/AIChatTypes.js.map +1 -1
- package/build/dist/Types/Alerts/AlertMeasurementAnchorType.js +15 -0
- package/build/dist/Types/Alerts/AlertMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/Alerts/AlertStateRole.js +12 -0
- package/build/dist/Types/Alerts/AlertStateRole.js.map +1 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +16 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/Dashboard/Chart/ChartType.js +1 -0
- package/build/dist/Types/Dashboard/Chart/ChartType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.js.map +1 -0
- package/build/dist/Types/Incident/IncidentMeasurementAnchorType.js +29 -0
- package/build/dist/Types/Incident/IncidentMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/Incident/IncidentStateRole.js +15 -0
- package/build/dist/Types/Incident/IncidentStateRole.js.map +1 -0
- package/build/dist/Types/Marketing/Attribution.js +68 -0
- package/build/dist/Types/Marketing/Attribution.js.map +1 -0
- package/build/dist/Types/Marketing/MarketingConversion.js +40 -1
- package/build/dist/Types/Marketing/MarketingConversion.js.map +1 -1
- package/build/dist/Types/Measurement/MeasurementAggregationType.js +40 -0
- package/build/dist/Types/Measurement/MeasurementAggregationType.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementAnchorKind.js +22 -0
- package/build/dist/Types/Measurement/MeasurementAnchorKind.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementOccurrence.js +15 -0
- package/build/dist/Types/Measurement/MeasurementOccurrence.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementStatus.js +32 -0
- package/build/dist/Types/Measurement/MeasurementStatus.js.map +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +3 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +59 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +17 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepSecurityEventsMonitor.js +64 -0
- package/build/dist/Types/Monitor/MonitorStepSecurityEventsMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +19 -0
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.js.map +1 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceLinkRuleScope.js +46 -0
- package/build/dist/Types/NetworkDevice/NetworkDeviceLinkRuleScope.js.map +1 -0
- package/build/dist/Types/Permission.js +347 -2
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.js +19 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.js +17 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.js.map +1 -0
- package/build/dist/Types/SecurityEvent/NormalizedSecurityEvent.js +2 -0
- package/build/dist/Types/SecurityEvent/NormalizedSecurityEvent.js.map +1 -0
- package/build/dist/Types/SecurityEvent/OcsfEventClass.js +181 -0
- package/build/dist/Types/SecurityEvent/OcsfEventClass.js.map +1 -0
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js +81 -0
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js.map +1 -0
- package/build/dist/Types/SecurityEvent/SecurityEventFormat.js +21 -0
- package/build/dist/Types/SecurityEvent/SecurityEventFormat.js.map +1 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js +16 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js.map +1 -0
- package/build/dist/Types/Telemetry/LlmConventions.js +19 -1
- package/build/dist/Types/Telemetry/LlmConventions.js.map +1 -1
- package/build/dist/Types/Telemetry/LlmCostCatalog.js +484 -0
- package/build/dist/Types/Telemetry/LlmCostCatalog.js.map +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryRetentionConfig.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryType.js +1 -0
- package/build/dist/Types/Telemetry/TelemetryType.js.map +1 -1
- package/build/dist/Types/TwoFactorAuthStatus.js +41 -0
- package/build/dist/Types/TwoFactorAuthStatus.js.map +1 -0
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js +16 -2
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +15 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkOwnerActions.js +20 -1
- package/build/dist/UI/Components/BulkUpdate/BulkOwnerActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js.map +1 -1
- package/build/dist/UI/Components/Button/Button.js +22 -1
- package/build/dist/UI/Components/Button/Button.js.map +1 -1
- package/build/dist/UI/Components/Card/Card.js +1 -1
- package/build/dist/UI/Components/Card/Card.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +14 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +47 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js +8 -0
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js.map +1 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js +2 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +10 -1
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicModelForm.js +2 -1
- package/build/dist/UI/Components/Forms/BasicModelForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/ModelForm.js +44 -2
- package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/Utils/FormAnalyticsName.js +33 -0
- package/build/dist/UI/Components/Forms/Utils/FormAnalyticsName.js.map +1 -0
- package/build/dist/UI/Components/List/ListRow.js +4 -1
- package/build/dist/UI/Components/List/ListRow.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js +32 -7
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +2 -17
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/SavedViewsDropdown.js +93 -4
- package/build/dist/UI/Components/LogsViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js +13 -0
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js +27 -11
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js +2 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js.map +1 -1
- package/build/dist/UI/Components/ModelList/ModelList.js +13 -2
- package/build/dist/UI/Components/ModelList/ModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js +4 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +101 -40
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/ModelTable.js +9 -7
- package/build/dist/UI/Components/ModelTable/ModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js +32 -4
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js +19 -2
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js +4 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +33 -32
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
- package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js +8 -0
- package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js.map +1 -1
- package/build/dist/UI/Components/SavedViews/SavedViewsFacetSection.js +98 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsFacetSection.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsList.js +99 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsList.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsSearchInput.js +17 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsSearchInput.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsShowMoreButton.js +15 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsShowMoreButton.js.map +1 -0
- package/build/dist/UI/Components/Table/TableRow.js +8 -2
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js +93 -4
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Types/UseComponentOutsideClick.js +39 -0
- package/build/dist/UI/Types/UseComponentOutsideClick.js.map +1 -1
- package/build/dist/UI/Utils/PermissionGate.js +164 -0
- package/build/dist/UI/Utils/PermissionGate.js.map +1 -0
- package/build/dist/Utils/Analytics.js +50 -2
- package/build/dist/Utils/Analytics.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.js +92 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +8 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Measurement/MeasurementEvaluator.js +210 -0
- package/build/dist/Utils/Measurement/MeasurementEvaluator.js.map +1 -0
- package/build/dist/Utils/Monitor/MonitorMetricType.js +37 -0
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Utils/Monitor/MonitorSummarySnapshotUtil.js +1 -0
- package/build/dist/Utils/Monitor/MonitorSummarySnapshotUtil.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js +359 -37
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +108 -0
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/UnclaimedScanDiagnosis.js +87 -0
- package/build/dist/Utils/NetworkDiscovery/UnclaimedScanDiagnosis.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GenericNormalizer.js +176 -0
- package/build/dist/Utils/SecurityEvent/GenericNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js +146 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/NormalizerHelpers.js +196 -0
- package/build/dist/Utils/SecurityEvent/NormalizerHelpers.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/OcsfNormalizer.js +136 -0
- package/build/dist/Utils/SecurityEvent/OcsfNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/SecurityEventNormalizer.js +64 -0
- package/build/dist/Utils/SecurityEvent/SecurityEventNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js +388 -0
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/UdmNormalizer.js +328 -0
- package/build/dist/Utils/SecurityEvent/UdmNormalizer.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +29 -7
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/build/dist/Utils/Telemetry/LogErrorPattern.js +284 -0
- package/build/dist/Utils/Telemetry/LogErrorPattern.js.map +1 -0
- package/package.json +3 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NetworkDeviceLinkRuleScopeUtil } from "../../Types/NetworkDevice/NetworkDeviceLinkRuleScope";
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* Turning label rules into uplinks.
|
|
3
5
|
*
|
|
@@ -9,12 +11,35 @@
|
|
|
9
11
|
* edge to the single device carrying all the parent labels. Matching "devices
|
|
10
12
|
* that share a label" symmetrically, which is what was originally asked for,
|
|
11
13
|
* would turn one forty-device site label into 780 edges.
|
|
14
|
+
*
|
|
15
|
+
* "The single device" needs a universe to be single IN, and the rule's scope
|
|
16
|
+
* is what names it. Project scope asks across everything the caller passed;
|
|
17
|
+
* Site scope asks once per site, which is what lets one rule draw the same
|
|
18
|
+
* router-to-switch star in fourteen buildings instead of reporting fourteen
|
|
19
|
+
* candidate routers and drawing nothing anywhere.
|
|
12
20
|
*/
|
|
13
21
|
|
|
14
22
|
export interface LinkRuleDeviceInput {
|
|
15
23
|
id: string;
|
|
16
24
|
// Normalised label ids the device carries.
|
|
17
25
|
labelIds: Array<string>;
|
|
26
|
+
/*
|
|
27
|
+
* Which site the device belongs to. ALWAYS a string, never an ObjectID —
|
|
28
|
+
* grouping keys a Map on it, and an ObjectID instance would compare by
|
|
29
|
+
* identity and put every device in a group of its own. null, undefined, ""
|
|
30
|
+
* and whitespace all normalise to the same "no site" key.
|
|
31
|
+
*
|
|
32
|
+
* Read only when the rule is site-scoped, so a caller that never populates
|
|
33
|
+
* it leaves project-scoped rules resolving exactly as before.
|
|
34
|
+
*/
|
|
35
|
+
siteId?: string | null | undefined;
|
|
36
|
+
/*
|
|
37
|
+
* Display name of that site, for the warning text. Carried on the device
|
|
38
|
+
* rather than looked up by the caller so the name comes from the same
|
|
39
|
+
* permission-filtered rows the map itself is drawn from — a viewer can
|
|
40
|
+
* never be told the name of a site none of whose devices they can read.
|
|
41
|
+
*/
|
|
42
|
+
siteName?: string | undefined;
|
|
18
43
|
}
|
|
19
44
|
|
|
20
45
|
export interface LinkRuleInput {
|
|
@@ -23,6 +48,19 @@ export interface LinkRuleInput {
|
|
|
23
48
|
isEnabled?: boolean | undefined;
|
|
24
49
|
childLabelIds: Array<string>;
|
|
25
50
|
parentLabelIds: Array<string>;
|
|
51
|
+
/*
|
|
52
|
+
* Raw column value. Always read through NetworkDeviceLinkRuleScopeUtil.parse
|
|
53
|
+
* so undefined and NULL read as Project — every rule written before the
|
|
54
|
+
* column existed means "one parent for the whole project", and defaulting
|
|
55
|
+
* the other way would silently redraw somebody's map.
|
|
56
|
+
*/
|
|
57
|
+
scope?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Structurally identical to the inline type it replaces.
|
|
61
|
+
export interface LinkRuleLink {
|
|
62
|
+
fromDeviceId: string;
|
|
63
|
+
toDeviceId: string;
|
|
26
64
|
}
|
|
27
65
|
|
|
28
66
|
/*
|
|
@@ -36,36 +74,275 @@ export type LinkRuleSkipReason =
|
|
|
36
74
|
| "noParentLabels"
|
|
37
75
|
| "noParentMatched"
|
|
38
76
|
| "ambiguousParent"
|
|
39
|
-
| "noChildrenMatched"
|
|
77
|
+
| "noChildrenMatched"
|
|
78
|
+
/*
|
|
79
|
+
* Site scope only: sites were in play and not one of them resolved. Its own
|
|
80
|
+
* reason because the per-site failures can be MIXED — one site with no
|
|
81
|
+
* parent, another with two — which none of the reasons above states.
|
|
82
|
+
*/
|
|
83
|
+
| "noSiteResolved";
|
|
84
|
+
|
|
85
|
+
/*
|
|
86
|
+
* The only two ways ONE site can fail in a way worth reporting. Deliberately
|
|
87
|
+
* narrower than LinkRuleSkipReason: `noChildrenMatched` is unreachable here
|
|
88
|
+
* (a site with nothing to place is never considered at all), and the three
|
|
89
|
+
* rule-level reasons are settled before any device is looked at.
|
|
90
|
+
*/
|
|
91
|
+
export type LinkRuleGroupSkipReason = "noParentMatched" | "ambiguousParent";
|
|
92
|
+
|
|
93
|
+
/*
|
|
94
|
+
* Warnings have a slightly wider vocabulary than skips: "some matching devices
|
|
95
|
+
* have no site" is not a reason the RULE drew nothing, so it has no business
|
|
96
|
+
* in LinkRuleSkipReason, which describeOutcome switches over.
|
|
97
|
+
*/
|
|
98
|
+
export type LinkRuleWarningReason = LinkRuleSkipReason | "devicesWithoutSite";
|
|
99
|
+
|
|
100
|
+
/*
|
|
101
|
+
* One site this rule was clearly meant to cover and could not. Independent of
|
|
102
|
+
* outcome.links.length — thirteen sites can draw while the fourteenth is
|
|
103
|
+
* listed here.
|
|
104
|
+
*/
|
|
105
|
+
export interface LinkRuleGroupFailure {
|
|
106
|
+
siteId: string;
|
|
107
|
+
siteName?: string | undefined;
|
|
108
|
+
reason: LinkRuleGroupSkipReason;
|
|
109
|
+
// Devices in THIS site carrying all the parent labels. 0 or >= 2.
|
|
110
|
+
matchedParentCount: number;
|
|
111
|
+
/*
|
|
112
|
+
* Devices in THIS site carrying all the child labels — the damage count,
|
|
113
|
+
* "how many nodes are floating on the map right now". No parent exclusion
|
|
114
|
+
* is applied because there is no resolved parent to exclude.
|
|
115
|
+
*/
|
|
116
|
+
matchedChildCount: number;
|
|
117
|
+
}
|
|
40
118
|
|
|
41
119
|
export interface LinkRuleOutcome {
|
|
42
120
|
ruleId: string;
|
|
43
121
|
ruleName?: string | undefined;
|
|
44
122
|
// Device pairs this rule contributes, parent second.
|
|
45
|
-
links: Array<
|
|
46
|
-
|
|
123
|
+
links: Array<LinkRuleLink>;
|
|
124
|
+
/*
|
|
125
|
+
* Set when links is empty and the rule had something to say about why.
|
|
126
|
+
* INVARIANT, both scopes: links.length === 0 <=> skipReason !== undefined.
|
|
127
|
+
* A site-scoped rule that drew in thirteen of fourteen sites has NOT been
|
|
128
|
+
* skipped; the fourteenth lives in groupFailures.
|
|
129
|
+
*/
|
|
47
130
|
skipReason?: LinkRuleSkipReason | undefined;
|
|
48
|
-
|
|
131
|
+
/*
|
|
132
|
+
* How many devices the parent labels matched — the ambiguity evidence.
|
|
133
|
+
* Project scope: unchanged. Site scope: summed over the sites the rule
|
|
134
|
+
* actually applies to.
|
|
135
|
+
*/
|
|
49
136
|
matchedParentCount: number;
|
|
137
|
+
// INVARIANT, both scopes: matchedChildCount === links.length.
|
|
50
138
|
matchedChildCount: number;
|
|
139
|
+
|
|
140
|
+
/*
|
|
141
|
+
* The three fields below are SITE SCOPE ONLY. On the project path the keys
|
|
142
|
+
* are not written at all, so a project-scoped outcome is the exact object
|
|
143
|
+
* it has always been, key for key.
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
// Sites the rule was meant to cover and could not. Omitted when empty.
|
|
147
|
+
groupFailures?: Array<LinkRuleGroupFailure> | undefined;
|
|
148
|
+
/*
|
|
149
|
+
* Sites this rule applies to: the ones holding at least one device it wanted
|
|
150
|
+
* to place. The coverage denominator, and deliberately not "every site in
|
|
151
|
+
* the project" — a healthy rule reading "drawing in 12 of 74 sites" would
|
|
152
|
+
* make the coverage sentence itself the noise.
|
|
153
|
+
*/
|
|
154
|
+
applicableSiteCount?: number | undefined;
|
|
155
|
+
// Devices carrying ALL the child labels that have no site. Omitted when 0.
|
|
156
|
+
unsitedChildDeviceCount?: number | undefined;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/*
|
|
160
|
+
* One failing site, as the banner lists it rather than as the resolver
|
|
161
|
+
* computed it. Deliberately not LinkRuleGroupFailure itself: this crosses the
|
|
162
|
+
* wire to the browser, so it carries the two numbers an operator acts on and
|
|
163
|
+
* nothing else.
|
|
164
|
+
*/
|
|
165
|
+
export interface LinkRuleWarningSite {
|
|
166
|
+
siteId: string;
|
|
167
|
+
siteName?: string | undefined;
|
|
168
|
+
reason: LinkRuleGroupSkipReason;
|
|
169
|
+
/*
|
|
170
|
+
* Devices in THIS site the rule wanted to place and could not — the damage
|
|
171
|
+
* count for one line of the list, which sums to the sentence's total.
|
|
172
|
+
*/
|
|
173
|
+
strandedDeviceCount: number;
|
|
174
|
+
// Devices in this site carrying the parent labels: 0, or >= 2 when ambiguous.
|
|
175
|
+
matchedParentCount: number;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** One bullet in the topology map's warning banner. At most one per rule. */
|
|
179
|
+
export interface LinkRuleWarning {
|
|
180
|
+
ruleId: string;
|
|
181
|
+
ruleName?: string | undefined;
|
|
182
|
+
reason: LinkRuleWarningReason;
|
|
183
|
+
message: string;
|
|
184
|
+
/*
|
|
185
|
+
* The failing sites themselves, in the same order the sentence names them,
|
|
186
|
+
* capped at MAX_LISTED_SITES. Present only for a site-scoped rule that
|
|
187
|
+
* failed somewhere.
|
|
188
|
+
*
|
|
189
|
+
* The sentence names three sites and then says "and 694 more", which is a
|
|
190
|
+
* blast radius and not something anybody can act on — issue #3321, where an
|
|
191
|
+
* operator with 949 sites had no way to find out WHICH of them were broken.
|
|
192
|
+
* The list is what turns that number back into work.
|
|
193
|
+
*/
|
|
194
|
+
sites?: Array<LinkRuleWarningSite> | undefined;
|
|
195
|
+
/*
|
|
196
|
+
* Exact number of failing sites, still exact when `sites` was capped. Always
|
|
197
|
+
* >= sites.length, so the UI can say how many it is not showing.
|
|
198
|
+
*/
|
|
199
|
+
siteCount?: number | undefined;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/*
|
|
203
|
+
* Devices are normalised once per resolveRule call: the label Set is built
|
|
204
|
+
* here rather than allocated afresh inside every match, and the group key is
|
|
205
|
+
* stringified and trimmed here so null, undefined, "" and " " cannot become
|
|
206
|
+
* four different sites. Nothing here mutates the caller's array, which matters
|
|
207
|
+
* because resolveRules hands the same array to every rule in turn.
|
|
208
|
+
*/
|
|
209
|
+
interface NormalizedDevice {
|
|
210
|
+
device: LinkRuleDeviceInput;
|
|
211
|
+
labelSet: Set<string>;
|
|
212
|
+
// "" means the device has no site.
|
|
213
|
+
siteKey: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/*
|
|
217
|
+
* One site's verdict — the same decision matrix as always, asked inside a
|
|
218
|
+
* narrower device set. Used by both scopes, so the parent/child matching
|
|
219
|
+
* exists exactly once.
|
|
220
|
+
*/
|
|
221
|
+
interface LinkRuleGroupResult {
|
|
222
|
+
// Empty on every failure path.
|
|
223
|
+
links: Array<LinkRuleLink>;
|
|
224
|
+
// 0, 1, or >= 2.
|
|
225
|
+
parentMatchCount: number;
|
|
226
|
+
// Devices carrying all the child labels, BEFORE the unique-parent exclusion.
|
|
227
|
+
childMatchCount: number;
|
|
228
|
+
// null when links is non-empty.
|
|
229
|
+
failure: "noParentMatched" | "ambiguousParent" | "noChildrenMatched" | null;
|
|
51
230
|
}
|
|
52
231
|
|
|
53
232
|
export default class NetworkDeviceLinkRuleUtil {
|
|
233
|
+
/*
|
|
234
|
+
* Appended by the caller when the device list hit its row cap. Lives here so
|
|
235
|
+
* every operator-facing string this feature produces stays in one file.
|
|
236
|
+
*/
|
|
237
|
+
public static readonly TRUNCATED_DEVICE_LIST_NOTE: string =
|
|
238
|
+
"The device list was truncated, so some of these may be false alarms.";
|
|
239
|
+
|
|
240
|
+
// Three names is enough to recognise a pattern; fourteen is a wall of text.
|
|
241
|
+
private static readonly MAX_NAMED_SITES: number = 3;
|
|
242
|
+
/*
|
|
243
|
+
* How many failing sites ride back on the warning for the operator to work
|
|
244
|
+
* through. Far more than the sentence names, because this is a list nobody
|
|
245
|
+
* reads until they open it — but still capped: a project with 949 broken
|
|
246
|
+
* sites must not turn a 60-second map poll into a megabyte of site names.
|
|
247
|
+
*/
|
|
248
|
+
public static readonly MAX_LISTED_SITES: number = 100;
|
|
249
|
+
// Site names are ShortText and can run to 100 characters.
|
|
250
|
+
private static readonly MAX_SITE_NAME_LENGTH: number = 40;
|
|
251
|
+
private static readonly UNNAMED_SITE: string = "an unnamed site";
|
|
252
|
+
|
|
54
253
|
/*
|
|
55
254
|
* ALL of the rule's labels must be present on the device, not any. "Devices
|
|
56
255
|
* that are both an access point AND on floor 1" is the question an operator
|
|
57
256
|
* is asking; any-of would sweep in every access point in the building.
|
|
58
257
|
*/
|
|
59
|
-
private static
|
|
60
|
-
|
|
258
|
+
private static matches(
|
|
259
|
+
labelSet: Set<string>,
|
|
61
260
|
requiredLabelIds: Array<string>,
|
|
62
261
|
): boolean {
|
|
63
|
-
const owned: Set<string> = new Set<string>(device.labelIds);
|
|
64
262
|
return requiredLabelIds.every((labelId: string) => {
|
|
65
|
-
return
|
|
263
|
+
return labelSet.has(labelId);
|
|
66
264
|
});
|
|
67
265
|
}
|
|
68
266
|
|
|
267
|
+
private static resolveGroup(
|
|
268
|
+
rule: LinkRuleInput,
|
|
269
|
+
group: Array<NormalizedDevice>,
|
|
270
|
+
): LinkRuleGroupResult {
|
|
271
|
+
const parents: Array<NormalizedDevice> = group.filter(
|
|
272
|
+
(entry: NormalizedDevice) => {
|
|
273
|
+
return NetworkDeviceLinkRuleUtil.matches(
|
|
274
|
+
entry.labelSet,
|
|
275
|
+
rule.parentLabelIds,
|
|
276
|
+
);
|
|
277
|
+
},
|
|
278
|
+
);
|
|
279
|
+
|
|
280
|
+
/*
|
|
281
|
+
* Counted before the parent branch, not after: a site that failed to
|
|
282
|
+
* resolve still has to report how many devices are floating there, and
|
|
283
|
+
* that number is the operator's damage assessment.
|
|
284
|
+
*/
|
|
285
|
+
const childCandidates: Array<NormalizedDevice> = group.filter(
|
|
286
|
+
(entry: NormalizedDevice) => {
|
|
287
|
+
return NetworkDeviceLinkRuleUtil.matches(
|
|
288
|
+
entry.labelSet,
|
|
289
|
+
rule.childLabelIds,
|
|
290
|
+
);
|
|
291
|
+
},
|
|
292
|
+
);
|
|
293
|
+
const childMatchCount: number = childCandidates.length;
|
|
294
|
+
|
|
295
|
+
if (parents.length === 0) {
|
|
296
|
+
return {
|
|
297
|
+
links: [],
|
|
298
|
+
parentMatchCount: 0,
|
|
299
|
+
childMatchCount: childMatchCount,
|
|
300
|
+
failure: "noParentMatched",
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/*
|
|
305
|
+
* Two candidate parents is not a tie to break — it is a question the
|
|
306
|
+
* labels do not answer. Drawing to either one would assert a cabling
|
|
307
|
+
* fact nobody stated.
|
|
308
|
+
*/
|
|
309
|
+
if (parents.length > 1) {
|
|
310
|
+
return {
|
|
311
|
+
links: [],
|
|
312
|
+
parentMatchCount: parents.length,
|
|
313
|
+
childMatchCount: childMatchCount,
|
|
314
|
+
failure: "ambiguousParent",
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const parent: NormalizedDevice = parents[0]!;
|
|
319
|
+
|
|
320
|
+
// The parent is excluded even when it matches both sets: no self-links.
|
|
321
|
+
const children: Array<NormalizedDevice> = childCandidates.filter(
|
|
322
|
+
(entry: NormalizedDevice) => {
|
|
323
|
+
return entry.device.id !== parent.device.id;
|
|
324
|
+
},
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
if (children.length === 0) {
|
|
328
|
+
return {
|
|
329
|
+
links: [],
|
|
330
|
+
parentMatchCount: 1,
|
|
331
|
+
childMatchCount: childMatchCount,
|
|
332
|
+
failure: "noChildrenMatched",
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
return {
|
|
337
|
+
links: children.map((child: NormalizedDevice) => {
|
|
338
|
+
return { fromDeviceId: child.device.id, toDeviceId: parent.device.id };
|
|
339
|
+
}),
|
|
340
|
+
parentMatchCount: 1,
|
|
341
|
+
childMatchCount: childMatchCount,
|
|
342
|
+
failure: null,
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
|
|
69
346
|
public static resolveRule(
|
|
70
347
|
rule: LinkRuleInput,
|
|
71
348
|
devices: Array<LinkRuleDeviceInput>,
|
|
@@ -89,6 +366,13 @@ export default class NetworkDeviceLinkRuleUtil {
|
|
|
89
366
|
};
|
|
90
367
|
};
|
|
91
368
|
|
|
369
|
+
/*
|
|
370
|
+
* The three checks below are properties of the rule's TEXT, true in every
|
|
371
|
+
* site, so they are settled before scope is even read. A disabled rule is
|
|
372
|
+
* not "disabled in Unit 7", and partitioning a rule with an empty parent
|
|
373
|
+
* label set would make every site in the project ambiguous at once — the
|
|
374
|
+
* worst noise outcome available.
|
|
375
|
+
*/
|
|
92
376
|
if (rule.isEnabled === false) {
|
|
93
377
|
return empty("disabled");
|
|
94
378
|
}
|
|
@@ -105,53 +389,247 @@ export default class NetworkDeviceLinkRuleUtil {
|
|
|
105
389
|
return empty("noParentLabels");
|
|
106
390
|
}
|
|
107
391
|
|
|
108
|
-
const
|
|
392
|
+
const normalized: Array<NormalizedDevice> = devices.map(
|
|
109
393
|
(device: LinkRuleDeviceInput) => {
|
|
110
|
-
return
|
|
111
|
-
device,
|
|
112
|
-
|
|
113
|
-
|
|
394
|
+
return {
|
|
395
|
+
device: device,
|
|
396
|
+
labelSet: new Set<string>(device.labelIds),
|
|
397
|
+
siteKey: (device.siteId || "").toString().trim(),
|
|
398
|
+
};
|
|
114
399
|
},
|
|
115
400
|
);
|
|
116
401
|
|
|
117
|
-
if (
|
|
402
|
+
if (NetworkDeviceLinkRuleScopeUtil.isSiteScoped(rule.scope)) {
|
|
403
|
+
return NetworkDeviceLinkRuleUtil.resolvePerSite(rule, normalized);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return NetworkDeviceLinkRuleUtil.resolveProject(rule, normalized, empty);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
private static resolveProject(
|
|
410
|
+
rule: LinkRuleInput,
|
|
411
|
+
normalized: Array<NormalizedDevice>,
|
|
412
|
+
empty: (
|
|
413
|
+
reason: LinkRuleSkipReason,
|
|
414
|
+
parents?: number,
|
|
415
|
+
children?: number,
|
|
416
|
+
) => LinkRuleOutcome,
|
|
417
|
+
): LinkRuleOutcome {
|
|
418
|
+
const result: LinkRuleGroupResult = NetworkDeviceLinkRuleUtil.resolveGroup(
|
|
419
|
+
rule,
|
|
420
|
+
normalized,
|
|
421
|
+
);
|
|
422
|
+
|
|
423
|
+
if (result.failure === "noParentMatched") {
|
|
118
424
|
return empty("noParentMatched", 0);
|
|
119
425
|
}
|
|
426
|
+
if (result.failure === "ambiguousParent") {
|
|
427
|
+
return empty("ambiguousParent", result.parentMatchCount);
|
|
428
|
+
}
|
|
429
|
+
if (result.failure === "noChildrenMatched") {
|
|
430
|
+
return empty("noChildrenMatched", 1);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
return {
|
|
434
|
+
ruleId: rule.id,
|
|
435
|
+
ruleName: rule.name,
|
|
436
|
+
links: result.links,
|
|
437
|
+
matchedParentCount: 1,
|
|
438
|
+
matchedChildCount: result.links.length,
|
|
439
|
+
};
|
|
440
|
+
}
|
|
120
441
|
|
|
442
|
+
private static resolvePerSite(
|
|
443
|
+
rule: LinkRuleInput,
|
|
444
|
+
normalized: Array<NormalizedDevice>,
|
|
445
|
+
): LinkRuleOutcome {
|
|
121
446
|
/*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
447
|
+
* Bucketed in ONE pass in first-appearance order. Never
|
|
448
|
+
* `devices.filter(...)` inside a loop over sites: that is O(devices x
|
|
449
|
+
* sites) per rule, and this endpoint runs at ten thousand devices.
|
|
125
450
|
*/
|
|
126
|
-
|
|
127
|
-
|
|
451
|
+
const buckets: Map<string, Array<NormalizedDevice>> = new Map<
|
|
452
|
+
string,
|
|
453
|
+
Array<NormalizedDevice>
|
|
454
|
+
>();
|
|
455
|
+
let unsitedChildDeviceCount: number = 0;
|
|
456
|
+
|
|
457
|
+
for (const entry of normalized) {
|
|
458
|
+
/*
|
|
459
|
+
* A device with no site is EXCLUDED, not pooled with the other unsited
|
|
460
|
+
* ones and not given a group of its own. Pooling would ask "exactly one
|
|
461
|
+
* parent among all the unsited devices", a question nobody posed, and
|
|
462
|
+
* would draw an edge between two boxes whose only relationship is that
|
|
463
|
+
* neither has been assigned a site yet. Counted instead, so the map can
|
|
464
|
+
* say how many the rule walked past.
|
|
465
|
+
*/
|
|
466
|
+
if (entry.siteKey === "") {
|
|
467
|
+
if (
|
|
468
|
+
NetworkDeviceLinkRuleUtil.matches(entry.labelSet, rule.childLabelIds)
|
|
469
|
+
) {
|
|
470
|
+
unsitedChildDeviceCount++;
|
|
471
|
+
}
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
const bucket: Array<NormalizedDevice> | undefined = buckets.get(
|
|
476
|
+
entry.siteKey,
|
|
477
|
+
);
|
|
478
|
+
if (bucket) {
|
|
479
|
+
bucket.push(entry);
|
|
480
|
+
} else {
|
|
481
|
+
buckets.set(entry.siteKey, [entry]);
|
|
482
|
+
}
|
|
128
483
|
}
|
|
129
484
|
|
|
130
|
-
const
|
|
485
|
+
const links: Array<LinkRuleLink> = [];
|
|
486
|
+
const groupFailures: Array<LinkRuleGroupFailure> = [];
|
|
487
|
+
let applicableSiteCount: number = 0;
|
|
488
|
+
let matchedParentCount: number = 0;
|
|
131
489
|
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return (
|
|
136
|
-
device.id !== parent.id &&
|
|
137
|
-
NetworkDeviceLinkRuleUtil.deviceMatches(device, rule.childLabelIds)
|
|
138
|
-
);
|
|
139
|
-
},
|
|
140
|
-
);
|
|
490
|
+
for (const [siteId, group] of buckets) {
|
|
491
|
+
const result: LinkRuleGroupResult =
|
|
492
|
+
NetworkDeviceLinkRuleUtil.resolveGroup(rule, group);
|
|
141
493
|
|
|
142
|
-
|
|
143
|
-
|
|
494
|
+
if (result.links.length > 0) {
|
|
495
|
+
applicableSiteCount++;
|
|
496
|
+
matchedParentCount += result.parentMatchCount;
|
|
497
|
+
links.push(...result.links);
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/*
|
|
502
|
+
* A site speaks only when it holds devices this rule wanted to place.
|
|
503
|
+
* Sites with nothing to place are not misconfigured — the rule simply
|
|
504
|
+
* does not apply there, and a parent label like `SubCategory:Router` is
|
|
505
|
+
* present in nearly every site by construction. Without this gate, site
|
|
506
|
+
* scoping would trade one loud failure for two hundred quiet ones and
|
|
507
|
+
* the banner would be ignored inside a week.
|
|
508
|
+
*
|
|
509
|
+
* `noChildrenMatched` lands here too: the only child candidate was the
|
|
510
|
+
* parent itself, so after the self-link exclusion there is nothing to
|
|
511
|
+
* place and nothing to report.
|
|
512
|
+
*/
|
|
513
|
+
if (
|
|
514
|
+
result.childMatchCount === 0 ||
|
|
515
|
+
result.failure === null ||
|
|
516
|
+
result.failure === "noChildrenMatched"
|
|
517
|
+
) {
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
applicableSiteCount++;
|
|
522
|
+
matchedParentCount += result.parentMatchCount;
|
|
523
|
+
groupFailures.push({
|
|
524
|
+
siteId: siteId,
|
|
525
|
+
siteName: NetworkDeviceLinkRuleUtil.siteNameOf(group),
|
|
526
|
+
reason: result.failure,
|
|
527
|
+
matchedParentCount: result.parentMatchCount,
|
|
528
|
+
matchedChildCount: result.childMatchCount,
|
|
529
|
+
});
|
|
144
530
|
}
|
|
145
531
|
|
|
146
|
-
|
|
532
|
+
const outcome: LinkRuleOutcome = {
|
|
147
533
|
ruleId: rule.id,
|
|
148
534
|
ruleName: rule.name,
|
|
149
|
-
links:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
matchedChildCount: children.length,
|
|
535
|
+
links: links,
|
|
536
|
+
matchedParentCount: matchedParentCount,
|
|
537
|
+
matchedChildCount: links.length,
|
|
538
|
+
applicableSiteCount: applicableSiteCount,
|
|
154
539
|
};
|
|
540
|
+
|
|
541
|
+
/*
|
|
542
|
+
* Keeps `links.length === 0 <=> skipReason defined` true with no gaps, so
|
|
543
|
+
* describeOutcome can never fall through to "Draws 0 uplinks" on an empty
|
|
544
|
+
* outcome. The second arm covers both an empty device list and a rule
|
|
545
|
+
* whose labels match nothing anywhere.
|
|
546
|
+
*/
|
|
547
|
+
if (links.length === 0) {
|
|
548
|
+
outcome.skipReason =
|
|
549
|
+
groupFailures.length > 0 ? "noSiteResolved" : "noChildrenMatched";
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (groupFailures.length > 0) {
|
|
553
|
+
outcome.groupFailures = groupFailures;
|
|
554
|
+
}
|
|
555
|
+
if (unsitedChildDeviceCount > 0) {
|
|
556
|
+
outcome.unsitedChildDeviceCount = unsitedChildDeviceCount;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
return outcome;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/** First non-empty site name among a site's devices, if any of them carry one. */
|
|
563
|
+
private static siteNameOf(
|
|
564
|
+
group: Array<NormalizedDevice>,
|
|
565
|
+
): string | undefined {
|
|
566
|
+
for (const entry of group) {
|
|
567
|
+
if (entry.device.siteName) {
|
|
568
|
+
return entry.device.siteName;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
return undefined;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/*
|
|
575
|
+
* By site name, then by id so equally-named (and unnamed) sites still have
|
|
576
|
+
* ONE order. Load-bearing rather than cosmetic: the live view refetches
|
|
577
|
+
* every sixty seconds and the device query has no ORDER BY, so an unsorted
|
|
578
|
+
* list would reshuffle the banner on every poll and read as a change that
|
|
579
|
+
* did not happen. The sentence and the site list share it so the three names
|
|
580
|
+
* the sentence gives are the first three rows of the list.
|
|
581
|
+
*/
|
|
582
|
+
private static sortSiteFailures(
|
|
583
|
+
failures: Array<LinkRuleGroupFailure>,
|
|
584
|
+
): Array<LinkRuleGroupFailure> {
|
|
585
|
+
return [...failures].sort(
|
|
586
|
+
(a: LinkRuleGroupFailure, b: LinkRuleGroupFailure) => {
|
|
587
|
+
return (
|
|
588
|
+
(a.siteName || "").localeCompare(b.siteName || "") ||
|
|
589
|
+
a.siteId.localeCompare(b.siteId)
|
|
590
|
+
);
|
|
591
|
+
},
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/*
|
|
596
|
+
* "Unit 4, Unit 9 and 2 more sites".
|
|
597
|
+
*
|
|
598
|
+
* Named in sortSiteFailures order, for the reasons given there. The count
|
|
599
|
+
* stays exact even when the names are elided, so the operator always knows
|
|
600
|
+
* the true blast radius — and `getWarning` sends the sites themselves
|
|
601
|
+
* alongside, because a blast radius is not a list of buildings.
|
|
602
|
+
*/
|
|
603
|
+
private static describeSiteList(
|
|
604
|
+
failures: Array<LinkRuleGroupFailure>,
|
|
605
|
+
): string {
|
|
606
|
+
const sorted: Array<LinkRuleGroupFailure> =
|
|
607
|
+
NetworkDeviceLinkRuleUtil.sortSiteFailures(failures);
|
|
608
|
+
|
|
609
|
+
const names: Array<string> = sorted
|
|
610
|
+
.slice(0, NetworkDeviceLinkRuleUtil.MAX_NAMED_SITES)
|
|
611
|
+
.map((failure: LinkRuleGroupFailure) => {
|
|
612
|
+
const name: string =
|
|
613
|
+
failure.siteName || NetworkDeviceLinkRuleUtil.UNNAMED_SITE;
|
|
614
|
+
return name.length > NetworkDeviceLinkRuleUtil.MAX_SITE_NAME_LENGTH
|
|
615
|
+
? `${name.slice(
|
|
616
|
+
0,
|
|
617
|
+
NetworkDeviceLinkRuleUtil.MAX_SITE_NAME_LENGTH - 1,
|
|
618
|
+
)}…`
|
|
619
|
+
: name;
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
const remaining: number = sorted.length - names.length;
|
|
623
|
+
|
|
624
|
+
if (remaining > 0) {
|
|
625
|
+
return `${names.join(", ")} and ${remaining} more site${
|
|
626
|
+
remaining === 1 ? "" : "s"
|
|
627
|
+
}`;
|
|
628
|
+
}
|
|
629
|
+
if (names.length === 1) {
|
|
630
|
+
return names[0]!;
|
|
631
|
+
}
|
|
632
|
+
return `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]!}`;
|
|
155
633
|
}
|
|
156
634
|
|
|
157
635
|
public static resolveRules(
|
|
@@ -178,10 +656,164 @@ export default class NetworkDeviceLinkRuleUtil {
|
|
|
178
656
|
return `${outcome.matchedParentCount} devices carry the parent labels. Exactly one must, or there is no way to tell which is the uplink.`;
|
|
179
657
|
case "noChildrenMatched":
|
|
180
658
|
return "No device carries the child labels yet.";
|
|
659
|
+
case "noSiteResolved":
|
|
660
|
+
return "No site resolved this rule.";
|
|
181
661
|
default:
|
|
182
662
|
return `Draws ${outcome.matchedChildCount} uplink${
|
|
183
663
|
outcome.matchedChildCount === 1 ? "" : "s"
|
|
184
664
|
}.`;
|
|
185
665
|
}
|
|
186
666
|
}
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* The operator-facing warning, or null when the rule needs no explanation.
|
|
670
|
+
*
|
|
671
|
+
* Singular on purpose: ONE bullet per rule, never one per site. The banner's
|
|
672
|
+
* length is then bounded by the number of rules the operator wrote — a small
|
|
673
|
+
* number they control — rather than by the number of sites in their project.
|
|
674
|
+
*
|
|
675
|
+
* This is also the only sanctioned "did this rule fail" predicate. A caller
|
|
676
|
+
* must not go back to testing `outcome.links.length === 0`, which a rule
|
|
677
|
+
* drawing thirteen of fourteen sites passes while genuinely failing.
|
|
678
|
+
*/
|
|
679
|
+
public static getWarning(outcome: LinkRuleOutcome): LinkRuleWarning | null {
|
|
680
|
+
const failures: Array<LinkRuleGroupFailure> = outcome.groupFailures || [];
|
|
681
|
+
const unsited: number = outcome.unsitedChildDeviceCount || 0;
|
|
682
|
+
|
|
683
|
+
/*
|
|
684
|
+
* Project scope always lands here, and this branch is what the topology
|
|
685
|
+
* API used to compute inline: warn iff the rule drew nothing, using
|
|
686
|
+
* describeOutcome's own words. The `!skipReason` guard makes the old
|
|
687
|
+
* code's implicit assumption explicit rather than emitting a warning with
|
|
688
|
+
* an undefined reason.
|
|
689
|
+
*/
|
|
690
|
+
if (failures.length === 0 && unsited === 0) {
|
|
691
|
+
if (outcome.links.length > 0 || !outcome.skipReason) {
|
|
692
|
+
return null;
|
|
693
|
+
}
|
|
694
|
+
return {
|
|
695
|
+
ruleId: outcome.ruleId,
|
|
696
|
+
ruleName: outcome.ruleName,
|
|
697
|
+
reason: outcome.skipReason,
|
|
698
|
+
message: NetworkDeviceLinkRuleUtil.describeOutcome(outcome),
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
const parts: Array<string> = [];
|
|
703
|
+
const applicableSiteCount: number = outcome.applicableSiteCount || 0;
|
|
704
|
+
|
|
705
|
+
if (outcome.links.length === 0) {
|
|
706
|
+
parts.push("No site resolved this rule.");
|
|
707
|
+
} else if (applicableSiteCount > 1) {
|
|
708
|
+
// A single applicable site needs no coverage fraction.
|
|
709
|
+
parts.push(
|
|
710
|
+
`Drawing in ${
|
|
711
|
+
applicableSiteCount - failures.length
|
|
712
|
+
} of ${applicableSiteCount} sites.`,
|
|
713
|
+
);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
const ambiguous: Array<LinkRuleGroupFailure> = failures.filter(
|
|
717
|
+
(failure: LinkRuleGroupFailure) => {
|
|
718
|
+
return failure.reason === "ambiguousParent";
|
|
719
|
+
},
|
|
720
|
+
);
|
|
721
|
+
const parentless: Array<LinkRuleGroupFailure> = failures.filter(
|
|
722
|
+
(failure: LinkRuleGroupFailure) => {
|
|
723
|
+
return failure.reason === "noParentMatched";
|
|
724
|
+
},
|
|
725
|
+
);
|
|
726
|
+
|
|
727
|
+
if (ambiguous.length === 1) {
|
|
728
|
+
/*
|
|
729
|
+
* The trailing sentence deliberately echoes the project-scope wording so
|
|
730
|
+
* an operator's vocabulary does not fork between the two scopes.
|
|
731
|
+
*/
|
|
732
|
+
parts.push(
|
|
733
|
+
`${
|
|
734
|
+
ambiguous[0]!.matchedParentCount
|
|
735
|
+
} devices carry the parent labels in ${NetworkDeviceLinkRuleUtil.describeSiteList(
|
|
736
|
+
ambiguous,
|
|
737
|
+
)}. Exactly one must, or there is no way to tell which is the uplink.`,
|
|
738
|
+
);
|
|
739
|
+
} else if (ambiguous.length > 1) {
|
|
740
|
+
parts.push(
|
|
741
|
+
`Several devices carry the parent labels in ${NetworkDeviceLinkRuleUtil.describeSiteList(
|
|
742
|
+
ambiguous,
|
|
743
|
+
)}. Exactly one per site must, or there is no way to tell which is the uplink.`,
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
if (parentless.length > 0) {
|
|
748
|
+
const stranded: number = parentless.reduce(
|
|
749
|
+
(sum: number, failure: LinkRuleGroupFailure) => {
|
|
750
|
+
return sum + failure.matchedChildCount;
|
|
751
|
+
},
|
|
752
|
+
0,
|
|
753
|
+
);
|
|
754
|
+
parts.push(
|
|
755
|
+
`No device carries the parent labels in ${NetworkDeviceLinkRuleUtil.describeSiteList(
|
|
756
|
+
parentless,
|
|
757
|
+
)}, so ${stranded} ${stranded === 1 ? "device" : "devices"} there ${
|
|
758
|
+
stranded === 1 ? "has" : "have"
|
|
759
|
+
} no uplink.`,
|
|
760
|
+
);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/*
|
|
764
|
+
* Always last and always its own sentence: the fix here is "assign these
|
|
765
|
+
* devices to a site", not "fix your labels", so they are never folded into
|
|
766
|
+
* a site-name list.
|
|
767
|
+
*/
|
|
768
|
+
if (unsited > 0) {
|
|
769
|
+
parts.push(
|
|
770
|
+
`${unsited} ${
|
|
771
|
+
unsited === 1 ? "device" : "devices"
|
|
772
|
+
} carrying the child labels ${
|
|
773
|
+
unsited === 1 ? "is" : "are"
|
|
774
|
+
} not assigned to a site, so this site-scoped rule skips ${
|
|
775
|
+
unsited === 1 ? "it" : "them"
|
|
776
|
+
}.`,
|
|
777
|
+
);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
const warning: LinkRuleWarning = {
|
|
781
|
+
ruleId: outcome.ruleId,
|
|
782
|
+
ruleName: outcome.ruleName,
|
|
783
|
+
// Highest-ranked condition present. Ambiguity outranks a missing parent.
|
|
784
|
+
reason:
|
|
785
|
+
ambiguous.length > 0
|
|
786
|
+
? "ambiguousParent"
|
|
787
|
+
: parentless.length > 0
|
|
788
|
+
? "noParentMatched"
|
|
789
|
+
: "devicesWithoutSite",
|
|
790
|
+
message: parts.join(" "),
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
/*
|
|
794
|
+
* The list, for the sentence the operator cannot act on. Written only when
|
|
795
|
+
* there are failing sites, so a warning that is purely about unsited
|
|
796
|
+
* devices — which names no site at all — keeps the exact shape it had.
|
|
797
|
+
*
|
|
798
|
+
* `siteCount` is the true total and `sites` may be shorter; a caller that
|
|
799
|
+
* reads sites.length as the number of broken sites is wrong at the cap,
|
|
800
|
+
* which is precisely the scale this exists for.
|
|
801
|
+
*/
|
|
802
|
+
if (failures.length > 0) {
|
|
803
|
+
warning.siteCount = failures.length;
|
|
804
|
+
warning.sites = NetworkDeviceLinkRuleUtil.sortSiteFailures(failures)
|
|
805
|
+
.slice(0, NetworkDeviceLinkRuleUtil.MAX_LISTED_SITES)
|
|
806
|
+
.map((failure: LinkRuleGroupFailure) => {
|
|
807
|
+
return {
|
|
808
|
+
siteId: failure.siteId,
|
|
809
|
+
siteName: failure.siteName,
|
|
810
|
+
reason: failure.reason,
|
|
811
|
+
strandedDeviceCount: failure.matchedChildCount,
|
|
812
|
+
matchedParentCount: failure.matchedParentCount,
|
|
813
|
+
};
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
return warning;
|
|
818
|
+
}
|
|
187
819
|
}
|