@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties, FunctionComponent, ReactElement } from "react";
|
|
2
2
|
import LabelModel from "../../../Models/DatabaseModels/Label";
|
|
3
3
|
import Pill, { ComponentProps as PillProps, PillSize } from "../Pill/Pill";
|
|
4
|
-
import {
|
|
4
|
+
import { Gray500 } from "../../../Types/BrandColors";
|
|
5
5
|
import Color from "../../../Types/Color";
|
|
6
6
|
import IconProp from "../../../Types/Icon/IconProp";
|
|
7
7
|
|
|
@@ -19,7 +19,7 @@ const LabelElement: FunctionComponent<ComponentProps> = (
|
|
|
19
19
|
|
|
20
20
|
const resolveColor: Color = (() => {
|
|
21
21
|
if (!label.color) {
|
|
22
|
-
return
|
|
22
|
+
return Gray500;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
if (typeof label.color === "string") {
|
|
@@ -654,21 +654,27 @@ const LogsAnalyticsView: FunctionComponent<LogsAnalyticsViewProps> = (
|
|
|
654
654
|
</defs>
|
|
655
655
|
<CartesianGrid
|
|
656
656
|
strokeDasharray="none"
|
|
657
|
-
stroke="#f1f5f9"
|
|
657
|
+
stroke="var(--ou-chart-grid, #f1f5f9)"
|
|
658
658
|
vertical={false}
|
|
659
659
|
/>
|
|
660
660
|
<XAxis
|
|
661
661
|
dataKey="time"
|
|
662
662
|
tickFormatter={formatTickTime}
|
|
663
|
-
tick={{
|
|
664
|
-
|
|
663
|
+
tick={{
|
|
664
|
+
fontSize: 11,
|
|
665
|
+
fill: "var(--ou-chart-tick, #94a3b8)",
|
|
666
|
+
}}
|
|
667
|
+
axisLine={{ stroke: "var(--ou-chart-grid, #e2e8f0)" }}
|
|
665
668
|
tickLine={false}
|
|
666
669
|
minTickGap={50}
|
|
667
670
|
interval="preserveStartEnd"
|
|
668
671
|
dy={8}
|
|
669
672
|
/>
|
|
670
673
|
<YAxis
|
|
671
|
-
tick={{
|
|
674
|
+
tick={{
|
|
675
|
+
fontSize: 11,
|
|
676
|
+
fill: "var(--ou-chart-tick, #94a3b8)",
|
|
677
|
+
}}
|
|
672
678
|
axisLine={false}
|
|
673
679
|
tickLine={false}
|
|
674
680
|
width={52}
|
|
@@ -678,7 +684,7 @@ const LogsAnalyticsView: FunctionComponent<LogsAnalyticsViewProps> = (
|
|
|
678
684
|
<Tooltip
|
|
679
685
|
content={<AnalyticsTooltip />}
|
|
680
686
|
cursor={{
|
|
681
|
-
stroke: "#c7d2fe",
|
|
687
|
+
stroke: "var(--ou-accent-muted, #c7d2fe)",
|
|
682
688
|
strokeWidth: 1,
|
|
683
689
|
strokeDasharray: "4 4",
|
|
684
690
|
}}
|
|
@@ -692,7 +698,7 @@ const LogsAnalyticsView: FunctionComponent<LogsAnalyticsViewProps> = (
|
|
|
692
698
|
activeDot={{
|
|
693
699
|
r: 4,
|
|
694
700
|
fill: CHART_COLORS[0]!,
|
|
695
|
-
stroke: "#
|
|
701
|
+
stroke: "var(--ou-chart-marker-ring, #ffffff)",
|
|
696
702
|
strokeWidth: 2,
|
|
697
703
|
}}
|
|
698
704
|
isAnimationActive={false}
|
|
@@ -707,21 +713,27 @@ const LogsAnalyticsView: FunctionComponent<LogsAnalyticsViewProps> = (
|
|
|
707
713
|
>
|
|
708
714
|
<CartesianGrid
|
|
709
715
|
strokeDasharray="none"
|
|
710
|
-
stroke="#f1f5f9"
|
|
716
|
+
stroke="var(--ou-chart-grid, #f1f5f9)"
|
|
711
717
|
vertical={false}
|
|
712
718
|
/>
|
|
713
719
|
<XAxis
|
|
714
720
|
dataKey="time"
|
|
715
721
|
tickFormatter={formatTickTime}
|
|
716
|
-
tick={{
|
|
717
|
-
|
|
722
|
+
tick={{
|
|
723
|
+
fontSize: 11,
|
|
724
|
+
fill: "var(--ou-chart-tick, #94a3b8)",
|
|
725
|
+
}}
|
|
726
|
+
axisLine={{ stroke: "var(--ou-chart-grid, #e2e8f0)" }}
|
|
718
727
|
tickLine={false}
|
|
719
728
|
minTickGap={50}
|
|
720
729
|
interval="preserveStartEnd"
|
|
721
730
|
dy={8}
|
|
722
731
|
/>
|
|
723
732
|
<YAxis
|
|
724
|
-
tick={{
|
|
733
|
+
tick={{
|
|
734
|
+
fontSize: 11,
|
|
735
|
+
fill: "var(--ou-chart-tick, #94a3b8)",
|
|
736
|
+
}}
|
|
725
737
|
axisLine={false}
|
|
726
738
|
tickLine={false}
|
|
727
739
|
width={52}
|
|
@@ -216,15 +216,21 @@ const LogsHistogram: FunctionComponent<LogsHistogramProps> = (
|
|
|
216
216
|
<XAxis
|
|
217
217
|
dataKey="time"
|
|
218
218
|
tickFormatter={formatTickTime}
|
|
219
|
-
tick={{
|
|
220
|
-
|
|
219
|
+
tick={{
|
|
220
|
+
fontSize: 10,
|
|
221
|
+
fill: "var(--ou-chart-tick, #9ca3af)",
|
|
222
|
+
}}
|
|
223
|
+
axisLine={{ stroke: "var(--ou-chart-grid, #e5e7eb)" }}
|
|
221
224
|
tickLine={false}
|
|
222
225
|
minTickGap={40}
|
|
223
226
|
dy={4}
|
|
224
227
|
interval="preserveStartEnd"
|
|
225
228
|
/>
|
|
226
229
|
<YAxis
|
|
227
|
-
tick={{
|
|
230
|
+
tick={{
|
|
231
|
+
fontSize: 10,
|
|
232
|
+
fill: "var(--ou-chart-tick, #9ca3af)",
|
|
233
|
+
}}
|
|
228
234
|
axisLine={false}
|
|
229
235
|
tickLine={false}
|
|
230
236
|
width={48}
|
|
@@ -901,17 +901,17 @@ const MarkdownEditor: FunctionComponent<ComponentProps> = (
|
|
|
901
901
|
.oneuptime-wysiwyg ol { list-style-type: decimal; }
|
|
902
902
|
.oneuptime-wysiwyg ul.task-list, .oneuptime-wysiwyg ul.task-list li { list-style: none; margin-left: 0; }
|
|
903
903
|
.oneuptime-wysiwyg ul.task-list li { padding-left: 0; }
|
|
904
|
-
.oneuptime-wysiwyg blockquote { border-left: 3px solid #d1d5db; padding-left: 0.75rem; color: #4b5563; margin: 0.5rem 0; }
|
|
905
|
-
.oneuptime-wysiwyg pre { background: #f3f4f6; border-radius: 0.375rem; padding: 0.75rem; overflow-x: auto; margin: 0.5rem 0; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.85rem; }
|
|
906
|
-
.oneuptime-wysiwyg code { background: #f3f4f6; padding: 0 0.25rem; border-radius: 0.25rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.85em; }
|
|
904
|
+
.oneuptime-wysiwyg blockquote { border-left: 3px solid var(--ou-border-strong, #d1d5db); padding-left: 0.75rem; color: var(--ou-text-secondary, #4b5563); margin: 0.5rem 0; }
|
|
905
|
+
.oneuptime-wysiwyg pre { background: var(--ou-surface-tertiary, #f3f4f6); border-radius: 0.375rem; padding: 0.75rem; overflow-x: auto; margin: 0.5rem 0; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.85rem; }
|
|
906
|
+
.oneuptime-wysiwyg code { background: var(--ou-surface-tertiary, #f3f4f6); padding: 0 0.25rem; border-radius: 0.25rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.85em; }
|
|
907
907
|
.oneuptime-wysiwyg pre code { background: transparent; padding: 0; }
|
|
908
|
-
.oneuptime-wysiwyg a { color: #4f46e5; text-decoration: underline; }
|
|
909
|
-
.oneuptime-wysiwyg hr { margin: 1rem 0; border: 0; border-top: 1px solid #e5e7eb; }
|
|
908
|
+
.oneuptime-wysiwyg a { color: var(--ou-link, #4f46e5); text-decoration: underline; }
|
|
909
|
+
.oneuptime-wysiwyg hr { margin: 1rem 0; border: 0; border-top: 1px solid var(--ou-border-default, #e5e7eb); }
|
|
910
910
|
.oneuptime-wysiwyg table { border-collapse: collapse; margin: 0.5rem 0; }
|
|
911
|
-
.oneuptime-wysiwyg th, .oneuptime-wysiwyg td { border: 1px solid #e5e7eb; padding: 0.25rem 0.5rem; }
|
|
912
|
-
.oneuptime-wysiwyg th { background: #f9fafb; font-weight: 600; }
|
|
911
|
+
.oneuptime-wysiwyg th, .oneuptime-wysiwyg td { border: 1px solid var(--ou-border-default, #e5e7eb); padding: 0.25rem 0.5rem; }
|
|
912
|
+
.oneuptime-wysiwyg th { background: var(--ou-surface-secondary, #f9fafb); font-weight: 600; }
|
|
913
913
|
.oneuptime-wysiwyg img { max-width: 100%; height: auto; }
|
|
914
|
-
.oneuptime-wysiwyg:empty::before { content: attr(data-placeholder); color: #9ca3af; pointer-events: none; }
|
|
914
|
+
.oneuptime-wysiwyg:empty::before { content: attr(data-placeholder); color: var(--ou-text-subtle, #9ca3af); pointer-events: none; }
|
|
915
915
|
`}</style>
|
|
916
916
|
|
|
917
917
|
{/* Toolbar */}
|
|
@@ -70,6 +70,7 @@ SyntaxHighlighter.registerLanguage("http", http);
|
|
|
70
70
|
import mermaid from "mermaid";
|
|
71
71
|
import DOMPurify from "dompurify";
|
|
72
72
|
import OneUptimeDate from "../../../Types/Date";
|
|
73
|
+
import { Theme, useTheme } from "../../Utils/Theme";
|
|
73
74
|
|
|
74
75
|
/*
|
|
75
76
|
* ISO 8601 timestamps produced by OneUptimeDate.toString() — the
|
|
@@ -80,22 +81,37 @@ import OneUptimeDate from "../../../Types/Date";
|
|
|
80
81
|
const ISO_8601_REGEX: RegExp =
|
|
81
82
|
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?Z$/;
|
|
82
83
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
84
|
+
const initializeMermaid: (theme: Theme) => void = (theme: Theme): void => {
|
|
85
|
+
const isDark: boolean = theme === Theme.Dark;
|
|
86
|
+
|
|
87
|
+
mermaid.initialize({
|
|
88
|
+
startOnLoad: false,
|
|
89
|
+
theme: isDark ? "dark" : "default",
|
|
90
|
+
securityLevel: "strict",
|
|
91
|
+
fontFamily: "inherit",
|
|
92
|
+
themeVariables: isDark
|
|
93
|
+
? {
|
|
94
|
+
background: "#111827",
|
|
95
|
+
primaryColor: "#1e3a5f",
|
|
96
|
+
primaryTextColor: "#f8fafc",
|
|
97
|
+
primaryBorderColor: "#38bdf8",
|
|
98
|
+
lineColor: "#94a3b8",
|
|
99
|
+
secondaryColor: "#1e293b",
|
|
100
|
+
tertiaryColor: "#0f172a",
|
|
101
|
+
}
|
|
102
|
+
: {
|
|
103
|
+
background: "#ffffff",
|
|
104
|
+
primaryColor: "#e0f2fe",
|
|
105
|
+
primaryTextColor: "#1e293b",
|
|
106
|
+
primaryBorderColor: "#0ea5e9",
|
|
107
|
+
lineColor: "#64748b",
|
|
108
|
+
secondaryColor: "#f1f5f9",
|
|
109
|
+
tertiaryColor: "#ffffff",
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
initializeMermaid(Theme.Light);
|
|
99
115
|
|
|
100
116
|
// Mermaid diagram component
|
|
101
117
|
const MermaidDiagram: FunctionComponent<{ chart: string }> = ({
|
|
@@ -105,22 +121,26 @@ const MermaidDiagram: FunctionComponent<{ chart: string }> = ({
|
|
|
105
121
|
}) => {
|
|
106
122
|
const containerRef: React.RefObject<HTMLDivElement> =
|
|
107
123
|
useRef<HTMLDivElement>(null);
|
|
124
|
+
const theme: Theme = useTheme();
|
|
108
125
|
|
|
109
126
|
useEffect(() => {
|
|
127
|
+
let isCancelled: boolean = false;
|
|
128
|
+
|
|
110
129
|
const renderDiagram: () => Promise<void> = async (): Promise<void> => {
|
|
111
130
|
if (containerRef.current) {
|
|
112
131
|
containerRef.current.innerHTML = "";
|
|
113
132
|
try {
|
|
133
|
+
initializeMermaid(theme);
|
|
114
134
|
const id: string = `mermaid-${Math.random().toString(36).substr(2, 9)}`;
|
|
115
135
|
const { svg } = await mermaid.render(id, chart);
|
|
116
|
-
if (containerRef.current) {
|
|
136
|
+
if (containerRef.current && !isCancelled) {
|
|
117
137
|
containerRef.current.innerHTML = DOMPurify.sanitize(svg, {
|
|
118
138
|
USE_PROFILES: { svg: true, svgFilters: true },
|
|
119
139
|
ADD_TAGS: ["foreignObject"],
|
|
120
140
|
});
|
|
121
141
|
}
|
|
122
142
|
} catch (error) {
|
|
123
|
-
if (containerRef.current) {
|
|
143
|
+
if (containerRef.current && !isCancelled) {
|
|
124
144
|
const errorMessage: string = String(error);
|
|
125
145
|
const errorEl: HTMLPreElement = document.createElement("pre");
|
|
126
146
|
errorEl.className = "text-red-500";
|
|
@@ -131,8 +151,12 @@ const MermaidDiagram: FunctionComponent<{ chart: string }> = ({
|
|
|
131
151
|
}
|
|
132
152
|
}
|
|
133
153
|
};
|
|
134
|
-
renderDiagram();
|
|
135
|
-
|
|
154
|
+
void renderDiagram();
|
|
155
|
+
|
|
156
|
+
return (): void => {
|
|
157
|
+
isCancelled = true;
|
|
158
|
+
};
|
|
159
|
+
}, [chart, theme]);
|
|
136
160
|
|
|
137
161
|
return (
|
|
138
162
|
<div
|
|
@@ -48,7 +48,7 @@ const ConfirmModal: FunctionComponent<ComponentProps> = (
|
|
|
48
48
|
>
|
|
49
49
|
<div
|
|
50
50
|
data-testid="confirm-modal-description"
|
|
51
|
-
className="
|
|
51
|
+
className="max-h-96 overflow-y-auto whitespace-pre-wrap break-words pr-1 text-sm leading-6 text-gray-600"
|
|
52
52
|
>
|
|
53
53
|
{translatedDescription}
|
|
54
54
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ButtonStyleType } from "../Button/Button";
|
|
2
2
|
import ButtonType from "../Button/ButtonTypes";
|
|
3
3
|
import Icon, { IconType, SizeProp, ThickProp } from "../Icon/Icon";
|
|
4
4
|
import Loader, { LoaderType } from "../Loader/Loader";
|
|
@@ -11,6 +11,7 @@ import React, {
|
|
|
11
11
|
FunctionComponent,
|
|
12
12
|
ReactElement,
|
|
13
13
|
useEffect,
|
|
14
|
+
useId,
|
|
14
15
|
useRef,
|
|
15
16
|
} from "react";
|
|
16
17
|
|
|
@@ -56,162 +57,253 @@ const Modal: FunctionComponent<ComponentProps> = (
|
|
|
56
57
|
const translatedCloseButtonText: string | undefined = translateString(
|
|
57
58
|
props.closeButtonText,
|
|
58
59
|
);
|
|
60
|
+
const translatedCloseLabel: string = translateString("Close") || "Close";
|
|
59
61
|
const modalRef: React.RefObject<HTMLDivElement> =
|
|
60
62
|
useRef<HTMLDivElement>(null);
|
|
63
|
+
const previouslyFocusedElementRef: React.MutableRefObject<HTMLElement | null> =
|
|
64
|
+
useRef<HTMLElement | null>(
|
|
65
|
+
typeof document !== "undefined" &&
|
|
66
|
+
document.activeElement instanceof HTMLElement
|
|
67
|
+
? document.activeElement
|
|
68
|
+
: null,
|
|
69
|
+
);
|
|
70
|
+
const onCloseRef: React.MutableRefObject<(() => void) | undefined> = useRef<
|
|
71
|
+
(() => void) | undefined
|
|
72
|
+
>(props.onClose);
|
|
73
|
+
const titleId: string = useId();
|
|
74
|
+
const descriptionId: string = useId();
|
|
61
75
|
|
|
62
|
-
// Handle Escape key to close modal
|
|
63
76
|
useEffect(() => {
|
|
64
|
-
|
|
77
|
+
onCloseRef.current = props.onClose;
|
|
78
|
+
}, [props.onClose]);
|
|
79
|
+
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
const modal: HTMLDivElement | null = modalRef.current;
|
|
82
|
+
if (!modal) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const getFocusableElements: () => Array<HTMLElement> =
|
|
87
|
+
(): Array<HTMLElement> => {
|
|
88
|
+
return Array.from(
|
|
89
|
+
modal.querySelectorAll<HTMLElement>(
|
|
90
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',
|
|
91
|
+
),
|
|
92
|
+
).filter((element: HTMLElement) => {
|
|
93
|
+
return (
|
|
94
|
+
!element.hasAttribute("disabled") &&
|
|
95
|
+
element.getAttribute("aria-hidden") !== "true"
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const isTopmostDialog: () => boolean = (): boolean => {
|
|
101
|
+
const openDialogs: Array<Element> = Array.from(
|
|
102
|
+
document.querySelectorAll('[role="dialog"][aria-modal="true"]'),
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
return openDialogs[openDialogs.length - 1] === modal;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const initialFocusElement: HTMLElement | undefined =
|
|
109
|
+
getFocusableElements().find((element: HTMLElement) => {
|
|
110
|
+
return element.getAttribute("data-testid") !== "close-button";
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
if (isTopmostDialog()) {
|
|
114
|
+
(initialFocusElement || modal).focus();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const handleKeyDown: (event: KeyboardEvent) => void = (
|
|
65
118
|
event: KeyboardEvent,
|
|
66
119
|
): void => {
|
|
67
|
-
if (event.
|
|
68
|
-
|
|
120
|
+
if (event.defaultPrevented || !isTopmostDialog()) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (event.key === "Escape" && onCloseRef.current) {
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
onCloseRef.current();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (event.key !== "Tab") {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const focusableElements: Array<HTMLElement> = getFocusableElements();
|
|
135
|
+
|
|
136
|
+
if (focusableElements.length === 0) {
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
modal.focus();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const firstFocusableElement: HTMLElement = focusableElements[0]!;
|
|
143
|
+
const lastFocusableElement: HTMLElement =
|
|
144
|
+
focusableElements[focusableElements.length - 1]!;
|
|
145
|
+
const activeElement: Element | null = document.activeElement;
|
|
146
|
+
|
|
147
|
+
if (
|
|
148
|
+
event.shiftKey &&
|
|
149
|
+
(activeElement === firstFocusableElement ||
|
|
150
|
+
!modal.contains(activeElement))
|
|
151
|
+
) {
|
|
152
|
+
event.preventDefault();
|
|
153
|
+
lastFocusableElement.focus();
|
|
154
|
+
} else if (
|
|
155
|
+
!event.shiftKey &&
|
|
156
|
+
(activeElement === lastFocusableElement ||
|
|
157
|
+
!modal.contains(activeElement))
|
|
158
|
+
) {
|
|
159
|
+
event.preventDefault();
|
|
160
|
+
firstFocusableElement.focus();
|
|
69
161
|
}
|
|
70
162
|
};
|
|
71
163
|
|
|
72
|
-
document.addEventListener("keydown",
|
|
164
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
165
|
+
|
|
73
166
|
return () => {
|
|
74
|
-
document.removeEventListener("keydown",
|
|
75
|
-
};
|
|
76
|
-
}, [props.onClose]);
|
|
167
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
77
168
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const modal: HTMLDivElement | null = modalRef.current;
|
|
81
|
-
if (modal) {
|
|
82
|
-
// Focus the first focusable element in the modal, excluding the close button
|
|
83
|
-
const focusableElements: NodeListOf<Element> = modal.querySelectorAll(
|
|
84
|
-
'button:not([data-testid="close-button"]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',
|
|
85
|
-
);
|
|
86
|
-
const firstFocusable: HTMLElement | undefined = focusableElements[0] as
|
|
87
|
-
| HTMLElement
|
|
88
|
-
| undefined;
|
|
89
|
-
if (firstFocusable) {
|
|
90
|
-
firstFocusable.focus();
|
|
169
|
+
if (previouslyFocusedElementRef.current?.isConnected) {
|
|
170
|
+
previouslyFocusedElementRef.current.focus();
|
|
91
171
|
}
|
|
92
|
-
}
|
|
172
|
+
};
|
|
93
173
|
}, []);
|
|
94
174
|
|
|
95
|
-
let iconBgColor: string = "bg-indigo-
|
|
175
|
+
let iconBgColor: string = "bg-indigo-50";
|
|
96
176
|
let iconColor: string = "text-indigo-600";
|
|
177
|
+
let iconRingColor: string = "ring-indigo-100";
|
|
97
178
|
|
|
98
179
|
if (props.iconType === IconType.Info) {
|
|
99
|
-
iconBgColor = "bg-indigo-
|
|
180
|
+
iconBgColor = "bg-indigo-50";
|
|
100
181
|
iconColor = "text-indigo-600";
|
|
182
|
+
iconRingColor = "ring-indigo-100";
|
|
101
183
|
} else if (props.iconType === IconType.Warning) {
|
|
102
|
-
iconBgColor = "bg-yellow-
|
|
103
|
-
iconColor = "text-yellow-
|
|
184
|
+
iconBgColor = "bg-yellow-50";
|
|
185
|
+
iconColor = "text-yellow-700";
|
|
186
|
+
iconRingColor = "ring-yellow-100";
|
|
104
187
|
} else if (props.iconType === IconType.Success) {
|
|
105
|
-
iconBgColor = "bg-green-
|
|
188
|
+
iconBgColor = "bg-green-50";
|
|
106
189
|
iconColor = "text-green-600";
|
|
190
|
+
iconRingColor = "ring-green-100";
|
|
107
191
|
} else if (props.iconType === IconType.Danger) {
|
|
108
|
-
iconBgColor = "bg-red-
|
|
192
|
+
iconBgColor = "bg-red-50";
|
|
109
193
|
iconColor = "text-red-600";
|
|
194
|
+
iconRingColor = "ring-red-100";
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
let modalWidthClassName: string = "sm:max-w-lg md:max-w-lg";
|
|
198
|
+
|
|
199
|
+
if (props.modalWidth === ModalWidth.Medium) {
|
|
200
|
+
modalWidthClassName = "sm:max-w-3xl md:max-w-3xl";
|
|
201
|
+
} else if (props.modalWidth === ModalWidth.Large) {
|
|
202
|
+
modalWidthClassName = "sm:max-w-7xl md:max-w-7xl";
|
|
110
203
|
}
|
|
111
204
|
|
|
112
205
|
return (
|
|
113
|
-
<div
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
aria-modal="true"
|
|
120
|
-
>
|
|
121
|
-
<div className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
|
|
206
|
+
<div className="relative z-50">
|
|
207
|
+
<div
|
|
208
|
+
className="fixed inset-0 bg-gray-950/45 backdrop-blur-[2px]"
|
|
209
|
+
data-testid="modal-backdrop"
|
|
210
|
+
aria-hidden="true"
|
|
211
|
+
/>
|
|
122
212
|
|
|
123
|
-
<div className="fixed inset-0 z-
|
|
124
|
-
<div className="flex min-h-
|
|
213
|
+
<div className="fixed inset-0 z-50 overflow-y-auto">
|
|
214
|
+
<div className="flex min-h-full items-end justify-center p-0 text-center sm:items-center sm:p-6">
|
|
125
215
|
<div
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
? "md:max-w-7xl"
|
|
129
|
-
: ""
|
|
130
|
-
} ${
|
|
131
|
-
props.modalWidth && props.modalWidth === ModalWidth.Medium
|
|
132
|
-
? "md:max-w-3xl"
|
|
133
|
-
: ""
|
|
134
|
-
} ${!props.modalWidth ? "md:max-w-lg" : ""} `}
|
|
216
|
+
ref={modalRef}
|
|
217
|
+
className={`relative flex max-h-[calc(100vh-1rem)] w-full flex-col rounded-t-2xl border border-gray-200/80 bg-white text-left shadow-2xl ring-1 ring-black/5 sm:my-8 sm:max-h-[calc(100vh-3rem)] sm:rounded-xl ${modalWidthClassName}`}
|
|
135
218
|
data-testid="modal"
|
|
219
|
+
aria-labelledby={titleId}
|
|
220
|
+
aria-describedby={translatedDescription ? descriptionId : undefined}
|
|
221
|
+
role="dialog"
|
|
222
|
+
aria-modal="true"
|
|
223
|
+
tabIndex={-1}
|
|
136
224
|
>
|
|
137
|
-
|
|
138
|
-
<div
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
225
|
+
<div className="relative flex shrink-0 flex-col gap-4 rounded-t-2xl border-b border-gray-100 bg-white px-5 py-4 sm:flex-row sm:items-start sm:justify-between sm:gap-6 sm:rounded-t-xl sm:px-6">
|
|
226
|
+
<div
|
|
227
|
+
className={`flex min-w-0 flex-1 items-start gap-3 ${
|
|
228
|
+
props.onClose ? "pr-9 sm:pr-0" : ""
|
|
229
|
+
}`}
|
|
230
|
+
>
|
|
231
|
+
{props.icon && (
|
|
232
|
+
<div
|
|
233
|
+
className={`flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-lg ${iconBgColor} ring-1 ring-inset ${iconRingColor}`}
|
|
234
|
+
data-testid="icon"
|
|
235
|
+
>
|
|
236
|
+
<Icon
|
|
237
|
+
thick={ThickProp.Thick}
|
|
238
|
+
type={
|
|
239
|
+
props.iconType === undefined
|
|
240
|
+
? IconType.Info
|
|
241
|
+
: props.iconType
|
|
242
|
+
}
|
|
243
|
+
className={`${iconColor} h-5 w-5`}
|
|
244
|
+
icon={props.icon}
|
|
245
|
+
size={SizeProp.Five}
|
|
246
|
+
/>
|
|
247
|
+
</div>
|
|
248
|
+
)}
|
|
249
|
+
<div className="min-w-0 flex-1">
|
|
250
|
+
<h3
|
|
251
|
+
data-testid="modal-title"
|
|
252
|
+
className="text-base font-semibold leading-6 tracking-tight text-gray-900"
|
|
253
|
+
id={titleId}
|
|
254
|
+
>
|
|
255
|
+
{translatedTitle}
|
|
256
|
+
</h3>
|
|
257
|
+
{translatedDescription && (
|
|
258
|
+
<p
|
|
259
|
+
id={descriptionId}
|
|
260
|
+
data-testid="modal-description"
|
|
261
|
+
className="mt-0.5 text-sm leading-5 text-gray-500"
|
|
262
|
+
>
|
|
263
|
+
{translatedDescription}
|
|
264
|
+
</p>
|
|
265
|
+
)}
|
|
266
|
+
</div>
|
|
147
267
|
</div>
|
|
148
|
-
|
|
149
|
-
<div className="p-4 md:p-6">
|
|
150
|
-
{props.icon && (
|
|
268
|
+
{props.rightElement && (
|
|
151
269
|
<div
|
|
152
|
-
|
|
153
|
-
|
|
270
|
+
data-testid="right-element"
|
|
271
|
+
className={`flex-shrink-0 ${props.onClose ? "pr-9" : ""}`}
|
|
154
272
|
>
|
|
155
|
-
|
|
156
|
-
thick={ThickProp.Thick}
|
|
157
|
-
type={
|
|
158
|
-
props.iconType === undefined
|
|
159
|
-
? IconType.Info
|
|
160
|
-
: props.iconType
|
|
161
|
-
}
|
|
162
|
-
className={`${iconColor} h-6 w-6 stroke-2`}
|
|
163
|
-
icon={props.icon}
|
|
164
|
-
size={SizeProp.Large}
|
|
165
|
-
/>
|
|
273
|
+
{props.rightElement}
|
|
166
274
|
</div>
|
|
167
275
|
)}
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
276
|
+
{props.onClose && (
|
|
277
|
+
<button
|
|
278
|
+
type="button"
|
|
279
|
+
title={translatedCloseLabel}
|
|
280
|
+
aria-label={translatedCloseLabel}
|
|
281
|
+
data-testid="close-button"
|
|
282
|
+
onClick={props.onClose}
|
|
283
|
+
className="absolute right-4 top-4 inline-flex h-8 w-8 items-center justify-center rounded-md text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2"
|
|
284
|
+
>
|
|
285
|
+
<Icon icon={IconProp.Close} className="h-4 w-4" />
|
|
286
|
+
</button>
|
|
287
|
+
)}
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
<div
|
|
291
|
+
className="min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 py-5 sm:px-6"
|
|
292
|
+
data-testid="modal-content"
|
|
293
|
+
>
|
|
294
|
+
<ModalBody error={props.error}>
|
|
295
|
+
{!props.isBodyLoading ? (
|
|
296
|
+
props.children
|
|
297
|
+
) : (
|
|
298
|
+
<div className="modal-body flex justify-center py-16">
|
|
299
|
+
<Loader
|
|
300
|
+
loaderType={LoaderType.Bar}
|
|
301
|
+
color={VeryLightGray}
|
|
302
|
+
size={200}
|
|
303
|
+
/>
|
|
189
304
|
</div>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
data-testid="right-element"
|
|
193
|
-
className="mt-4 md:mt-0 lg:mr-4"
|
|
194
|
-
>
|
|
195
|
-
{props.rightElement}
|
|
196
|
-
</div>
|
|
197
|
-
)}
|
|
198
|
-
</div>
|
|
199
|
-
<div className="mt-2">
|
|
200
|
-
<ModalBody error={props.error}>
|
|
201
|
-
{!props.isBodyLoading ? (
|
|
202
|
-
props.children
|
|
203
|
-
) : (
|
|
204
|
-
<div className="modal-body mt-20 mb-20 flex justify-center">
|
|
205
|
-
<Loader
|
|
206
|
-
loaderType={LoaderType.Bar}
|
|
207
|
-
color={VeryLightGray}
|
|
208
|
-
size={200}
|
|
209
|
-
/>
|
|
210
|
-
</div>
|
|
211
|
-
)}
|
|
212
|
-
</ModalBody>
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
305
|
+
)}
|
|
306
|
+
</ModalBody>
|
|
215
307
|
</div>
|
|
216
308
|
<ModalFooter
|
|
217
309
|
submitButtonType={
|