@oneuptime/common 14.0.8 → 14.0.10
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/AutoRemediationSuggestion.ts +60 -0
- package/Models/DatabaseModels/CephCluster.ts +213 -0
- package/Models/DatabaseModels/DatabaseServer.ts +213 -0
- package/Models/DatabaseModels/DockerHost.ts +213 -0
- package/Models/DatabaseModels/DockerSwarmCluster.ts +213 -0
- package/Models/DatabaseModels/GlobalConfig.ts +1 -1
- package/Models/DatabaseModels/Host.ts +213 -0
- package/Models/DatabaseModels/Index.ts +4 -0
- package/Models/DatabaseModels/KubernetesAiAgent.ts +364 -0
- package/Models/DatabaseModels/KubernetesCluster.ts +3 -3
- package/Models/DatabaseModels/PodmanHost.ts +213 -0
- package/Models/DatabaseModels/Project.ts +55 -5
- package/Models/DatabaseModels/ProxmoxCluster.ts +213 -0
- package/Models/DatabaseModels/ProxmoxResource.ts +49 -1
- package/Models/DatabaseModels/ResourceAiAgent.ts +419 -0
- package/Models/DatabaseModels/RunnerJob.ts +219 -0
- package/Models/DatabaseModels/TeamComplianceSetting.ts +143 -2
- package/Models/DatabaseModels/VMwareVCenter.ts +213 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.ts +17 -0
- package/Server/API/AIChatAPI.ts +6 -3
- package/Server/API/AIInvestigationAPI.ts +17 -10
- package/Server/API/AutoRemediationAPI.ts +598 -25
- package/Server/API/KubernetesClusterAiAccessAPI.ts +623 -21
- package/Server/API/MicrosoftTeamsAPI.ts +93 -14
- package/Server/API/ProxmoxResourceAPI.ts +244 -14
- package/Server/API/ResourceAiAccessAPI.ts +1669 -0
- package/Server/Infrastructure/GlobalCache.ts +32 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1796000000000-AddTeamComplianceRuleScope.ts +99 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1796100000000-AddKubernetesAiAgentAndAiDefaults.ts +137 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1796200000000-AddProxmoxResourceNativePushColumns.ts +42 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1796300000000-AddResourceAiAgents.ts +423 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +8 -0
- package/Server/Infrastructure/Semaphore.ts +22 -0
- package/Server/Middleware/TelemetryIngest.ts +51 -18
- package/Server/Services/AIService.ts +70 -1
- package/Server/Services/AlertService.ts +352 -11
- package/Server/Services/AlertSeverityService.ts +65 -15
- package/Server/Services/AnalyticsDatabaseService.ts +45 -1
- package/Server/Services/AutoRemediationRuleEngineService.ts +940 -112
- package/Server/Services/AutoRemediationRuleService.ts +1 -1
- package/Server/Services/CephClusterService.ts +109 -1
- package/Server/Services/DatabaseServerService.ts +116 -1
- package/Server/Services/DockerHostService.ts +109 -1
- package/Server/Services/DockerSwarmClusterService.ts +113 -1
- package/Server/Services/HostService.ts +126 -4
- package/Server/Services/IncidentService.ts +280 -104
- package/Server/Services/IncidentSeverityService.ts +66 -15
- package/Server/Services/KubernetesAiAgentJobService.ts +185 -0
- package/Server/Services/KubernetesAiAgentService.ts +1634 -0
- package/Server/Services/KubernetesClusterAiAccessService.ts +1118 -451
- package/Server/Services/KubernetesClusterService.ts +129 -21
- package/Server/Services/MetricRecordingRuleService.ts +47 -0
- package/Server/Services/PodmanHostService.ts +109 -1
- package/Server/Services/ProjectService.ts +32 -0
- package/Server/Services/ProxmoxClusterService.ts +110 -1
- package/Server/Services/ProxmoxResourceService.ts +322 -5
- package/Server/Services/ResourceAiAccessService.ts +1439 -0
- package/Server/Services/ResourceAiAgentJobService.ts +202 -0
- package/Server/Services/ResourceAiAgentService.ts +2432 -0
- package/Server/Services/RunnerJobService.ts +852 -108
- package/Server/Services/RunnerService.ts +1 -1
- package/Server/Services/ScheduledMaintenanceService.ts +737 -1
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +414 -56
- package/Server/Services/TeamComplianceSettingService.ts +1125 -9
- package/Server/Services/TelemetryUsageBillingService.ts +28 -0
- package/Server/Services/TraceRecordingRuleService.ts +33 -0
- package/Server/Services/VMwareVCenterService.ts +110 -1
- package/Server/Utils/AI/ClusterAccess/ClusterAccessContext.ts +67 -9
- package/Server/Utils/AI/ClusterAccess/KubectlInvestigationToolkit.ts +39 -10
- package/Server/Utils/AI/ClusterAccess/KubectlJobRunner.ts +14 -3
- package/Server/Utils/AI/Remediation/RemediationCommandTools.ts +1475 -51
- package/Server/Utils/AI/Remediation/RemediationExecutionRunner.ts +1000 -43
- package/Server/Utils/AI/Remediation/RemediationPlanRunner.ts +25 -1
- package/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.ts +577 -0
- package/Server/Utils/AI/ResourceAccess/ResourceAccessContext.ts +271 -0
- package/Server/Utils/AI/ResourceAccess/ResourceAccessToolNames.ts +45 -0
- package/Server/Utils/AI/ResourceAccess/ResourceAiAccessSettings.ts +964 -0
- package/Server/Utils/AI/ResourceAccess/ResourceAiDeleteCleanup.ts +333 -0
- package/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.ts +873 -0
- package/Server/Utils/AI/SRE/AIInvestigationEngine.ts +120 -7
- package/Server/Utils/AI/SRE/AlertInvestigationRunner.ts +72 -5
- package/Server/Utils/AI/SRE/IncidentInvestigationRunner.ts +72 -5
- package/Server/Utils/AI/SRE/IncidentPostmortemRunner.ts +40 -8
- package/Server/Utils/AI/SRE/InvestigationEligibility.ts +13 -2
- package/Server/Utils/AI/SRE/InvestigationGrader.ts +1 -1
- package/Server/Utils/AutoRemediation/CommandPlanExecutor.ts +402 -14
- package/Server/Utils/AutoRemediation/RemediationVerifier.ts +35 -2
- package/Server/Utils/Database/ProjectScopedReferenceValidator.ts +9 -1
- package/Server/Utils/SessionReplay/SessionReplayBudgetMetrics.ts +920 -0
- package/Server/Utils/SessionReplay/SessionReplayUsage.ts +84 -6
- package/Server/Utils/Telemetry/InventoryEntityRegistry.ts +133 -7
- package/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.ts +58 -4
- package/Server/Utils/Telemetry/ProxmoxNativeNodeLiveness.ts +447 -0
- package/Server/Utils/Telemetry/ProxmoxNativePush.ts +903 -0
- package/Server/Utils/Telemetry/TelemetryEntity.ts +87 -27
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +35 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +33 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +21 -1
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +298 -224
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.ts +35 -15
- package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +389 -175
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +1073 -213
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsActivityDeduplicator.ts +163 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCardChoices.ts +396 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCommands.ts +418 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsMessageSize.ts +152 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsReplies.ts +251 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezone.ts +214 -0
- package/Tests/App/AdminDashboard/RowActionPlacementOverrides.test.tsx +278 -0
- package/Tests/App/Dashboard/AIChatChartWidgetZoom.test.tsx +738 -0
- package/Tests/App/Dashboard/AIFeaturesSettingsPointers.test.tsx +147 -0
- package/Tests/App/Dashboard/AIInsightsKubernetesClusterPage.test.tsx +1523 -0
- package/Tests/App/Dashboard/AdminUserNotificationMethodsPage.test.tsx +463 -3
- package/Tests/App/Dashboard/AffectedResourcesPickerDropdownPlacement.test.tsx +958 -0
- package/Tests/App/Dashboard/AffectedResourcesPickerFocusLeave.test.tsx +595 -0
- package/Tests/App/Dashboard/AskAiAvailability.test.ts +20 -3
- package/Tests/App/Dashboard/AskAiDisabled.test.tsx +8 -3
- package/Tests/App/Dashboard/CephRateChartReload.test.tsx +1456 -0
- package/Tests/App/Dashboard/CephTimeRangeZoom.test.tsx +1229 -0
- package/Tests/App/Dashboard/ChartCardTimeRangeZoom.test.tsx +151 -0
- package/Tests/App/Dashboard/ChartCardZoomAffordances.test.tsx +257 -0
- package/Tests/App/Dashboard/ChartRefetchFrame.test.tsx +141 -0
- package/Tests/App/Dashboard/ChartZoomHarness.tsx +249 -0
- package/Tests/App/Dashboard/ChartZoomStandIn.tsx +131 -0
- package/Tests/App/Dashboard/CloudServerlessSlowLoads.test.tsx +628 -0
- package/Tests/App/Dashboard/CloudServerlessTimeRangeZoom.test.tsx +607 -0
- package/Tests/App/Dashboard/ClusterAccessNotice.test.tsx +184 -19
- package/Tests/App/Dashboard/CompanionMetricsTabZoom.test.tsx +632 -0
- package/Tests/App/Dashboard/ContainerChartZoomStandIn.tsx +195 -0
- package/Tests/App/Dashboard/ContainerHostOverviewSlowLoads.test.tsx +542 -0
- package/Tests/App/Dashboard/ContainerHostOverviewTimeRangeZoom.test.tsx +848 -0
- package/Tests/App/Dashboard/ContainerMetricsTimeRangeZoom.test.tsx +561 -0
- package/Tests/App/Dashboard/DashboardBoardWideZoomShell.test.tsx +1147 -0
- package/Tests/App/Dashboard/DashboardEditPermissions.test.tsx +3 -2
- package/Tests/App/Dashboard/DashboardHistogramWidgetDragCursor.test.tsx +399 -0
- package/Tests/App/Dashboard/DashboardHistogramWidgetZoom.test.tsx +985 -0
- package/Tests/App/Dashboard/DashboardHistogramWidgetZoomHint.test.tsx +803 -0
- package/Tests/App/Dashboard/DashboardLazyPages.test.tsx +1 -0
- package/Tests/App/Dashboard/DashboardSettingsPreviewZoom.test.tsx +679 -0
- package/Tests/App/Dashboard/DashboardSloAndDataSourceChartZoom.test.tsx +881 -0
- package/Tests/App/Dashboard/DashboardTraceStatusWidgets.test.tsx +878 -0
- package/Tests/App/Dashboard/DatabaseDocumentationMarkdown.test.ts +18 -6
- package/Tests/App/Dashboard/DatabaseMetricChartModalTimeRangeZoom.test.tsx +442 -0
- package/Tests/App/Dashboard/DatabaseOverviewTimeRangeZoom.test.tsx +831 -0
- package/Tests/App/Dashboard/DatabaseServerComponents.test.tsx +43 -0
- package/Tests/App/Dashboard/DockerSwarmInsightsTimeRangeZoom.test.tsx +524 -0
- package/Tests/App/Dashboard/DockerSwarmRateChartRefresh.test.tsx +259 -0
- package/Tests/App/Dashboard/EdgeDetailPanelHistory.test.tsx +763 -0
- package/Tests/App/Dashboard/EdgeDetailPanelTimeRangeZoom.test.tsx +547 -0
- package/Tests/App/Dashboard/EdgeHistoryBucketsCases.tsx +565 -0
- package/Tests/App/Dashboard/EdgeHistoryBucketsKathmandu.test.tsx +73 -0
- package/Tests/App/Dashboard/EdgeHistoryBucketsKolkata.test.tsx +74 -0
- package/Tests/App/Dashboard/EdgeHistoryBucketsNewYork.test.tsx +72 -0
- package/Tests/App/Dashboard/EdgeHistoryBucketsUtc.test.tsx +72 -0
- package/Tests/App/Dashboard/EmbeddedMetricCardRefresh.test.tsx +310 -0
- package/Tests/App/Dashboard/EmbeddedMetricCardTimeRangeZoom.test.tsx +536 -0
- package/Tests/App/Dashboard/EscalationRuleReadiness.test.tsx +3 -1
- package/Tests/App/Dashboard/EscalationRuleRowActions.test.tsx +660 -0
- package/Tests/App/Dashboard/EventNotes.test.tsx +2 -2
- package/Tests/App/Dashboard/EventOverviewPages.test.tsx +587 -13
- package/Tests/App/Dashboard/EventOverviewSnapshotExplorerZoom.test.tsx +1139 -0
- package/Tests/App/Dashboard/EventOverviewSnapshotZoomAcrossTabs.test.tsx +1057 -0
- package/Tests/App/Dashboard/EventOverviewTelemetrySnapshotZoom.test.tsx +757 -0
- package/Tests/App/Dashboard/ExceptionOccurrenceTrendZoom.test.tsx +675 -0
- package/Tests/App/Dashboard/ExceptionOccurrencesZoomSurvivesViewSwitch.test.tsx +405 -0
- package/Tests/App/Dashboard/ExceptionSignalPages.test.tsx +67 -3
- package/Tests/App/Dashboard/ExceptionTablesSpanStatus.test.tsx +515 -0
- package/Tests/App/Dashboard/ExplorerOwnZoomRegression.test.tsx +739 -0
- package/Tests/App/Dashboard/FlowBandwidthAxisCases.tsx +461 -0
- package/Tests/App/Dashboard/FlowBandwidthAxisKathmandu.test.tsx +25 -0
- package/Tests/App/Dashboard/FlowBandwidthAxisKolkata.test.tsx +25 -0
- package/Tests/App/Dashboard/FlowBandwidthAxisNewYork.test.tsx +25 -0
- package/Tests/App/Dashboard/FlowBandwidthAxisUtc.test.tsx +24 -0
- package/Tests/App/Dashboard/FlowTopTalkersZoomRefetch.test.tsx +722 -0
- package/Tests/App/Dashboard/FlowViewportGuard.test.tsx +2526 -0
- package/Tests/App/Dashboard/HostPagesSlowLoads.test.tsx +872 -0
- package/Tests/App/Dashboard/HostPagesTimeRangeZoom.test.tsx +1208 -0
- package/Tests/App/Dashboard/IncidentRootCauseTimeRangeZoom.test.tsx +358 -0
- package/Tests/App/Dashboard/InfrastructureGraph.test.tsx +100 -9
- package/Tests/App/Dashboard/InfrastructureMetricsTabTimeRangeZoom.test.tsx +485 -0
- package/Tests/App/Dashboard/InvestigationDrawerCompanionZoom.test.tsx +655 -0
- package/Tests/App/Dashboard/InvestigationDrawerZoom.test.tsx +830 -0
- package/Tests/App/Dashboard/InvestigationInfrastructureTools.test.tsx +506 -0
- package/Tests/App/Dashboard/InvestigationNotStarted.test.tsx +338 -2
- package/Tests/App/Dashboard/InvoicesPayInvoice.test.tsx +454 -16
- package/Tests/App/Dashboard/KubernetesClusterAiAccessSettings.test.ts +799 -819
- package/Tests/App/Dashboard/KubernetesClusterAiAgentOverviewCard.test.tsx +367 -0
- package/Tests/App/Dashboard/KubernetesClusterAiAgentStatus.test.ts +1202 -0
- package/Tests/App/Dashboard/KubernetesClusterAiDocumentationMarkdown.test.ts +106 -0
- package/Tests/App/Dashboard/KubernetesClusterAiNavigation.test.tsx +354 -0
- package/Tests/App/Dashboard/KubernetesClusterAiPage.test.tsx +1884 -2054
- package/Tests/App/Dashboard/KubernetesClusterAiPageServerParity.test.ts +478 -179
- package/Tests/App/Dashboard/KubernetesClusterMetricTooltips.test.ts +50 -0
- package/Tests/App/Dashboard/KubernetesClusterOverviewTooltips.test.tsx +2 -1
- package/Tests/App/Dashboard/KubernetesClusterOverviewZoom.test.tsx +1217 -0
- package/Tests/App/Dashboard/KubernetesClusterPagesZoom.test.tsx +731 -0
- package/Tests/App/Dashboard/KubernetesCostsLoadRecovery.test.tsx +869 -0
- package/Tests/App/Dashboard/KubernetesCostsZoom.test.tsx +1214 -0
- package/Tests/App/Dashboard/KubernetesCostsZoomExactHours.test.tsx +692 -0
- package/Tests/App/Dashboard/KubernetesNetworkThroughputReload.test.tsx +902 -0
- package/Tests/App/Dashboard/KubernetesNetworkZoomBucketEdges.test.tsx +571 -0
- package/Tests/App/Dashboard/KubernetesOverviewZoomBucketEdges.test.tsx +697 -0
- package/Tests/App/Dashboard/KubernetesResourceMetricsTabZoom.test.tsx +633 -0
- package/Tests/App/Dashboard/LogsExplorerTimeRangeZoom.test.tsx +470 -0
- package/Tests/App/Dashboard/LogsInsightsTimeRangeZoom.test.tsx +948 -0
- package/Tests/App/Dashboard/LogsViewerPinnedWindowZoom.test.tsx +486 -0
- package/Tests/App/Dashboard/MetricChartsBucketInspectorDoubleClick.test.tsx +1001 -0
- package/Tests/App/Dashboard/MetricExplorerInvestigationAutoRefresh.test.tsx +514 -0
- package/Tests/App/Dashboard/MetricExplorerSavedViewZoomRoundTrip.test.tsx +581 -0
- package/Tests/App/Dashboard/MetricExplorerTimeRangeZoom.test.tsx +1162 -0
- package/Tests/App/Dashboard/MetricMonitorPreviewZoomLabel.test.ts +72 -0
- package/Tests/App/Dashboard/MetricRowSparklineTimeRangeZoom.test.tsx +204 -0
- package/Tests/App/Dashboard/MetricViewFirstResultLands.test.tsx +408 -0
- package/Tests/App/Dashboard/MetricViewOwnZoomResetPlacement.test.tsx +952 -0
- package/Tests/App/Dashboard/MetricViewTimeRange.test.ts +139 -0
- package/Tests/App/Dashboard/MetricViewTimeRangeZoom.test.tsx +556 -0
- package/Tests/App/Dashboard/MonitorMetricsChartWrappersZoom.test.tsx +552 -0
- package/Tests/App/Dashboard/MonitorMetricsTabsTimeRangeZoom.test.tsx +740 -0
- package/Tests/App/Dashboard/MonitorOverviewChartsTimeRangeZoom.test.tsx +735 -0
- package/Tests/App/Dashboard/MonitorStepPreviewsTimeRangeZoom.test.tsx +835 -0
- package/Tests/App/Dashboard/NetworkDeviceTimeRangeZoom.test.tsx +1115 -0
- package/Tests/App/Dashboard/OnCallPreventionGuards.test.tsx +186 -17
- package/Tests/App/Dashboard/OnCallRulesDeleteGuard.test.tsx +155 -46
- package/Tests/App/Dashboard/PasskeySettings.test.tsx +87 -2
- package/Tests/App/Dashboard/ProjectAISettingsPages.test.tsx +884 -0
- package/Tests/App/Dashboard/ProxmoxNodeRemove.test.tsx +621 -0
- package/Tests/App/Dashboard/ProxmoxOverviewSlowLoads.test.tsx +584 -0
- package/Tests/App/Dashboard/ProxmoxPagesTimeRangeZoom.test.tsx +823 -0
- package/Tests/App/Dashboard/ProxmoxRateChartReload.test.tsx +1253 -0
- package/Tests/App/Dashboard/PublicDashboardBoardWideZoom.test.tsx +605 -0
- package/Tests/App/Dashboard/RealRowsLineChart.tsx +250 -0
- package/Tests/App/Dashboard/RechartsHostsPlotCursor.test.tsx +513 -0
- package/Tests/App/Dashboard/RemediationSuggestionCardDescription.test.tsx +209 -0
- package/Tests/App/Dashboard/RemediationSuggestionCardResource.test.tsx +317 -0
- package/Tests/App/Dashboard/ResourceAiAccessSettingsUtil.test.ts +921 -0
- package/Tests/App/Dashboard/ResourceAiAgentInstall.test.ts +860 -0
- package/Tests/App/Dashboard/ResourceAiAgentPage.test.tsx +1721 -0
- package/Tests/App/Dashboard/ResourceAiAgentStatus.test.ts +1002 -0
- package/Tests/App/Dashboard/ResourceAiInsightsPage.test.tsx +931 -0
- package/Tests/App/Dashboard/ResourceAiNavigation.test.tsx +575 -0
- package/Tests/App/Dashboard/RowActionPlacementOverrides.test.tsx +865 -0
- package/Tests/App/Dashboard/RumOverviewTimeRangeZoom.test.tsx +877 -0
- package/Tests/App/Dashboard/RunbookStepTypeMaps.test.ts +38 -7
- package/Tests/App/Dashboard/RunnerKubernetesAgentForm.test.tsx +20 -4
- package/Tests/App/Dashboard/RunnerSupersededByAiAgentNote.test.tsx +296 -0
- package/Tests/App/Dashboard/SecurityEventConnectionsTable.test.tsx +146 -36
- package/Tests/App/Dashboard/ServiceDatabaseSlowLoads.test.tsx +1166 -0
- package/Tests/App/Dashboard/ServiceMapGraph.test.tsx +1243 -104
- package/Tests/App/Dashboard/ServiceOverviewTimeRangeZoom.test.tsx +792 -0
- package/Tests/App/Dashboard/SloBudgetBurnDownZoom.test.tsx +771 -0
- package/Tests/App/Dashboard/SloBudgetBurnDownZoomAffordances.test.tsx +380 -0
- package/Tests/App/Dashboard/SloEventMetricsBarChartZoom.test.tsx +369 -0
- package/Tests/App/Dashboard/SloHistoryChartsTimeRangeZoom.test.tsx +694 -0
- package/Tests/App/Dashboard/SloHistoryChartsZoomAffordances.test.tsx +497 -0
- package/Tests/App/Dashboard/SloMetricsTimeRangeZoom.test.tsx +541 -0
- package/Tests/App/Dashboard/SlowLoadHarness.ts +123 -0
- package/Tests/App/Dashboard/SnapshotExplorerPrimaryZoom.test.tsx +1194 -0
- package/Tests/App/Dashboard/SnapshotViewerPinnedWindow.test.tsx +620 -0
- package/Tests/App/Dashboard/TelemetrySnapshotPanelTimeRangeZoom.test.tsx +765 -0
- package/Tests/App/Dashboard/TelemetrySnapshotZoom.test.tsx +516 -0
- package/Tests/App/Dashboard/TelemetrySnapshotZoomAcrossTabs.test.tsx +827 -0
- package/Tests/App/Dashboard/TimeRangeZoomPageHarness.tsx +463 -0
- package/Tests/App/Dashboard/TraceChartEditorStatusSplit.test.tsx +543 -0
- package/Tests/App/Dashboard/TraceStatusPresentation.test.tsx +967 -0
- package/Tests/App/Dashboard/TraceTimelineMinimapZoom.test.tsx +315 -0
- package/Tests/App/Dashboard/TracesAnalyticsStatusSplit.test.tsx +778 -0
- package/Tests/App/Dashboard/TracesAnalyticsViewZoom.test.tsx +349 -0
- package/Tests/App/Dashboard/TracesExplorerTimeRangeZoom.test.tsx +551 -0
- package/Tests/App/Dashboard/TracesStatusChartAndFacet.test.tsx +687 -0
- package/Tests/App/Dashboard/TracesViewerStaleResponses.test.tsx +458 -0
- package/Tests/App/Dashboard/UptimeStripsExcludedFromZoom.test.tsx +406 -0
- package/Tests/App/Dashboard/VMwareOverviewSlowLoads.test.tsx +535 -0
- package/Tests/App/Dashboard/VMwarePagesTimeRangeZoom.test.tsx +606 -0
- package/Tests/App/Dashboard/ValueWidgetSparklineStaleHover.test.tsx +1292 -0
- package/Tests/App/Dashboard/ValueWidgetSparklineZoom.test.tsx +765 -0
- package/Tests/App/StatusPage/StatusPageResourceExplorer.test.tsx +98 -0
- package/Tests/Models/DatabaseModels/DatabaseServerModels.test.ts +33 -1
- package/Tests/Models/DatabaseModels/KubernetesAiAgentModel.test.ts +295 -0
- package/Tests/Models/DatabaseModels/ResourceAiAccessColumns.test.ts +738 -0
- package/Tests/Models/DatabaseModels/ResourceAiAgentModel.test.ts +842 -0
- package/Tests/Models/DatabaseModels/TeamComplianceSettingModel.test.ts +347 -0
- package/Tests/Server/API/AIChatRouteAuthorization.test.ts +58 -0
- package/Tests/Server/API/AIGenerationProjectAIToggle.test.ts +1 -1
- package/Tests/Server/API/AIInvestigationAPI.test.ts +123 -45
- package/Tests/Server/API/AutoRemediationApproveClusterRound.test.ts +1329 -0
- package/Tests/Server/API/AutoRemediationApproveKubectlRecheck.test.ts +25 -2
- package/Tests/Server/API/AutoRemediationApproveResourceRound.test.ts +835 -0
- package/Tests/Server/API/KubernetesClusterAiAccessAPI.test.ts +2 -0
- package/Tests/Server/API/KubernetesClusterAiAccessAPIAgent.test.ts +903 -0
- package/Tests/Server/API/MicrosoftTeamsChatsRefreshRoute.test.ts +667 -0
- package/Tests/Server/API/MicrosoftTeamsManifest.test.ts +294 -6
- package/Tests/Server/API/ProxmoxResourceAPIRemoveNode.test.ts +1932 -0
- package/Tests/Server/API/ResourceAiAccessAPI.test.ts +2730 -0
- package/Tests/Server/Infrastructure/GlobalCache.test.ts +195 -0
- package/Tests/Server/Infrastructure/Postgres/AddDatabaseServerTablesMigration.test.ts +60 -0
- package/Tests/Server/Infrastructure/Postgres/AddKubernetesAiAgentAndAiDefaultsMigration.test.ts +623 -0
- package/Tests/Server/Infrastructure/Postgres/AddKubernetesClusterAiAccessMigration.test.ts +87 -10
- package/Tests/Server/Infrastructure/Postgres/AddResourceAiAgentsMigration.test.ts +659 -0
- package/Tests/Server/Infrastructure/Postgres/AddTeamComplianceRuleScopeMigration.test.ts +622 -0
- package/Tests/Server/Infrastructure/SemaphoreMutex.test.ts +31 -0
- package/Tests/Server/Middleware/TelemetryIngestBrowserKey.test.ts +119 -4
- package/Tests/Server/Middleware/TelemetryIngestKubernetesAgentRunnerPinnedKey.test.ts +196 -2
- package/Tests/Server/Middleware/TelemetryIngestKubernetesAgentRunnerRateLimit.test.ts +123 -2
- package/Tests/Server/Services/AIServiceBalanceBlocker.test.ts +282 -0
- package/Tests/Server/Services/AlertMonitorClearWritesNull.test.ts +409 -0
- package/Tests/Server/Services/AlertMonitorEditFeed.test.ts +474 -0
- package/Tests/Server/Services/AlertMonitorEditGuard.test.ts +610 -0
- package/Tests/Server/Services/AutoRemediationClusterRuleEngine.test.ts +2 -0
- package/Tests/Server/Services/AutoRemediationResourceRuleEngine.test.ts +1279 -0
- package/Tests/Server/Services/AutoRemediationRuleCommandRunners.test.ts +2 -1
- package/Tests/Server/Services/DatabaseServerService.test.ts +55 -0
- package/Tests/Server/Services/GroupTelemetryUsageExcludeNames.test.ts +299 -0
- package/Tests/Server/Services/HostServiceFindOrCreateMemo.test.ts +44 -0
- package/Tests/Server/Services/IncidentAffectedMonitorsEdit.test.ts +1360 -0
- package/Tests/Server/Services/IncidentAlertSloLinkSurvivesEdit.test.ts +3 -1
- package/Tests/Server/Services/IncidentSeverityDeletePausesComplianceRules.test.ts +488 -0
- package/Tests/Server/Services/KubernetesAiAgentJobService.test.ts +329 -0
- package/Tests/Server/Services/KubernetesAiAgentServiceHelpers.test.ts +618 -0
- package/Tests/Server/Services/KubernetesAiAgentServiceLifecycle.test.ts +1444 -0
- package/Tests/Server/Services/KubernetesAiAgentServiceRegister.test.ts +1666 -0
- package/Tests/Server/Services/KubernetesClusterAiAccessDeletedRunnerRemedy.test.ts +140 -111
- package/Tests/Server/Services/KubernetesClusterAiAccessGapNextSteps.test.ts +267 -105
- package/Tests/Server/Services/KubernetesClusterAiAccessLegacySuperseded.test.ts +440 -0
- package/Tests/Server/Services/KubernetesClusterAiAccessService.test.ts +567 -411
- package/Tests/Server/Services/KubernetesClusterAiAccessTarget.test.ts +1168 -0
- package/Tests/Server/Services/KubernetesClusterAiSettingsPermission.test.ts +410 -12
- package/Tests/Server/Services/KubernetesClusterServiceAiAccessFeed.test.ts +55 -0
- package/Tests/Server/Services/MonitorProbeServiceIntervalScheduling.test.ts +45 -6
- package/Tests/Server/Services/ProjectServiceNewProjectAiDefaults.test.ts +288 -0
- package/Tests/Server/Services/ProxmoxResourcePostgres.test.ts +5633 -0
- package/Tests/Server/Services/ProxmoxResourceService.test.ts +6458 -5
- package/Tests/Server/Services/RecordingRuleReservedMetricName.test.ts +171 -0
- package/Tests/Server/Services/ResourceAiAccessChangeAuthorization.test.ts +256 -0
- package/Tests/Server/Services/ResourceAiAccessService.test.ts +1373 -0
- package/Tests/Server/Services/ResourceAiAgentJobService.test.ts +375 -0
- package/Tests/Server/Services/ResourceAiAgentServiceHelpers.test.ts +1114 -0
- package/Tests/Server/Services/ResourceAiAgentServiceLifecycle.test.ts +1050 -0
- package/Tests/Server/Services/ResourceAiAgentServiceRegister.test.ts +2251 -0
- package/Tests/Server/Services/ResourceAiSettingsCreate.test.ts +373 -0
- package/Tests/Server/Services/ResourceAiSettingsPermission.test.ts +1042 -0
- package/Tests/Server/Services/ResourceServiceDeleteCleansUpAi.test.ts +319 -0
- package/Tests/Server/Services/RunnerJobEnqueueKubectl.test.ts +153 -15
- package/Tests/Server/Services/RunnerJobEnqueueKubectlAiAgent.test.ts +620 -0
- package/Tests/Server/Services/RunnerJobEnqueueResourceCommand.test.ts +986 -0
- package/Tests/Server/Services/RunnerJobKubectlWriteScope.test.ts +170 -3
- package/Tests/Server/Services/RunnerJobResourceCommandLane.test.ts +211 -0
- package/Tests/Server/Services/RunnerJobResourceCommandTimeoutAndRedaction.test.ts +352 -0
- package/Tests/Server/Services/RunnerJobTimeoutReason.test.ts +72 -0
- package/Tests/Server/Services/RunnerServiceAgentName.test.ts +6 -4
- package/Tests/Server/Services/ScheduledMaintenanceAttachmentEdit.test.ts +2113 -0
- package/Tests/Server/Services/ScheduledMaintenanceMonitorRelease.test.ts +972 -0
- package/Tests/Server/Services/TeamComplianceSettingPostgres.test.ts +2237 -0
- package/Tests/Server/Services/TeamComplianceSettingService.test.ts +3988 -138
- package/Tests/Server/Services/TelemetryUsageBillingSloExclusion.test.ts +218 -0
- package/Tests/Server/TestingUtils/Services/FakeRunnerJobCount.ts +145 -0
- package/Tests/Server/Utils/AI/ClusterAccessContext.test.ts +107 -1
- package/Tests/Server/Utils/AI/IncidentPostmortemRunner.test.ts +351 -0
- package/Tests/Server/Utils/AI/InvestigationClusterAccessWiring.test.ts +2 -0
- package/Tests/Server/Utils/AI/InvestigationEligibility.test.ts +310 -0
- package/Tests/Server/Utils/AI/InvestigationInfrastructureAccessWiring.test.ts +453 -0
- package/Tests/Server/Utils/AI/InvestigationInfrastructureReport.test.ts +721 -0
- package/Tests/Server/Utils/AI/KubectlInvestigationToolkit.test.ts +70 -0
- package/Tests/Server/Utils/AI/KubectlJobRunnerFinishedJob.test.ts +58 -0
- package/Tests/Server/Utils/AI/RemediationCommandTools.test.ts +94 -1
- package/Tests/Server/Utils/AI/RemediationCommandToolsKubectl.test.ts +2 -0
- package/Tests/Server/Utils/AI/RemediationCommandToolsKubectlOutcome.test.ts +2 -0
- package/Tests/Server/Utils/AI/RemediationCommandToolsLiveCluster.test.ts +2 -0
- package/Tests/Server/Utils/AI/RemediationCommandToolsResource.test.ts +1530 -0
- package/Tests/Server/Utils/AI/RemediationCommandToolsRunnerScope.test.ts +125 -1
- package/Tests/Server/Utils/AI/RemediationExecutionRunner.test.ts +252 -3
- package/Tests/Server/Utils/AI/RemediationExecutionRunnerClusterMode.test.ts +2 -0
- package/Tests/Server/Utils/AI/RemediationExecutionRunnerProjectGates.test.ts +240 -0
- package/Tests/Server/Utils/AI/RemediationExecutionRunnerResourceMode.test.ts +1249 -0
- package/Tests/Server/Utils/AI/RemediationKubectlCopyParity.test.ts +2 -0
- package/Tests/Server/Utils/AI/RemediationPlanRunner.test.ts +117 -0
- package/Tests/Server/Utils/AI/RemediationResourceCopyParity.test.ts +463 -0
- package/Tests/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.test.ts +722 -0
- package/Tests/Server/Utils/AI/ResourceAccess/ResourceAccessContext.test.ts +266 -0
- package/Tests/Server/Utils/AI/ResourceAccess/ResourceAiAccessSettings.test.ts +1220 -0
- package/Tests/Server/Utils/AI/ResourceAccess/ResourceAiDeleteCleanup.test.ts +569 -0
- package/Tests/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.test.ts +830 -0
- package/Tests/Server/Utils/AutoRemediation/CommandPlanExecutor.test.ts +2 -0
- package/Tests/Server/Utils/AutoRemediation/CommandPlanExecutorResource.test.ts +717 -0
- package/Tests/Server/Utils/AutoRemediation/CommandPlanExecutorUnknownRun.test.ts +2 -0
- package/Tests/Server/Utils/AutoRemediation/CommandPlanVerification.test.ts +2 -0
- package/Tests/Server/Utils/AutoRemediation/RemediationVerifierResourceFollowUp.test.ts +338 -0
- package/Tests/Server/Utils/Monitor/Criteria/SessionReplayBudgetTemplateCriteria.test.ts +422 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayBudgetMetrics.test.ts +1647 -0
- package/Tests/Server/Utils/SessionReplay/SessionReplayUsage.test.ts +143 -1
- package/Tests/Server/Utils/Telemetry/HostAssetAttributesFromOtlp.test.ts +68 -0
- package/Tests/Server/Utils/Telemetry/InventoryMirrorPostgres.test.ts +370 -0
- package/Tests/Server/Utils/Telemetry/NetworkDeviceInventoryAttributes.test.ts +522 -0
- package/Tests/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.test.ts +155 -0
- package/Tests/Server/Utils/Telemetry/ProxmoxNativeNodeLiveness.test.ts +8631 -0
- package/Tests/Server/Utils/Telemetry/ProxmoxNativePush.test.ts +2852 -0
- package/Tests/Server/Utils/Telemetry/TelemetryEntity.test.ts +367 -1
- package/Tests/Server/Utils/Telemetry/TelemetryIngestionKeyGuard.test.ts +75 -3
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsAccountNotLinked.test.ts +1093 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsActivityDeduplicator.test.ts +1049 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCardChoices.test.ts +1676 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCards.test.ts +2884 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCommands.test.ts +2490 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateSubmit.test.ts +2293 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateSubmitServerTimezone.test.ts +386 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsMessageSize.test.ts +1477 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsReplies.test.ts +1967 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsStripHtmlTags.test.ts +92 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsSubmittedFormRemoval.test.ts +1819 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezone.test.ts +1033 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezoneServerZone.test.ts +610 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsBotMessageHandling.test.ts +2610 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsChats.test.ts +25 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsCreateCommandsEndToEnd.test.ts +4672 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsGroupChatNames.test.ts +3119 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsGroupChatNamesPostgres.test.ts +1721 -0
- package/Tests/Server/Utils/Workspace/WorkspaceCreateProjectReferences.test.ts +190 -65
- package/Tests/Types/AutoRemediation/AiRemediationCommandPlan.test.ts +10 -4
- package/Tests/Types/AutoRemediation/AiRemediationCommandPlanResourceCommand.test.ts +305 -0
- package/Tests/Types/Kubernetes/KubernetesAgentChartAiAccess.test.ts +581 -113
- package/Tests/Types/Kubernetes/KubernetesAiAgentAccessContract.test.ts +510 -0
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationCatalog.test.ts +277 -13
- package/Tests/Types/Monitor/Recommendation/MonitorRecommendationUtil.test.ts +113 -0
- package/Tests/Types/Monitor/RumAlertTemplates.test.ts +773 -2
- package/Tests/Types/ResourceAiAgent/AiResourceType.test.ts +419 -0
- package/Tests/Types/ResourceAiAgent/ResourceAiAccess.test.ts +517 -0
- package/Tests/Types/Runbook/RunbookStepType.test.ts +147 -8
- package/Tests/Types/Team/ComplianceRule.test.ts +1029 -0
- package/Tests/Types/Team/TeamComplianceStatus.test.ts +176 -0
- package/Tests/UI/Components/ActionButton/RowActions.test.tsx +641 -0
- package/Tests/UI/Components/ActionButton/RowActionsAccessibility.test.tsx +414 -0
- package/Tests/UI/Components/ActionButton/SplitActionButtons.test.ts +565 -0
- package/Tests/UI/Components/Charts/BarChartDragToSelect.test.tsx +386 -0
- package/Tests/UI/Components/Charts/ChartDoubleClickResetWithoutDblclick.test.tsx +1025 -0
- package/Tests/UI/Components/Charts/ChartGroupPageZoomHint.test.tsx +196 -0
- package/Tests/UI/Components/Charts/ChartPlaceholdersTakeDoubleClick.test.tsx +1861 -0
- package/Tests/UI/Components/Charts/ChartPlotClicksWhileResetArmed.test.tsx +382 -0
- package/Tests/UI/Components/Charts/ChartRangeSelection.test.tsx +704 -0
- package/Tests/UI/Components/Charts/ChartRangeSelectionDoubleClickReset.test.tsx +1481 -0
- package/Tests/UI/Components/Charts/ChartRangeSelectionRealRecharts.test.tsx +918 -0
- package/Tests/UI/Components/Charts/ChartRowBucketStart.test.ts +350 -0
- package/Tests/UI/Components/Charts/DoubleClickReset.test.tsx +996 -0
- package/Tests/UI/Components/Charts/HistogramDoubleClickResetRealRecharts.test.tsx +965 -0
- package/Tests/UI/Components/Charts/HistogramDriftThenRefetch.test.tsx +277 -0
- package/Tests/UI/Components/Charts/HistogramRangeSelectionDataChange.test.tsx +1757 -0
- package/Tests/UI/Components/Charts/HistogramRangeSelectionRealRecharts.test.tsx +560 -0
- package/Tests/UI/Components/Charts/TimeRangeZoom/ChartPageTimeRangeZoom.test.tsx +513 -0
- package/Tests/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomContext.test.tsx +845 -0
- package/Tests/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomHint.test.tsx +119 -0
- package/Tests/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomHintTailwind.test.tsx +274 -0
- package/Tests/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomUtil.test.ts +433 -0
- package/Tests/UI/Components/Charts/TimeRangeZoom/UseTimeRangeZoom.test.tsx +863 -0
- package/Tests/UI/Components/Charts/TimeRangeZoom/ZoomDocsPromises.test.tsx +1147 -0
- package/Tests/UI/Components/DisabledButtonTooltip.test.tsx +14 -3
- package/Tests/UI/Components/EntityDropdownEscape.test.tsx +454 -0
- package/Tests/UI/Components/EntityDropdownFocusLeave.test.tsx +420 -0
- package/Tests/UI/Components/Forms/FormFieldDropdownDisabled.test.tsx +233 -0
- package/Tests/UI/Components/Input.test.tsx +80 -1
- package/Tests/UI/Components/LogsAnalyticsViewZoom.test.tsx +947 -0
- package/Tests/UI/Components/LogsHistogramDragTooltip.test.tsx +17 -5
- package/Tests/UI/Components/LogsViewerAnalyticsZoom.test.tsx +501 -0
- package/Tests/UI/Components/LogsViewerHistogramZoom.test.tsx +1 -1
- package/Tests/UI/Components/ModelTable/BaseModelTableBulkDelete.test.tsx +6 -4
- package/Tests/UI/Components/ModelTable/BaseModelTablePermissionGating.test.tsx +60 -8
- package/Tests/UI/Components/ModelTable/BaseModelTableRowActions.test.tsx +476 -0
- package/Tests/UI/Components/ModelTable/ModelTableWrapContent.test.tsx +7 -5
- package/Tests/UI/Components/MoreMenuPortal.test.tsx +623 -0
- package/Tests/UI/Components/StatusPage/ResourceGridActions.test.tsx +538 -0
- package/Tests/UI/Components/StatusPage/ResourceGridSelection.test.tsx +14 -4
- package/Tests/UI/Components/TableCellWrapping.test.tsx +3 -3
- package/Tests/UI/Components/TableRowActions.test.tsx +472 -0
- package/Tests/UI/Components/TelemetryHistogramDragTooltip.test.tsx +1 -1
- package/Tests/UI/Components/TelemetryViewer/TelemetryViewerHistogramClickZoom.test.tsx +1 -1
- package/Tests/UI/Components/TelemetryViewer/TelemetryViewerZoomScope.test.tsx +470 -0
- package/Tests/UI/Components/TelemetryViewer/UseViewerTimeRangeZoom.test.tsx +571 -0
- package/Tests/UI/Components/TelemetryViewer/ViewerDoubleClickResetUnderDataChange.test.tsx +928 -0
- package/Tests/UI/Components/TelemetryViewer/ViewerFollowsEnclosingZoom.test.tsx +1569 -0
- package/Tests/UI/Components/Toggle.test.tsx +66 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsChatsCardRefreshNames.test.tsx +1023 -0
- package/Tests/UI/Rum/ChunkLoader.test.ts +201 -0
- package/Tests/UI/Rum/FidelityNotices.test.ts +54 -0
- package/Tests/UI/Rum/RecordingHealthDashboard.test.tsx +769 -1
- package/Tests/UI/Rum/ReplayCorrelationPanel.test.tsx +72 -0
- package/Tests/UI/Rum/ReplayFrameCapture.test.ts +1009 -9
- package/Tests/UI/Rum/ReplayRecordedAssets.test.ts +1069 -0
- package/Tests/UI/Rum/ReplayStage.test.tsx +913 -2
- package/Tests/UI/Rum/SessionReplayTable.test.tsx +443 -8
- package/Tests/UI/Rum/SessionReplayUsersTable.test.tsx +439 -9
- package/Tests/UI/Rum/UserFlowTablesRowActions.test.tsx +501 -0
- package/Tests/Utils/AiRemediation/KubectlPolicyChartRbacParity.test.ts +47 -19
- package/Tests/Utils/AiRemediation/KubectlWriteScopeCallerParity.test.ts +2 -0
- package/Tests/Utils/AiRemediation/KubernetesAiAgentPolicyCopyParity.test.ts +396 -0
- package/Tests/Utils/AiRemediation/Resource/CephCommandPolicy.test.ts +1653 -0
- package/Tests/Utils/AiRemediation/Resource/CephOutputRedaction.test.ts +204 -0
- package/Tests/Utils/AiRemediation/Resource/DatabaseCommandPolicy.test.ts +1077 -0
- package/Tests/Utils/AiRemediation/Resource/DatabaseDiagnosticCatalog.test.ts +558 -0
- package/Tests/Utils/AiRemediation/Resource/DatabaseQueryRedactor.test.ts +834 -0
- package/Tests/Utils/AiRemediation/Resource/DockerCliGrammar.test.ts +747 -0
- package/Tests/Utils/AiRemediation/Resource/DockerEngineCommandPolicy.test.ts +1259 -0
- package/Tests/Utils/AiRemediation/Resource/DockerOutputRedaction.test.ts +386 -0
- package/Tests/Utils/AiRemediation/Resource/DockerSwarmCommandPolicy.test.ts +782 -0
- package/Tests/Utils/AiRemediation/Resource/GovcCommandPolicy.test.ts +2259 -0
- package/Tests/Utils/AiRemediation/Resource/HostCommandPolicy.test.ts +2019 -0
- package/Tests/Utils/AiRemediation/Resource/ProxmoxCommandPolicy.test.ts +2497 -0
- package/Tests/Utils/AiRemediation/Resource/ResourceCommandPolicy.test.ts +1305 -0
- package/Tests/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.test.ts +585 -0
- package/Tests/Utils/AiRemediation/Resource/ResourceOutputRedactor.test.ts +334 -0
- package/Tests/Utils/AiRemediation/Resource/ResourceOutputRedactorCopyParity.test.ts +98 -0
- package/Tests/Utils/AiRemediation/Resource/ResourcePolicyImportClosure.test.ts +391 -0
- package/Tests/Utils/AiRemediation/ResourceAiAgentPolicyCopyParity.test.ts +497 -0
- package/Tests/Utils/Dashboard/DashboardTimeRangeZoom.test.ts +104 -1
- package/Tests/Utils/SessionReplay/SessionReplayBudgetMetricType.test.ts +383 -0
- package/Types/AI/AIRunType.ts +9 -4
- package/Types/AI/InvestigationNotStartedReason.ts +6 -0
- package/Types/AI/ResourceAiAccessApi.ts +140 -0
- package/Types/AI/ResourceAiAccessPermissions.ts +126 -0
- package/Types/AutoRemediation/AiRemediationCommandPlan.ts +197 -18
- package/Types/AutoRemediation/AiRemediationCommandPolicyVerdict.ts +28 -0
- package/Types/Dashboard/DashboardComponents/DashboardTraceChartComponent.ts +4 -2
- package/Types/Kubernetes/KubernetesClusterAiAccess.ts +263 -32
- package/Types/Kubernetes/KubernetesClusterAiAccessPermissions.ts +20 -16
- package/Types/Kubernetes/KubernetesClusterAiInsights.ts +81 -0
- package/Types/Monitor/ProxmoxAlertTemplates.ts +4 -4
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.ts +55 -22
- package/Types/Monitor/Recommendation/MonitorRecommendationTypes.ts +35 -3
- package/Types/Monitor/RumAlertTemplates.ts +351 -4
- package/Types/ResourceAiAgent/AiResourceType.ts +310 -0
- package/Types/ResourceAiAgent/ResourceAiAccess.ts +574 -0
- package/Types/Rum/SessionReplayBudgetMetricType.ts +47 -0
- package/Types/Runbook/RunbookStepType.ts +29 -0
- package/Types/Team/ComplianceNotificationChannel.ts +22 -0
- package/Types/Team/ComplianceRule.ts +434 -0
- package/Types/Team/ComplianceRuleType.ts +21 -0
- package/Types/Team/TeamComplianceStatus.ts +81 -0
- package/Types/Telemetry/TelemetryIngestSurface.ts +40 -0
- package/UI/Components/ActionButton/ActionButtonSchema.ts +21 -0
- package/UI/Components/ActionButton/RowActions.tsx +238 -0
- package/UI/Components/ActionButton/SplitActionButtons.ts +173 -0
- package/UI/Components/Charts/Area/AreaChart.tsx +32 -2
- package/UI/Components/Charts/Bar/BarChart.tsx +40 -3
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +37 -11
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +80 -243
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +122 -31
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +95 -244
- package/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.ts +214 -0
- package/UI/Components/Charts/ChartLibrary/Utils/UseChartBucketsChange.ts +32 -0
- package/UI/Components/Charts/ChartLibrary/Utils/UseChartRangeSelection.ts +599 -0
- package/UI/Components/Charts/Line/LineChart.tsx +32 -2
- package/UI/Components/Charts/TimeRangeZoom/ResetTimeRangeZoomButton.tsx +70 -0
- package/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomContext.tsx +226 -0
- package/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomHint.tsx +73 -0
- package/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomUtil.ts +163 -0
- package/UI/Components/Charts/TimeRangeZoom/UseTimeRangeZoom.ts +215 -0
- package/UI/Components/Charts/Utils/DataPoint.ts +20 -8
- package/UI/Components/Charts/Utils/XAxis.ts +75 -0
- package/UI/Components/Charts/Utils/useHistogramRangeSelection.ts +493 -59
- package/UI/Components/EntityDropdown/EntityDropdown.tsx +107 -11
- package/UI/Components/Forms/Fields/FormField.tsx +10 -0
- package/UI/Components/Input/Input.tsx +90 -57
- package/UI/Components/List/ListRow.tsx +8 -74
- package/UI/Components/LogsViewer/LogsViewer.tsx +40 -11
- package/UI/Components/LogsViewer/components/LogTimeRangePicker.tsx +22 -6
- package/UI/Components/LogsViewer/components/LogsAnalyticsView.tsx +209 -6
- package/UI/Components/LogsViewer/components/LogsHistogram.tsx +127 -84
- package/UI/Components/LogsViewer/components/LogsViewerToolbar.tsx +3 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +12 -1
- package/UI/Components/MoreMenu/MoreMenu.tsx +365 -30
- package/UI/Components/MoreMenu/MoreMenuItem.tsx +70 -17
- package/UI/Components/OrderedStatesList/Item.tsx +7 -72
- package/UI/Components/StatusPage/ResourceGrid.tsx +126 -77
- package/UI/Components/Table/TableBody.tsx +8 -2
- package/UI/Components/Table/TableRow.tsx +20 -140
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +41 -10
- package/UI/Components/TelemetryViewer/components/TelemetryHistogram.tsx +47 -9
- package/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.tsx +25 -6
- package/UI/Components/TelemetryViewer/types.ts +2 -0
- package/UI/Components/TelemetryViewer/useViewerTimeRangeZoom.ts +448 -0
- package/UI/Components/Toggle/Toggle.tsx +26 -0
- package/UI/Components/Tooltip/Tooltip.tsx +8 -1
- package/UI/Styles/Theme.css +14 -2
- package/Utils/AI/InvestigationReport.ts +121 -15
- package/Utils/AiRemediation/CommandPolicy.ts +1 -1
- package/Utils/AiRemediation/KubectlPolicy.ts +1 -1
- package/Utils/AiRemediation/Resource/CephCommandPolicy.ts +1936 -0
- package/Utils/AiRemediation/Resource/DatabaseCommandPolicy.ts +166 -0
- package/Utils/AiRemediation/Resource/DatabaseDiagnosticCatalog.ts +1532 -0
- package/Utils/AiRemediation/Resource/DatabaseQueryRedactor.ts +1394 -0
- package/Utils/AiRemediation/Resource/DockerCliGrammar.ts +1839 -0
- package/Utils/AiRemediation/Resource/DockerEngineCommandPolicy.ts +490 -0
- package/Utils/AiRemediation/Resource/DockerSwarmCommandPolicy.ts +687 -0
- package/Utils/AiRemediation/Resource/GovcCommandPolicy.ts +2096 -0
- package/Utils/AiRemediation/Resource/HostCommandPolicy.ts +2982 -0
- package/Utils/AiRemediation/Resource/ProxmoxCommandPolicy.ts +1679 -0
- package/Utils/AiRemediation/Resource/ResourceCommandPolicy.ts +851 -0
- package/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.ts +593 -0
- package/Utils/AiRemediation/Resource/ResourceOutputRedactor.ts +2812 -0
- package/Utils/Dashboard/DashboardTimeRangeZoom.ts +46 -2
- package/Utils/SessionReplay/SessionReplayBudgetMetricType.ts +184 -0
- package/build/dist/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
- package/build/dist/Models/DatabaseModels/AutoRemediationSuggestion.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephCluster.js +219 -0
- package/build/dist/Models/DatabaseModels/CephCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DatabaseServer.js +219 -0
- package/build/dist/Models/DatabaseModels/DatabaseServer.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerHost.js +219 -0
- package/build/dist/Models/DatabaseModels/DockerHost.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js +219 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Host.js +219 -0
- package/build/dist/Models/DatabaseModels/Host.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/KubernetesAiAgent.js +385 -0
- package/build/dist/Models/DatabaseModels/KubernetesAiAgent.js.map +1 -0
- package/build/dist/Models/DatabaseModels/KubernetesCluster.js +3 -3
- package/build/dist/Models/DatabaseModels/KubernetesCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHost.js +219 -0
- package/build/dist/Models/DatabaseModels/PodmanHost.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +56 -5
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js +219 -0
- package/build/dist/Models/DatabaseModels/ProxmoxCluster.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ProxmoxResource.js +51 -1
- package/build/dist/Models/DatabaseModels/ProxmoxResource.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ResourceAiAgent.js +439 -0
- package/build/dist/Models/DatabaseModels/ResourceAiAgent.js.map +1 -0
- package/build/dist/Models/DatabaseModels/RunnerJob.js +219 -0
- package/build/dist/Models/DatabaseModels/RunnerJob.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamComplianceSetting.js +134 -3
- package/build/dist/Models/DatabaseModels/TeamComplianceSetting.js.map +1 -1
- package/build/dist/Models/DatabaseModels/VMwareVCenter.js +219 -0
- package/build/dist/Models/DatabaseModels/VMwareVCenter.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkspaceProjectAuthToken.js.map +1 -1
- package/build/dist/Server/API/AIChatAPI.js +6 -1
- package/build/dist/Server/API/AIChatAPI.js.map +1 -1
- package/build/dist/Server/API/AIInvestigationAPI.js +17 -10
- package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
- package/build/dist/Server/API/AutoRemediationAPI.js +374 -24
- package/build/dist/Server/API/AutoRemediationAPI.js.map +1 -1
- package/build/dist/Server/API/KubernetesClusterAiAccessAPI.js +436 -22
- package/build/dist/Server/API/KubernetesClusterAiAccessAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +69 -13
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/ProxmoxResourceAPI.js +187 -14
- package/build/dist/Server/API/ProxmoxResourceAPI.js.map +1 -1
- package/build/dist/Server/API/ResourceAiAccessAPI.js +1119 -0
- package/build/dist/Server/API/ResourceAiAccessAPI.js.map +1 -0
- package/build/dist/Server/Infrastructure/GlobalCache.js +27 -0
- package/build/dist/Server/Infrastructure/GlobalCache.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796000000000-AddTeamComplianceRuleScope.js +50 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796000000000-AddTeamComplianceRuleScope.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796100000000-AddKubernetesAiAgentAndAiDefaults.js +84 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796100000000-AddKubernetesAiAgentAndAiDefaults.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796200000000-AddProxmoxResourceNativePushColumns.js +31 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796200000000-AddProxmoxResourceNativePushColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796300000000-AddResourceAiAgents.js +168 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1796300000000-AddResourceAiAgents.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +8 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Semaphore.js +6 -0
- package/build/dist/Server/Infrastructure/Semaphore.js.map +1 -1
- package/build/dist/Server/Middleware/TelemetryIngest.js +41 -19
- package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +59 -1
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +248 -13
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AlertSeverityService.js +51 -15
- package/build/dist/Server/Services/AlertSeverityService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +26 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/AutoRemediationRuleEngineService.js +601 -3
- package/build/dist/Server/Services/AutoRemediationRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/AutoRemediationRuleService.js +1 -1
- package/build/dist/Server/Services/AutoRemediationRuleService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterService.js +104 -0
- package/build/dist/Server/Services/CephClusterService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseServerService.js +99 -0
- package/build/dist/Server/Services/DatabaseServerService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +104 -0
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js +104 -0
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +114 -2
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +199 -72
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentSeverityService.js +51 -15
- package/build/dist/Server/Services/IncidentSeverityService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesAiAgentJobService.js +158 -0
- package/build/dist/Server/Services/KubernetesAiAgentJobService.js.map +1 -0
- package/build/dist/Server/Services/KubernetesAiAgentService.js +1145 -0
- package/build/dist/Server/Services/KubernetesAiAgentService.js.map +1 -0
- package/build/dist/Server/Services/KubernetesClusterAiAccessService.js +842 -371
- package/build/dist/Server/Services/KubernetesClusterAiAccessService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +86 -17
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/MetricRecordingRuleService.js +46 -0
- package/build/dist/Server/Services/MetricRecordingRuleService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostService.js +104 -0
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +22 -0
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js +104 -0
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxResourceService.js +258 -3
- package/build/dist/Server/Services/ProxmoxResourceService.js.map +1 -1
- package/build/dist/Server/Services/ResourceAiAccessService.js +1028 -0
- package/build/dist/Server/Services/ResourceAiAccessService.js.map +1 -0
- package/build/dist/Server/Services/ResourceAiAgentJobService.js +173 -0
- package/build/dist/Server/Services/ResourceAiAgentJobService.js.map +1 -0
- package/build/dist/Server/Services/ResourceAiAgentService.js +1687 -0
- package/build/dist/Server/Services/ResourceAiAgentService.js.map +1 -0
- package/build/dist/Server/Services/RunnerJobService.js +522 -97
- package/build/dist/Server/Services/RunnerJobService.js.map +1 -1
- package/build/dist/Server/Services/RunnerService.js +1 -1
- package/build/dist/Server/Services/RunnerService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +535 -3
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +316 -46
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/TeamComplianceSettingService.js +833 -7
- package/build/dist/Server/Services/TeamComplianceSettingService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +26 -0
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/TraceRecordingRuleService.js +37 -0
- package/build/dist/Server/Services/TraceRecordingRuleService.js.map +1 -1
- package/build/dist/Server/Services/VMwareVCenterService.js +104 -0
- package/build/dist/Server/Services/VMwareVCenterService.js.map +1 -1
- package/build/dist/Server/Utils/AI/ClusterAccess/ClusterAccessContext.js +52 -9
- package/build/dist/Server/Utils/AI/ClusterAccess/ClusterAccessContext.js.map +1 -1
- package/build/dist/Server/Utils/AI/ClusterAccess/KubectlInvestigationToolkit.js +13 -9
- package/build/dist/Server/Utils/AI/ClusterAccess/KubectlInvestigationToolkit.js.map +1 -1
- package/build/dist/Server/Utils/AI/ClusterAccess/KubectlJobRunner.js +7 -3
- package/build/dist/Server/Utils/AI/ClusterAccess/KubectlJobRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationCommandTools.js +1056 -43
- package/build/dist/Server/Utils/AI/Remediation/RemediationCommandTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationExecutionRunner.js +683 -42
- package/build/dist/Server/Utils/AI/Remediation/RemediationExecutionRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationPlanRunner.js +21 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationPlanRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.js +330 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/InfrastructureInvestigationToolkit.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAccessContext.js +160 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAccessContext.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAccessToolNames.js +33 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAccessToolNames.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAiAccessSettings.js +640 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAiAccessSettings.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAiDeleteCleanup.js +226 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceAiDeleteCleanup.js.map +1 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.js +600 -0
- package/build/dist/Server/Utils/AI/ResourceAccess/ResourceCommandJobRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js +89 -9
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/AlertInvestigationRunner.js +55 -4
- package/build/dist/Server/Utils/AI/SRE/AlertInvestigationRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/IncidentInvestigationRunner.js +55 -4
- package/build/dist/Server/Utils/AI/SRE/IncidentInvestigationRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/IncidentPostmortemRunner.js +30 -3
- package/build/dist/Server/Utils/AI/SRE/IncidentPostmortemRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/InvestigationEligibility.js +13 -2
- package/build/dist/Server/Utils/AI/SRE/InvestigationEligibility.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js +1 -1
- package/build/dist/Server/Utils/AutoRemediation/CommandPlanExecutor.js +294 -15
- package/build/dist/Server/Utils/AutoRemediation/CommandPlanExecutor.js.map +1 -1
- package/build/dist/Server/Utils/AutoRemediation/RemediationVerifier.js +29 -1
- package/build/dist/Server/Utils/AutoRemediation/RemediationVerifier.js.map +1 -1
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js +9 -1
- package/build/dist/Server/Utils/Database/ProjectScopedReferenceValidator.js.map +1 -1
- package/build/dist/Server/Utils/SessionReplay/SessionReplayBudgetMetrics.js +627 -0
- package/build/dist/Server/Utils/SessionReplay/SessionReplayBudgetMetrics.js.map +1 -0
- package/build/dist/Server/Utils/SessionReplay/SessionReplayUsage.js +60 -5
- package/build/dist/Server/Utils/SessionReplay/SessionReplayUsage.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/InventoryEntityRegistry.js +111 -6
- package/build/dist/Server/Utils/Telemetry/InventoryEntityRegistry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js +40 -4
- package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ProxmoxNativeNodeLiveness.js +296 -0
- package/build/dist/Server/Utils/Telemetry/ProxmoxNativeNodeLiveness.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/ProxmoxNativePush.js +699 -0
- package/build/dist/Server/Utils/Telemetry/ProxmoxNativePush.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +77 -19
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +19 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +19 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +17 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +183 -209
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.js +19 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/IncidentEpisode.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +233 -167
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +768 -152
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsActivityDeduplicator.js +129 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsActivityDeduplicator.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCardChoices.js +266 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCardChoices.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCommands.js +258 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsCreateCommands.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsMessageSize.js +104 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsMessageSize.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsReplies.js +183 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsReplies.js.map +1 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezone.js +123 -0
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeamsTimezone.js.map +1 -0
- package/build/dist/Types/AI/AIRunType.js +9 -4
- package/build/dist/Types/AI/AIRunType.js.map +1 -1
- package/build/dist/Types/AI/ResourceAiAccessApi.js +30 -0
- package/build/dist/Types/AI/ResourceAiAccessApi.js.map +1 -0
- package/build/dist/Types/AI/ResourceAiAccessPermissions.js +98 -0
- package/build/dist/Types/AI/ResourceAiAccessPermissions.js.map +1 -0
- package/build/dist/Types/AutoRemediation/AiRemediationCommandPlan.js +126 -45
- package/build/dist/Types/AutoRemediation/AiRemediationCommandPlan.js.map +1 -1
- package/build/dist/Types/AutoRemediation/AiRemediationCommandPolicyVerdict.js +28 -0
- package/build/dist/Types/AutoRemediation/AiRemediationCommandPolicyVerdict.js.map +1 -0
- package/build/dist/Types/Kubernetes/KubernetesClusterAiAccess.js +72 -16
- package/build/dist/Types/Kubernetes/KubernetesClusterAiAccess.js.map +1 -1
- package/build/dist/Types/Kubernetes/KubernetesClusterAiAccessPermissions.js +20 -16
- package/build/dist/Types/Kubernetes/KubernetesClusterAiAccessPermissions.js.map +1 -1
- package/build/dist/Types/Kubernetes/KubernetesClusterAiInsights.js +17 -0
- package/build/dist/Types/Kubernetes/KubernetesClusterAiInsights.js.map +1 -0
- package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js +4 -4
- package/build/dist/Types/Monitor/ProxmoxAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +47 -21
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js.map +1 -1
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js +5 -0
- package/build/dist/Types/Monitor/Recommendation/MonitorRecommendationTypes.js.map +1 -1
- package/build/dist/Types/Monitor/RumAlertTemplates.js +199 -3
- package/build/dist/Types/Monitor/RumAlertTemplates.js.map +1 -1
- package/build/dist/Types/ResourceAiAgent/AiResourceType.js +242 -0
- package/build/dist/Types/ResourceAiAgent/AiResourceType.js.map +1 -0
- package/build/dist/Types/ResourceAiAgent/ResourceAiAccess.js +275 -0
- package/build/dist/Types/ResourceAiAgent/ResourceAiAccess.js.map +1 -0
- package/build/dist/Types/Rum/SessionReplayBudgetMetricType.js +45 -0
- package/build/dist/Types/Rum/SessionReplayBudgetMetricType.js.map +1 -0
- package/build/dist/Types/Runbook/RunbookStepType.js +27 -0
- package/build/dist/Types/Runbook/RunbookStepType.js.map +1 -1
- package/build/dist/Types/Team/ComplianceNotificationChannel.js +23 -0
- package/build/dist/Types/Team/ComplianceNotificationChannel.js.map +1 -0
- package/build/dist/Types/Team/ComplianceRule.js +304 -0
- package/build/dist/Types/Team/ComplianceRule.js.map +1 -0
- package/build/dist/Types/Team/ComplianceRuleType.js +21 -0
- package/build/dist/Types/Team/ComplianceRuleType.js.map +1 -1
- package/build/dist/Types/Team/TeamComplianceStatus.js +2 -0
- package/build/dist/Types/Team/TeamComplianceStatus.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetryIngestSurface.js +36 -0
- package/build/dist/Types/Telemetry/TelemetryIngestSurface.js.map +1 -1
- package/build/dist/UI/Components/ActionButton/ActionButtonSchema.js +20 -1
- package/build/dist/UI/Components/ActionButton/ActionButtonSchema.js.map +1 -1
- package/build/dist/UI/Components/ActionButton/RowActions.js +113 -0
- package/build/dist/UI/Components/ActionButton/RowActions.js.map +1 -0
- package/build/dist/UI/Components/ActionButton/SplitActionButtons.js +71 -0
- package/build/dist/UI/Components/ActionButton/SplitActionButtons.js.map +1 -0
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +16 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +16 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +27 -5
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +61 -194
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +84 -26
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +75 -196
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.js +133 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/DoubleClick.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/UseChartBucketsChange.js +26 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/UseChartBucketsChange.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/UseChartRangeSelection.js +371 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Utils/UseChartRangeSelection.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +16 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/TimeRangeZoom/ResetTimeRangeZoomButton.js +35 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/ResetTimeRangeZoomButton.js.map +1 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomContext.js +107 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomContext.js.map +1 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomHint.js +41 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomHint.js.map +1 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomUtil.js +117 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/TimeRangeZoomUtil.js.map +1 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/UseTimeRangeZoom.js +121 -0
- package/build/dist/UI/Components/Charts/TimeRangeZoom/UseTimeRangeZoom.js.map +1 -0
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js +15 -7
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/XAxis.js +70 -0
- package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/useHistogramRangeSelection.js +305 -38
- package/build/dist/UI/Components/Charts/Utils/useHistogramRangeSelection.js.map +1 -1
- package/build/dist/UI/Components/EntityDropdown/EntityDropdown.js +89 -14
- package/build/dist/UI/Components/EntityDropdown/EntityDropdown.js.map +1 -1
- package/build/dist/UI/Components/Forms/Fields/FormField.js +11 -2
- package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
- package/build/dist/UI/Components/Input/Input.js +69 -54
- package/build/dist/UI/Components/Input/Input.js.map +1 -1
- package/build/dist/UI/Components/List/ListRow.js +4 -39
- package/build/dist/UI/Components/List/ListRow.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +31 -8
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js +10 -1
- package/build/dist/UI/Components/LogsViewer/components/LogTimeRangePicker.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js +139 -21
- package/build/dist/UI/Components/LogsViewer/components/LogsAnalyticsView.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js +30 -8
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsViewerToolbar.js +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsViewerToolbar.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +10 -0
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js +253 -14
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js +43 -13
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js +2 -38
- package/build/dist/UI/Components/OrderedStatesList/Item.js.map +1 -1
- package/build/dist/UI/Components/StatusPage/ResourceGrid.js +53 -15
- package/build/dist/UI/Components/StatusPage/ResourceGrid.js.map +1 -1
- package/build/dist/UI/Components/Table/TableBody.js +6 -2
- package/build/dist/UI/Components/Table/TableBody.js.map +1 -1
- package/build/dist/UI/Components/Table/TableRow.js +12 -75
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +32 -7
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js +27 -9
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js +11 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryTimeRangePicker.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/useViewerTimeRangeZoom.js +272 -0
- package/build/dist/UI/Components/TelemetryViewer/useViewerTimeRangeZoom.js.map +1 -0
- package/build/dist/UI/Components/Toggle/Toggle.js +14 -1
- package/build/dist/UI/Components/Toggle/Toggle.js.map +1 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js +1 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
- package/build/dist/Utils/AI/InvestigationReport.js +71 -11
- package/build/dist/Utils/AI/InvestigationReport.js.map +1 -1
- package/build/dist/Utils/AiRemediation/CommandPolicy.js +1 -1
- package/build/dist/Utils/AiRemediation/CommandPolicy.js.map +1 -1
- package/build/dist/Utils/AiRemediation/KubectlPolicy.js +1 -1
- package/build/dist/Utils/AiRemediation/KubectlPolicy.js.map +1 -1
- package/build/dist/Utils/AiRemediation/Resource/CephCommandPolicy.js +1462 -0
- package/build/dist/Utils/AiRemediation/Resource/CephCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseCommandPolicy.js +122 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseDiagnosticCatalog.js +1139 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseDiagnosticCatalog.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseQueryRedactor.js +1060 -0
- package/build/dist/Utils/AiRemediation/Resource/DatabaseQueryRedactor.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerCliGrammar.js +1301 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerCliGrammar.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerEngineCommandPolicy.js +370 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerEngineCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerSwarmCommandPolicy.js +498 -0
- package/build/dist/Utils/AiRemediation/Resource/DockerSwarmCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/GovcCommandPolicy.js +1565 -0
- package/build/dist/Utils/AiRemediation/Resource/GovcCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/HostCommandPolicy.js +2206 -0
- package/build/dist/Utils/AiRemediation/Resource/HostCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/ProxmoxCommandPolicy.js +1129 -0
- package/build/dist/Utils/AiRemediation/Resource/ProxmoxCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +565 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceCommandPolicy.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.js +408 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceCommandPolicyCore.js.map +1 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceOutputRedactor.js +1910 -0
- package/build/dist/Utils/AiRemediation/Resource/ResourceOutputRedactor.js.map +1 -0
- package/build/dist/Utils/Dashboard/DashboardTimeRangeZoom.js +27 -1
- package/build/dist/Utils/Dashboard/DashboardTimeRangeZoom.js.map +1 -1
- package/build/dist/Utils/SessionReplay/SessionReplayBudgetMetricType.js +160 -0
- package/build/dist/Utils/SessionReplay/SessionReplayBudgetMetricType.js.map +1 -0
- package/package.json +1 -1
|
@@ -206,6 +206,93 @@ function giveRuleListItem(sheet: CSSStyleSheet | null | undefined): void {
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
interface CrossOriginSheet {
|
|
210
|
+
sheet: CSSStyleSheet;
|
|
211
|
+
/* How many times cssRules was asked for. */
|
|
212
|
+
readCount: () => number;
|
|
213
|
+
/* Every value the capture tried to give `disabled`: there must be none. */
|
|
214
|
+
disabledWrites: Array<boolean>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/*
|
|
218
|
+
* A stylesheet the stage loaded from another site: in force, and closed to
|
|
219
|
+
* the page, whose origin is the Dashboard's. Chromium and Firefox throw a
|
|
220
|
+
* SecurityError from cssRules; WebKit answers null.
|
|
221
|
+
*/
|
|
222
|
+
function makeCrossOriginSheet(
|
|
223
|
+
rules: "throws" | "null",
|
|
224
|
+
options?: { isDisabled?: boolean },
|
|
225
|
+
): CrossOriginSheet {
|
|
226
|
+
const disabledWrites: Array<boolean> = [];
|
|
227
|
+
const sheet: Record<string, unknown> = {};
|
|
228
|
+
let reads: number = 0;
|
|
229
|
+
|
|
230
|
+
Object.defineProperty(sheet, "cssRules", {
|
|
231
|
+
get: (): CSSRuleList | null => {
|
|
232
|
+
reads++;
|
|
233
|
+
|
|
234
|
+
if (rules === "null") {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
throw new DOMException(
|
|
239
|
+
"Cannot access rules of a cross-origin sheet.",
|
|
240
|
+
"SecurityError",
|
|
241
|
+
);
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
Object.defineProperty(sheet, "disabled", {
|
|
245
|
+
get: (): boolean => {
|
|
246
|
+
return Boolean(options?.isDisabled);
|
|
247
|
+
},
|
|
248
|
+
set: (value: boolean): void => {
|
|
249
|
+
disabledWrites.push(value);
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
return {
|
|
254
|
+
sheet: sheet as unknown as CSSStyleSheet,
|
|
255
|
+
readCount: (): number => {
|
|
256
|
+
return reads;
|
|
257
|
+
},
|
|
258
|
+
disabledWrites: disabledWrites,
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* A readable sheet of plain rule objects, in a list that has item(). */
|
|
263
|
+
function makeMockSheet(rules: Array<Record<string, unknown>>): CSSStyleSheet {
|
|
264
|
+
return {
|
|
265
|
+
disabled: false,
|
|
266
|
+
cssRules: {
|
|
267
|
+
length: rules.length,
|
|
268
|
+
item: (index: number): CSSRule | null => {
|
|
269
|
+
return (rules[index] as CSSRule | undefined) ?? null;
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
} as unknown as CSSStyleSheet;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* The sheet a <link> or <style> hands out, in place of jsdom's. */
|
|
276
|
+
function giveSheet(owner: Element, sheet: CSSStyleSheet): void {
|
|
277
|
+
Object.defineProperty(owner, "sheet", {
|
|
278
|
+
configurable: true,
|
|
279
|
+
get: (): CSSStyleSheet => {
|
|
280
|
+
return sheet;
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/*
|
|
286
|
+
* The first rule of a <style>'s own sheet: jsdom hands its cssRules out
|
|
287
|
+
* as a plain Array.
|
|
288
|
+
*/
|
|
289
|
+
function firstRuleOf(style: Element): CSSRule {
|
|
290
|
+
const sheet: CSSStyleSheet = (style as HTMLStyleElement)
|
|
291
|
+
.sheet as CSSStyleSheet;
|
|
292
|
+
|
|
293
|
+
return (sheet.cssRules as unknown as Array<CSSRule>)[0] as CSSRule;
|
|
294
|
+
}
|
|
295
|
+
|
|
209
296
|
function prepareRuleLists(replayDocument: Document): void {
|
|
210
297
|
for (
|
|
211
298
|
let index: number = 0;
|
|
@@ -436,6 +523,34 @@ function markImageLoaded(
|
|
|
436
523
|
});
|
|
437
524
|
}
|
|
438
525
|
|
|
526
|
+
/*
|
|
527
|
+
* An image the stage is still fetching: not complete, and with no natural
|
|
528
|
+
* size yet - unless it is a progressive one whose header has decoded.
|
|
529
|
+
*/
|
|
530
|
+
function markImageLoading(
|
|
531
|
+
image: Element,
|
|
532
|
+
natural?: { width: number; height: number },
|
|
533
|
+
): void {
|
|
534
|
+
Object.defineProperty(image, "complete", {
|
|
535
|
+
configurable: true,
|
|
536
|
+
get: (): boolean => {
|
|
537
|
+
return false;
|
|
538
|
+
},
|
|
539
|
+
});
|
|
540
|
+
Object.defineProperty(image, "naturalWidth", {
|
|
541
|
+
configurable: true,
|
|
542
|
+
get: (): number => {
|
|
543
|
+
return natural?.width ?? 0;
|
|
544
|
+
},
|
|
545
|
+
});
|
|
546
|
+
Object.defineProperty(image, "naturalHeight", {
|
|
547
|
+
configurable: true,
|
|
548
|
+
get: (): number => {
|
|
549
|
+
return natural?.height ?? 0;
|
|
550
|
+
},
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
|
|
439
554
|
interface ImageCanvasMock {
|
|
440
555
|
draws: Array<Array<unknown>>;
|
|
441
556
|
}
|
|
@@ -2501,6 +2616,62 @@ describe("serializeReplayFrame", () => {
|
|
|
2501
2616
|
|
|
2502
2617
|
expect(serialize(replayDocument).svg).not.toContain("cdn.example");
|
|
2503
2618
|
});
|
|
2619
|
+
|
|
2620
|
+
/*
|
|
2621
|
+
* The same promise with everything the stage now loads from the
|
|
2622
|
+
* recorded site in play: a stylesheet and an @import it cannot read
|
|
2623
|
+
* (so what they hide is pinned hidden), an image still loading, one
|
|
2624
|
+
* that failed and one it may not read.
|
|
2625
|
+
*/
|
|
2626
|
+
it("leaves no reference to anything outside the frame while a stylesheet it cannot read is in force", () => {
|
|
2627
|
+
mockImageCanvas({ hasContext: true, isTainted: true });
|
|
2628
|
+
|
|
2629
|
+
const replayDocument: Document = makeReplayDocument(
|
|
2630
|
+
`<div id="offline" class="displayNone" style="background-image: url(https://cdn.example/offline.png)">You're offline.</div>` +
|
|
2631
|
+
`<img id="pending" src="https://cdn.example/pending.png" srcset="https://cdn.example/pending@2x.png 2x">` +
|
|
2632
|
+
`<img id="failed" src="https://cdn.example/failed.png">` +
|
|
2633
|
+
`<img id="photo" src="https://cdn.example/photo.jpg">`,
|
|
2634
|
+
{
|
|
2635
|
+
head:
|
|
2636
|
+
`<link id="site" rel="stylesheet" href="https://cdn.example/site.css">` +
|
|
2637
|
+
`<style id="imports">@import url("https://cdn.example/imported.css"); .own { background: url(https://cdn.example/own.png); }</style>`,
|
|
2638
|
+
},
|
|
2639
|
+
);
|
|
2640
|
+
|
|
2641
|
+
giveSheet(
|
|
2642
|
+
liveById(replayDocument, "site"),
|
|
2643
|
+
makeCrossOriginSheet("throws").sheet,
|
|
2644
|
+
);
|
|
2645
|
+
Object.defineProperty(
|
|
2646
|
+
firstRuleOf(liveById(replayDocument, "imports")),
|
|
2647
|
+
"styleSheet",
|
|
2648
|
+
{
|
|
2649
|
+
configurable: true,
|
|
2650
|
+
get: (): CSSStyleSheet => {
|
|
2651
|
+
return makeCrossOriginSheet("null").sheet;
|
|
2652
|
+
},
|
|
2653
|
+
},
|
|
2654
|
+
);
|
|
2655
|
+
overrideComputedStyle(liveById(replayDocument, "offline"), {
|
|
2656
|
+
display: "none",
|
|
2657
|
+
});
|
|
2658
|
+
markImageLoading(liveById(replayDocument, "pending"));
|
|
2659
|
+
markImageLoaded(liveById(replayDocument, "failed"), {
|
|
2660
|
+
width: 0,
|
|
2661
|
+
height: 0,
|
|
2662
|
+
});
|
|
2663
|
+
markImageLoaded(liveById(replayDocument, "photo"), {
|
|
2664
|
+
width: 640,
|
|
2665
|
+
height: 480,
|
|
2666
|
+
});
|
|
2667
|
+
|
|
2668
|
+
const serialization: ReplayFrameSerialization = serialize(replayDocument);
|
|
2669
|
+
|
|
2670
|
+
expect(serialization.svg).not.toContain("cdn.example");
|
|
2671
|
+
expect(styleOf(byId(readFrame(serialization).svg, "offline"))).toContain(
|
|
2672
|
+
"display: none !important",
|
|
2673
|
+
);
|
|
2674
|
+
});
|
|
2504
2675
|
});
|
|
2505
2676
|
|
|
2506
2677
|
describe("stylesheets", () => {
|
|
@@ -2688,6 +2859,698 @@ describe("serializeReplayFrame", () => {
|
|
|
2688
2859
|
});
|
|
2689
2860
|
});
|
|
2690
2861
|
|
|
2862
|
+
/*
|
|
2863
|
+
* #4119. The stage loads a stylesheet the recorder could not inline from
|
|
2864
|
+
* the recorded site, and to the replay document - the Dashboard's origin
|
|
2865
|
+
* - it is another site's: its rules cannot be read, so they cannot come
|
|
2866
|
+
* across. What it hid is still hidden on the stage (here a portal's
|
|
2867
|
+
* "You're offline" banner, hidden by .displayNone in such a sheet), so
|
|
2868
|
+
* while such a sheet is in force every light-DOM element the stage
|
|
2869
|
+
* computes display: none for is pinned hidden in the clone. jsdom
|
|
2870
|
+
* applies no rule of a sheet it cannot read either, so the stage's
|
|
2871
|
+
* computed display is given per element.
|
|
2872
|
+
*/
|
|
2873
|
+
describe("a stylesheet it cannot read", () => {
|
|
2874
|
+
function makeOfflinePortal(): Document {
|
|
2875
|
+
return makeReplayDocument(
|
|
2876
|
+
`<div id="offline" class="displayNone">You're offline. This is a read only version of the page.</div>` +
|
|
2877
|
+
`<main id="content"><p id="welcome" style="color: rgb(0, 128, 0)">Welcome</p><span id="note" class="displayNone" style="color: red">Saved for later</span></main>`,
|
|
2878
|
+
{
|
|
2879
|
+
head:
|
|
2880
|
+
`<link id="portal" rel="stylesheet" href="https://portal-cdn.example/portal.css">` +
|
|
2881
|
+
`<style>.own { color: green; }</style>`,
|
|
2882
|
+
},
|
|
2883
|
+
);
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
/* What .displayNone { display: none !important } does on the stage. */
|
|
2887
|
+
function hideOnStage(replayDocument: Document, ids: Array<string>): void {
|
|
2888
|
+
for (const id of ids) {
|
|
2889
|
+
overrideComputedStyle(liveById(replayDocument, id), {
|
|
2890
|
+
display: "none",
|
|
2891
|
+
});
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
/* Every element of the picture pinned hidden, by id or by name. */
|
|
2896
|
+
function pinnedHidden(captured: CapturedFrame): Array<string> {
|
|
2897
|
+
return Array.from(captured.html.querySelectorAll("*"))
|
|
2898
|
+
.filter((element: Element): boolean => {
|
|
2899
|
+
return styleOf(element).includes("display: none !important");
|
|
2900
|
+
})
|
|
2901
|
+
.map((element: Element): string => {
|
|
2902
|
+
return element.getAttribute("id") ?? element.localName;
|
|
2903
|
+
});
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
for (const rules of ["throws", "null"] as const) {
|
|
2907
|
+
it(`keeps what a <link> it cannot read hides hidden, and nothing else, when its cssRules ${
|
|
2908
|
+
rules === "throws" ? "throws a SecurityError" : "is null (WebKit)"
|
|
2909
|
+
}`, () => {
|
|
2910
|
+
const replayDocument: Document = makeOfflinePortal();
|
|
2911
|
+
const portal: CrossOriginSheet = makeCrossOriginSheet(rules);
|
|
2912
|
+
|
|
2913
|
+
giveSheet(liveById(replayDocument, "portal"), portal.sheet);
|
|
2914
|
+
hideOnStage(replayDocument, ["offline", "note"]);
|
|
2915
|
+
|
|
2916
|
+
const before: string = replayDocument.documentElement.outerHTML;
|
|
2917
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
2918
|
+
|
|
2919
|
+
expect(styleOf(byId(captured.svg, "offline"))).toBe(
|
|
2920
|
+
"display: none !important",
|
|
2921
|
+
);
|
|
2922
|
+
/* After the element's own declarations, which it keeps. */
|
|
2923
|
+
expect(styleOf(byId(captured.svg, "note"))).toBe(
|
|
2924
|
+
"color: red; display: none !important",
|
|
2925
|
+
);
|
|
2926
|
+
/* Nothing for what the stage shows. */
|
|
2927
|
+
expect(byId(captured.svg, "content").getAttribute("style")).toBeNull();
|
|
2928
|
+
expect(styleOf(byId(captured.svg, "welcome"))).toBe(
|
|
2929
|
+
"color: rgb(0, 128, 0)",
|
|
2930
|
+
);
|
|
2931
|
+
/* <head> is display: none in every engine anyway. */
|
|
2932
|
+
expect(pinnedHidden(captured)).toEqual(["head", "offline", "note"]);
|
|
2933
|
+
/* The sheet itself is left out, and nothing points at its host. */
|
|
2934
|
+
expect(captured.svg.getElementsByTagName("link")).toHaveLength(0);
|
|
2935
|
+
expect(headStyleTexts(captured).join("\n")).toContain(".own");
|
|
2936
|
+
expect(captured.serialization.svg).not.toContain("portal-cdn.example");
|
|
2937
|
+
/*
|
|
2938
|
+
* Only read: the live document is as it was, the sheet was never
|
|
2939
|
+
* disabled to see what it does, and it was asked for its rules
|
|
2940
|
+
* once to find out and once when the clone reached its <link> -
|
|
2941
|
+
* not once per element.
|
|
2942
|
+
*/
|
|
2943
|
+
expect(replayDocument.documentElement.outerHTML).toBe(before);
|
|
2944
|
+
expect(portal.disabledWrites).toEqual([]);
|
|
2945
|
+
expect(portal.readCount()).toBeLessThanOrEqual(2);
|
|
2946
|
+
});
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
it("adds nothing when every sheet in force can be read, though the page hides elements", () => {
|
|
2950
|
+
const replayDocument: Document = makeOfflinePortal();
|
|
2951
|
+
|
|
2952
|
+
giveSheet(
|
|
2953
|
+
liveById(replayDocument, "portal"),
|
|
2954
|
+
makeMockSheet([{ cssText: ".displayNone { display: none; }" }]),
|
|
2955
|
+
);
|
|
2956
|
+
hideOnStage(replayDocument, ["offline", "note"]);
|
|
2957
|
+
|
|
2958
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
2959
|
+
|
|
2960
|
+
/* The page's own rule hides them in the picture, as on the stage. */
|
|
2961
|
+
expect(headStyleTexts(captured).join("\n")).toContain(
|
|
2962
|
+
".displayNone { display: none; }",
|
|
2963
|
+
);
|
|
2964
|
+
expect(byId(captured.svg, "offline").getAttribute("style")).toBeNull();
|
|
2965
|
+
expect(styleOf(byId(captured.svg, "note"))).toBe("color: red");
|
|
2966
|
+
expect(pinnedHidden(captured)).toEqual([]);
|
|
2967
|
+
expect(captured.serialization.svg).not.toContain(
|
|
2968
|
+
"display: none !important",
|
|
2969
|
+
);
|
|
2970
|
+
});
|
|
2971
|
+
|
|
2972
|
+
it("keeps what an @import it cannot read hides hidden, inside a <style> it can read", () => {
|
|
2973
|
+
const replayDocument: Document = makeReplayDocument(
|
|
2974
|
+
`<div id="offline">You're offline.</div><p id="welcome">Welcome</p>`,
|
|
2975
|
+
{
|
|
2976
|
+
head: `<style id="imports">@import url("https://portal-cdn.example/portal.css"); .own { color: green; }</style>`,
|
|
2977
|
+
},
|
|
2978
|
+
);
|
|
2979
|
+
|
|
2980
|
+
Object.defineProperty(
|
|
2981
|
+
firstRuleOf(liveById(replayDocument, "imports")),
|
|
2982
|
+
"styleSheet",
|
|
2983
|
+
{
|
|
2984
|
+
configurable: true,
|
|
2985
|
+
get: (): CSSStyleSheet => {
|
|
2986
|
+
return makeCrossOriginSheet("throws").sheet;
|
|
2987
|
+
},
|
|
2988
|
+
},
|
|
2989
|
+
);
|
|
2990
|
+
hideOnStage(replayDocument, ["offline"]);
|
|
2991
|
+
|
|
2992
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
2993
|
+
const css: string = headStyleTexts(captured).join("\n");
|
|
2994
|
+
|
|
2995
|
+
expect(styleOf(byId(captured.svg, "offline"))).toBe(
|
|
2996
|
+
"display: none !important",
|
|
2997
|
+
);
|
|
2998
|
+
expect(byId(captured.svg, "welcome").getAttribute("style")).toBeNull();
|
|
2999
|
+
/* The rest of the sheet still comes across; the import cannot. */
|
|
3000
|
+
expect(css).toContain(".own");
|
|
3001
|
+
expect(css).not.toContain("@import");
|
|
3002
|
+
expect(captured.serialization.svg).not.toContain("portal-cdn.example");
|
|
3003
|
+
});
|
|
3004
|
+
|
|
3005
|
+
it("follows @imports through sheets it can read, past an @layer statement, to one it cannot", () => {
|
|
3006
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3007
|
+
`<div id="offline">You're offline.</div>`,
|
|
3008
|
+
{
|
|
3009
|
+
head: `<link id="site" rel="stylesheet" href="https://portal.example/site.css">`,
|
|
3010
|
+
},
|
|
3011
|
+
);
|
|
3012
|
+
|
|
3013
|
+
giveSheet(
|
|
3014
|
+
liveById(replayDocument, "site"),
|
|
3015
|
+
makeMockSheet([
|
|
3016
|
+
{ cssText: "@layer base, site;", nameList: ["base", "site"] },
|
|
3017
|
+
{
|
|
3018
|
+
cssText:
|
|
3019
|
+
'@import url("https://portal.example/base.css") layer(base);',
|
|
3020
|
+
media: { mediaText: "" },
|
|
3021
|
+
styleSheet: makeMockSheet([
|
|
3022
|
+
{
|
|
3023
|
+
cssText:
|
|
3024
|
+
'@import url("https://portal-cdn.example/portal.css");',
|
|
3025
|
+
media: { mediaText: "" },
|
|
3026
|
+
styleSheet: makeCrossOriginSheet("null").sheet,
|
|
3027
|
+
},
|
|
3028
|
+
{ cssText: ".base { color: blue; }" },
|
|
3029
|
+
]),
|
|
3030
|
+
},
|
|
3031
|
+
{ cssText: ".site { color: green; }" },
|
|
3032
|
+
]),
|
|
3033
|
+
);
|
|
3034
|
+
hideOnStage(replayDocument, ["offline"]);
|
|
3035
|
+
|
|
3036
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3037
|
+
const css: string = headStyleTexts(captured).join("\n");
|
|
3038
|
+
|
|
3039
|
+
expect(styleOf(byId(captured.svg, "offline"))).toBe(
|
|
3040
|
+
"display: none !important",
|
|
3041
|
+
);
|
|
3042
|
+
expect(css).toContain(".base");
|
|
3043
|
+
expect(css).toContain(".site");
|
|
3044
|
+
expect(captured.serialization.svg).not.toContain("portal-cdn.example");
|
|
3045
|
+
});
|
|
3046
|
+
|
|
3047
|
+
/*
|
|
3048
|
+
* The scope is the clone's own: a sheet that is off, or whose media
|
|
3049
|
+
* the replay window does not match, is not applied on the stage
|
|
3050
|
+
* either, and one that never loaded has nothing to apply.
|
|
3051
|
+
*/
|
|
3052
|
+
it("leaves out a sheet that is disabled, whose media the window does not match, or that never loaded", () => {
|
|
3053
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3054
|
+
`<div id="offline">You're offline.</div>`,
|
|
3055
|
+
{
|
|
3056
|
+
head:
|
|
3057
|
+
`<link id="disabled" rel="stylesheet" href="https://portal-cdn.example/off.css">` +
|
|
3058
|
+
`<link id="printed" rel="stylesheet" href="https://portal-cdn.example/print.css" media="print">` +
|
|
3059
|
+
`<link id="missing" rel="stylesheet" href="https://portal-cdn.example/gone.css">` +
|
|
3060
|
+
`<link id="readable" rel="stylesheet" href="https://portal.example/site.css">` +
|
|
3061
|
+
`<style id="imports">@import url("https://portal-cdn.example/print-import.css") print; .own { color: green; }</style>`,
|
|
3062
|
+
},
|
|
3063
|
+
);
|
|
3064
|
+
|
|
3065
|
+
giveSheet(
|
|
3066
|
+
liveById(replayDocument, "disabled"),
|
|
3067
|
+
makeCrossOriginSheet("throws", { isDisabled: true }).sheet,
|
|
3068
|
+
);
|
|
3069
|
+
giveSheet(
|
|
3070
|
+
liveById(replayDocument, "printed"),
|
|
3071
|
+
makeCrossOriginSheet("throws").sheet,
|
|
3072
|
+
);
|
|
3073
|
+
/* An import that never loaded has no sheet, on the stage either. */
|
|
3074
|
+
giveSheet(
|
|
3075
|
+
liveById(replayDocument, "readable"),
|
|
3076
|
+
makeMockSheet([
|
|
3077
|
+
{
|
|
3078
|
+
cssText: '@import url("https://portal-cdn.example/gone.css");',
|
|
3079
|
+
media: { mediaText: "" },
|
|
3080
|
+
styleSheet: null,
|
|
3081
|
+
},
|
|
3082
|
+
{ cssText: ".site { color: green; }" },
|
|
3083
|
+
]),
|
|
3084
|
+
);
|
|
3085
|
+
Object.defineProperty(
|
|
3086
|
+
firstRuleOf(liveById(replayDocument, "imports")),
|
|
3087
|
+
"styleSheet",
|
|
3088
|
+
{
|
|
3089
|
+
configurable: true,
|
|
3090
|
+
get: (): CSSStyleSheet => {
|
|
3091
|
+
return makeCrossOriginSheet("throws").sheet;
|
|
3092
|
+
},
|
|
3093
|
+
},
|
|
3094
|
+
);
|
|
3095
|
+
hideOnStage(replayDocument, ["offline"]);
|
|
3096
|
+
defineMatchMedia(replayDocument, (query: string): boolean => {
|
|
3097
|
+
return !query.includes("print");
|
|
3098
|
+
});
|
|
3099
|
+
|
|
3100
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3101
|
+
|
|
3102
|
+
expect(byId(captured.svg, "offline").getAttribute("style")).toBeNull();
|
|
3103
|
+
expect(captured.serialization.svg).not.toContain(
|
|
3104
|
+
"display: none !important",
|
|
3105
|
+
);
|
|
3106
|
+
|
|
3107
|
+
/* The same page printed: the print sheet and import are in force. */
|
|
3108
|
+
defineMatchMedia(replayDocument, (): boolean => {
|
|
3109
|
+
return true;
|
|
3110
|
+
});
|
|
3111
|
+
|
|
3112
|
+
expect(styleOf(byId(capture(replayDocument).svg, "offline"))).toBe(
|
|
3113
|
+
"display: none !important",
|
|
3114
|
+
);
|
|
3115
|
+
});
|
|
3116
|
+
|
|
3117
|
+
/*
|
|
3118
|
+
* Stylesheets apply per document: a nested frame is measured by a
|
|
3119
|
+
* serialiser of its own, and neither document's sheets change what
|
|
3120
|
+
* the other's picture keeps hidden.
|
|
3121
|
+
*/
|
|
3122
|
+
it("looks at each document's own sheets, the page's and every frame's apart", () => {
|
|
3123
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3124
|
+
`<div id="page-banner">You're offline.</div><iframe id="widget"></iframe><iframe id="chat"></iframe>`,
|
|
3125
|
+
{
|
|
3126
|
+
head: `<link id="page-sheet" rel="stylesheet" href="https://portal-cdn.example/portal.css">`,
|
|
3127
|
+
},
|
|
3128
|
+
);
|
|
3129
|
+
const widget: Document = mountChildFrame(
|
|
3130
|
+
replayDocument,
|
|
3131
|
+
"widget",
|
|
3132
|
+
`<div id="widget-banner">Offline</div>`,
|
|
3133
|
+
{ width: 300, height: 150 },
|
|
3134
|
+
);
|
|
3135
|
+
const chat: Document = mountChildFrame(
|
|
3136
|
+
replayDocument,
|
|
3137
|
+
"chat",
|
|
3138
|
+
`<div id="chat-banner">Offline</div>`,
|
|
3139
|
+
{ width: 300, height: 150 },
|
|
3140
|
+
);
|
|
3141
|
+
const chatLink: HTMLLinkElement = chat.createElement("link");
|
|
3142
|
+
|
|
3143
|
+
chatLink.setAttribute("id", "chat-sheet");
|
|
3144
|
+
chatLink.setAttribute("rel", "stylesheet");
|
|
3145
|
+
chatLink.setAttribute("href", "https://chat-cdn.example/chat.css");
|
|
3146
|
+
chat.head.appendChild(chatLink);
|
|
3147
|
+
|
|
3148
|
+
giveSheet(
|
|
3149
|
+
liveById(replayDocument, "page-sheet"),
|
|
3150
|
+
makeCrossOriginSheet("throws").sheet,
|
|
3151
|
+
);
|
|
3152
|
+
giveSheet(chatLink, makeCrossOriginSheet("null").sheet);
|
|
3153
|
+
hideOnStage(replayDocument, ["page-banner"]);
|
|
3154
|
+
hideOnStage(widget, ["widget-banner"]);
|
|
3155
|
+
hideOnStage(chat, ["chat-banner"]);
|
|
3156
|
+
|
|
3157
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3158
|
+
const frames: Array<ReplayFrameSerialization> =
|
|
3159
|
+
captured.serialization.frames.map(
|
|
3160
|
+
(frame: {
|
|
3161
|
+
serialization: ReplayFrameSerialization;
|
|
3162
|
+
}): ReplayFrameSerialization => {
|
|
3163
|
+
return frame.serialization;
|
|
3164
|
+
},
|
|
3165
|
+
);
|
|
3166
|
+
|
|
3167
|
+
expect(frames).toHaveLength(2);
|
|
3168
|
+
expect(styleOf(byId(captured.svg, "page-banner"))).toBe(
|
|
3169
|
+
"display: none !important",
|
|
3170
|
+
);
|
|
3171
|
+
/* The page's sheet does not reach into the widget's document... */
|
|
3172
|
+
expect(
|
|
3173
|
+
byId(readFrame(frames[0]!).svg, "widget-banner").getAttribute("style"),
|
|
3174
|
+
).toBeNull();
|
|
3175
|
+
expect(frames[0]!.svg).not.toContain("display: none !important");
|
|
3176
|
+
/* ...and the chat frame's own sheet counts for the chat frame. */
|
|
3177
|
+
expect(styleOf(byId(readFrame(frames[1]!).svg, "chat-banner"))).toBe(
|
|
3178
|
+
"display: none !important",
|
|
3179
|
+
);
|
|
3180
|
+
});
|
|
3181
|
+
|
|
3182
|
+
/*
|
|
3183
|
+
* A shadow tree is flattened with every element's computed style
|
|
3184
|
+
* inlined, display included: it needs nothing more, whatever sheet
|
|
3185
|
+
* is in force, and its own sheets style nothing outside it.
|
|
3186
|
+
*/
|
|
3187
|
+
it("leaves flattened shadow content to its computed style, and a shadow tree's own sheets out of it", () => {
|
|
3188
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3189
|
+
`<div id="light-banner">You're offline.</div><fancy-card id="card"></fancy-card>`,
|
|
3190
|
+
{
|
|
3191
|
+
head: `<link id="page-sheet" rel="stylesheet" href="https://portal-cdn.example/portal.css">`,
|
|
3192
|
+
},
|
|
3193
|
+
);
|
|
3194
|
+
const root: ShadowRoot = attachShadow(
|
|
3195
|
+
liveById(replayDocument, "card"),
|
|
3196
|
+
`<p id="shadow-banner">Offline</p><p id="shadow-text">Text</p>`,
|
|
3197
|
+
);
|
|
3198
|
+
|
|
3199
|
+
giveSheet(
|
|
3200
|
+
liveById(replayDocument, "page-sheet"),
|
|
3201
|
+
makeCrossOriginSheet("throws").sheet,
|
|
3202
|
+
);
|
|
3203
|
+
hideOnStage(replayDocument, ["light-banner"]);
|
|
3204
|
+
overrideComputedStyle(root.getElementById("shadow-banner") as Element, {
|
|
3205
|
+
display: "none",
|
|
3206
|
+
});
|
|
3207
|
+
|
|
3208
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3209
|
+
|
|
3210
|
+
expect(styleOf(byId(captured.svg, "light-banner"))).toBe(
|
|
3211
|
+
"display: none !important",
|
|
3212
|
+
);
|
|
3213
|
+
/* Once, from its computed style; not a second time on top. */
|
|
3214
|
+
expect(
|
|
3215
|
+
styleOf(byId(captured.svg, "shadow-banner")).split(
|
|
3216
|
+
"display: none !important",
|
|
3217
|
+
),
|
|
3218
|
+
).toHaveLength(2);
|
|
3219
|
+
expect(styleOf(byId(captured.svg, "shadow-text"))).not.toContain(
|
|
3220
|
+
"display: none",
|
|
3221
|
+
);
|
|
3222
|
+
});
|
|
3223
|
+
|
|
3224
|
+
it("is not turned on by a sheet inside a shadow tree", () => {
|
|
3225
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3226
|
+
`<div id="light-banner">You're offline.</div><fancy-card id="card"></fancy-card>`,
|
|
3227
|
+
);
|
|
3228
|
+
const root: ShadowRoot = attachShadow(
|
|
3229
|
+
liveById(replayDocument, "card"),
|
|
3230
|
+
`<link id="shadow-sheet" rel="stylesheet" href="https://widget-cdn.example/widget.css"><p id="inner">Inner</p>`,
|
|
3231
|
+
);
|
|
3232
|
+
|
|
3233
|
+
giveSheet(
|
|
3234
|
+
root.getElementById("shadow-sheet") as Element,
|
|
3235
|
+
makeCrossOriginSheet("throws").sheet,
|
|
3236
|
+
);
|
|
3237
|
+
hideOnStage(replayDocument, ["light-banner"]);
|
|
3238
|
+
|
|
3239
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3240
|
+
|
|
3241
|
+
expect(
|
|
3242
|
+
byId(captured.svg, "light-banner").getAttribute("style"),
|
|
3243
|
+
).toBeNull();
|
|
3244
|
+
expect(captured.serialization.svg).not.toContain("widget-cdn.example");
|
|
3245
|
+
});
|
|
3246
|
+
|
|
3247
|
+
/*
|
|
3248
|
+
* visibility is the other way of hiding that a computed style reports
|
|
3249
|
+
* whichever rule did it: an off-canvas menu, a closed tooltip, a
|
|
3250
|
+
* collapsed table row. It is inherited, and a box can show inside a
|
|
3251
|
+
* hidden one, so the stage's value is pinned wherever the clone could
|
|
3252
|
+
* otherwise differ - and nowhere else.
|
|
3253
|
+
*/
|
|
3254
|
+
function makeDrawerPage(): Document {
|
|
3255
|
+
return makeReplayDocument(
|
|
3256
|
+
`<nav id="drawer" class="offcanvas"><a id="drawer-link" class="menu-link" href="#home">Home</a><button id="drawer-toggle" class="toggle">Menu</button></nav>` +
|
|
3257
|
+
`<table><tbody id="rows"><tr id="collapsed-row" class="collapse"><td id="collapsed-cell">Archived</td></tr><tr id="open-row"><td id="open-cell">Current</td></tr></tbody></table>` +
|
|
3258
|
+
`<main id="content"><p id="welcome">Welcome</p><span id="badge" style="color: red">New</span></main>`,
|
|
3259
|
+
{
|
|
3260
|
+
head:
|
|
3261
|
+
`<link id="portal" rel="stylesheet" href="https://portal-cdn.example/portal.css">` +
|
|
3262
|
+
/*
|
|
3263
|
+
* A rule the clone keeps, which on the stage the portal's
|
|
3264
|
+
* `.offcanvas .menu-link { visibility: hidden }` outranks.
|
|
3265
|
+
*/
|
|
3266
|
+
`<style>.menu-link { visibility: visible; }</style>`,
|
|
3267
|
+
},
|
|
3268
|
+
);
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
/* What the portal's sheet makes the stage compute for each element. */
|
|
3272
|
+
function setStageVisibility(
|
|
3273
|
+
replayDocument: Document,
|
|
3274
|
+
visibilities: Record<string, string>,
|
|
3275
|
+
): void {
|
|
3276
|
+
for (const [id, visibility] of Object.entries(visibilities)) {
|
|
3277
|
+
overrideComputedStyle(liveById(replayDocument, id), {
|
|
3278
|
+
visibility: visibility,
|
|
3279
|
+
});
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
/* The drawer closed and a table row collapsed, as the stage has them. */
|
|
3284
|
+
const DRAWER_PAGE_ON_STAGE: Record<string, string> = {
|
|
3285
|
+
drawer: "hidden",
|
|
3286
|
+
"drawer-link": "hidden",
|
|
3287
|
+
"drawer-toggle": "visible",
|
|
3288
|
+
"collapsed-row": "collapse",
|
|
3289
|
+
"collapsed-cell": "collapse",
|
|
3290
|
+
};
|
|
3291
|
+
|
|
3292
|
+
/* Every visibility declaration in the picture, by id or by name. */
|
|
3293
|
+
function carriedVisibility(
|
|
3294
|
+
captured: CapturedFrame,
|
|
3295
|
+
): Record<string, string> {
|
|
3296
|
+
const carried: Record<string, string> = {};
|
|
3297
|
+
|
|
3298
|
+
for (const element of Array.from(captured.html.querySelectorAll("*"))) {
|
|
3299
|
+
const declarations: Array<string> = declarationsOf(element).filter(
|
|
3300
|
+
(declaration: string): boolean => {
|
|
3301
|
+
return declaration.startsWith("visibility");
|
|
3302
|
+
},
|
|
3303
|
+
);
|
|
3304
|
+
|
|
3305
|
+
if (declarations.length > 0) {
|
|
3306
|
+
carried[element.getAttribute("id") ?? element.localName] =
|
|
3307
|
+
declarations.join("; ");
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3311
|
+
return carried;
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
it("pins what a sheet it cannot read hides with visibility, hidden and collapse alike, and a child it shows inside a hidden box", () => {
|
|
3315
|
+
const replayDocument: Document = makeDrawerPage();
|
|
3316
|
+
const portal: CrossOriginSheet = makeCrossOriginSheet("throws");
|
|
3317
|
+
|
|
3318
|
+
giveSheet(liveById(replayDocument, "portal"), portal.sheet);
|
|
3319
|
+
setStageVisibility(replayDocument, DRAWER_PAGE_ON_STAGE);
|
|
3320
|
+
|
|
3321
|
+
const before: string = replayDocument.documentElement.outerHTML;
|
|
3322
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3323
|
+
|
|
3324
|
+
expect(carriedVisibility(captured)).toEqual({
|
|
3325
|
+
drawer: "visibility: hidden !important",
|
|
3326
|
+
/*
|
|
3327
|
+
* Hidden only by inheriting, and pinned all the same: unpinned,
|
|
3328
|
+
* the kept .menu-link rule would show it in the picture.
|
|
3329
|
+
*/
|
|
3330
|
+
"drawer-link": "visibility: hidden !important",
|
|
3331
|
+
/* Visible inside a hidden parent: it would inherit hidden. */
|
|
3332
|
+
"drawer-toggle": "visibility: visible !important",
|
|
3333
|
+
"collapsed-row": "visibility: collapse !important",
|
|
3334
|
+
"collapsed-cell": "visibility: collapse !important",
|
|
3335
|
+
});
|
|
3336
|
+
/*
|
|
3337
|
+
* Nothing for what shows inside a box that shows - it inherits what
|
|
3338
|
+
* the stage has - and an element's own declarations come first.
|
|
3339
|
+
*/
|
|
3340
|
+
expect(byId(captured.svg, "content").getAttribute("style")).toBeNull();
|
|
3341
|
+
expect(byId(captured.svg, "welcome").getAttribute("style")).toBeNull();
|
|
3342
|
+
expect(byId(captured.svg, "open-row").getAttribute("style")).toBeNull();
|
|
3343
|
+
expect(styleOf(byId(captured.svg, "badge"))).toBe("color: red");
|
|
3344
|
+
expect(styleOf(byId(captured.svg, "drawer-link"))).toBe(
|
|
3345
|
+
"visibility: hidden !important",
|
|
3346
|
+
);
|
|
3347
|
+
/* Only read, as for display: none. */
|
|
3348
|
+
expect(replayDocument.documentElement.outerHTML).toBe(before);
|
|
3349
|
+
expect(portal.disabledWrites).toEqual([]);
|
|
3350
|
+
expect(portal.readCount()).toBeLessThanOrEqual(2);
|
|
3351
|
+
});
|
|
3352
|
+
|
|
3353
|
+
it("adds no visibility anywhere when every sheet in force can be read, though the page hides elements with it", () => {
|
|
3354
|
+
const replayDocument: Document = makeDrawerPage();
|
|
3355
|
+
|
|
3356
|
+
giveSheet(
|
|
3357
|
+
liveById(replayDocument, "portal"),
|
|
3358
|
+
makeMockSheet([
|
|
3359
|
+
{ cssText: ".offcanvas { visibility: hidden; }" },
|
|
3360
|
+
{ cssText: ".offcanvas .menu-link { visibility: hidden; }" },
|
|
3361
|
+
{ cssText: ".toggle { visibility: visible; }" },
|
|
3362
|
+
{ cssText: ".collapse { visibility: collapse; }" },
|
|
3363
|
+
]),
|
|
3364
|
+
);
|
|
3365
|
+
setStageVisibility(replayDocument, DRAWER_PAGE_ON_STAGE);
|
|
3366
|
+
|
|
3367
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3368
|
+
|
|
3369
|
+
/* The page's own rules do it in the picture, as on the stage. */
|
|
3370
|
+
expect(headStyleTexts(captured).join("\n")).toContain(
|
|
3371
|
+
".offcanvas { visibility: hidden; }",
|
|
3372
|
+
);
|
|
3373
|
+
expect(carriedVisibility(captured)).toEqual({});
|
|
3374
|
+
|
|
3375
|
+
for (const id of Object.keys(DRAWER_PAGE_ON_STAGE)) {
|
|
3376
|
+
expect(byId(captured.svg, id).getAttribute("style")).toBeNull();
|
|
3377
|
+
}
|
|
3378
|
+
});
|
|
3379
|
+
|
|
3380
|
+
it("pins no visibility on a page that hides nothing with it, though a sheet it cannot read is in force", () => {
|
|
3381
|
+
const replayDocument: Document = makeDrawerPage();
|
|
3382
|
+
|
|
3383
|
+
giveSheet(
|
|
3384
|
+
liveById(replayDocument, "portal"),
|
|
3385
|
+
makeCrossOriginSheet("null").sheet,
|
|
3386
|
+
);
|
|
3387
|
+
|
|
3388
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3389
|
+
|
|
3390
|
+
expect(carriedVisibility(captured)).toEqual({});
|
|
3391
|
+
expect(byId(captured.svg, "drawer").getAttribute("style")).toBeNull();
|
|
3392
|
+
expect(styleOf(byId(captured.svg, "badge"))).toBe("color: red");
|
|
3393
|
+
});
|
|
3394
|
+
|
|
3395
|
+
it("pins display: none and visibility together on an element the stage hides both ways", () => {
|
|
3396
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3397
|
+
`<div id="offline" class="displayNone invisible" style="color: red"><p id="offline-text">You're offline.</p></div><p id="welcome">Welcome</p>`,
|
|
3398
|
+
{
|
|
3399
|
+
head: `<link id="portal" rel="stylesheet" href="https://portal-cdn.example/portal.css">`,
|
|
3400
|
+
},
|
|
3401
|
+
);
|
|
3402
|
+
|
|
3403
|
+
giveSheet(
|
|
3404
|
+
liveById(replayDocument, "portal"),
|
|
3405
|
+
makeCrossOriginSheet("throws").sheet,
|
|
3406
|
+
);
|
|
3407
|
+
overrideComputedStyle(liveById(replayDocument, "offline"), {
|
|
3408
|
+
display: "none",
|
|
3409
|
+
visibility: "hidden",
|
|
3410
|
+
});
|
|
3411
|
+
/* visibility is inherited, display: none is not. */
|
|
3412
|
+
setStageVisibility(replayDocument, { "offline-text": "hidden" });
|
|
3413
|
+
|
|
3414
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3415
|
+
|
|
3416
|
+
expect(styleOf(byId(captured.svg, "offline"))).toBe(
|
|
3417
|
+
"color: red; display: none !important; visibility: hidden !important",
|
|
3418
|
+
);
|
|
3419
|
+
expect(styleOf(byId(captured.svg, "offline-text"))).toBe(
|
|
3420
|
+
"visibility: hidden !important",
|
|
3421
|
+
);
|
|
3422
|
+
expect(byId(captured.svg, "welcome").getAttribute("style")).toBeNull();
|
|
3423
|
+
});
|
|
3424
|
+
|
|
3425
|
+
/*
|
|
3426
|
+
* <use> draws a copy of what it points at, style attribute and all, and
|
|
3427
|
+
* on the stage that copy inherits from the <use>. A sprite sheet in a
|
|
3428
|
+
* hidden <svg> is pinned at the <svg>; what it holds is left to inherit
|
|
3429
|
+
* from there, or every icon drawn from it would vanish from the picture.
|
|
3430
|
+
*/
|
|
3431
|
+
it("pins a hidden sprite <svg> but leaves the symbols in it to inherit, so the icons <use> draws from them still show", () => {
|
|
3432
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3433
|
+
`<svg id="sprite" class="hidden-sprite"><symbol id="icon-star"><rect id="star-shape" width="10" height="10"></rect><circle id="star-dot" r="2"></circle></symbol></svg>` +
|
|
3434
|
+
`<svg id="toolbar"><use id="star-use" href="#icon-star"></use></svg>` +
|
|
3435
|
+
`<div id="tip" class="tooltip"><svg id="tip-icon"><use id="tip-use" href="#icon-star"></use></svg></div>`,
|
|
3436
|
+
{
|
|
3437
|
+
head: `<link id="portal" rel="stylesheet" href="https://portal-cdn.example/portal.css">`,
|
|
3438
|
+
},
|
|
3439
|
+
);
|
|
3440
|
+
|
|
3441
|
+
giveSheet(
|
|
3442
|
+
liveById(replayDocument, "portal"),
|
|
3443
|
+
makeCrossOriginSheet("throws").sheet,
|
|
3444
|
+
);
|
|
3445
|
+
setStageVisibility(replayDocument, {
|
|
3446
|
+
sprite: "hidden",
|
|
3447
|
+
"icon-star": "hidden",
|
|
3448
|
+
"star-shape": "hidden",
|
|
3449
|
+
/* Shown by the sheet inside the hidden sprite: pinned visible. */
|
|
3450
|
+
"star-dot": "visible",
|
|
3451
|
+
/* A closed tooltip, and the icon in it that only inherits that. */
|
|
3452
|
+
tip: "hidden",
|
|
3453
|
+
"tip-icon": "hidden",
|
|
3454
|
+
"tip-use": "hidden",
|
|
3455
|
+
});
|
|
3456
|
+
|
|
3457
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3458
|
+
|
|
3459
|
+
expect(carriedVisibility(captured)).toEqual({
|
|
3460
|
+
sprite: "visibility: hidden !important",
|
|
3461
|
+
"star-dot": "visibility: visible !important",
|
|
3462
|
+
tip: "visibility: hidden !important",
|
|
3463
|
+
});
|
|
3464
|
+
/* The references the copies are drawn from are kept. */
|
|
3465
|
+
expect(byId(captured.svg, "star-use").getAttribute("href")).toBe(
|
|
3466
|
+
"#icon-star",
|
|
3467
|
+
);
|
|
3468
|
+
});
|
|
3469
|
+
|
|
3470
|
+
/*
|
|
3471
|
+
* An animated visibility is pinned at its paused value with the rest of
|
|
3472
|
+
* the element's animated properties; it is not pinned a second time.
|
|
3473
|
+
*/
|
|
3474
|
+
it("leaves an animated visibility to the animation freeze", () => {
|
|
3475
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3476
|
+
`<div id="toast" class="toast">Saved</div>`,
|
|
3477
|
+
{
|
|
3478
|
+
head: `<link id="portal" rel="stylesheet" href="https://portal-cdn.example/portal.css">`,
|
|
3479
|
+
},
|
|
3480
|
+
);
|
|
3481
|
+
const toast: HTMLElement = liveById(replayDocument, "toast");
|
|
3482
|
+
|
|
3483
|
+
giveSheet(
|
|
3484
|
+
liveById(replayDocument, "portal"),
|
|
3485
|
+
makeCrossOriginSheet("throws").sheet,
|
|
3486
|
+
);
|
|
3487
|
+
setStageVisibility(replayDocument, { toast: "hidden" });
|
|
3488
|
+
defineAnimations(replayDocument, (): Array<unknown> => {
|
|
3489
|
+
return [
|
|
3490
|
+
fakeAnimation({
|
|
3491
|
+
target: toast,
|
|
3492
|
+
keyframes: [{ visibility: "visible" }, { visibility: "hidden" }],
|
|
3493
|
+
}),
|
|
3494
|
+
];
|
|
3495
|
+
});
|
|
3496
|
+
|
|
3497
|
+
expect(
|
|
3498
|
+
declarationsOf(byId(capture(replayDocument).svg, "toast")),
|
|
3499
|
+
).toEqual(["visibility: hidden !important"]);
|
|
3500
|
+
});
|
|
3501
|
+
|
|
3502
|
+
/*
|
|
3503
|
+
* Where the clone inlines an element's whole computed style anyway -
|
|
3504
|
+
* flattened shadow content, a modal dialog, a frame's stand-in image -
|
|
3505
|
+
* visibility comes with it, once.
|
|
3506
|
+
*/
|
|
3507
|
+
it("leaves visibility to the computed style where the clone inlines it anyway", () => {
|
|
3508
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3509
|
+
`<fancy-card id="card"></fancy-card><dialog id="modal" open><p id="modal-text">Confirm</p></dialog><iframe id="widget"></iframe>`,
|
|
3510
|
+
{
|
|
3511
|
+
head: `<link id="portal" rel="stylesheet" href="https://portal-cdn.example/portal.css">`,
|
|
3512
|
+
},
|
|
3513
|
+
);
|
|
3514
|
+
const root: ShadowRoot = attachShadow(
|
|
3515
|
+
liveById(replayDocument, "card"),
|
|
3516
|
+
`<p id="shadow-tip">Tip</p>`,
|
|
3517
|
+
);
|
|
3518
|
+
|
|
3519
|
+
giveSheet(
|
|
3520
|
+
liveById(replayDocument, "portal"),
|
|
3521
|
+
makeCrossOriginSheet("throws").sheet,
|
|
3522
|
+
);
|
|
3523
|
+
makeModal(liveById(replayDocument, "modal"));
|
|
3524
|
+
overrideComputedStyle(root.getElementById("shadow-tip") as Element, {
|
|
3525
|
+
visibility: "hidden",
|
|
3526
|
+
});
|
|
3527
|
+
setStageVisibility(replayDocument, {
|
|
3528
|
+
modal: "hidden",
|
|
3529
|
+
"modal-text": "visible",
|
|
3530
|
+
widget: "hidden",
|
|
3531
|
+
});
|
|
3532
|
+
|
|
3533
|
+
const svg: Document = capture(replayDocument).svg;
|
|
3534
|
+
const count: (id: string, declaration: string) => number = (
|
|
3535
|
+
id: string,
|
|
3536
|
+
declaration: string,
|
|
3537
|
+
): number => {
|
|
3538
|
+
return declarationsOf(byId(svg, id)).filter(
|
|
3539
|
+
(candidate: string): boolean => {
|
|
3540
|
+
return candidate === declaration;
|
|
3541
|
+
},
|
|
3542
|
+
).length;
|
|
3543
|
+
};
|
|
3544
|
+
|
|
3545
|
+
expect(count("shadow-tip", "visibility: hidden !important")).toBe(1);
|
|
3546
|
+
expect(count("modal", "visibility: hidden !important")).toBe(1);
|
|
3547
|
+
expect(count("modal-text", "visibility: visible !important")).toBe(1);
|
|
3548
|
+
expect(count("widget", "visibility: hidden !important")).toBe(1);
|
|
3549
|
+
/* The shadow host shows, and its computed style says so by omission. */
|
|
3550
|
+
expect(styleOf(byId(svg, "card"))).not.toContain("visibility");
|
|
3551
|
+
});
|
|
3552
|
+
});
|
|
3553
|
+
|
|
2691
3554
|
/*
|
|
2692
3555
|
* The image answers some media features differently from the stage
|
|
2693
3556
|
* ((hover) and (pointer) are false inside it in Chromium and WebKit),
|
|
@@ -2991,24 +3854,161 @@ describe("serializeReplayFrame", () => {
|
|
|
2991
3854
|
}
|
|
2992
3855
|
});
|
|
2993
3856
|
|
|
2994
|
-
|
|
3857
|
+
/*
|
|
3858
|
+
* Right after a seek or a rebuild the stage is still fetching the
|
|
3859
|
+
* page's images and has drawn nothing where they go. A broken icon and
|
|
3860
|
+
* alt text there would put in the picture what was never on the stage.
|
|
3861
|
+
*/
|
|
3862
|
+
it("leaves an image the stage is still loading transparent, in the box the stage laid it out in", () => {
|
|
3863
|
+
const canvas: ImageCanvasMock = mockImageCanvas({
|
|
3864
|
+
hasContext: true,
|
|
3865
|
+
dataUrl: "data:image/png;base64,Q09QSUVE",
|
|
3866
|
+
});
|
|
2995
3867
|
const replayDocument: Document = makeReplayDocument(
|
|
2996
|
-
`<img id="pending" src="https://cdn.example/
|
|
3868
|
+
`<img id="pending" src="https://cdn.example/logo.png" alt="Logo" style="width: 120px; height: 40px">` +
|
|
3869
|
+
`<img id="lazy" src="https://cdn.example/banner.png" loading="lazy" alt="Banner">` +
|
|
3870
|
+
`<img id="progressive" src="https://cdn.example/photo.jpg" alt="Photo" style="width: 320px; height: 240px">`,
|
|
2997
3871
|
);
|
|
2998
3872
|
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3873
|
+
markImageLoading(liveById(replayDocument, "pending"));
|
|
3874
|
+
markImageLoading(liveById(replayDocument, "lazy"));
|
|
3875
|
+
/* Its header has decoded, so it has a size, but it is not complete. */
|
|
3876
|
+
markImageLoading(liveById(replayDocument, "progressive"), {
|
|
3877
|
+
width: 640,
|
|
3878
|
+
height: 480,
|
|
3002
3879
|
});
|
|
3003
3880
|
|
|
3004
3881
|
const captured: CapturedFrame = capture(replayDocument);
|
|
3882
|
+
const pending: Element = byId(captured.svg, "pending");
|
|
3883
|
+
const lazy: Element = byId(captured.svg, "lazy");
|
|
3884
|
+
const progressive: Element = byId(captured.svg, "progressive");
|
|
3005
3885
|
|
|
3006
|
-
|
|
3007
|
-
|
|
3886
|
+
for (const image of [pending, lazy, progressive]) {
|
|
3887
|
+
expect(image.getAttribute("src")).toBe(REPLAY_FRAME_TRANSPARENT_IMAGE);
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
expect(declarationsOf(pending)).toEqual([
|
|
3891
|
+
"width: 120px",
|
|
3892
|
+
"height: 40px",
|
|
3893
|
+
"width: 120px !important",
|
|
3894
|
+
"height: 40px !important",
|
|
3895
|
+
"object-fit: fill !important",
|
|
3896
|
+
]);
|
|
3897
|
+
expect(styleOf(progressive)).toContain("width: 320px !important");
|
|
3898
|
+
expect(styleOf(progressive)).toContain("height: 240px !important");
|
|
3899
|
+
/* jsdom lays nothing out; a browser reports the used size here. */
|
|
3900
|
+
expect(styleOf(lazy)).toBe("object-fit: fill !important");
|
|
3901
|
+
expect(lazy.hasAttribute("loading")).toBe(false);
|
|
3902
|
+
/* Nothing is read from an image that has not finished. */
|
|
3903
|
+
expect(canvas.draws).toEqual([]);
|
|
3904
|
+
});
|
|
3905
|
+
|
|
3906
|
+
/*
|
|
3907
|
+
* A KNOWN LIMIT, pinned so that changing it is a decision - this is not
|
|
3908
|
+
* the picture we would want. A recorded mutation changed the src of an
|
|
3909
|
+
* image that had loaded (a carousel's next slide), or a lazy loader put
|
|
3910
|
+
* the real file in place of a data: placeholder, and the new file is
|
|
3911
|
+
* still on its way. The stage keeps painting the previous image until
|
|
3912
|
+
* it arrives, but Chromium reports what a first load reports - not
|
|
3913
|
+
* complete, no natural size, and a currentSrc of '' - so the capture
|
|
3914
|
+
* cannot tell the two apart and leaves a transparent hole where the
|
|
3915
|
+
* stage shows a picture.
|
|
3916
|
+
*/
|
|
3917
|
+
it("leaves an image whose src just changed transparent, although the stage still shows its previous image (a known limit)", () => {
|
|
3918
|
+
const canvas: ImageCanvasMock = mockImageCanvas({
|
|
3919
|
+
hasContext: true,
|
|
3920
|
+
dataUrl: "data:image/png;base64,Q09QSUVE",
|
|
3921
|
+
});
|
|
3922
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3923
|
+
`<img id="slide" src="https://cdn.example/slide-1.jpg" alt="Slide" style="width: 320px; height: 180px">` +
|
|
3924
|
+
`<img id="photo" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Photo" style="width: 200px; height: 150px">`,
|
|
3925
|
+
);
|
|
3926
|
+
const slide: HTMLElement = liveById(replayDocument, "slide");
|
|
3927
|
+
const photo: HTMLElement = liveById(replayDocument, "photo");
|
|
3928
|
+
|
|
3929
|
+
/* The mutations, and what Chromium reports while the new files load. */
|
|
3930
|
+
slide.setAttribute("src", "https://cdn.example/slide-2.jpg");
|
|
3931
|
+
photo.setAttribute("src", "https://cdn.example/photo.jpg");
|
|
3932
|
+
|
|
3933
|
+
for (const image of [slide, photo]) {
|
|
3934
|
+
markImageLoading(image);
|
|
3935
|
+
Object.defineProperty(image, "currentSrc", {
|
|
3936
|
+
configurable: true,
|
|
3937
|
+
get: (): string => {
|
|
3938
|
+
return "";
|
|
3939
|
+
},
|
|
3940
|
+
});
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3943
|
+
const captured: CapturedFrame = capture(replayDocument);
|
|
3944
|
+
|
|
3945
|
+
for (const id of ["slide", "photo"]) {
|
|
3946
|
+
const image: Element = byId(captured.svg, id);
|
|
3947
|
+
|
|
3948
|
+
expect(image.getAttribute("src")).toBe(REPLAY_FRAME_TRANSPARENT_IMAGE);
|
|
3949
|
+
expect(styleOf(image)).toContain("object-fit: fill !important");
|
|
3950
|
+
}
|
|
3951
|
+
|
|
3952
|
+
expect(styleOf(byId(captured.svg, "slide"))).toContain(
|
|
3953
|
+
"width: 320px !important",
|
|
3008
3954
|
);
|
|
3009
|
-
expect(byId(captured.svg, "
|
|
3010
|
-
|
|
3955
|
+
expect(styleOf(byId(captured.svg, "photo"))).toContain(
|
|
3956
|
+
"height: 150px !important",
|
|
3011
3957
|
);
|
|
3958
|
+
/* Not the placeholder either: currentSrc no longer names it. */
|
|
3959
|
+
expect(captured.serialization.svg).not.toContain("R0lGODlhAQABAIAAAP");
|
|
3960
|
+
expect(captured.serialization.svg).not.toContain("cdn.example");
|
|
3961
|
+
expect(canvas.draws).toEqual([]);
|
|
3962
|
+
});
|
|
3963
|
+
|
|
3964
|
+
/*
|
|
3965
|
+
* Firefox keeps the previous currentSrc until the new file arrives, so
|
|
3966
|
+
* there a data: placeholder being replaced is still drawn, as the stage
|
|
3967
|
+
* draws it.
|
|
3968
|
+
*/
|
|
3969
|
+
it("keeps a data: placeholder the engine still reports as currentSrc while its replacement loads", () => {
|
|
3970
|
+
const placeholder: string =
|
|
3971
|
+
"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";
|
|
3972
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3973
|
+
`<img id="photo" src="https://cdn.example/photo.jpg" alt="Photo">`,
|
|
3974
|
+
);
|
|
3975
|
+
const photo: HTMLElement = liveById(replayDocument, "photo");
|
|
3976
|
+
|
|
3977
|
+
markImageLoading(photo, { width: 1, height: 1 });
|
|
3978
|
+
Object.defineProperty(photo, "currentSrc", {
|
|
3979
|
+
configurable: true,
|
|
3980
|
+
get: (): string => {
|
|
3981
|
+
return placeholder;
|
|
3982
|
+
},
|
|
3983
|
+
});
|
|
3984
|
+
|
|
3985
|
+
expect(
|
|
3986
|
+
byId(capture(replayDocument).svg, "photo").getAttribute("src"),
|
|
3987
|
+
).toBe(placeholder);
|
|
3988
|
+
});
|
|
3989
|
+
|
|
3990
|
+
/*
|
|
3991
|
+
* An image that finished with nothing to show failed on the stage too
|
|
3992
|
+
* - it needs the user's sign-in, its site refuses other sites, it has
|
|
3993
|
+
* gone, or it was never loaded under Mask all text - and the stage
|
|
3994
|
+
* draws it broken, with its alt text.
|
|
3995
|
+
*/
|
|
3996
|
+
it("draws an image whose load failed as broken, as the stage does", () => {
|
|
3997
|
+
const replayDocument: Document = makeReplayDocument(
|
|
3998
|
+
`<img id="failed" src="https://cdn.example/logo.png" alt="Company logo" style="width: 120px; height: 40px">`,
|
|
3999
|
+
);
|
|
4000
|
+
|
|
4001
|
+
markImageLoaded(liveById(replayDocument, "failed"), {
|
|
4002
|
+
width: 0,
|
|
4003
|
+
height: 0,
|
|
4004
|
+
});
|
|
4005
|
+
|
|
4006
|
+
const image: Element = byId(capture(replayDocument).svg, "failed");
|
|
4007
|
+
|
|
4008
|
+
expect(image.getAttribute("src")).toBe(REPLAY_FRAME_BROKEN_IMAGE);
|
|
4009
|
+
expect(image.getAttribute("alt")).toBe("Company logo");
|
|
4010
|
+
/* Laid out by its own declarations, as on the stage: nothing pinned. */
|
|
4011
|
+
expect(styleOf(image)).toBe("width: 120px; height: 40px");
|
|
3012
4012
|
});
|
|
3013
4013
|
|
|
3014
4014
|
it("copies the pixels of a loaded image the browser lets it read", () => {
|