@oneuptime/common 12.0.30 → 12.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/SecurityEvent.ts +48 -16
- package/Models/AnalyticsModels/ThreatIntelIndicator.ts +10 -5
- package/Models/DatabaseModels/AlertSeverity.ts +44 -0
- package/Models/DatabaseModels/AlertState.ts +0 -2
- package/Models/DatabaseModels/DetectionRule.ts +16 -5
- package/Models/DatabaseModels/Domain.ts +1 -1
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +14 -5
- package/Models/DatabaseModels/Incident.ts +1 -1
- package/Models/DatabaseModels/IncidentSeverity.ts +44 -0
- package/Models/DatabaseModels/IncidentTemplate.ts +1 -1
- package/Models/DatabaseModels/Index.ts +4 -0
- package/Models/DatabaseModels/MetricType.ts +0 -2
- package/Models/DatabaseModels/MonitorStatusTimeline.ts +0 -2
- package/Models/DatabaseModels/MonitorTest.ts +0 -2
- package/Models/DatabaseModels/NetworkDevice.ts +234 -5
- package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +88 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +22 -0
- package/Models/DatabaseModels/NetworkDeviceOidTemplate.ts +501 -0
- package/Models/DatabaseModels/NetworkDeviceRole.ts +648 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.ts +1 -1
- package/Models/DatabaseModels/StatusPageAnnouncement.ts +0 -2
- package/Models/DatabaseModels/StatusPageAnnouncementTemplate.ts +0 -2
- package/Models/DatabaseModels/StatusPagePrivateUser.ts +0 -2
- package/Models/DatabaseModels/StatusPageResource.ts +0 -2
- package/Models/DatabaseModels/StatusPageSubscriber.ts +0 -2
- package/Models/DatabaseModels/ThreatIntelFeed.ts +16 -5
- package/Server/API/GlobalConfigAPI.ts +362 -183
- package/Server/API/TelemetryAPI.ts +42 -4
- package/Server/EnvironmentConfig.ts +112 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790500000000-AddNetworkDeviceOidTemplate.ts +59 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790600000000-AddAutoImportRuleOidTemplate.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790800000000-AddNetworkDeviceRoleTable.ts +72 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
- package/Server/Middleware/MultipartFormData.ts +118 -32
- package/Server/Services/AlertEpisodeLabelRuleEngineService.ts +9 -1
- package/Server/Services/AlertEpisodeOnCallRuleEngineService.ts +9 -1
- package/Server/Services/AlertEpisodeOwnerRuleEngineService.ts +9 -1
- package/Server/Services/AlertEpisodePrivacyRuleEngineService.ts +9 -1
- package/Server/Services/AlertGroupingEngineService.ts +9 -1
- package/Server/Services/AlertLabelRuleEngineService.ts +9 -1
- package/Server/Services/AlertOnCallRuleEngineService.ts +9 -1
- package/Server/Services/AlertOwnerRuleEngineService.ts +9 -1
- package/Server/Services/AlertPrivacyRuleEngineService.ts +9 -1
- package/Server/Services/AlertReminderRuleService.ts +9 -1
- package/Server/Services/AutoRemediationRuleEngineService.ts +9 -1
- package/Server/Services/CephClusterLabelRuleEngineService.ts +9 -1
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +9 -1
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +9 -1
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +9 -1
- package/Server/Services/DashboardLabelRuleEngineService.ts +9 -1
- package/Server/Services/DashboardOwnerRuleEngineService.ts +9 -1
- package/Server/Services/DatabaseService.ts +39 -9
- package/Server/Services/DockerHostLabelRuleEngineService.ts +9 -1
- package/Server/Services/DockerHostOwnerRuleEngineService.ts +9 -1
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +9 -1
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +9 -1
- package/Server/Services/HostLabelRuleEngineService.ts +9 -1
- package/Server/Services/HostOwnerRuleEngineService.ts +9 -1
- package/Server/Services/IncidentEpisodeLabelRuleEngineService.ts +9 -1
- package/Server/Services/IncidentEpisodeOnCallRuleEngineService.ts +9 -1
- package/Server/Services/IncidentEpisodeOwnerRuleEngineService.ts +9 -1
- package/Server/Services/IncidentEpisodePrivacyRuleEngineService.ts +9 -1
- package/Server/Services/IncidentGroupingEngineService.ts +9 -1
- package/Server/Services/IncidentLabelRuleEngineService.ts +9 -1
- package/Server/Services/IncidentOnCallRuleEngineService.ts +9 -1
- package/Server/Services/IncidentOwnerRuleEngineService.ts +9 -1
- package/Server/Services/IncidentPrivacyRuleEngineService.ts +9 -1
- package/Server/Services/IncidentReminderRuleService.ts +9 -1
- package/Server/Services/IncidentSlaRuleService.ts +9 -1
- package/Server/Services/IncomingCallPolicyLabelRuleEngineService.ts +9 -1
- package/Server/Services/IncomingCallPolicyOwnerRuleEngineService.ts +9 -1
- package/Server/Services/Index.ts +4 -0
- package/Server/Services/IoTFleetLabelRuleEngineService.ts +9 -1
- package/Server/Services/IoTFleetOwnerRuleEngineService.ts +9 -1
- package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +9 -1
- package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +9 -1
- package/Server/Services/KubernetesResourceService.ts +5 -1
- package/Server/Services/MonitorLabelRuleEngineService.ts +9 -1
- package/Server/Services/MonitorOwnerRuleEngineService.ts +9 -1
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +35 -0
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +96 -0
- package/Server/Services/NetworkDeviceLabelRuleEngineService.ts +9 -1
- package/Server/Services/NetworkDeviceOidTemplateService.ts +201 -0
- package/Server/Services/NetworkDeviceOwnerRuleEngineService.ts +9 -1
- package/Server/Services/NetworkDeviceRoleService.ts +90 -0
- package/Server/Services/NetworkDeviceService.ts +209 -1
- package/Server/Services/OnCallDutyPolicyLabelRuleEngineService.ts +9 -1
- package/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.ts +9 -1
- package/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.ts +9 -1
- package/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.ts +9 -1
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +9 -1
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +9 -1
- package/Server/Services/ProjectService.ts +85 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +9 -1
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +9 -1
- package/Server/Services/RumApplicationLabelRuleEngineService.ts +9 -1
- package/Server/Services/RumApplicationOwnerRuleEngineService.ts +9 -1
- package/Server/Services/RunbookLabelRuleEngineService.ts +9 -1
- package/Server/Services/RunbookOwnerRuleEngineService.ts +9 -1
- package/Server/Services/RunbookRuleEngineService.ts +9 -1
- package/Server/Services/ScheduledMaintenanceLabelRuleEngineService.ts +9 -1
- package/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.ts +9 -1
- package/Server/Services/ScheduledMaintenanceReminderRuleService.ts +9 -1
- package/Server/Services/ServerlessFunctionLabelRuleEngineService.ts +9 -1
- package/Server/Services/ServerlessFunctionOwnerRuleEngineService.ts +9 -1
- package/Server/Services/ServiceLabelRuleEngineService.ts +9 -1
- package/Server/Services/ServiceOwnerRuleEngineService.ts +9 -1
- package/Server/Services/StatusPageLabelRuleEngineService.ts +9 -1
- package/Server/Services/StatusPageMonitorRuleEngineService.ts +7 -0
- package/Server/Services/StatusPageOwnerRuleEngineService.ts +9 -1
- package/Server/Services/TelemetrySourceMapService.ts +266 -23
- package/Server/Services/UserNotificationSettingService.ts +0 -6
- package/Server/Services/UserService.ts +27 -0
- package/Server/Services/WorkflowLabelRuleEngineService.ts +9 -1
- package/Server/Services/WorkflowOwnerRuleEngineService.ts +9 -1
- package/Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.ts +186 -0
- package/Server/Utils/Monitor/CapturedMetricAttributeUtil.ts +245 -0
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +21 -2
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +55 -21
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +32 -0
- package/Server/Utils/Monitor/NetworkDeviceMetricUtil.ts +15 -2
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +18 -1
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +10 -0
- package/Server/Utils/Monitor/SeriesResourceLabels.ts +34 -0
- package/Server/Utils/Rules/RuleEngineRuleRead.ts +48 -0
- package/Server/Utils/Telemetry/ExceptionSanitizer.ts +14 -1
- package/Server/Utils/Telemetry/LogExceptionExtractor.ts +14 -2
- package/Server/Utils/Telemetry/SourceMapResolver.ts +16 -5
- package/Server/Utils/Telemetry/StackTraceParser.ts +399 -0
- package/Tests/App/Dashboard/AddNeighborToMonitoringModal.test.tsx +31 -1
- package/Tests/App/Dashboard/DashboardChartWidgetZoom.test.tsx +35 -8
- package/Tests/App/Dashboard/DashboardCommandPalette.test.tsx +107 -3
- package/Tests/App/Dashboard/DashboardWideChartZoom.test.tsx +401 -0
- package/Tests/App/Dashboard/EventOverlayHook.test.tsx +125 -0
- package/Tests/App/Dashboard/HeaderImageAssets.test.tsx +93 -0
- package/Tests/App/Dashboard/MonitorTemplateColumnAndFacet.test.tsx +318 -0
- package/Tests/App/Dashboard/NetworkDeviceBulkDelete.test.tsx +357 -0
- package/Tests/App/Dashboard/NetworkSideMenu.test.tsx +590 -0
- package/Tests/App/Dashboard/OnCallReadinessSurfaces.test.tsx +3 -3
- package/Tests/App/Dashboard/SideMenuHarness.tsx +11 -3
- package/Tests/App/Dashboard/UserElementEmail.test.tsx +12 -4
- package/Tests/App/Dashboard/UserEmailCallSites.test.tsx +1 -1
- package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +14 -0
- package/Tests/Models/DatabaseModels/ModelRegistryInvariants.test.ts +543 -0
- package/Tests/Models/SecurityDomainAccessControl.test.ts +429 -0
- package/Tests/Server/API/GlobalConfigLicense.test.ts +657 -0
- package/Tests/Server/API/SecurityEventAttributesAPI.test.ts +84 -6
- package/Tests/Server/API/TelemetryResolveStackTraceAPI.test.ts +805 -0
- package/Tests/Server/Infrastructure/Postgres/AddOnCallCalendarFeedsMigration.test.ts +32 -7
- package/Tests/Server/Infrastructure/Postgres/NetworkDeviceRoleTableMigration.test.ts +476 -0
- package/Tests/Server/Middleware/IdentityRateLimit.test.ts +1144 -0
- package/Tests/Server/Middleware/MultipartFormData.test.ts +618 -3
- package/Tests/Server/Services/DatabaseServiceGenerateSlug.test.ts +215 -0
- package/Tests/Server/Services/MonitorLabelRuleEngineScale.test.ts +520 -0
- package/Tests/Server/Services/NetworkDeviceOidTemplateService.test.ts +332 -0
- package/Tests/Server/Services/NetworkDeviceOidTemplateWriteGuards.test.ts +409 -0
- package/Tests/Server/Services/NetworkDeviceRoleModel.test.ts +672 -0
- package/Tests/Server/Services/NetworkDeviceRuleEngines.test.ts +1 -1
- package/Tests/Server/Services/ProjectServiceCreateSubscriptionStarted.test.ts +67 -4
- package/Tests/Server/Services/RuleEngineRuleFetchLimit.test.ts +239 -0
- package/Tests/Server/Services/ScheduledMaintenanceSubscriberEndTime.test.ts +369 -0
- package/Tests/Server/Services/TelemetrySourceMapService.test.ts +1210 -2
- package/Tests/Server/Services/UserNotificationSettingMonitorDefaults.test.ts +248 -0
- package/Tests/Server/Services/UserNotificationSettingWorkspaceChannels.test.ts +43 -2
- package/Tests/Server/Services/UserServiceSeatLimit.test.ts +182 -0
- package/Tests/Server/Types/AnalyticsDatabase/SecurityEventModelPermission.test.ts +255 -0
- package/Tests/Server/Types/Database/Permissions/ReadBlockPermission.test.ts +212 -0
- package/Tests/Server/Types/Database/Permissions/SecurityRoleAccess.test.ts +413 -0
- package/Tests/Server/Utils/BasicCron.test.ts +283 -0
- package/Tests/Server/Utils/CodeRepository.test.ts +689 -0
- package/Tests/Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.test.ts +495 -0
- package/Tests/Server/Utils/ExceptionSanitizer.test.ts +77 -0
- package/Tests/Server/Utils/IncomingCallPhoneNumber.test.ts +174 -0
- package/Tests/Server/Utils/Monitor/CapturedMetricAttributeUtil.test.ts +284 -0
- package/Tests/Server/Utils/Monitor/MonitorCustomMetricAttributes.test.ts +503 -0
- package/Tests/Server/Utils/Monitor/MonitorTemplatePrototypePollution.test.ts +106 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkLogWritePath.test.ts +33 -4
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +14 -4
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +44 -0
- package/Tests/Server/Utils/OpenAPISpec.test.ts +536 -0
- package/Tests/Server/Utils/Rules/RuleEngineRuleRead.test.ts +115 -0
- package/Tests/Server/Utils/StackTraceParser.test.ts +610 -0
- package/Tests/Server/Utils/Telemetry/LogExceptionExtractor.test.ts +0 -0
- package/Tests/Server/Utils/Telemetry/SourceMapLimits.test.ts +656 -0
- package/Tests/Server/Utils/Telemetry/SourceMapResolver.test.ts +100 -0
- package/Tests/Types/Monitor/SnmpMonitor/SnmpOidListUtil.test.ts +454 -0
- package/Tests/Types/NetworkDevice/DefaultNetworkDeviceRole.test.ts +417 -0
- package/Tests/Types/SecurityRolePermissions.test.ts +193 -0
- package/Tests/UI/Components/Charts/AnnotationLayout.test.ts +773 -0
- package/Tests/UI/Components/Charts/ChartAnnotationRail.test.tsx +789 -0
- package/Tests/UI/Components/Charts/ChartBucketIdentity.test.ts +254 -0
- package/Tests/UI/Components/Charts/ChartClickDoubleClickDisambiguation.test.tsx +221 -0
- package/Tests/UI/Components/Charts/ChartDoubleClickReset.test.tsx +220 -0
- package/Tests/UI/Components/Charts/TimeAnnotation.test.ts +471 -0
- package/Tests/UI/Components/EditionLabelLicenseRefresh.test.tsx +405 -0
- package/Tests/UI/Components/ErrorMessageRefreshControl.test.tsx +83 -0
- package/Tests/UI/Components/MarkdownConverters.test.ts +686 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableBulkDelete.test.tsx +751 -0
- package/Tests/UI/Components/ModelTable/BaseModelTableColumnCustomization.test.tsx +475 -43
- package/Tests/UI/Components/ModelTable/BaseModelTableDeleteAndEmptyStates.test.tsx +341 -0
- package/Tests/UI/Components/ModelTable/ColumnPreference.test.ts +89 -0
- package/Tests/UI/Components/NavBarCommandKGating.test.tsx +103 -8
- package/Tests/UI/Components/OrderedStatesList.test.tsx +5 -5
- package/Tests/UI/Components/PendingProjectInvitations.test.tsx +1 -1
- package/Tests/UI/Components/SideMenuItem.test.tsx +30 -0
- package/Tests/UI/Components/TableSortAndMobileColumns.test.tsx +195 -0
- package/Tests/UI/Components/XAxis.test.ts +270 -5
- package/Tests/UI/Components/XAxisDaylightSaving.test.ts +113 -0
- package/Tests/UI/Styles/ChartFocusRing.test.ts +153 -0
- package/Tests/UI/Styles/ChartFocusRingCoverage.test.tsx +377 -0
- package/Tests/UI/Styles/ThemeStylesheet.ts +162 -0
- package/Tests/UI/Utils/TableColumnsToCsv.test.ts +30 -0
- package/Tests/UI/Utils/UseDashboardTimeRangeZoom.test.tsx +187 -0
- package/Tests/Utils/Dashboard/DashboardResourceListSharedArgs.test.ts +302 -0
- package/Tests/Utils/Dashboard/DashboardTimeRangeZoom.test.ts +242 -0
- package/Tests/Utils/EnterpriseLicenseSeats.test.ts +507 -0
- package/Tests/Utils/Monitor/NetworkDeviceRoleCatalog.test.ts +981 -0
- package/Tests/Utils/Monitor/NetworkTopologyRoleCatalog.test.ts +865 -0
- package/Tests/Utils/NetworkDevice/DeviceRoleKeyUtil.test.ts +538 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +951 -1
- package/Tests/Utils/NetworkDiscovery/DiscoveredHostUtil.test.ts +238 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveryReverseDnsChain.test.ts +1056 -0
- package/Tests/Utils/NetworkDiscovery/ReverseDnsNameUtil.test.ts +882 -0
- package/Tests/Utils/Slo/SloEvaluation.test.ts +171 -0
- package/Tests/Utils/Slug.test.ts +61 -1
- package/Tests/jest.setup.ts +19 -0
- package/Types/Date.ts +39 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +61 -0
- package/Types/Monitor/SnmpMonitor/SnmpOidListUtil.ts +333 -0
- package/Types/NetworkDevice/DefaultNetworkDeviceRole.ts +145 -0
- package/Types/Permission.ts +141 -0
- package/Types/Rum/SessionReplay.ts +21 -0
- package/Types/Telemetry/SourceMap.ts +8 -0
- package/UI/Components/Charts/Area/AreaChart.tsx +7 -0
- package/UI/Components/Charts/Bar/BarChart.tsx +6 -0
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +9 -1
- package/UI/Components/Charts/ChartLibrary/Annotations/AnnotationHoverCard.tsx +176 -0
- package/UI/Components/Charts/ChartLibrary/Annotations/AnnotationLayout.ts +745 -0
- package/UI/Components/Charts/ChartLibrary/Annotations/ChartAnnotationLayer.tsx +576 -0
- package/UI/Components/Charts/ChartLibrary/Annotations/UseChartAnnotations.tsx +204 -0
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +554 -545
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +337 -371
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +549 -540
- package/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.ts +7 -3
- package/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.ts +14 -3
- package/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.ts +13 -0
- package/UI/Components/Charts/Line/LineChart.tsx +7 -0
- package/UI/Components/Charts/Types/ChartEventKind.ts +13 -0
- package/UI/Components/Charts/Types/ReferenceRegionProps.ts +6 -0
- package/UI/Components/Charts/Types/TimeReferenceLineProps.ts +20 -3
- package/UI/Components/Charts/Utils/TimeAnnotation.ts +69 -35
- package/UI/Components/Charts/Utils/XAxis.ts +125 -18
- package/UI/Components/EditionLabel/EditionLabel.tsx +280 -26
- package/UI/Components/ErrorMessage/ErrorMessage.tsx +21 -10
- package/UI/Components/Feed/FeedItem.tsx +4 -5
- package/UI/Components/Header/HeaderIconDropdownButton.tsx +1 -2
- package/UI/Components/Header/UserProfile/UserProfile.tsx +1 -2
- package/UI/Components/Image/Image.tsx +20 -3
- package/UI/Components/Markdown.tsx/MarkdownConverters.ts +0 -0
- package/UI/Components/MemberRoleAssignment/MemberRoleAssignment.tsx +1 -2
- package/UI/Components/ModelTable/BaseModelTable.tsx +200 -39
- package/UI/Components/Navbar/NavBar.tsx +62 -13
- package/UI/Components/Navbar/NavBarMenuModal.tsx +7 -2
- package/UI/Components/SideMenu/CountModelSideMenuItem.tsx +2 -0
- package/UI/Components/SideMenu/SideMenu.tsx +12 -2
- package/UI/Components/SideMenu/SideMenuItem.tsx +4 -1
- package/UI/Components/SideMenu/SideMenuSection.tsx +14 -2
- package/UI/Components/Table/TableHeader.tsx +64 -48
- package/UI/Components/Table/TableRow.tsx +13 -3
- package/UI/Styles/Theme.css +38 -0
- package/UI/Utils/UseDashboardTimeRangeZoom.ts +77 -0
- package/Utils/Dashboard/DashboardTimeRangeZoom.ts +118 -0
- package/Utils/EnterpriseLicense/EnterpriseLicenseSeats.ts +271 -0
- package/Utils/Monitor/NetworkDeviceRoleCatalog.ts +232 -0
- package/Utils/Monitor/NetworkDeviceRoleUtil.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.ts +116 -33
- package/Utils/NetworkDevice/DeviceRoleKeyUtil.ts +137 -0
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +6 -0
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +141 -10
- package/Utils/NetworkDiscovery/DiscoveredHostUtil.ts +55 -3
- package/Utils/NetworkDiscovery/ReverseDnsNameUtil.ts +151 -0
- package/Utils/Rules/RuleEngineLimits.ts +32 -0
- package/Utils/Rules/RulePatternMatchUtil.ts +1 -1
- package/Utils/Slug.ts +34 -1
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js +48 -16
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js +10 -5
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +46 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertState.js +0 -2
- package/build/dist/Models/DatabaseModels/AlertState.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +16 -5
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Domain.js +1 -1
- package/build/dist/Models/DatabaseModels/Domain.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +14 -5
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js +1 -1
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +46 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js +1 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +4 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MetricType.js +0 -2
- package/build/dist/Models/DatabaseModels/MetricType.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MonitorStatusTimeline.js +0 -2
- package/build/dist/Models/DatabaseModels/MonitorStatusTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MonitorTest.js +0 -2
- package/build/dist/Models/DatabaseModels/MonitorTest.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +239 -6
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +88 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceOidTemplate.js +521 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceOidTemplate.js.map +1 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceRole.js +677 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceRole.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncement.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncement.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncementTemplate.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPageAnnouncementTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPagePrivateUser.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPagePrivateUser.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageResource.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPageResource.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageSubscriber.js +0 -2
- package/build/dist/Models/DatabaseModels/StatusPageSubscriber.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +16 -5
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js.map +1 -1
- package/build/dist/Server/API/GlobalConfigAPI.js +293 -176
- package/build/dist/Server/API/GlobalConfigAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +31 -3
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +83 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790500000000-AddNetworkDeviceOidTemplate.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790500000000-AddNetworkDeviceOidTemplate.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790600000000-AddAutoImportRuleOidTemplate.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790600000000-AddAutoImportRuleOidTemplate.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790800000000-AddNetworkDeviceRoleTable.js +39 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790800000000-AddNetworkDeviceRoleTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/MultipartFormData.js +93 -28
- package/build/dist/Server/Middleware/MultipartFormData.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertEpisodeLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeOnCallRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertEpisodeOnCallRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertEpisodeOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertEpisodePrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertGroupingEngineService.js +8 -1
- package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertOnCallRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertOnCallRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AlertPrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AlertReminderRuleService.js +8 -1
- package/build/dist/Server/Services/AlertReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/AutoRemediationRuleEngineService.js +8 -1
- package/build/dist/Server/Services/AutoRemediationRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DashboardLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DashboardLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DashboardOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +31 -5
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentEpisodeLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeOnCallRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentEpisodeOnCallRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentEpisodeOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentEpisodePrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentGroupingEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentGroupingEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOnCallRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentOnCallRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncidentPrivacyRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentReminderRuleService.js +8 -1
- package/build/dist/Server/Services/IncidentReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/IncidentSlaRuleService.js +8 -1
- package/build/dist/Server/Services/IncidentSlaRuleService.js.map +1 -1
- package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncomingCallPolicyLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IncomingCallPolicyOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +4 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IoTFleetLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/IoTFleetOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesResourceService.js +5 -1
- package/build/dist/Server/Services/KubernetesResourceService.js.map +1 -1
- package/build/dist/Server/Services/MonitorLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/MonitorLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/MonitorOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +30 -21
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +64 -0
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/NetworkDeviceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceOidTemplateService.js +180 -0
- package/build/dist/Server/Services/NetworkDeviceOidTemplateService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/NetworkDeviceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceRoleService.js +70 -0
- package/build/dist/Server/Services/NetworkDeviceRoleService.js.map +1 -0
- package/build/dist/Server/Services/NetworkDeviceService.js +154 -1
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/OnCallDutyPolicyLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/OnCallDutyPolicyOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +65 -0
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RunbookLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RunbookLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RunbookOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/RunbookRuleEngineService.js +8 -1
- package/build/dist/Server/Services/RunbookRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ScheduledMaintenanceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ScheduledMaintenanceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceReminderRuleService.js +8 -1
- package/build/dist/Server/Services/ScheduledMaintenanceReminderRuleService.js.map +1 -1
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/StatusPageLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageMonitorRuleEngineService.js +6 -0
- package/build/dist/Server/Services/StatusPageMonitorRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/StatusPageOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/TelemetrySourceMapService.js +213 -19
- package/build/dist/Server/Services/TelemetrySourceMapService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationSettingService.js +0 -1
- package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +25 -0
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js +8 -1
- package/build/dist/Server/Services/WorkflowLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js +8 -1
- package/build/dist/Server/Services/WorkflowOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.js +145 -0
- package/build/dist/Server/Utils/EnterpriseLicense/EnterpriseLicenseSeatUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/CapturedMetricAttributeUtil.js +201 -0
- package/build/dist/Server/Utils/Monitor/CapturedMetricAttributeUtil.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +19 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +42 -23
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +29 -0
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js +11 -2
- package/build/dist/Server/Utils/Monitor/NetworkDeviceMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +16 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +10 -0
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js +33 -0
- package/build/dist/Server/Utils/Monitor/SeriesResourceLabels.js.map +1 -1
- package/build/dist/Server/Utils/Rules/RuleEngineRuleRead.js +37 -0
- package/build/dist/Server/Utils/Rules/RuleEngineRuleRead.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/ExceptionSanitizer.js +12 -1
- package/build/dist/Server/Utils/Telemetry/ExceptionSanitizer.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LogExceptionExtractor.js +14 -2
- package/build/dist/Server/Utils/Telemetry/LogExceptionExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js +15 -5
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/StackTraceParser.js +307 -0
- package/build/dist/Server/Utils/Telemetry/StackTraceParser.js.map +1 -1
- package/build/dist/Types/Date.js +27 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpOidListUtil.js +253 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpOidListUtil.js.map +1 -0
- package/build/dist/Types/NetworkDevice/DefaultNetworkDeviceRole.js +105 -0
- package/build/dist/Types/NetworkDevice/DefaultNetworkDeviceRole.js.map +1 -0
- package/build/dist/Types/Permission.js +126 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Rum/SessionReplay.js +19 -0
- package/build/dist/Types/Rum/SessionReplay.js.map +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +1 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +6 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/AnnotationHoverCard.js +83 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/AnnotationHoverCard.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/AnnotationLayout.js +531 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/AnnotationLayout.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/ChartAnnotationLayer.js +264 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/UseChartAnnotations.js +122 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Annotations/UseChartAnnotations.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +262 -234
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +146 -153
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +261 -233
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.js +14 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +1 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ChartEventKind.js +14 -0
- package/build/dist/UI/Components/Charts/Types/ChartEventKind.js.map +1 -0
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js +57 -28
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/XAxis.js +103 -17
- package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -1
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js +198 -23
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
- package/build/dist/UI/Components/ErrorMessage/ErrorMessage.js +15 -5
- package/build/dist/UI/Components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/build/dist/UI/Components/Feed/FeedItem.js +4 -5
- package/build/dist/UI/Components/Feed/FeedItem.js.map +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +1 -2
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
- package/build/dist/UI/Components/Header/UserProfile/UserProfile.js.map +1 -1
- package/build/dist/UI/Components/Image/Image.js +6 -1
- package/build/dist/UI/Components/Image/Image.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownConverters.js +0 -0
- package/build/dist/UI/Components/Markdown.tsx/MarkdownConverters.js.map +1 -1
- package/build/dist/UI/Components/MemberRoleAssignment/MemberRoleAssignment.js +1 -2
- package/build/dist/UI/Components/MemberRoleAssignment/MemberRoleAssignment.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +143 -36
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBar.js +44 -9
- package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js +2 -2
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js +1 -1
- package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenu.js +9 -6
- package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuItem.js.map +1 -1
- package/build/dist/UI/Components/SideMenu/SideMenuSection.js +7 -2
- package/build/dist/UI/Components/SideMenu/SideMenuSection.js.map +1 -1
- package/build/dist/UI/Components/Table/TableHeader.js +20 -22
- package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
- package/build/dist/UI/Components/Table/TableRow.js +13 -4
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Utils/UseDashboardTimeRangeZoom.js +42 -0
- package/build/dist/UI/Utils/UseDashboardTimeRangeZoom.js.map +1 -0
- package/build/dist/Utils/Dashboard/DashboardTimeRangeZoom.js +74 -0
- package/build/dist/Utils/Dashboard/DashboardTimeRangeZoom.js.map +1 -0
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseSeats.js +153 -0
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseSeats.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceRoleCatalog.js +126 -0
- package/build/dist/Utils/Monitor/NetworkDeviceRoleCatalog.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceRoleUtil.js +2 -1
- package/build/dist/Utils/Monitor/NetworkDeviceRoleUtil.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +67 -32
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceRoleKeyUtil.js +114 -0
- package/build/dist/Utils/NetworkDevice/DeviceRoleKeyUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +127 -7
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js +50 -3
- package/build/dist/Utils/NetworkDiscovery/DiscoveredHostUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/ReverseDnsNameUtil.js +132 -0
- package/build/dist/Utils/NetworkDiscovery/ReverseDnsNameUtil.js.map +1 -0
- package/build/dist/Utils/Rules/RuleEngineLimits.js +31 -0
- package/build/dist/Utils/Rules/RuleEngineLimits.js.map +1 -0
- package/build/dist/Utils/Rules/RulePatternMatchUtil.js +1 -1
- package/build/dist/Utils/Slug.js +31 -1
- package/build/dist/Utils/Slug.js.map +1 -1
- package/jest.config.json +1 -0
- package/package.json +2 -2
|
@@ -37,7 +37,11 @@ import {
|
|
|
37
37
|
getColorHex,
|
|
38
38
|
isHexColorValue,
|
|
39
39
|
} from "../Utils/ChartColors";
|
|
40
|
+
import useChartAnnotations, {
|
|
41
|
+
UseChartAnnotationsResult,
|
|
42
|
+
} from "../Annotations/UseChartAnnotations";
|
|
40
43
|
import { cx } from "../Utils/Cx";
|
|
44
|
+
import { DOUBLE_CLICK_DISAMBIGUATION_MS } from "../Utils/DoubleClick";
|
|
41
45
|
import { getYAxisDomain } from "../Utils/GetYAxisDomain";
|
|
42
46
|
import { hasOnlyOneValueForKey } from "../Utils/HasOnlyOneValueForKey";
|
|
43
47
|
import {
|
|
@@ -46,15 +50,6 @@ import {
|
|
|
46
50
|
} from "../Utils/TooltipEntries";
|
|
47
51
|
import ChartCurve from "../../Types/ChartCurve";
|
|
48
52
|
|
|
49
|
-
/*
|
|
50
|
-
* Incident/alert time markers each label at the same "insideTop" band, so
|
|
51
|
-
* several events in one window pile their labels into an unreadable stack.
|
|
52
|
-
* A single marker keeps the classic horizontal top label; a handful get
|
|
53
|
-
* rotated to run along their lines; past this cap inline labels are hidden
|
|
54
|
-
* entirely (the dashed lines and their click-through remain).
|
|
55
|
-
*/
|
|
56
|
-
const MAX_LABELED_TIME_REFERENCE_LINES: number = 6;
|
|
57
|
-
|
|
58
53
|
/*
|
|
59
54
|
* recharts invokes child event handlers with varying shapes ((event) for
|
|
60
55
|
* plain SVG passthrough, (data, event) for adapted children) — find the
|
|
@@ -649,6 +644,15 @@ interface LineChartProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
649
644
|
formattedExemplarPoints?: Array<FormattedExemplarPoint> | undefined;
|
|
650
645
|
onExemplarClick?: ((exemplar: ExemplarPoint) => void) | undefined;
|
|
651
646
|
onTimeRangeSelect?: ((startTime: Date, endTime: Date) => void) | undefined;
|
|
647
|
+
/**
|
|
648
|
+
* Double-click on the plot surface: the counterpart to drag-to-select,
|
|
649
|
+
* for undoing the zoom it produced. Supplying it makes single clicks
|
|
650
|
+
* wait DOUBLE_CLICK_DISAMBIGUATION_MS before they act, so a double-click
|
|
651
|
+
* cannot also fire the bucket-click path twice on its way past — hosts
|
|
652
|
+
* that have nothing to reset should leave it undefined and keep clicks
|
|
653
|
+
* instant.
|
|
654
|
+
*/
|
|
655
|
+
onTimeRangeReset?: (() => void) | undefined;
|
|
652
656
|
/**
|
|
653
657
|
* Plain click on a time bucket (the plot background — dot/legend clicks
|
|
654
658
|
* and drag-selections never reach this). [bucketStart, bucketEnd) uses
|
|
@@ -708,6 +712,7 @@ const LineChart: React.ForwardRefExoticComponent<
|
|
|
708
712
|
formattedTimeReferenceLines,
|
|
709
713
|
formattedReferenceRegions,
|
|
710
714
|
onTimeRangeSelect,
|
|
715
|
+
onTimeRangeReset,
|
|
711
716
|
onBucketClick,
|
|
712
717
|
ghostCategories,
|
|
713
718
|
...other
|
|
@@ -738,12 +743,51 @@ const LineChart: React.ForwardRefExoticComponent<
|
|
|
738
743
|
React.useRef<number | null>(null);
|
|
739
744
|
const suppressNextClickRef: React.MutableRefObject<boolean> =
|
|
740
745
|
React.useRef<boolean>(false);
|
|
746
|
+
const hasOnTimeRangeReset: boolean = Boolean(onTimeRangeReset);
|
|
747
|
+
/*
|
|
748
|
+
* A pending single-click, held open long enough for a second click to
|
|
749
|
+
* cancel it. Only armed when onTimeRangeReset is supplied.
|
|
750
|
+
*/
|
|
751
|
+
const pendingClickTimeoutRef: React.MutableRefObject<ReturnType<
|
|
752
|
+
typeof setTimeout
|
|
753
|
+
> | null> = React.useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
741
754
|
const categoryColors: Map<string, ChartColorValue> =
|
|
742
755
|
constructCategoryColors(categories, colors);
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
756
|
+
|
|
757
|
+
React.useEffect(() => {
|
|
758
|
+
return () => {
|
|
759
|
+
if (pendingClickTimeoutRef.current !== null) {
|
|
760
|
+
clearTimeout(pendingClickTimeoutRef.current);
|
|
761
|
+
pendingClickTimeoutRef.current = null;
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
}, []);
|
|
765
|
+
|
|
766
|
+
/*
|
|
767
|
+
* Annotations are drawn onto the categorical axis, so the layer needs
|
|
768
|
+
* the same x values recharts is drawing — not the source dates.
|
|
769
|
+
*/
|
|
770
|
+
const categoryLabels: Array<string> = React.useMemo(():
|
|
771
|
+
| Array<string>
|
|
772
|
+
| never => {
|
|
773
|
+
return (data as Array<Record<string, unknown>>).map(
|
|
774
|
+
(row: Record<string, unknown>): string => {
|
|
775
|
+
return String(row[index] ?? "");
|
|
776
|
+
},
|
|
777
|
+
);
|
|
778
|
+
}, [data, index]);
|
|
779
|
+
|
|
780
|
+
const annotations: UseChartAnnotationsResult = useChartAnnotations({
|
|
781
|
+
formattedTimeReferenceLines,
|
|
782
|
+
formattedReferenceRegions,
|
|
783
|
+
categoryLabels,
|
|
784
|
+
axisPaddingPx: paddingValue,
|
|
785
|
+
scaleKind: "point",
|
|
786
|
+
hasTopLegend: showLegend,
|
|
787
|
+
isClickSuppressed: (): boolean => {
|
|
788
|
+
return suppressNextClickRef.current;
|
|
789
|
+
},
|
|
790
|
+
});
|
|
747
791
|
|
|
748
792
|
const yAxisDomain: (number | "auto")[] = getYAxisDomain(
|
|
749
793
|
autoMinValue,
|
|
@@ -962,6 +1006,51 @@ const LineChart: React.ForwardRefExoticComponent<
|
|
|
962
1006
|
onTimeRangeSelect(startDate, endDate);
|
|
963
1007
|
}
|
|
964
1008
|
|
|
1009
|
+
/*
|
|
1010
|
+
* The plain-click path, split out so it can either run inline (no
|
|
1011
|
+
* reset handler) or be deferred behind the double-click window.
|
|
1012
|
+
*/
|
|
1013
|
+
function handleChartClick(chartState: RangeSelectionChartState): void {
|
|
1014
|
+
/*
|
|
1015
|
+
* A click while a legend/dot selection is active keeps its
|
|
1016
|
+
* long-standing meaning — clear the selection — and never
|
|
1017
|
+
* also pins a bucket.
|
|
1018
|
+
*/
|
|
1019
|
+
if (hasOnValueChange && (activeLegend || activeDot)) {
|
|
1020
|
+
setActiveDot(undefined);
|
|
1021
|
+
setActiveLegend(undefined);
|
|
1022
|
+
onValueChange?.(null);
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
if (!onBucketClick) {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
const rowIndex: number | null = getRowIndexFromChartState(chartState);
|
|
1029
|
+
if (rowIndex === null) {
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
const bucketStart: Date | null = getBucketDateAtIndex(rowIndex);
|
|
1033
|
+
if (!bucketStart) {
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
/*
|
|
1037
|
+
* Cover the full bucket: width from adjacent row dates, the
|
|
1038
|
+
* same derivation drag-to-select uses.
|
|
1039
|
+
*/
|
|
1040
|
+
const adjacentBucketDate: Date | null =
|
|
1041
|
+
rowIndex > 0
|
|
1042
|
+
? getBucketDateAtIndex(rowIndex - 1)
|
|
1043
|
+
: getBucketDateAtIndex(rowIndex + 1);
|
|
1044
|
+
const clickedBucketWidthInMs: number = adjacentBucketDate
|
|
1045
|
+
? Math.abs(bucketStart.getTime() - adjacentBucketDate.getTime())
|
|
1046
|
+
: 0;
|
|
1047
|
+
onBucketClick(
|
|
1048
|
+
bucketStart,
|
|
1049
|
+
new Date(bucketStart.getTime() + clickedBucketWidthInMs),
|
|
1050
|
+
(data[rowIndex] || {}) as Record<string, number | string>,
|
|
1051
|
+
);
|
|
1052
|
+
}
|
|
1053
|
+
|
|
965
1054
|
return (
|
|
966
1055
|
<div
|
|
967
1056
|
ref={ref}
|
|
@@ -972,560 +1061,480 @@ const LineChart: React.ForwardRefExoticComponent<
|
|
|
972
1061
|
)}
|
|
973
1062
|
{...other}
|
|
974
1063
|
>
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
? {
|
|
986
|
-
onMouseDown: handleRangeSelectMouseDown,
|
|
987
|
-
onMouseMove: handleRangeSelectMouseMove,
|
|
988
|
-
onMouseUp: handleRangeSelectMouseUp,
|
|
989
|
-
}
|
|
990
|
-
: {})}
|
|
991
|
-
onClick={(chartState: RangeSelectionChartState) => {
|
|
992
|
-
// Ignore the click that follows a drag-to-select.
|
|
993
|
-
if (suppressNextClickRef.current) {
|
|
994
|
-
return;
|
|
995
|
-
}
|
|
996
|
-
/*
|
|
997
|
-
* A click while a legend/dot selection is active keeps its
|
|
998
|
-
* long-standing meaning — clear the selection — and never
|
|
999
|
-
* also pins a bucket.
|
|
1000
|
-
*/
|
|
1001
|
-
if (hasOnValueChange && (activeLegend || activeDot)) {
|
|
1002
|
-
setActiveDot(undefined);
|
|
1003
|
-
setActiveLegend(undefined);
|
|
1004
|
-
onValueChange?.(null);
|
|
1005
|
-
return;
|
|
1006
|
-
}
|
|
1007
|
-
if (!onBucketClick) {
|
|
1008
|
-
return;
|
|
1009
|
-
}
|
|
1010
|
-
const rowIndex: number | null =
|
|
1011
|
-
getRowIndexFromChartState(chartState);
|
|
1012
|
-
if (rowIndex === null) {
|
|
1013
|
-
return;
|
|
1014
|
-
}
|
|
1015
|
-
const bucketStart: Date | null = getBucketDateAtIndex(rowIndex);
|
|
1016
|
-
if (!bucketStart) {
|
|
1017
|
-
return;
|
|
1018
|
-
}
|
|
1064
|
+
{/*
|
|
1065
|
+
* The hover card is HTML over the SVG, so it needs a positioned
|
|
1066
|
+
* ancestor that is exactly the chart's box. recharts sizes its
|
|
1067
|
+
* <svg> in CSS pixels with no viewBox, so the card can reuse the
|
|
1068
|
+
* coordinates the rail was drawn with.
|
|
1069
|
+
*/}
|
|
1070
|
+
<div className={cx("relative isolate h-full w-full")}>
|
|
1071
|
+
<ResponsiveContainer>
|
|
1072
|
+
<RechartsLineChart
|
|
1073
|
+
data={data}
|
|
1019
1074
|
/*
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1075
|
+
* Omitted, not "": recharts treats "" as a real sync
|
|
1076
|
+
* channel, so every unsynced chart page-wide would
|
|
1077
|
+
* accidentally sync with every other one.
|
|
1022
1078
|
*/
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
(
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
{showGridLines ? (
|
|
1054
|
-
<CartesianGrid
|
|
1055
|
-
className={cx("stroke-gray-100")}
|
|
1056
|
-
strokeDasharray="3 3"
|
|
1057
|
-
horizontal={true}
|
|
1058
|
-
vertical={false}
|
|
1059
|
-
/>
|
|
1060
|
-
) : null}
|
|
1061
|
-
<XAxis
|
|
1062
|
-
padding={{ left: paddingValue, right: paddingValue }}
|
|
1063
|
-
hide={!showXAxis}
|
|
1064
|
-
dataKey={index}
|
|
1065
|
-
interval={startEndOnly ? "preserveStartEnd" : intervalType}
|
|
1066
|
-
tick={{
|
|
1067
|
-
transform: "translate(0, 6)",
|
|
1068
|
-
fontSize: 10,
|
|
1069
|
-
fontWeight: 500,
|
|
1070
|
-
fill: "var(--ou-chart-tick)",
|
|
1079
|
+
{...(props.syncid ? { syncId: props.syncid.toString() } : {})}
|
|
1080
|
+
{...(hasOnTimeRangeSelect
|
|
1081
|
+
? {
|
|
1082
|
+
onMouseDown: handleRangeSelectMouseDown,
|
|
1083
|
+
onMouseMove: handleRangeSelectMouseMove,
|
|
1084
|
+
onMouseUp: handleRangeSelectMouseUp,
|
|
1085
|
+
}
|
|
1086
|
+
: {})}
|
|
1087
|
+
onClick={(chartState: RangeSelectionChartState) => {
|
|
1088
|
+
// Ignore the click that follows a drag-to-select.
|
|
1089
|
+
if (suppressNextClickRef.current) {
|
|
1090
|
+
return;
|
|
1091
|
+
}
|
|
1092
|
+
if (!hasOnTimeRangeReset) {
|
|
1093
|
+
handleChartClick(chartState);
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
/*
|
|
1097
|
+
* Reset is on, so hold the click open: both clicks of a
|
|
1098
|
+
* double-click arrive before dblclick does, and neither
|
|
1099
|
+
* may pin a bucket. The second click re-arms the timer,
|
|
1100
|
+
* dblclick clears it.
|
|
1101
|
+
*/
|
|
1102
|
+
if (pendingClickTimeoutRef.current !== null) {
|
|
1103
|
+
clearTimeout(pendingClickTimeoutRef.current);
|
|
1104
|
+
}
|
|
1105
|
+
pendingClickTimeoutRef.current = setTimeout(() => {
|
|
1106
|
+
pendingClickTimeoutRef.current = null;
|
|
1107
|
+
handleChartClick(chartState);
|
|
1108
|
+
}, DOUBLE_CLICK_DISAMBIGUATION_MS);
|
|
1071
1109
|
}}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
(
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
width={yAxisWidth}
|
|
1104
|
-
hide={!showYAxis}
|
|
1105
|
-
axisLine={false}
|
|
1106
|
-
tickLine={false}
|
|
1107
|
-
type="number"
|
|
1108
|
-
domain={yAxisDomain as AxisDomain}
|
|
1109
|
-
tick={{
|
|
1110
|
-
transform: "translate(-4, 0)",
|
|
1111
|
-
fontSize: 10,
|
|
1112
|
-
fontWeight: 500,
|
|
1113
|
-
fill: "var(--ou-chart-tick)",
|
|
1110
|
+
{...(hasOnTimeRangeReset
|
|
1111
|
+
? {
|
|
1112
|
+
onDoubleClick: () => {
|
|
1113
|
+
if (pendingClickTimeoutRef.current !== null) {
|
|
1114
|
+
clearTimeout(pendingClickTimeoutRef.current);
|
|
1115
|
+
pendingClickTimeoutRef.current = null;
|
|
1116
|
+
}
|
|
1117
|
+
onTimeRangeReset?.();
|
|
1118
|
+
},
|
|
1119
|
+
}
|
|
1120
|
+
: {})}
|
|
1121
|
+
margin={{
|
|
1122
|
+
/*
|
|
1123
|
+
* Tick labels are 10px font with a translate(0, 6) — they
|
|
1124
|
+
* need ~20px of bottom space, plus another ~20px for the
|
|
1125
|
+
* optional axis label. 8px (the no-axis case) is only
|
|
1126
|
+
* valid when the axis is hidden entirely.
|
|
1127
|
+
*/
|
|
1128
|
+
bottom: (xAxisLabel
|
|
1129
|
+
? 40
|
|
1130
|
+
: showXAxis
|
|
1131
|
+
? 24
|
|
1132
|
+
: 8) as unknown as number,
|
|
1133
|
+
left: (yAxisLabel ? 20 : 0) as unknown as number,
|
|
1134
|
+
right: (yAxisLabel ? 5 : 8) as unknown as number,
|
|
1135
|
+
/*
|
|
1136
|
+
* The annotation rail is drawn in the top margin, so the
|
|
1137
|
+
* margin has to grow to hold it — otherwise chips render
|
|
1138
|
+
* above the SVG's own edge and get clipped.
|
|
1139
|
+
*/
|
|
1140
|
+
top: annotations.marginTop,
|
|
1114
1141
|
}}
|
|
1115
|
-
fill=""
|
|
1116
|
-
stroke=""
|
|
1117
|
-
className={cx(
|
|
1118
|
-
// base
|
|
1119
|
-
"tabular-nums",
|
|
1120
|
-
// text fill
|
|
1121
|
-
"fill-gray-500",
|
|
1122
|
-
)}
|
|
1123
|
-
tickFormatter={valueFormatter}
|
|
1124
|
-
allowDecimals={allowDecimals}
|
|
1125
1142
|
>
|
|
1126
|
-
{
|
|
1127
|
-
<
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
category: item.dataKey,
|
|
1153
|
-
value: item.value,
|
|
1154
|
-
index: item.payload[index],
|
|
1155
|
-
color: categoryColors.get(
|
|
1156
|
-
item.dataKey,
|
|
1157
|
-
) as ChartColorValue,
|
|
1158
|
-
type: item.type,
|
|
1159
|
-
payload: item.payload,
|
|
1160
|
-
};
|
|
1161
|
-
})
|
|
1162
|
-
: [];
|
|
1163
|
-
|
|
1164
|
-
if (
|
|
1165
|
-
tooltipCallback &&
|
|
1166
|
-
(active !== prevActiveRef.current ||
|
|
1167
|
-
label !== prevLabelRef.current)
|
|
1168
|
-
) {
|
|
1169
|
-
tooltipCallback({ active, payload: cleanPayload, label });
|
|
1170
|
-
prevActiveRef.current = active;
|
|
1171
|
-
prevLabelRef.current = label;
|
|
1143
|
+
{showGridLines ? (
|
|
1144
|
+
<CartesianGrid
|
|
1145
|
+
className={cx("stroke-gray-100")}
|
|
1146
|
+
strokeDasharray="3 3"
|
|
1147
|
+
horizontal={true}
|
|
1148
|
+
vertical={false}
|
|
1149
|
+
/>
|
|
1150
|
+
) : null}
|
|
1151
|
+
<XAxis
|
|
1152
|
+
padding={{ left: paddingValue, right: paddingValue }}
|
|
1153
|
+
hide={!showXAxis}
|
|
1154
|
+
dataKey={index}
|
|
1155
|
+
interval={startEndOnly ? "preserveStartEnd" : intervalType}
|
|
1156
|
+
tick={{
|
|
1157
|
+
transform: "translate(0, 6)",
|
|
1158
|
+
fontSize: 10,
|
|
1159
|
+
fontWeight: 500,
|
|
1160
|
+
fill: "var(--ou-chart-tick)",
|
|
1161
|
+
}}
|
|
1162
|
+
ticks={
|
|
1163
|
+
startEndOnly
|
|
1164
|
+
? ([
|
|
1165
|
+
(data[0] as any)[index],
|
|
1166
|
+
(data[data.length - 1] as any)[index],
|
|
1167
|
+
] as any)
|
|
1168
|
+
: undefined
|
|
1172
1169
|
}
|
|
1170
|
+
fill=""
|
|
1171
|
+
stroke=""
|
|
1172
|
+
className={cx(
|
|
1173
|
+
// base
|
|
1174
|
+
"tabular-nums",
|
|
1175
|
+
// text fill
|
|
1176
|
+
"fill-gray-500",
|
|
1177
|
+
)}
|
|
1178
|
+
tickLine={false}
|
|
1179
|
+
axisLine={false}
|
|
1180
|
+
minTickGap={tickGap}
|
|
1181
|
+
>
|
|
1182
|
+
{xAxisLabel && (
|
|
1183
|
+
<Label
|
|
1184
|
+
position="insideBottom"
|
|
1185
|
+
offset={-20}
|
|
1186
|
+
className="fill-gray-800 text-sm font-medium"
|
|
1187
|
+
>
|
|
1188
|
+
{xAxisLabel}
|
|
1189
|
+
</Label>
|
|
1190
|
+
)}
|
|
1191
|
+
</XAxis>
|
|
1192
|
+
<YAxis
|
|
1193
|
+
width={yAxisWidth}
|
|
1194
|
+
hide={!showYAxis}
|
|
1195
|
+
axisLine={false}
|
|
1196
|
+
tickLine={false}
|
|
1197
|
+
type="number"
|
|
1198
|
+
domain={yAxisDomain as AxisDomain}
|
|
1199
|
+
tick={{
|
|
1200
|
+
transform: "translate(-4, 0)",
|
|
1201
|
+
fontSize: 10,
|
|
1202
|
+
fontWeight: 500,
|
|
1203
|
+
fill: "var(--ou-chart-tick)",
|
|
1204
|
+
}}
|
|
1205
|
+
fill=""
|
|
1206
|
+
stroke=""
|
|
1207
|
+
className={cx(
|
|
1208
|
+
// base
|
|
1209
|
+
"tabular-nums",
|
|
1210
|
+
// text fill
|
|
1211
|
+
"fill-gray-500",
|
|
1212
|
+
)}
|
|
1213
|
+
tickFormatter={valueFormatter}
|
|
1214
|
+
allowDecimals={allowDecimals}
|
|
1215
|
+
>
|
|
1216
|
+
{yAxisLabel && (
|
|
1217
|
+
<Label
|
|
1218
|
+
position="insideLeft"
|
|
1219
|
+
style={{ textAnchor: "middle" }}
|
|
1220
|
+
angle={-90}
|
|
1221
|
+
offset={-15}
|
|
1222
|
+
className="fill-gray-800 text-sm font-medium"
|
|
1223
|
+
>
|
|
1224
|
+
{yAxisLabel}
|
|
1225
|
+
</Label>
|
|
1226
|
+
)}
|
|
1227
|
+
</YAxis>
|
|
1228
|
+
<Tooltip
|
|
1229
|
+
wrapperStyle={{ outline: "none", zIndex: 10 }}
|
|
1230
|
+
isAnimationActive={true}
|
|
1231
|
+
animationDuration={100}
|
|
1232
|
+
cursor={{
|
|
1233
|
+
stroke: "var(--ou-chart-cursor, #d1d5db)",
|
|
1234
|
+
strokeWidth: 1,
|
|
1235
|
+
}}
|
|
1236
|
+
offset={20}
|
|
1237
|
+
position={{ y: 0 }}
|
|
1238
|
+
content={({ active, payload, label }: any) => {
|
|
1239
|
+
const cleanPayload: TooltipProps["payload"] = payload
|
|
1240
|
+
? payload.map((item: any) => {
|
|
1241
|
+
return {
|
|
1242
|
+
category: item.dataKey,
|
|
1243
|
+
value: item.value,
|
|
1244
|
+
index: item.payload[index],
|
|
1245
|
+
color: categoryColors.get(
|
|
1246
|
+
item.dataKey,
|
|
1247
|
+
) as ChartColorValue,
|
|
1248
|
+
type: item.type,
|
|
1249
|
+
payload: item.payload,
|
|
1250
|
+
};
|
|
1251
|
+
})
|
|
1252
|
+
: [];
|
|
1253
|
+
|
|
1254
|
+
if (
|
|
1255
|
+
tooltipCallback &&
|
|
1256
|
+
(active !== prevActiveRef.current ||
|
|
1257
|
+
label !== prevLabelRef.current)
|
|
1258
|
+
) {
|
|
1259
|
+
tooltipCallback({ active, payload: cleanPayload, label });
|
|
1260
|
+
prevActiveRef.current = active;
|
|
1261
|
+
prevLabelRef.current = label;
|
|
1262
|
+
}
|
|
1173
1263
|
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
}}
|
|
1191
|
-
/>
|
|
1192
|
-
|
|
1193
|
-
{showLegend ? (
|
|
1194
|
-
<RechartsLegend
|
|
1195
|
-
verticalAlign="top"
|
|
1196
|
-
height={legendHeight}
|
|
1197
|
-
content={({ payload }: any) => {
|
|
1198
|
-
return ChartLegend(
|
|
1199
|
-
{ payload },
|
|
1200
|
-
categoryColors,
|
|
1201
|
-
setLegendHeight,
|
|
1202
|
-
activeLegend,
|
|
1203
|
-
hasOnValueChange
|
|
1204
|
-
? (clickedLegendItem: string) => {
|
|
1205
|
-
return onCategoryClick(clickedLegendItem);
|
|
1206
|
-
}
|
|
1207
|
-
: undefined,
|
|
1208
|
-
enableLegendSlider,
|
|
1209
|
-
legendPosition,
|
|
1210
|
-
yAxisWidth,
|
|
1211
|
-
);
|
|
1264
|
+
return showTooltip && active ? (
|
|
1265
|
+
CustomTooltip ? (
|
|
1266
|
+
<CustomTooltip
|
|
1267
|
+
active={active}
|
|
1268
|
+
payload={cleanPayload}
|
|
1269
|
+
label={label}
|
|
1270
|
+
/>
|
|
1271
|
+
) : (
|
|
1272
|
+
<ChartTooltip
|
|
1273
|
+
active={active}
|
|
1274
|
+
payload={cleanPayload}
|
|
1275
|
+
label={label}
|
|
1276
|
+
valueFormatter={valueFormatter}
|
|
1277
|
+
/>
|
|
1278
|
+
)
|
|
1279
|
+
) : null;
|
|
1212
1280
|
}}
|
|
1213
1281
|
/>
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
const {
|
|
1270
|
-
stroke,
|
|
1271
|
-
strokeLinecap,
|
|
1272
|
-
strokeLinejoin,
|
|
1273
|
-
strokeWidth,
|
|
1274
|
-
cx: cxCoord,
|
|
1275
|
-
cy: cyCoord,
|
|
1276
|
-
index,
|
|
1277
|
-
} = props;
|
|
1278
|
-
|
|
1279
|
-
if (
|
|
1280
|
-
(hasOnlyOneValueForKey(data, category) &&
|
|
1281
|
-
!(
|
|
1282
|
-
activeDot ||
|
|
1283
|
-
(activeLegend && activeLegend !== category)
|
|
1284
|
-
)) ||
|
|
1285
|
-
(activeDot?.index === index &&
|
|
1286
|
-
activeDot?.dataKey === category)
|
|
1287
|
-
) {
|
|
1282
|
+
|
|
1283
|
+
{showLegend ? (
|
|
1284
|
+
<RechartsLegend
|
|
1285
|
+
verticalAlign="top"
|
|
1286
|
+
/*
|
|
1287
|
+
* Padded so the annotation rail gets a clear strip between
|
|
1288
|
+
* the legend and the plot; see UseChartAnnotations.
|
|
1289
|
+
*/
|
|
1290
|
+
height={legendHeight + annotations.railHeight}
|
|
1291
|
+
content={({ payload }: any) => {
|
|
1292
|
+
return ChartLegend(
|
|
1293
|
+
{ payload },
|
|
1294
|
+
categoryColors,
|
|
1295
|
+
setLegendHeight,
|
|
1296
|
+
activeLegend,
|
|
1297
|
+
hasOnValueChange
|
|
1298
|
+
? (clickedLegendItem: string) => {
|
|
1299
|
+
return onCategoryClick(clickedLegendItem);
|
|
1300
|
+
}
|
|
1301
|
+
: undefined,
|
|
1302
|
+
enableLegendSlider,
|
|
1303
|
+
legendPosition,
|
|
1304
|
+
yAxisWidth,
|
|
1305
|
+
);
|
|
1306
|
+
}}
|
|
1307
|
+
/>
|
|
1308
|
+
) : null}
|
|
1309
|
+
{categories.map((category: string) => {
|
|
1310
|
+
const lineColor: ChartColorValue = categoryColors.get(
|
|
1311
|
+
category,
|
|
1312
|
+
) as ChartColorValue;
|
|
1313
|
+
const isCustomColor: boolean = isHexColorValue(lineColor);
|
|
1314
|
+
const lineHex: string = getColorHex(lineColor);
|
|
1315
|
+
const isGhost: boolean =
|
|
1316
|
+
ghostCategories?.includes(category) || false;
|
|
1317
|
+
return (
|
|
1318
|
+
<Line
|
|
1319
|
+
className={cx(getColorClassName(lineColor, "stroke"))}
|
|
1320
|
+
strokeOpacity={
|
|
1321
|
+
(activeDot || (activeLegend && activeLegend !== category)
|
|
1322
|
+
? 0.3
|
|
1323
|
+
: 1) * (isGhost ? 0.45 : 1)
|
|
1324
|
+
}
|
|
1325
|
+
activeDot={
|
|
1326
|
+
isGhost
|
|
1327
|
+
? false
|
|
1328
|
+
: (props: any) => {
|
|
1329
|
+
const {
|
|
1330
|
+
cx: cxCoord,
|
|
1331
|
+
cy: cyCoord,
|
|
1332
|
+
stroke,
|
|
1333
|
+
strokeLinecap,
|
|
1334
|
+
strokeLinejoin,
|
|
1335
|
+
strokeWidth,
|
|
1336
|
+
} = props;
|
|
1288
1337
|
return (
|
|
1289
1338
|
<Dot
|
|
1290
|
-
|
|
1339
|
+
className={cx(
|
|
1340
|
+
"stroke-white",
|
|
1341
|
+
onValueChange ? "cursor-pointer" : "",
|
|
1342
|
+
getColorClassName(lineColor, "fill"),
|
|
1343
|
+
)}
|
|
1291
1344
|
cx={cxCoord}
|
|
1292
1345
|
cy={cyCoord}
|
|
1293
1346
|
r={5}
|
|
1294
|
-
stroke={stroke}
|
|
1295
1347
|
fill={isCustomColor ? lineHex : ""}
|
|
1348
|
+
stroke={stroke}
|
|
1296
1349
|
strokeLinecap={strokeLinecap}
|
|
1297
1350
|
strokeLinejoin={strokeLinejoin}
|
|
1298
1351
|
strokeWidth={strokeWidth}
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
getColorClassName(lineColor, "fill"),
|
|
1303
|
-
)}
|
|
1352
|
+
onClick={(_: any, event: any) => {
|
|
1353
|
+
return onDotClick(props, event);
|
|
1354
|
+
}}
|
|
1304
1355
|
/>
|
|
1305
1356
|
);
|
|
1306
1357
|
}
|
|
1307
|
-
return <React.Fragment key={index}></React.Fragment>;
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
key={category}
|
|
1311
|
-
name={category}
|
|
1312
|
-
type={props.curve || ChartCurve.LINEAR}
|
|
1313
|
-
dataKey={category}
|
|
1314
|
-
/*
|
|
1315
|
-
* Custom hex → set the stroke inline; named palette → keep ""
|
|
1316
|
-
* so the `stroke-*` Tailwind class on the Line applies.
|
|
1317
|
-
*/
|
|
1318
|
-
stroke={isCustomColor ? lineHex : ""}
|
|
1319
|
-
strokeWidth={isGhost ? 1.5 : 2}
|
|
1320
|
-
strokeLinejoin="round"
|
|
1321
|
-
strokeLinecap="round"
|
|
1322
|
-
isAnimationActive={false}
|
|
1323
|
-
connectNulls={connectNulls}
|
|
1324
|
-
{...(isGhost ? { strokeDasharray: "6 4" } : {})}
|
|
1325
|
-
/>
|
|
1326
|
-
);
|
|
1327
|
-
})}
|
|
1328
|
-
{/* hidden lines to increase clickable target area */}
|
|
1329
|
-
{onValueChange
|
|
1330
|
-
? categories
|
|
1331
|
-
.filter((category: string) => {
|
|
1332
|
-
// Ghosts are context, not click-selectable series.
|
|
1333
|
-
return !(ghostCategories?.includes(category) || false);
|
|
1334
|
-
})
|
|
1335
|
-
.map((category: string) => {
|
|
1336
|
-
return (
|
|
1337
|
-
<Line
|
|
1338
|
-
className={cx("cursor-pointer")}
|
|
1339
|
-
strokeOpacity={0}
|
|
1340
|
-
key={category}
|
|
1341
|
-
name={category}
|
|
1342
|
-
type={props.curve || ChartCurve.LINEAR}
|
|
1343
|
-
dataKey={category}
|
|
1344
|
-
stroke="transparent"
|
|
1345
|
-
fill="transparent"
|
|
1346
|
-
legendType="none"
|
|
1347
|
-
tooltipType="none"
|
|
1348
|
-
strokeWidth={12}
|
|
1349
|
-
connectNulls={connectNulls}
|
|
1350
|
-
onClick={(props: any, event: any) => {
|
|
1351
|
-
event.stopPropagation();
|
|
1352
|
-
const { name } = props;
|
|
1353
|
-
onCategoryClick(name);
|
|
1354
|
-
}}
|
|
1355
|
-
/>
|
|
1356
|
-
);
|
|
1357
|
-
})
|
|
1358
|
-
: null}
|
|
1359
|
-
{props.referenceLines?.map(
|
|
1360
|
-
(refLine: ChartReferenceLineProps, refIndex: number) => {
|
|
1361
|
-
return (
|
|
1362
|
-
<ReferenceLine
|
|
1363
|
-
key={`ref-${refIndex}`}
|
|
1364
|
-
y={refLine.value}
|
|
1365
|
-
stroke={refLine.color}
|
|
1366
|
-
strokeDasharray={refLine.strokeDasharray || "4 4"}
|
|
1367
|
-
strokeWidth={1.5}
|
|
1368
|
-
>
|
|
1369
|
-
{refLine.label && (
|
|
1370
|
-
<Label
|
|
1371
|
-
value={refLine.label}
|
|
1372
|
-
position="insideTopRight"
|
|
1373
|
-
fill={refLine.color}
|
|
1374
|
-
fontSize={11}
|
|
1375
|
-
fontWeight={500}
|
|
1376
|
-
/>
|
|
1377
|
-
)}
|
|
1378
|
-
</ReferenceLine>
|
|
1379
|
-
);
|
|
1380
|
-
},
|
|
1381
|
-
)}
|
|
1382
|
-
{/* Time-anchored shaded regions (e.g. incident/maintenance windows) */}
|
|
1383
|
-
{formattedReferenceRegions?.map(
|
|
1384
|
-
(region: FormattedReferenceRegion, regionIndex: number) => {
|
|
1385
|
-
const regionColor: string = region.original.color || "#6366f1";
|
|
1386
|
-
return (
|
|
1387
|
-
<ReferenceArea
|
|
1388
|
-
key={`ref-region-${regionIndex}`}
|
|
1389
|
-
x1={region.formattedX1}
|
|
1390
|
-
x2={region.formattedX2}
|
|
1391
|
-
fill={regionColor}
|
|
1392
|
-
fillOpacity={0.12}
|
|
1393
|
-
stroke={regionColor}
|
|
1394
|
-
strokeOpacity={0.35}
|
|
1395
|
-
strokeWidth={1}
|
|
1396
|
-
{...(region.original.onClick
|
|
1397
|
-
? {
|
|
1398
|
-
style: { cursor: "pointer" as const },
|
|
1399
|
-
onClick: (...args: Array<unknown>): void => {
|
|
1400
|
-
// Never let an annotation click also pin a bucket.
|
|
1401
|
-
stopChartEventPropagation(...args);
|
|
1402
|
-
if (suppressNextClickRef.current) {
|
|
1403
|
-
return;
|
|
1404
|
-
}
|
|
1405
|
-
region.original.onClick?.();
|
|
1406
|
-
},
|
|
1407
|
-
}
|
|
1408
|
-
: {})}
|
|
1409
|
-
>
|
|
1410
|
-
{region.original.label && (
|
|
1411
|
-
<Label
|
|
1412
|
-
value={region.original.label}
|
|
1413
|
-
position="insideTop"
|
|
1414
|
-
fill={regionColor}
|
|
1415
|
-
fontSize={10}
|
|
1416
|
-
fontWeight={500}
|
|
1417
|
-
/>
|
|
1418
|
-
)}
|
|
1419
|
-
</ReferenceArea>
|
|
1420
|
-
);
|
|
1421
|
-
},
|
|
1422
|
-
)}
|
|
1423
|
-
{/* Time-anchored vertical event markers (e.g. deploys, incidents) */}
|
|
1424
|
-
{formattedTimeReferenceLines?.map(
|
|
1425
|
-
(
|
|
1426
|
-
timeRefLine: FormattedTimeReferenceLine,
|
|
1427
|
-
timeRefIndex: number,
|
|
1428
|
-
) => {
|
|
1429
|
-
const lineColor: string =
|
|
1430
|
-
timeRefLine.original.color || "#f59e0b";
|
|
1431
|
-
return (
|
|
1432
|
-
<ReferenceLine
|
|
1433
|
-
key={`time-ref-${timeRefIndex}`}
|
|
1434
|
-
x={timeRefLine.formattedX}
|
|
1435
|
-
stroke={lineColor}
|
|
1436
|
-
strokeDasharray={
|
|
1437
|
-
timeRefLine.original.strokeDasharray || "4 4"
|
|
1438
1358
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1359
|
+
dot={
|
|
1360
|
+
isGhost
|
|
1361
|
+
? false
|
|
1362
|
+
: (props: any) => {
|
|
1363
|
+
const {
|
|
1364
|
+
stroke,
|
|
1365
|
+
strokeLinecap,
|
|
1366
|
+
strokeLinejoin,
|
|
1367
|
+
strokeWidth,
|
|
1368
|
+
cx: cxCoord,
|
|
1369
|
+
cy: cyCoord,
|
|
1370
|
+
index,
|
|
1371
|
+
} = props;
|
|
1372
|
+
|
|
1373
|
+
if (
|
|
1374
|
+
(hasOnlyOneValueForKey(data, category) &&
|
|
1375
|
+
!(
|
|
1376
|
+
activeDot ||
|
|
1377
|
+
(activeLegend && activeLegend !== category)
|
|
1378
|
+
)) ||
|
|
1379
|
+
(activeDot?.index === index &&
|
|
1380
|
+
activeDot?.dataKey === category)
|
|
1381
|
+
) {
|
|
1382
|
+
return (
|
|
1383
|
+
<Dot
|
|
1384
|
+
key={index}
|
|
1385
|
+
cx={cxCoord}
|
|
1386
|
+
cy={cyCoord}
|
|
1387
|
+
r={5}
|
|
1388
|
+
stroke={stroke}
|
|
1389
|
+
fill={isCustomColor ? lineHex : ""}
|
|
1390
|
+
strokeLinecap={strokeLinecap}
|
|
1391
|
+
strokeLinejoin={strokeLinejoin}
|
|
1392
|
+
strokeWidth={strokeWidth}
|
|
1393
|
+
className={cx(
|
|
1394
|
+
"stroke-white",
|
|
1395
|
+
onValueChange ? "cursor-pointer" : "",
|
|
1396
|
+
getColorClassName(lineColor, "fill"),
|
|
1397
|
+
)}
|
|
1398
|
+
/>
|
|
1399
|
+
);
|
|
1448
1400
|
}
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
{
|
|
1455
|
-
|
|
1401
|
+
return (
|
|
1402
|
+
<React.Fragment key={index}></React.Fragment>
|
|
1403
|
+
);
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
key={category}
|
|
1407
|
+
name={category}
|
|
1408
|
+
type={props.curve || ChartCurve.LINEAR}
|
|
1409
|
+
dataKey={category}
|
|
1410
|
+
/*
|
|
1411
|
+
* Custom hex → set the stroke inline; named palette → keep ""
|
|
1412
|
+
* so the `stroke-*` Tailwind class on the Line applies.
|
|
1413
|
+
*/
|
|
1414
|
+
stroke={isCustomColor ? lineHex : ""}
|
|
1415
|
+
strokeWidth={isGhost ? 1.5 : 2}
|
|
1416
|
+
strokeLinejoin="round"
|
|
1417
|
+
strokeLinecap="round"
|
|
1418
|
+
isAnimationActive={false}
|
|
1419
|
+
connectNulls={connectNulls}
|
|
1420
|
+
{...(isGhost ? { strokeDasharray: "6 4" } : {})}
|
|
1421
|
+
/>
|
|
1422
|
+
);
|
|
1423
|
+
})}
|
|
1424
|
+
{/* hidden lines to increase clickable target area */}
|
|
1425
|
+
{onValueChange
|
|
1426
|
+
? categories
|
|
1427
|
+
.filter((category: string) => {
|
|
1428
|
+
// Ghosts are context, not click-selectable series.
|
|
1429
|
+
return !(ghostCategories?.includes(category) || false);
|
|
1430
|
+
})
|
|
1431
|
+
.map((category: string) => {
|
|
1432
|
+
return (
|
|
1433
|
+
<Line
|
|
1434
|
+
className={cx("cursor-pointer")}
|
|
1435
|
+
strokeOpacity={0}
|
|
1436
|
+
key={category}
|
|
1437
|
+
name={category}
|
|
1438
|
+
type={props.curve || ChartCurve.LINEAR}
|
|
1439
|
+
dataKey={category}
|
|
1440
|
+
stroke="transparent"
|
|
1441
|
+
fill="transparent"
|
|
1442
|
+
legendType="none"
|
|
1443
|
+
tooltipType="none"
|
|
1444
|
+
strokeWidth={12}
|
|
1445
|
+
connectNulls={connectNulls}
|
|
1446
|
+
onClick={(props: any, event: any) => {
|
|
1447
|
+
event.stopPropagation();
|
|
1448
|
+
const { name } = props;
|
|
1449
|
+
onCategoryClick(name);
|
|
1450
|
+
}}
|
|
1451
|
+
/>
|
|
1452
|
+
);
|
|
1453
|
+
})
|
|
1454
|
+
: null}
|
|
1455
|
+
{props.referenceLines?.map(
|
|
1456
|
+
(refLine: ChartReferenceLineProps, refIndex: number) => {
|
|
1457
|
+
return (
|
|
1458
|
+
<ReferenceLine
|
|
1459
|
+
key={`ref-${refIndex}`}
|
|
1460
|
+
y={refLine.value}
|
|
1461
|
+
stroke={refLine.color}
|
|
1462
|
+
strokeDasharray={refLine.strokeDasharray || "4 4"}
|
|
1463
|
+
strokeWidth={1.5}
|
|
1464
|
+
>
|
|
1465
|
+
{refLine.label && (
|
|
1456
1466
|
<Label
|
|
1457
|
-
value={
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
* Several markers: run each label down its
|
|
1462
|
-
* own line so labels at different x stop
|
|
1463
|
-
* sharing one horizontal band.
|
|
1464
|
-
*/
|
|
1465
|
-
position: "insideTopLeft" as const,
|
|
1466
|
-
angle: 90,
|
|
1467
|
-
}
|
|
1468
|
-
: { position: "insideTop" as const })}
|
|
1469
|
-
fill={lineColor}
|
|
1470
|
-
fontSize={10}
|
|
1467
|
+
value={refLine.label}
|
|
1468
|
+
position="insideTopRight"
|
|
1469
|
+
fill={refLine.color}
|
|
1470
|
+
fontSize={11}
|
|
1471
1471
|
fontWeight={500}
|
|
1472
1472
|
/>
|
|
1473
1473
|
)}
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1474
|
+
</ReferenceLine>
|
|
1475
|
+
);
|
|
1476
|
+
},
|
|
1477
|
+
)}
|
|
1478
|
+
{/*
|
|
1479
|
+
* Event markers and shaded windows: hairlines through the plot
|
|
1480
|
+
* topped by a chip rail in the chart's top margin. Everything
|
|
1481
|
+
* that used to be painted over the series as rotated text now
|
|
1482
|
+
* lives in the chip's hover card.
|
|
1483
|
+
*/}
|
|
1484
|
+
{annotations.layer}
|
|
1485
|
+
{/* Exemplar dots - clickable markers linking to traces */}
|
|
1486
|
+
{props.formattedExemplarPoints?.map(
|
|
1487
|
+
(exemplar: FormattedExemplarPoint, exemplarIndex: number) => {
|
|
1488
|
+
return (
|
|
1489
|
+
<ReferenceDot
|
|
1490
|
+
key={`exemplar-${exemplarIndex}`}
|
|
1491
|
+
x={exemplar.formattedX}
|
|
1492
|
+
y={exemplar.y}
|
|
1493
|
+
r={5}
|
|
1494
|
+
fill="#7c3aed"
|
|
1495
|
+
stroke="var(--ou-chart-marker-ring, #ffffff)"
|
|
1496
|
+
strokeWidth={2}
|
|
1497
|
+
style={{ cursor: "pointer" }}
|
|
1498
|
+
onClick={(...args: Array<unknown>) => {
|
|
1499
|
+
// Never let an exemplar click also pin a bucket.
|
|
1500
|
+
stopChartEventPropagation(...args);
|
|
1501
|
+
// Ignore the click that follows a drag-to-select.
|
|
1502
|
+
if (suppressNextClickRef.current) {
|
|
1503
|
+
return;
|
|
1504
|
+
}
|
|
1505
|
+
props.onExemplarClick?.(exemplar.original);
|
|
1506
|
+
}}
|
|
1507
|
+
>
|
|
1508
|
+
<Label
|
|
1509
|
+
value="E"
|
|
1510
|
+
position="center"
|
|
1511
|
+
/*
|
|
1512
|
+
* Sits on the dot's purple, not on the surface, so it must
|
|
1513
|
+
* not follow the ring token that flips dark with the theme.
|
|
1514
|
+
*/
|
|
1515
|
+
fill="#ffffff"
|
|
1516
|
+
fontSize={8}
|
|
1517
|
+
fontWeight={700}
|
|
1518
|
+
/>
|
|
1519
|
+
</ReferenceDot>
|
|
1520
|
+
);
|
|
1521
|
+
},
|
|
1522
|
+
)}
|
|
1523
|
+
{/* Live drag-to-select highlight */}
|
|
1524
|
+
{rangeSelectionStart && rangeSelectionEnd ? (
|
|
1525
|
+
<ReferenceArea
|
|
1526
|
+
x1={rangeSelectionStart}
|
|
1527
|
+
x2={rangeSelectionEnd}
|
|
1528
|
+
fill="rgba(99,102,241,0.12)"
|
|
1529
|
+
stroke="rgba(99,102,241,0.5)"
|
|
1530
|
+
strokeWidth={1}
|
|
1531
|
+
radius={2}
|
|
1532
|
+
/>
|
|
1533
|
+
) : null}
|
|
1534
|
+
</RechartsLineChart>
|
|
1535
|
+
</ResponsiveContainer>
|
|
1536
|
+
{annotations.overlay}
|
|
1537
|
+
</div>
|
|
1529
1538
|
</div>
|
|
1530
1539
|
);
|
|
1531
1540
|
},
|