@oneuptime/common 11.4.0 → 11.5.0
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/DatabaseModels/AIRun.ts +50 -0
- package/Models/DatabaseModels/AlertSeverity.ts +6 -0
- package/Models/DatabaseModels/IncidentSeverity.ts +6 -0
- package/Models/DatabaseModels/Index.ts +16 -0
- package/Models/DatabaseModels/IoTDeviceCredential.ts +471 -0
- package/Models/DatabaseModels/LlmLog.ts +56 -0
- package/Models/DatabaseModels/LlmProvider.ts +33 -0
- package/Models/DatabaseModels/NetworkDevice.ts +1385 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +717 -0
- package/Models/DatabaseModels/NetworkDeviceLabelRule.ts +514 -0
- package/Models/DatabaseModels/NetworkDeviceOwnerRule.ts +596 -0
- package/Models/DatabaseModels/NetworkDeviceOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/NetworkDeviceOwnerUser.ts +486 -0
- package/Models/DatabaseModels/NetworkInterface.ts +563 -0
- package/Models/DatabaseModels/Project.ts +145 -0
- package/Models/DatabaseModels/TelemetryEntityRelationship.ts +54 -0
- package/Server/API/AIAgentTaskAPI.ts +10 -24
- package/Server/API/AIInvestigationAPI.ts +131 -63
- package/Server/API/AlertAPI.ts +5 -0
- package/Server/API/IncidentAPI.ts +10 -0
- package/Server/API/IncidentEpisodeAPI.ts +5 -0
- package/Server/API/LlmProviderAPI.ts +4 -0
- package/Server/API/ScheduledMaintenanceAPI.ts +5 -0
- package/Server/API/TelemetryAPI.ts +4 -3
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.ts +105 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.ts +15 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.ts +192 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.ts +37 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.ts +19 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.ts +79 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +24 -0
- package/Server/Services/AIAgentTaskService.ts +62 -0
- package/Server/Services/AIRunService.ts +58 -0
- package/Server/Services/AIService.ts +101 -0
- package/Server/Services/AnalyticsDatabaseService.ts +27 -0
- package/Server/Services/IncidentService.ts +14 -41
- package/Server/Services/Index.ts +14 -0
- package/Server/Services/IoTDeviceCredentialService.ts +351 -0
- package/Server/Services/IoTDeviceService.ts +64 -21
- package/Server/Services/LlmLogService.ts +26 -0
- package/Server/Services/LlmProviderService.ts +3 -0
- package/Server/Services/LogAggregationService.ts +29 -11
- package/Server/Services/MetricService.ts +603 -13
- package/Server/Services/MonitorService.ts +4 -1
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +10 -0
- package/Server/Services/NetworkDeviceLabelRuleEngineService.ts +204 -0
- package/Server/Services/NetworkDeviceLabelRuleService.ts +14 -0
- package/Server/Services/NetworkDeviceOwnerRuleEngineService.ts +222 -0
- package/Server/Services/NetworkDeviceOwnerRuleService.ts +14 -0
- package/Server/Services/NetworkDeviceOwnerTeamService.ts +10 -0
- package/Server/Services/NetworkDeviceOwnerUserService.ts +10 -0
- package/Server/Services/NetworkDeviceService.ts +50 -0
- package/Server/Services/NetworkInterfaceService.ts +10 -0
- package/Server/Services/TelemetryEntityRelationshipService.ts +23 -0
- package/Server/Services/TelemetryEntityService.ts +72 -2
- package/Server/Utils/AI/Sentinel/AlertInvestigationRunner.ts +244 -12
- package/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.ts +92 -19
- package/Server/Utils/AI/Sentinel/InvestigationQueue.ts +493 -0
- package/Server/Utils/AI/Sentinel/README.md +10 -0
- package/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.ts +88 -68
- package/Server/Utils/AI/Toolbox/Index.ts +2 -1
- package/Server/Utils/AI/Toolbox/MetricTools.ts +391 -0
- package/Server/Utils/LLM/LLMService.ts +21 -0
- package/Server/Utils/Monitor/Criteria/APIRequestCriteria.ts +44 -0
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +170 -2
- package/Server/Utils/Monitor/IoTDeviceAbsenceSeries.ts +101 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +15 -3
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +1 -1
- package/Server/Utils/Monitor/MonitorIncident.ts +19 -3
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +195 -2
- package/Server/Utils/Monitor/MonitorResource.ts +77 -21
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +1 -1
- package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +201 -0
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +215 -0
- package/Server/Utils/Monitor/SnmpInterfaceRateUtil.ts +169 -0
- package/Tests/Server/Services/AIAgentTaskServiceClaim.test.ts +146 -0
- package/Tests/Server/Services/AIServiceDailyBudget.test.ts +173 -0
- package/Tests/Server/Services/IncidentInternalNoteAnnouncement.test.ts +97 -0
- package/Tests/Server/Services/IoTDeviceService.test.ts +54 -0
- package/Tests/Server/Services/LogAggregationService.test.ts +22 -0
- package/Tests/Server/Services/MetricServiceAggregate.test.ts +194 -0
- package/Tests/Server/Utils/AI/BaselineAnomalyTool.test.ts +253 -0
- package/Tests/Server/Utils/AI/LLMServiceToolCalling.test.ts +44 -0
- package/Tests/Server/Utils/AI/SentinelAlertGating.test.ts +360 -0
- package/Tests/Server/Utils/AI/SentinelInvestigationQueue.test.ts +295 -0
- package/Tests/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.test.ts +59 -0
- package/Tests/Server/Utils/Monitor/IoTDeviceAbsenceSeries.test.ts +113 -0
- package/Tests/Server/Utils/Monitor/PerSeriesRecoveryResolution.test.ts +198 -0
- package/Tests/Types/AI/AIAgentTaskStatus.test.ts +86 -0
- package/Tests/Types/BaseDatabase/AggregationIntervalUtil.test.ts +127 -0
- package/Tests/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.test.ts +152 -0
- package/Tests/Types/Monitor/MonitorType.test.ts +1 -1
- package/Tests/Types/Trace/TraceRecordingRuleDefinition.test.ts +308 -0
- package/Tests/UI/Components/Dropdown.test.tsx +17 -0
- package/Tests/UI/Components/EntityDropdown.test.tsx +130 -0
- package/Tests/UI/Components/Modal.test.tsx +144 -2
- package/Tests/UI/Components/TelemetrySearchBar.test.tsx +90 -0
- package/Tests/UI/Utils/Theme.test.ts +161 -0
- package/Tests/Utils/Monitor/LatencyMatrixUtil.test.ts +111 -0
- package/Types/AI/AIRunStatus.ts +9 -0
- package/Types/BaseDatabase/AggregateBy.ts +12 -0
- package/Types/Dashboard/DashboardComponentType.ts +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardLogChartComponent.ts +24 -0
- package/Types/Dashboard/DashboardTemplates.ts +9 -1
- package/Types/LlmLogStatus.ts +1 -0
- package/Types/Monitor/CriteriaFilter.ts +9 -0
- package/Types/Monitor/HttpPhaseTimings.ts +16 -0
- package/Types/Monitor/IotAlertTemplates.ts +22 -3
- package/Types/Monitor/LatencyMatrix.ts +27 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +2 -2
- package/Types/Monitor/MonitorMetricType.ts +27 -0
- package/Types/Monitor/MonitorStep.ts +36 -11
- package/Types/Monitor/MonitorStepNetworkDeviceMonitor.ts +55 -0
- package/Types/Monitor/MonitorStepSnmpMonitor.ts +8 -0
- package/Types/Monitor/MonitorType.ts +14 -9
- package/Types/Monitor/PingMonitor/PingMonitorResponse.ts +20 -0
- package/Types/Monitor/SnmpMonitor/LldpNeighbor.ts +12 -0
- package/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.ts +116 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +29 -0
- package/Types/Monitor/SnmpMonitor/SnmpInterface.ts +31 -0
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.ts +24 -0
- package/Types/Monitor/SnmpMonitor/SnmpTrap.ts +20 -0
- package/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.ts +173 -0
- package/Types/Permission.ts +314 -0
- package/Types/Probe/ProbeMonitorResponse.ts +22 -0
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +8 -5
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +4 -1
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +6 -3
- package/UI/Components/CodeBlock/CodeBlock.tsx +2 -1
- package/UI/Components/CodeEditor/CodeEditor.tsx +3 -0
- package/UI/Components/Divider/Divider.tsx +1 -1
- package/UI/Components/Dropdown/Dropdown.tsx +13 -4
- package/UI/Components/EntityDropdown/EntityDropdown.tsx +110 -2
- package/UI/Components/ErrorBoundary.tsx +2 -1
- package/UI/Components/EventItem/EventItem.tsx +2 -2
- package/UI/Components/GanttChart/Bar/Index.tsx +1 -1
- package/UI/Components/Graphs/UptimeBarTooltip.tsx +30 -23
- package/UI/Components/Header/Header.tsx +7 -0
- package/UI/Components/Header/HeaderIconDropdownButton.tsx +2 -0
- package/UI/Components/Icon/Icon.tsx +8 -6
- package/UI/Components/Label/Label.tsx +2 -2
- package/UI/Components/LogsViewer/components/LogsAnalyticsView.tsx +22 -10
- package/UI/Components/LogsViewer/components/LogsHistogram.tsx +9 -3
- package/UI/Components/Markdown.tsx/MarkdownEditor.tsx +8 -8
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +44 -20
- package/UI/Components/Modal/ConfirmModal.tsx +1 -1
- package/UI/Components/Modal/Modal.tsx +213 -121
- package/UI/Components/Modal/ModalFooter.tsx +33 -22
- package/UI/Components/ModelTable/TableView.tsx +1 -1
- package/UI/Components/MonitorGraphs/UptimeBarDayModal.tsx +20 -12
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +2 -2
- package/UI/Components/Pill/Pill.tsx +21 -13
- package/UI/Components/StatusBubble/StatusBubble.tsx +3 -3
- package/UI/Components/Tabs/Tabs.tsx +10 -1
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +7 -1
- package/UI/Components/TelemetryViewer/components/TelemetryHistogram.tsx +9 -3
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +62 -4
- package/UI/Components/Workflow/Component.tsx +53 -33
- package/UI/Components/Workflow/ComponentPortViewer.tsx +6 -6
- package/UI/Components/Workflow/ComponentReturnValueViewer.tsx +8 -8
- package/UI/Components/Workflow/ComponentsModal.tsx +16 -9
- package/UI/Components/Workflow/Workflow.tsx +13 -11
- package/UI/Utils/Navigation.ts +10 -1
- package/UI/Utils/Theme.ts +140 -0
- package/Utils/Dashboard/Components/DashboardLogChartComponent.ts +99 -0
- package/Utils/Dashboard/Components/Index.ts +7 -0
- package/Utils/Monitor/LatencyMatrixUtil.ts +162 -0
- package/Utils/Monitor/MonitorMetricType.ts +141 -3
- package/Utils/Monitor/NetworkTopologyUtil.ts +159 -0
- package/Utils/Telemetry/EntityRelationship.ts +11 -0
- package/build/dist/Models/DatabaseModels/AIRun.js +52 -0
- package/build/dist/Models/DatabaseModels/AIRun.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +6 -0
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +6 -0
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +16 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IoTDeviceCredential.js +493 -0
- package/build/dist/Models/DatabaseModels/IoTDeviceCredential.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LlmLog.js +58 -0
- package/build/dist/Models/DatabaseModels/LlmLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LlmProvider.js +33 -0
- package/build/dist/Models/DatabaseModels/LlmProvider.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +1426 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +738 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLabelRule.js +522 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerRule.js +603 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkInterface.js +589 -0
- package/build/dist/Models/DatabaseModels/NetworkInterface.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Project.js +147 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js +57 -0
- package/build/dist/Models/DatabaseModels/TelemetryEntityRelationship.js.map +1 -1
- package/build/dist/Server/API/AIAgentTaskAPI.js +8 -23
- package/build/dist/Server/API/AIAgentTaskAPI.js.map +1 -1
- package/build/dist/Server/API/AIInvestigationAPI.js +95 -55
- package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +5 -0
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +10 -0
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +5 -0
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/LlmProviderAPI.js +5 -7
- package/build/dist/Server/API/LlmProviderAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +5 -0
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783650000000-AddAdditionalParamsToLlmProvider.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783695782697-AddCacheTokenColumnsToLlmLog.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783701585317-AddAlertInvestigationGating.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783702431535-AddAiDailyAutonomousTokenLimitToProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.js +51 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783720000000-AddNetworkDeviceTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783721121260-AddAttemptCountToAIRun.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.js +101 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783730000000-AddNetworkDeviceOwnersAndRules.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783740000000-AddNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783750000000-AddLldpNeighborsToNetworkDevice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783760576655-AddInvestigationTuningToProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783762505482-AddTelemetryEntityRelationshipMetrics.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.js +38 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783780000000-AddIoTDeviceCredentialTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783790000000-AddSnmpV3AuthColumnsToNetworkDevice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AIAgentTaskService.js +59 -0
- package/build/dist/Server/Services/AIAgentTaskService.js.map +1 -1
- package/build/dist/Server/Services/AIRunService.js +33 -0
- package/build/dist/Server/Services/AIRunService.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +82 -9
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +19 -0
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +14 -25
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +14 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/IoTDeviceCredentialService.js +321 -0
- package/build/dist/Server/Services/IoTDeviceCredentialService.js.map +1 -0
- package/build/dist/Server/Services/IoTDeviceService.js +49 -15
- package/build/dist/Server/Services/IoTDeviceService.js.map +1 -1
- package/build/dist/Server/Services/LlmLogService.js +29 -0
- package/build/dist/Server/Services/LlmLogService.js.map +1 -1
- package/build/dist/Server/Services/LlmProviderService.js +3 -0
- package/build/dist/Server/Services/LlmProviderService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +21 -7
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricService.js +449 -7
- package/build/dist/Server/Services/MetricService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +2 -1
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +9 -0
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js +166 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleService.js +13 -0
- package/build/dist/Server/Services/NetworkDeviceLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js +186 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js +9 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceService.js +52 -0
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js +9 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js.map +1 -0
- package/build/dist/Server/Services/TelemetryEntityRelationshipService.js +22 -0
- package/build/dist/Server/Services/TelemetryEntityRelationshipService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryEntityService.js +64 -2
- package/build/dist/Server/Services/TelemetryEntityService.js.map +1 -1
- package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js +189 -9
- package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js +84 -17
- package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Sentinel/InvestigationQueue.js +428 -0
- package/build/dist/Server/Utils/AI/Sentinel/InvestigationQueue.js.map +1 -0
- package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js +63 -47
- package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +2 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/MetricTools.js +300 -0
- package/build/dist/Server/Utils/AI/Toolbox/MetricTools.js.map +1 -1
- package/build/dist/Server/Utils/LLM/LLMService.js +16 -0
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js +29 -0
- package/build/dist/Server/Utils/Monitor/Criteria/APIRequestCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +130 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/IoTDeviceAbsenceSeries.js +81 -0
- package/build/dist/Server/Utils/Monitor/IoTDeviceAbsenceSeries.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +18 -7
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +25 -10
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +155 -5
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +76 -30
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +147 -0
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +167 -0
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/SnmpInterfaceRateUtil.js +93 -0
- package/build/dist/Server/Utils/Monitor/SnmpInterfaceRateUtil.js.map +1 -0
- package/build/dist/Types/AI/AIRunStatus.js +9 -0
- package/build/dist/Types/AI/AIRunStatus.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +1 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogChartComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardLogChartComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js +9 -1
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/LlmLogStatus.js +1 -0
- package/build/dist/Types/LlmLogStatus.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +9 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/HttpPhaseTimings.js +2 -0
- package/build/dist/Types/Monitor/HttpPhaseTimings.js.map +1 -0
- package/build/dist/Types/Monitor/IotAlertTemplates.js +7 -7
- package/build/dist/Types/Monitor/IotAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/LatencyMatrix.js +2 -0
- package/build/dist/Types/Monitor/LatencyMatrix.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +2 -2
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorMetricType.js +24 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +22 -9
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepNetworkDeviceMonitor.js +36 -0
- package/build/dist/Types/Monitor/MonitorStepNetworkDeviceMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js +3 -0
- package/build/dist/Types/Monitor/MonitorStepSnmpMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorType.js +14 -9
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/PingMonitor/PingMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/PingMonitor/PingMonitorResponse.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/LldpNeighbor.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/LldpNeighbor.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js +89 -0
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkDeviceAlertPack.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkTopology.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/NetworkTopology.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpInterface.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpInterface.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpTrap.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpTrap.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js +137 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js.map +1 -0
- package/build/dist/Types/Permission.js +280 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +7 -4
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +4 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +6 -3
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/CodeBlock/CodeBlock.js +1 -1
- package/build/dist/UI/Components/CodeBlock/CodeBlock.js.map +1 -1
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js +3 -1
- package/build/dist/UI/Components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/dist/UI/Components/Divider/Divider.js +1 -1
- package/build/dist/UI/Components/Divider/Divider.js.map +1 -1
- package/build/dist/UI/Components/Dropdown/Dropdown.js +10 -4
- package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
- package/build/dist/UI/Components/EntityDropdown/EntityDropdown.js +76 -3
- package/build/dist/UI/Components/EntityDropdown/EntityDropdown.js.map +1 -1
- package/build/dist/UI/Components/ErrorBoundary.js +2 -1
- package/build/dist/UI/Components/ErrorBoundary.js.map +1 -1
- package/build/dist/UI/Components/EventItem/EventItem.js +2 -2
- package/build/dist/UI/Components/EventItem/EventItem.js.map +1 -1
- package/build/dist/UI/Components/GanttChart/Bar/Index.js +1 -1
- package/build/dist/UI/Components/GanttChart/Bar/Index.js.map +1 -1
- package/build/dist/UI/Components/Graphs/UptimeBarTooltip.js +29 -23
- package/build/dist/UI/Components/Graphs/UptimeBarTooltip.js.map +1 -1
- package/build/dist/UI/Components/Header/Header.js +1 -0
- package/build/dist/UI/Components/Header/Header.js.map +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +8 -6
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/Label/Label.js +2 -2
- package/build/dist/UI/Components/Label/Label.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js +20 -8
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js +8 -2
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js +8 -8
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +40 -20
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/Modal/ConfirmModal.js +1 -1
- package/build/dist/UI/Components/Modal/ConfirmModal.js.map +1 -1
- package/build/dist/UI/Components/Modal/Modal.js +109 -51
- package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
- package/build/dist/UI/Components/Modal/ModalFooter.js +13 -10
- package/build/dist/UI/Components/Modal/ModalFooter.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/MonitorGraphs/UptimeBarDayModal.js +17 -12
- package/build/dist/UI/Components/MonitorGraphs/UptimeBarDayModal.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +2 -2
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Components/Pill/Pill.js +12 -13
- package/build/dist/UI/Components/Pill/Pill.js.map +1 -1
- package/build/dist/UI/Components/StatusBubble/StatusBubble.js +3 -3
- package/build/dist/UI/Components/StatusBubble/StatusBubble.js.map +1 -1
- package/build/dist/UI/Components/Tabs/Tabs.js +3 -1
- package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js +8 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +36 -6
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Component.js +43 -33
- package/build/dist/UI/Components/Workflow/Component.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js +6 -6
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js +8 -8
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js +15 -9
- package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Workflow.js +13 -11
- package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
- package/build/dist/UI/Utils/Navigation.js +11 -1
- package/build/dist/UI/Utils/Navigation.js.map +1 -1
- package/build/dist/UI/Utils/Theme.js +106 -0
- package/build/dist/UI/Utils/Theme.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardLogChartComponent.js +89 -0
- package/build/dist/Utils/Dashboard/Components/DashboardLogChartComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +4 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Monitor/LatencyMatrixUtil.js +89 -0
- package/build/dist/Utils/Monitor/LatencyMatrixUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/MonitorMetricType.js +138 -4
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +112 -0
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -0
- package/build/dist/Utils/Telemetry/EntityRelationship.js.map +1 -1
- package/package.json +1 -1
|
@@ -26,6 +26,148 @@ describe("Modal", () => {
|
|
|
26
26
|
expect(getByText("Modal content")).toBeInTheDocument();
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
+
it("renders an accessible elevated dialog shell", () => {
|
|
30
|
+
const onCloseMock: MockFunction = getJestMockFunction();
|
|
31
|
+
const { getByTestId } = render(
|
|
32
|
+
<Modal
|
|
33
|
+
title="Accessible Modal"
|
|
34
|
+
description="A concise description"
|
|
35
|
+
onClose={onCloseMock}
|
|
36
|
+
>
|
|
37
|
+
<div>Modal content</div>
|
|
38
|
+
</Modal>,
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const modal: HTMLElement = getByTestId("modal");
|
|
42
|
+
const title: HTMLElement = getByTestId("modal-title");
|
|
43
|
+
const description: HTMLElement = getByTestId("modal-description");
|
|
44
|
+
const closeButton: HTMLElement = getByTestId("close-button");
|
|
45
|
+
|
|
46
|
+
expect(modal).toHaveAttribute("role", "dialog");
|
|
47
|
+
expect(modal).toHaveAttribute("aria-modal", "true");
|
|
48
|
+
expect(modal).toHaveAttribute("aria-labelledby", title.id);
|
|
49
|
+
expect(modal).toHaveAttribute("aria-describedby", description.id);
|
|
50
|
+
expect(modal).toHaveClass("rounded-t-2xl", "shadow-2xl");
|
|
51
|
+
expect(getByTestId("modal-backdrop")).toHaveClass(
|
|
52
|
+
"bg-gray-950/45",
|
|
53
|
+
"backdrop-blur-[2px]",
|
|
54
|
+
);
|
|
55
|
+
expect(closeButton).toHaveClass("inline-flex");
|
|
56
|
+
expect(closeButton).not.toHaveClass("md:hidden");
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("keeps keyboard focus inside the modal", () => {
|
|
60
|
+
const onCloseMock: MockFunction = getJestMockFunction();
|
|
61
|
+
const onSubmitMock: MockFunction = getJestMockFunction();
|
|
62
|
+
const { getByLabelText, getByTestId } = render(
|
|
63
|
+
<Modal title="Focus Modal" onClose={onCloseMock} onSubmit={onSubmitMock}>
|
|
64
|
+
<input aria-label="Modal input" />
|
|
65
|
+
</Modal>,
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
const input: HTMLElement = getByLabelText("Modal input");
|
|
69
|
+
const headerCloseButton: HTMLElement = getByTestId("close-button");
|
|
70
|
+
const submitButton: HTMLElement = getByTestId("modal-footer-submit-button");
|
|
71
|
+
|
|
72
|
+
expect(input).toHaveFocus();
|
|
73
|
+
|
|
74
|
+
submitButton.focus();
|
|
75
|
+
fireEvent.keyDown(document, { key: "Tab" });
|
|
76
|
+
expect(headerCloseButton).toHaveFocus();
|
|
77
|
+
|
|
78
|
+
fireEvent.keyDown(document, { key: "Tab", shiftKey: true });
|
|
79
|
+
expect(submitButton).toHaveFocus();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("closes only the topmost modal and restores focus to its opener", () => {
|
|
83
|
+
const onParentCloseMock: MockFunction = getJestMockFunction();
|
|
84
|
+
const onChildCloseMock: MockFunction = getJestMockFunction();
|
|
85
|
+
const onChildSubmitMock: MockFunction = getJestMockFunction();
|
|
86
|
+
|
|
87
|
+
const NestedModalFixture: React.FunctionComponent =
|
|
88
|
+
(): React.ReactElement => {
|
|
89
|
+
const [isChildOpen, setIsChildOpen] = React.useState<boolean>(false);
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<Modal title="Parent Modal" onClose={onParentCloseMock}>
|
|
93
|
+
<>
|
|
94
|
+
<button
|
|
95
|
+
type="button"
|
|
96
|
+
onClick={() => {
|
|
97
|
+
setIsChildOpen(true);
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
Open child
|
|
101
|
+
</button>
|
|
102
|
+
{isChildOpen && (
|
|
103
|
+
<Modal
|
|
104
|
+
title="Child Modal"
|
|
105
|
+
onSubmit={onChildSubmitMock}
|
|
106
|
+
onClose={() => {
|
|
107
|
+
onChildCloseMock();
|
|
108
|
+
setIsChildOpen(false);
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
111
|
+
<div>Child content</div>
|
|
112
|
+
</Modal>
|
|
113
|
+
)}
|
|
114
|
+
</>
|
|
115
|
+
</Modal>
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const { getByRole } = render(<NestedModalFixture />);
|
|
120
|
+
const childOpener: HTMLElement = getByRole("button", {
|
|
121
|
+
name: "Open child",
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
fireEvent.click(childOpener);
|
|
125
|
+
fireEvent.keyDown(document, { key: "Escape" });
|
|
126
|
+
|
|
127
|
+
expect(onChildCloseMock).toHaveBeenCalledTimes(1);
|
|
128
|
+
expect(onParentCloseMock).not.toHaveBeenCalled();
|
|
129
|
+
expect(childOpener).toHaveFocus();
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it("restores focus when a modal contains an auto-focused field", () => {
|
|
133
|
+
const opener: HTMLButtonElement = document.createElement("button");
|
|
134
|
+
document.body.appendChild(opener);
|
|
135
|
+
opener.focus();
|
|
136
|
+
|
|
137
|
+
const { getByLabelText, unmount } = render(
|
|
138
|
+
<Modal title="Auto Focus Modal">
|
|
139
|
+
<input aria-label="Auto-focused input" autoFocus />
|
|
140
|
+
</Modal>,
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
expect(getByLabelText("Auto-focused input")).toHaveFocus();
|
|
144
|
+
|
|
145
|
+
unmount();
|
|
146
|
+
expect(opener).toHaveFocus();
|
|
147
|
+
opener.remove();
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it("renders the footer only when it has content", () => {
|
|
151
|
+
const { queryByTestId, rerender } = render(
|
|
152
|
+
<Modal title="No Actions Modal">
|
|
153
|
+
<div>Modal content</div>
|
|
154
|
+
</Modal>,
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
expect(queryByTestId("modal-footer")).not.toBeInTheDocument();
|
|
158
|
+
|
|
159
|
+
rerender(
|
|
160
|
+
<Modal
|
|
161
|
+
title="Utility Action Modal"
|
|
162
|
+
leftFooterElement={<button type="button">Utility action</button>}
|
|
163
|
+
>
|
|
164
|
+
<div>Modal content</div>
|
|
165
|
+
</Modal>,
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
expect(queryByTestId("modal-footer")).toBeInTheDocument();
|
|
169
|
+
});
|
|
170
|
+
|
|
29
171
|
it("closes the modal when the close button is clicked", () => {
|
|
30
172
|
const onCloseMock: MockFunction = getJestMockFunction();
|
|
31
173
|
const onSubmit: MockFunction = getJestMockFunction();
|
|
@@ -72,7 +214,7 @@ describe("Modal", () => {
|
|
|
72
214
|
</Modal>,
|
|
73
215
|
);
|
|
74
216
|
|
|
75
|
-
expect(getByTestId("modal")).toHaveClass("md:max-w-lg");
|
|
217
|
+
expect(getByTestId("modal")).toHaveClass("sm:max-w-lg", "md:max-w-lg");
|
|
76
218
|
});
|
|
77
219
|
|
|
78
220
|
it("displays the modal with the correct width when modalWidth is set", () => {
|
|
@@ -88,7 +230,7 @@ describe("Modal", () => {
|
|
|
88
230
|
</Modal>,
|
|
89
231
|
);
|
|
90
232
|
|
|
91
|
-
expect(getByTestId("modal")).toHaveClass("md:max-w-3xl");
|
|
233
|
+
expect(getByTestId("modal")).toHaveClass("sm:max-w-3xl", "md:max-w-3xl");
|
|
92
234
|
});
|
|
93
235
|
|
|
94
236
|
it("displays the children passed to the modal", () => {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import TelemetrySearchBar from "../../../UI/Components/TelemetryViewer/components/TelemetrySearchBar";
|
|
2
|
+
import "@testing-library/jest-dom/extend-expect";
|
|
3
|
+
import { cleanup, fireEvent, render, screen } from "@testing-library/react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { afterEach, describe, expect, jest, test } from "@jest/globals";
|
|
6
|
+
|
|
7
|
+
describe("TelemetrySearchBar", () => {
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
cleanup();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test("shows the results loader inside the search box while loading", () => {
|
|
13
|
+
const { rerender } = render(
|
|
14
|
+
<TelemetrySearchBar
|
|
15
|
+
value="service:api"
|
|
16
|
+
onChange={jest.fn()}
|
|
17
|
+
onSubmit={jest.fn()}
|
|
18
|
+
isLoading={false}
|
|
19
|
+
/>,
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
expect(
|
|
23
|
+
screen.queryByRole("status", { name: "Loading results" }),
|
|
24
|
+
).toBeNull();
|
|
25
|
+
|
|
26
|
+
rerender(
|
|
27
|
+
<TelemetrySearchBar
|
|
28
|
+
value="service:api"
|
|
29
|
+
onChange={jest.fn()}
|
|
30
|
+
onSubmit={jest.fn()}
|
|
31
|
+
isLoading={true}
|
|
32
|
+
/>,
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const input: HTMLElement = screen.getByRole("textbox");
|
|
36
|
+
const loader: HTMLElement = screen.getByRole("status", {
|
|
37
|
+
name: "Loading results",
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
expect(input.parentElement?.contains(loader)).toBe(true);
|
|
41
|
+
expect(input.parentElement?.getAttribute("aria-busy")).toBe("true");
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test("Enter submits and keeps the token when onFieldValueSelect returns false", () => {
|
|
45
|
+
const onChange: (value: string) => void = jest.fn();
|
|
46
|
+
const onSubmit: () => void = jest.fn();
|
|
47
|
+
const onFieldValueSelect: (fieldKey: string, value: string) => boolean =
|
|
48
|
+
jest.fn((_fieldKey: string, _value: string): boolean => {
|
|
49
|
+
return false;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
render(
|
|
53
|
+
<TelemetrySearchBar
|
|
54
|
+
value="name:process"
|
|
55
|
+
onChange={onChange}
|
|
56
|
+
onSubmit={onSubmit}
|
|
57
|
+
onFieldValueSelect={onFieldValueSelect}
|
|
58
|
+
/>,
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
fireEvent.keyDown(screen.getByRole("textbox"), { key: "Enter" });
|
|
62
|
+
|
|
63
|
+
expect(onFieldValueSelect).toHaveBeenCalledWith("name", "process");
|
|
64
|
+
expect(onSubmit).toHaveBeenCalledTimes(1);
|
|
65
|
+
// The token must stay in the input — clearing it would drop the filter.
|
|
66
|
+
expect(onChange).not.toHaveBeenCalled();
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("Enter clears the token when onFieldValueSelect consumes it as a chip", () => {
|
|
70
|
+
const onChange: (value: string) => void = jest.fn();
|
|
71
|
+
const onSubmit: () => void = jest.fn();
|
|
72
|
+
const onFieldValueSelect: (fieldKey: string, value: string) => void =
|
|
73
|
+
jest.fn();
|
|
74
|
+
|
|
75
|
+
render(
|
|
76
|
+
<TelemetrySearchBar
|
|
77
|
+
value="@http.method:GET"
|
|
78
|
+
onChange={onChange}
|
|
79
|
+
onSubmit={onSubmit}
|
|
80
|
+
onFieldValueSelect={onFieldValueSelect}
|
|
81
|
+
/>,
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
fireEvent.keyDown(screen.getByRole("textbox"), { key: "Enter" });
|
|
85
|
+
|
|
86
|
+
expect(onFieldValueSelect).toHaveBeenCalledWith("http.method", "GET");
|
|
87
|
+
expect(onChange).toHaveBeenCalledWith("");
|
|
88
|
+
expect(onSubmit).not.toHaveBeenCalled();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, test } from "@jest/globals";
|
|
2
|
+
import ThemeUtil, { THEME_STORAGE_KEY, Theme } from "../../../UI/Utils/Theme";
|
|
3
|
+
|
|
4
|
+
const LIGHT_THEME_COLOR: string = "#f9fafb";
|
|
5
|
+
const DARK_THEME_COLOR: string = "#0f172a";
|
|
6
|
+
|
|
7
|
+
const getThemeColorMeta: () => HTMLMetaElement = (): HTMLMetaElement => {
|
|
8
|
+
const themeColor: HTMLMetaElement | null = document.querySelector(
|
|
9
|
+
'meta[name="theme-color"]:not([media])',
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
expect(themeColor).not.toBeNull();
|
|
13
|
+
return themeColor as HTMLMetaElement;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const dispatchStorageEvent: (
|
|
17
|
+
key: string | null,
|
|
18
|
+
newValue: string | null,
|
|
19
|
+
) => void = (key: string | null, newValue: string | null): void => {
|
|
20
|
+
window.dispatchEvent(
|
|
21
|
+
new StorageEvent("storage", {
|
|
22
|
+
key,
|
|
23
|
+
newValue,
|
|
24
|
+
storageArea: window.localStorage,
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const makeLocalStorageUnavailable: () => () => void = (): (() => void) => {
|
|
30
|
+
const descriptor: PropertyDescriptor | undefined =
|
|
31
|
+
Object.getOwnPropertyDescriptor(window, "localStorage");
|
|
32
|
+
|
|
33
|
+
if (!descriptor) {
|
|
34
|
+
throw new Error(
|
|
35
|
+
"Expected window.localStorage to have a property descriptor",
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
Object.defineProperty(window, "localStorage", {
|
|
40
|
+
configurable: true,
|
|
41
|
+
get: (): never => {
|
|
42
|
+
throw new Error("Storage is unavailable");
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return (): void => {
|
|
47
|
+
Object.defineProperty(window, "localStorage", descriptor);
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
describe("ThemeUtil", () => {
|
|
52
|
+
beforeEach(() => {
|
|
53
|
+
window.localStorage.clear();
|
|
54
|
+
|
|
55
|
+
const root: HTMLElement = document.documentElement;
|
|
56
|
+
root.removeAttribute("class");
|
|
57
|
+
root.removeAttribute("data-theme");
|
|
58
|
+
root.style.removeProperty("color-scheme");
|
|
59
|
+
|
|
60
|
+
document.head.innerHTML = [
|
|
61
|
+
'<meta name="theme-color" content="initial">',
|
|
62
|
+
'<meta name="theme-color" media="(prefers-color-scheme: dark)" content="media-theme">',
|
|
63
|
+
].join("");
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test("defaults to light when no preference has been saved", () => {
|
|
67
|
+
document.documentElement.classList.add(Theme.Dark);
|
|
68
|
+
|
|
69
|
+
expect(ThemeUtil.getStoredTheme()).toBe(Theme.Light);
|
|
70
|
+
|
|
71
|
+
ThemeUtil.initialize();
|
|
72
|
+
|
|
73
|
+
expect(ThemeUtil.getAppliedTheme()).toBe(Theme.Light);
|
|
74
|
+
expect(document.documentElement.classList.contains(Theme.Dark)).toBe(false);
|
|
75
|
+
expect(document.documentElement.dataset["theme"]).toBe(Theme.Light);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
test("restores an exactly persisted dark preference", () => {
|
|
79
|
+
window.localStorage.setItem(THEME_STORAGE_KEY, Theme.Dark);
|
|
80
|
+
|
|
81
|
+
expect(ThemeUtil.getStoredTheme()).toBe(Theme.Dark);
|
|
82
|
+
|
|
83
|
+
ThemeUtil.initialize();
|
|
84
|
+
|
|
85
|
+
expect(ThemeUtil.getAppliedTheme()).toBe(Theme.Dark);
|
|
86
|
+
expect(document.documentElement.classList.contains(Theme.Dark)).toBe(true);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
test.each([Theme.Light, "Dark", "DARK", " dark ", "invalid", ""])(
|
|
90
|
+
"treats the persisted value %p as light",
|
|
91
|
+
(persistedValue: string) => {
|
|
92
|
+
window.localStorage.setItem(THEME_STORAGE_KEY, persistedValue);
|
|
93
|
+
|
|
94
|
+
expect(ThemeUtil.getStoredTheme()).toBe(Theme.Light);
|
|
95
|
+
},
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
test("updates the root class, data attribute, color scheme, and theme-color meta", () => {
|
|
99
|
+
const mediaThemeColor: HTMLMetaElement = document.querySelector(
|
|
100
|
+
'meta[name="theme-color"][media]',
|
|
101
|
+
) as HTMLMetaElement;
|
|
102
|
+
|
|
103
|
+
ThemeUtil.setTheme(Theme.Dark);
|
|
104
|
+
|
|
105
|
+
expect(window.localStorage.getItem(THEME_STORAGE_KEY)).toBe(Theme.Dark);
|
|
106
|
+
expect(document.documentElement.classList.contains(Theme.Dark)).toBe(true);
|
|
107
|
+
expect(document.documentElement.dataset["theme"]).toBe(Theme.Dark);
|
|
108
|
+
expect(document.documentElement.style.colorScheme).toBe(Theme.Dark);
|
|
109
|
+
expect(getThemeColorMeta().getAttribute("content")).toBe(DARK_THEME_COLOR);
|
|
110
|
+
expect(mediaThemeColor.getAttribute("content")).toBe("media-theme");
|
|
111
|
+
|
|
112
|
+
ThemeUtil.setTheme(Theme.Light);
|
|
113
|
+
|
|
114
|
+
expect(window.localStorage.getItem(THEME_STORAGE_KEY)).toBe(Theme.Light);
|
|
115
|
+
expect(document.documentElement.classList.contains(Theme.Dark)).toBe(false);
|
|
116
|
+
expect(document.documentElement.dataset["theme"]).toBe(Theme.Light);
|
|
117
|
+
expect(document.documentElement.style.colorScheme).toBe(Theme.Light);
|
|
118
|
+
expect(getThemeColorMeta().getAttribute("content")).toBe(LIGHT_THEME_COLOR);
|
|
119
|
+
expect(mediaThemeColor.getAttribute("content")).toBe("media-theme");
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
test("falls back to light when reading storage fails", () => {
|
|
123
|
+
const restoreLocalStorage: () => void = makeLocalStorageUnavailable();
|
|
124
|
+
|
|
125
|
+
try {
|
|
126
|
+
expect(ThemeUtil.getStoredTheme()).toBe(Theme.Light);
|
|
127
|
+
} finally {
|
|
128
|
+
restoreLocalStorage();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
test("still applies the visual theme when writing storage fails", () => {
|
|
133
|
+
const restoreLocalStorage: () => void = makeLocalStorageUnavailable();
|
|
134
|
+
|
|
135
|
+
try {
|
|
136
|
+
expect(() => {
|
|
137
|
+
ThemeUtil.setTheme(Theme.Dark);
|
|
138
|
+
}).not.toThrow();
|
|
139
|
+
expect(ThemeUtil.getAppliedTheme()).toBe(Theme.Dark);
|
|
140
|
+
expect(document.documentElement.dataset["theme"]).toBe(Theme.Dark);
|
|
141
|
+
} finally {
|
|
142
|
+
restoreLocalStorage();
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test("synchronizes dark and cleared preferences from other tabs", () => {
|
|
147
|
+
ThemeUtil.initialize();
|
|
148
|
+
|
|
149
|
+
dispatchStorageEvent(THEME_STORAGE_KEY, Theme.Dark);
|
|
150
|
+
expect(ThemeUtil.getAppliedTheme()).toBe(Theme.Dark);
|
|
151
|
+
|
|
152
|
+
dispatchStorageEvent(THEME_STORAGE_KEY, null);
|
|
153
|
+
expect(ThemeUtil.getAppliedTheme()).toBe(Theme.Light);
|
|
154
|
+
|
|
155
|
+
dispatchStorageEvent(THEME_STORAGE_KEY, Theme.Dark);
|
|
156
|
+
expect(ThemeUtil.getAppliedTheme()).toBe(Theme.Dark);
|
|
157
|
+
|
|
158
|
+
dispatchStorageEvent(null, null);
|
|
159
|
+
expect(ThemeUtil.getAppliedTheme()).toBe(Theme.Light);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import LatencyMatrixUtil from "../../../Utils/Monitor/LatencyMatrixUtil";
|
|
2
|
+
import LatencyMatrix, {
|
|
3
|
+
LatencyMatrixCell,
|
|
4
|
+
} from "../../../Types/Monitor/LatencyMatrix";
|
|
5
|
+
|
|
6
|
+
describe("LatencyMatrixUtil.buildMatrix", () => {
|
|
7
|
+
const now: Date = new Date("2026-07-11T12:00:00Z");
|
|
8
|
+
|
|
9
|
+
it("builds a dense grid seeded with no-data cells", () => {
|
|
10
|
+
const matrix: LatencyMatrix = LatencyMatrixUtil.buildMatrix({
|
|
11
|
+
monitors: [{ id: "m1", name: "Ping A" }],
|
|
12
|
+
probes: [
|
|
13
|
+
{ id: "p1", name: "US East" },
|
|
14
|
+
{ id: "p2", name: "EU West" },
|
|
15
|
+
],
|
|
16
|
+
results: [],
|
|
17
|
+
now,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
expect(matrix.monitors).toHaveLength(1);
|
|
21
|
+
expect(matrix.probes).toHaveLength(2);
|
|
22
|
+
expect(matrix.cells["m1"]!["p1"]!.hasData).toBe(false);
|
|
23
|
+
expect(matrix.cells["m1"]!["p2"]!.hasData).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("fills latency, online state, and age from the latest step", () => {
|
|
27
|
+
const matrix: LatencyMatrix = LatencyMatrixUtil.buildMatrix({
|
|
28
|
+
monitors: [{ id: "m1", name: "Ping A" }],
|
|
29
|
+
probes: [{ id: "p1", name: "US East" }],
|
|
30
|
+
results: [
|
|
31
|
+
{
|
|
32
|
+
monitorId: "m1",
|
|
33
|
+
probeId: "p1",
|
|
34
|
+
lastMonitoringLog: {
|
|
35
|
+
step1: {
|
|
36
|
+
responseTimeInMs: 42,
|
|
37
|
+
isOnline: true,
|
|
38
|
+
monitoredAt: "2026-07-11T11:59:00Z",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
now,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const cell: LatencyMatrixCell = matrix.cells["m1"]!["p1"]!;
|
|
47
|
+
expect(cell.hasData).toBe(true);
|
|
48
|
+
expect(cell.latencyInMs).toBe(42);
|
|
49
|
+
expect(cell.isOnline).toBe(true);
|
|
50
|
+
expect(cell.ageInSeconds).toBe(60);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("picks the most recently monitored step across multiple steps", () => {
|
|
54
|
+
const matrix: LatencyMatrix = LatencyMatrixUtil.buildMatrix({
|
|
55
|
+
monitors: [{ id: "m1", name: "Ping A" }],
|
|
56
|
+
probes: [{ id: "p1", name: "US East" }],
|
|
57
|
+
results: [
|
|
58
|
+
{
|
|
59
|
+
monitorId: "m1",
|
|
60
|
+
probeId: "p1",
|
|
61
|
+
lastMonitoringLog: {
|
|
62
|
+
older: {
|
|
63
|
+
responseTimeInMs: 100,
|
|
64
|
+
isOnline: true,
|
|
65
|
+
monitoredAt: "2026-07-11T10:00:00Z",
|
|
66
|
+
},
|
|
67
|
+
newer: {
|
|
68
|
+
responseTimeInMs: 25,
|
|
69
|
+
isOnline: true,
|
|
70
|
+
monitoredAt: "2026-07-11T11:59:30Z",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
now,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
expect(matrix.cells["m1"]!["p1"]!.latencyInMs).toBe(25);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("ignores results for unknown monitor/probe pairs", () => {
|
|
82
|
+
const matrix: LatencyMatrix = LatencyMatrixUtil.buildMatrix({
|
|
83
|
+
monitors: [{ id: "m1", name: "Ping A" }],
|
|
84
|
+
probes: [{ id: "p1", name: "US East" }],
|
|
85
|
+
results: [
|
|
86
|
+
{
|
|
87
|
+
monitorId: "ghost",
|
|
88
|
+
probeId: "p1",
|
|
89
|
+
lastMonitoringLog: {
|
|
90
|
+
step1: { responseTimeInMs: 5, monitoredAt: now.toISOString() },
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
now,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
expect(matrix.cells["m1"]!["p1"]!.hasData).toBe(false);
|
|
98
|
+
expect(matrix.cells["ghost"]).toBeUndefined();
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("treats an empty log as no data", () => {
|
|
102
|
+
const matrix: LatencyMatrix = LatencyMatrixUtil.buildMatrix({
|
|
103
|
+
monitors: [{ id: "m1", name: "Ping A" }],
|
|
104
|
+
probes: [{ id: "p1", name: "US East" }],
|
|
105
|
+
results: [{ monitorId: "m1", probeId: "p1", lastMonitoringLog: {} }],
|
|
106
|
+
now,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
expect(matrix.cells["m1"]!["p1"]!.hasData).toBe(false);
|
|
110
|
+
});
|
|
111
|
+
});
|
package/Types/AI/AIRunStatus.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
enum AIRunStatus {
|
|
2
|
+
/*
|
|
3
|
+
* Durable intent: the run has been recorded but no worker has claimed it
|
|
4
|
+
* yet. Queued runs survive pod restarts — the enqueueing pod tries to
|
|
5
|
+
* process immediately, and the queue poller picks up whatever is left
|
|
6
|
+
* (claims are CAS-guarded, so double-processing is impossible). Not
|
|
7
|
+
* terminal, not consuming compute; the queue's own TTL expires runs that
|
|
8
|
+
* sit here too long to still be useful.
|
|
9
|
+
*/
|
|
10
|
+
Queued = "Queued",
|
|
2
11
|
Running = "Running",
|
|
3
12
|
/*
|
|
4
13
|
* The run paused mid-turn to wait for the user to approve pending tool
|
|
@@ -16,4 +16,16 @@ export default interface AggregateBy<TBaseModel extends GenericObject> {
|
|
|
16
16
|
skip: number;
|
|
17
17
|
sort?: Sort<TBaseModel> | undefined;
|
|
18
18
|
groupBy?: GroupBy<TBaseModel> | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* OpenTelemetry attribute keys (e.g. "service.name") to group the
|
|
21
|
+
* aggregation by. Grouping happens on the individual map entries —
|
|
22
|
+
* `attributes['service.name']` — so all rows sharing the selected
|
|
23
|
+
* key values are pooled into one series per bucket. This is distinct
|
|
24
|
+
* from `groupBy: { attributes: true }`, which groups by the ENTIRE
|
|
25
|
+
* attribute map and therefore fragments the result into one series
|
|
26
|
+
* per unique attribute combination. Only supported by models with an
|
|
27
|
+
* `attributes` map column (currently Metric); result rows carry an
|
|
28
|
+
* `attributes` object containing exactly these keys.
|
|
29
|
+
*/
|
|
30
|
+
groupByAttributeKeys?: Array<string> | undefined;
|
|
19
31
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import ObjectID from "../../ObjectID";
|
|
2
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
3
|
+
import DashboardChartType from "../Chart/ChartType";
|
|
4
|
+
import BaseComponent from "./DashboardBaseComponent";
|
|
5
|
+
|
|
6
|
+
export default interface DashboardLogChartComponent extends BaseComponent {
|
|
7
|
+
componentType: DashboardComponentType.LogChart;
|
|
8
|
+
componentId: ObjectID;
|
|
9
|
+
arguments: {
|
|
10
|
+
title?: string | undefined;
|
|
11
|
+
chartType?: DashboardChartType | undefined;
|
|
12
|
+
severityFilters?: Array<string> | undefined;
|
|
13
|
+
bodyContains?: string | undefined;
|
|
14
|
+
/*
|
|
15
|
+
* Exact attribute matches stored by the structured key/value editor.
|
|
16
|
+
*/
|
|
17
|
+
attributeFilters?: Record<string, string | number | boolean> | undefined;
|
|
18
|
+
/*
|
|
19
|
+
* Legacy log-search syntax retained as a read-only fallback for widgets
|
|
20
|
+
* saved before the structured attribute editor was introduced.
|
|
21
|
+
*/
|
|
22
|
+
attributeFilterQuery?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -192,7 +192,15 @@ function buildMetricQueryConfig(config: MetricConfig): Record<string, unknown> {
|
|
|
192
192
|
metricName: config.metricName,
|
|
193
193
|
aggegationType: config.aggregationType,
|
|
194
194
|
},
|
|
195
|
-
|
|
195
|
+
/*
|
|
196
|
+
* groupByAttributeKeys alone drives per-series grouping — the
|
|
197
|
+
* fetch layer compiles it to `GROUP BY attributes['<key>']`.
|
|
198
|
+
* Baking a whole-map `groupBy: { attributes: true }` alongside
|
|
199
|
+
* it (the old approach) fragmented results into one series per
|
|
200
|
+
* unique attribute combination; older stored configs that still
|
|
201
|
+
* carry it are stripped at fetch time (MetricUtil.fetchResults).
|
|
202
|
+
*/
|
|
203
|
+
groupBy: undefined,
|
|
196
204
|
groupByAttributeKeys: config.groupByAttributeKeys,
|
|
197
205
|
},
|
|
198
206
|
transformAsRate: config.transformAsRate,
|
package/Types/LlmLogStatus.ts
CHANGED
|
@@ -3,6 +3,8 @@ import MetricCriteriaContext from "./MetricMonitor/MetricCriteriaContext";
|
|
|
3
3
|
|
|
4
4
|
export enum CheckOn {
|
|
5
5
|
ResponseTime = "Response Time (in ms)",
|
|
6
|
+
PacketLossPercent = "Packet Loss (in %)",
|
|
7
|
+
Jitter = "Jitter (in ms)",
|
|
6
8
|
ResponseStatusCode = "Response Status Code",
|
|
7
9
|
ResponseHeader = "Response Header",
|
|
8
10
|
ResponseHeaderValue = "Response Header Value",
|
|
@@ -69,6 +71,10 @@ export enum CheckOn {
|
|
|
69
71
|
SnmpOidExists = "SNMP OID Exists",
|
|
70
72
|
SnmpResponseTime = "SNMP Response Time (in ms)",
|
|
71
73
|
SnmpIsOnline = "SNMP Device Is Online",
|
|
74
|
+
SnmpInterfaceIsDown = "SNMP Interface Is Down",
|
|
75
|
+
SnmpTrapReceived = "SNMP Trap Received (Trap OID)",
|
|
76
|
+
SnmpInterfaceUtilizationPercent = "SNMP Interface Utilization (in %)",
|
|
77
|
+
SnmpInterfaceErrorsPerSecond = "SNMP Interface Errors (per second)",
|
|
72
78
|
|
|
73
79
|
// DNS monitors.
|
|
74
80
|
DnsResponseTime = "DNS Response Time (in ms)",
|
|
@@ -285,6 +291,7 @@ export class CriteriaFilterUtil {
|
|
|
285
291
|
if (
|
|
286
292
|
checkOn === CheckOn.IsOnline ||
|
|
287
293
|
checkOn === CheckOn.SnmpIsOnline ||
|
|
294
|
+
checkOn === CheckOn.SnmpInterfaceIsDown ||
|
|
288
295
|
checkOn === CheckOn.DnsIsOnline ||
|
|
289
296
|
checkOn === CheckOn.DomainIsExpired ||
|
|
290
297
|
checkOn === CheckOn.DnssecChainValid ||
|
|
@@ -374,6 +381,8 @@ export class CriteriaFilterUtil {
|
|
|
374
381
|
return (
|
|
375
382
|
checkOn === CheckOn.ResponseStatusCode ||
|
|
376
383
|
checkOn === CheckOn.ResponseTime ||
|
|
384
|
+
checkOn === CheckOn.PacketLossPercent ||
|
|
385
|
+
checkOn === CheckOn.Jitter ||
|
|
377
386
|
checkOn === CheckOn.DiskUsagePercent ||
|
|
378
387
|
checkOn === CheckOn.CPUUsagePercent ||
|
|
379
388
|
checkOn === CheckOn.MemoryUsagePercent ||
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Per-phase breakdown of an HTTP(S) check, all in milliseconds. Captured by
|
|
3
|
+
* the probe from socket events on the initial connection of the request.
|
|
4
|
+
* Every field is optional: phases are absent when they don't apply (no TLS
|
|
5
|
+
* on plain HTTP, no DNS lookup when the target is an IP address) or when the
|
|
6
|
+
* request went through a proxy, where per-phase timing would be misleading.
|
|
7
|
+
* When the check follows redirects, the phases describe the first connection
|
|
8
|
+
* and the download phase absorbs the rest of the exchange.
|
|
9
|
+
*/
|
|
10
|
+
export default interface HttpPhaseTimings {
|
|
11
|
+
dnsLookupInMs?: number | undefined;
|
|
12
|
+
tcpConnectInMs?: number | undefined;
|
|
13
|
+
tlsHandshakeInMs?: number | undefined;
|
|
14
|
+
timeToFirstByteInMs?: number | undefined;
|
|
15
|
+
downloadInMs?: number | undefined;
|
|
16
|
+
}
|