@oneuptime/common 14.0.7 → 14.0.9
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/Incident.ts +267 -1
- package/Models/DatabaseModels/IncidentCustomField.ts +202 -0
- package/Models/DatabaseModels/IncidentEpisode.ts +30 -0
- package/Models/DatabaseModels/IncidentTemplate.ts +126 -1
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/KubernetesAiAgent.ts +364 -0
- package/Models/DatabaseModels/KubernetesCluster.ts +3 -3
- package/Models/DatabaseModels/Project.ts +55 -5
- package/Models/DatabaseModels/ProxmoxResource.ts +49 -1
- package/Models/DatabaseModels/RunnerJob.ts +75 -0
- package/Models/DatabaseModels/StatusPage.ts +55 -0
- package/Models/DatabaseModels/StatusPageSubscriber.ts +128 -0
- package/Models/DatabaseModels/TeamComplianceSetting.ts +143 -2
- 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 +207 -25
- package/Server/API/IncidentAPI.ts +162 -0
- package/Server/API/KubernetesClusterAiAccessAPI.ts +623 -21
- package/Server/API/MicrosoftTeamsAPI.ts +93 -14
- package/Server/API/ProxmoxResourceAPI.ts +244 -14
- package/Server/API/StatusPageAPI.ts +487 -171
- package/Server/API/StatusPageSubscriberAPI.ts +63 -15
- package/Server/Infrastructure/GlobalCache.ts +32 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795300000000-SkipHiddenIncidentCreatedNotifications.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795400000000-AddIncidentStatusPageScope.ts +108 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795500000000-AddIncidentTemplateStatusPageScopeFlag.ts +33 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795600000000-AddStatusPageSubscriberUnsubscribeToken.ts +51 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795700000000-AddStatusPageSubscriberIsAddedByTeam.ts +33 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795800000000-AddIncidentCustomFieldCreateAndNotificationSettings.ts +168 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1795900000000-AddSubscriberNotificationClaimedAt.ts +44 -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/Index.ts +20 -0
- package/Server/Infrastructure/Semaphore.ts +10 -0
- package/Server/Middleware/IdentityRateLimit.ts +108 -3
- package/Server/Middleware/SubscriberNotificationPreviewRateLimit.ts +237 -0
- package/Server/Middleware/SubscriberNotificationTestSendRateLimit.ts +304 -0
- package/Server/Middleware/TelemetryIngest.ts +41 -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/AutoRemediationRuleService.ts +1 -1
- package/Server/Services/DatabaseService.ts +93 -10
- package/Server/Services/IncidentCustomFieldService.ts +276 -1
- package/Server/Services/IncidentEpisodePublicNoteService.ts +28 -0
- package/Server/Services/IncidentEpisodeService.ts +15 -0
- package/Server/Services/IncidentEpisodeStateTimelineService.ts +27 -1
- package/Server/Services/IncidentPublicNoteService.ts +30 -1
- package/Server/Services/IncidentService.ts +1788 -142
- package/Server/Services/IncidentSeverityService.ts +66 -15
- package/Server/Services/IncidentStateTimelineService.ts +13 -0
- package/Server/Services/IncidentTemplateService.ts +109 -0
- 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/ProjectService.ts +32 -0
- package/Server/Services/ProxmoxResourceService.ts +322 -5
- package/Server/Services/RunnerJobService.ts +241 -104
- package/Server/Services/RunnerService.ts +1 -1
- package/Server/Services/ScheduledMaintenancePublicNoteService.ts +30 -1
- package/Server/Services/ScheduledMaintenanceService.ts +805 -19
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +414 -56
- package/Server/Services/SmsService.ts +10 -0
- package/Server/Services/StatusPageService.ts +65 -8
- package/Server/Services/StatusPageSubscriberNotificationTemplateService.ts +299 -37
- package/Server/Services/StatusPageSubscriberNotificationTemplateStatusPageService.ts +129 -0
- package/Server/Services/StatusPageSubscriberService.ts +1161 -64
- package/Server/Services/TeamComplianceSettingService.ts +1125 -9
- package/Server/Types/Markdown.ts +153 -6
- package/Server/Types/Workflow/Components/Email.ts +61 -2
- 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 +37 -15
- package/Server/Utils/AI/Remediation/RemediationExecutionRunner.ts +67 -24
- package/Server/Utils/AI/SRE/AIInvestigationEngine.ts +48 -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 +6 -1
- package/Server/Utils/CustomField/CustomFieldRename.ts +378 -0
- package/Server/Utils/DataSource/EgressGuard.ts +66 -21
- package/Server/Utils/Mail/PinnedSmtpSocket.ts +130 -0
- package/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.ts +10 -0
- package/Server/Utils/SSRFProtection.ts +76 -16
- package/Server/Utils/StatusPage/IncidentStatusPageScope.ts +948 -0
- package/Server/Utils/StatusPage/IncidentSubscriberAudienceBuilder.ts +656 -0
- package/Server/Utils/StatusPage/IncidentTemplateVariableBuilder.ts +805 -0
- package/Server/Utils/StatusPage/StatusPageExclusion.ts +18 -0
- package/Server/Utils/StatusPage/StatusPageReadAccess.ts +125 -0
- package/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeNotice.ts +151 -0
- package/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeToken.ts +70 -0
- package/Server/Utils/StatusPage/SubscriberIncidentEmailBuilder.ts +421 -0
- package/Server/Utils/StatusPage/SubscriberNotificationClaim.ts +107 -0
- package/Server/Utils/StatusPage/SubscriberNotificationDeliveryRecord.ts +1049 -0
- package/Server/Utils/StatusPage/SubscriberNotificationFanOut.ts +180 -0
- package/Server/Utils/StatusPage/SubscriberNotificationPreviewBuilder.ts +839 -0
- package/Server/Utils/StatusPage/SubscriberNotificationResendAccess.ts +393 -0
- package/Server/Utils/StatusPage/SubscriberNotificationRunLimit.ts +246 -0
- package/Server/Utils/StatusPage/SubscriberNotificationTiming.ts +133 -0
- package/Server/Utils/StatusPage/SubscriberTemplateIncidentRecordAccess.ts +215 -0
- package/Server/Utils/StatusPageResource.ts +51 -20
- 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/VM/VMAPI.ts +1 -0
- package/Server/Utils/VM/VMRunner.ts +10 -0
- package/Server/Utils/Workflow/OAuth2TokenClient.ts +10 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +684 -47
- package/Server/Views/Partials/SensitiveUrlToken.ejs +8 -5
- package/Tests/App/Accounts/RegisterVerifyEmail.test.tsx +748 -0
- package/Tests/App/Accounts/ResendVerificationEmail.test.tsx +1222 -0
- package/Tests/App/Accounts/VerificationEmailResendUtils.test.ts +797 -0
- package/Tests/App/Accounts/VerifyEmailPending.test.tsx +538 -0
- package/Tests/App/Accounts/VerifyEmailResend.test.tsx +779 -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 +91 -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/CustomFieldsSettingsIncidentOptions.test.tsx +357 -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/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 +778 -2
- package/Tests/App/Dashboard/EventNotesPages.test.tsx +119 -0
- package/Tests/App/Dashboard/EventNotesUtil.test.ts +116 -17
- package/Tests/App/Dashboard/EventOverviewPages.test.tsx +828 -17
- 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/IncidentChangeStateNotifyDefault.test.tsx +91 -1
- package/Tests/App/Dashboard/IncidentCreateDetailsStep.test.tsx +643 -0
- package/Tests/App/Dashboard/IncidentCreateFromAlerts.test.tsx +8 -1
- package/Tests/App/Dashboard/IncidentCreateStatusPageScope.test.tsx +601 -0
- package/Tests/App/Dashboard/IncidentCustomFieldTemplateVariables.test.tsx +386 -0
- package/Tests/App/Dashboard/IncidentNoteTemplatePlaceholders.test.tsx +124 -0
- package/Tests/App/Dashboard/IncidentNoteTemplateVariablesLoader.test.ts +305 -0
- package/Tests/App/Dashboard/IncidentOverviewNotifyDefault.test.tsx +112 -0
- package/Tests/App/Dashboard/IncidentRootCauseTimeRangeZoom.test.tsx +358 -0
- package/Tests/App/Dashboard/IncidentSettingsRenotifyOnPublish.test.tsx +674 -0
- package/Tests/App/Dashboard/IncidentSettingsStatusPageScope.test.tsx +1051 -0
- package/Tests/App/Dashboard/IncidentTemplateCustomFields.test.tsx +384 -0
- package/Tests/App/Dashboard/IncidentTemplateStatusPageScopeCard.test.tsx +215 -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/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/PublicNotePagesNotifyDefault.test.tsx +113 -1
- package/Tests/App/Dashboard/RealRowsLineChart.tsx +250 -0
- package/Tests/App/Dashboard/RechartsHostsPlotCursor.test.tsx +513 -0
- package/Tests/App/Dashboard/RowActionPlacementOverrides.test.tsx +865 -0
- package/Tests/App/Dashboard/RumOverviewTimeRangeZoom.test.tsx +877 -0
- 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/SubscriberAudienceSummary.test.tsx +512 -0
- package/Tests/App/Dashboard/SubscriberNotificationPreviewModal.test.tsx +837 -0
- package/Tests/App/Dashboard/SubscriberNotificationStatusLabel.test.tsx +88 -0
- package/Tests/App/Dashboard/SubscriberNotificationStatusResend.test.tsx +473 -0
- package/Tests/App/Dashboard/SubscriberTemplateLivePreview.test.tsx +196 -0
- package/Tests/App/Dashboard/TeamAddedSubscribersUnsubscribedNotice.test.tsx +248 -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/SensitiveUrlTokenBootstrap.test.ts +64 -3
- package/Tests/App/StatusPage/StatusPageResourceExplorer.test.tsx +98 -0
- package/Tests/App/StatusPage/StatusPageUnsubscribePage.test.tsx +412 -0
- package/Tests/Models/DatabaseModels/KubernetesAiAgentModel.test.ts +295 -0
- package/Tests/Models/DatabaseModels/TeamComplianceSettingModel.test.ts +347 -0
- package/Tests/Models/IncidentCustomFieldApiSchemaContract.test.ts +217 -0
- package/Tests/Models/IncidentCustomFieldCreateSettingsColumns.test.ts +252 -0
- package/Tests/Models/StatusPageSubscriberUnsubscribeColumns.test.ts +218 -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/ExpiredSessionRouteGuards.test.ts +7 -0
- package/Tests/Server/API/IncidentSubscriberAudienceAPI.test.ts +1408 -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/StatusPageIncidentScope.test.ts +1868 -0
- package/Tests/Server/API/StatusPageIncidentScopePostgres.test.ts +790 -0
- package/Tests/Server/API/StatusPageManageSubscriptionRecipient.test.ts +10 -1
- package/Tests/Server/API/StatusPageManageSubscriptionTemplateVariables.test.ts +206 -18
- package/Tests/Server/API/StatusPagePostmortemVisibility.test.ts +14 -2
- package/Tests/Server/API/StatusPageSubscriberCreateResponse.test.ts +217 -0
- package/Tests/Server/API/StatusPageSubscriberOwnership.test.ts +103 -2
- package/Tests/Server/API/StatusPageUnsubscribeAPI.test.ts +396 -0
- package/Tests/Server/Infrastructure/GlobalCache.test.ts +195 -0
- package/Tests/Server/Infrastructure/Postgres/AddIncidentStatusPageScopeMigration.test.ts +395 -0
- package/Tests/Server/Infrastructure/Postgres/AddIncidentTemplateStatusPageScopeFlagMigration.test.ts +150 -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/AddSubscriberNotificationClaimedAtMigration.test.ts +156 -0
- package/Tests/Server/Infrastructure/Postgres/AddTeamComplianceRuleScopeMigration.test.ts +622 -0
- package/Tests/Server/Infrastructure/Postgres/SkipHiddenIncidentCreatedNotificationsMigration.test.ts +410 -0
- package/Tests/Server/Middleware/IdentityRateLimit.test.ts +551 -1
- package/Tests/Server/Middleware/SubscriberNotificationPreviewRateLimit.test.ts +238 -0
- package/Tests/Server/Middleware/SubscriberNotificationTestSendRateLimit.test.ts +245 -0
- package/Tests/Server/Middleware/TelemetryIngestBrowserKey.test.ts +61 -4
- package/Tests/Server/Middleware/TelemetryIngestKubernetesAgentRunnerPinnedKey.test.ts +98 -2
- package/Tests/Server/Middleware/TelemetryIngestKubernetesAgentRunnerRateLimit.test.ts +105 -2
- package/Tests/Server/Services/AIServiceBalanceBlocker.test.ts +282 -0
- package/Tests/Server/Services/AddStatusPageSubscriberUnsubscribeTokenMigration.test.ts +152 -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/AutoRemediationRuleCommandRunners.test.ts +2 -1
- package/Tests/Server/Services/CrossProjectRelationWriteGuard.test.ts +221 -36
- package/Tests/Server/Services/DatabaseServiceCompareAndSetColumns.test.ts +191 -0
- package/Tests/Server/Services/IncidentAffectedMonitorsEdit.test.ts +1360 -0
- package/Tests/Server/Services/IncidentAlertSloLinkSurvivesEdit.test.ts +3 -1
- package/Tests/Server/Services/IncidentCreatedRenotifyOnPublish.test.ts +681 -0
- package/Tests/Server/Services/IncidentCreatedResend.test.ts +775 -0
- package/Tests/Server/Services/IncidentCustomFieldRenamePostgres.test.ts +713 -0
- package/Tests/Server/Services/IncidentCustomFieldService.test.ts +751 -0
- package/Tests/Server/Services/IncidentCustomFieldValueValidation.test.ts +556 -0
- package/Tests/Server/Services/IncidentSeverityDeletePausesComplianceRules.test.ts +488 -0
- package/Tests/Server/Services/IncidentStatusPageScope.test.ts +2971 -0
- package/Tests/Server/Services/IncidentStatusPageScopeFeed.test.ts +131 -0
- package/Tests/Server/Services/IncidentStatusPageScopePostgres.test.ts +625 -0
- package/Tests/Server/Services/IncidentTemplateCustomFieldsCopy.test.ts +311 -0
- package/Tests/Server/Services/IncidentTemplateStatusPageScope.test.ts +363 -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/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/PublicNoteEditFeedEventType.test.ts +213 -0
- package/Tests/Server/Services/PublicNoteResendAccess.test.ts +994 -0
- package/Tests/Server/Services/RunnerJobEnqueueKubectl.test.ts +48 -15
- package/Tests/Server/Services/RunnerJobEnqueueKubectlAiAgent.test.ts +620 -0
- package/Tests/Server/Services/RunnerJobKubectlWriteScope.test.ts +170 -3
- 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/ScheduledMaintenanceSubscriberTemplateFormats.test.ts +289 -9
- package/Tests/Server/Services/SmsServiceFailIfNotSent.test.ts +67 -0
- package/Tests/Server/Services/StatusPageReportIncidentCounts.test.ts +610 -0
- package/Tests/Server/Services/StatusPageSubscriberAudienceCounts.test.ts +201 -0
- package/Tests/Server/Services/StatusPageSubscriberAudienceCountsPostgres.test.ts +271 -0
- package/Tests/Server/Services/StatusPageSubscriberConfirmationTemplateEscaping.test.ts +200 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationLogRedaction.test.ts +54 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateCompile.test.ts +37 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateIncidentRecordAccess.test.ts +772 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateLookup.test.ts +506 -0
- package/Tests/Server/Services/StatusPageSubscriberNotificationTemplateLookupPostgres.test.ts +261 -0
- package/Tests/Server/Services/StatusPageSubscriberReport.test.ts +21 -5
- package/Tests/Server/Services/StatusPageSubscriberUnsubscribe.test.ts +1618 -0
- package/Tests/Server/Services/StatusPageSubscriberUnsubscribeLinkSenders.test.ts +373 -0
- package/Tests/Server/Services/StatusPageSubscriberUnsubscribePostgres.test.ts +388 -0
- package/Tests/Server/Services/SubscriberNotificationInFlightRequeue.test.ts +500 -0
- package/Tests/Server/Services/TeamComplianceSettingPostgres.test.ts +2237 -0
- package/Tests/Server/Services/TeamComplianceSettingService.test.ts +3988 -138
- package/Tests/Server/Types/MarkdownEmailLinks.test.ts +320 -0
- package/Tests/Server/Types/Workflow/Components/Email.test.ts +491 -1
- package/Tests/Server/Types/Workflow/Components/EmailSmtpPinning.test.ts +398 -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/KubectlInvestigationToolkit.test.ts +70 -0
- package/Tests/Server/Utils/AI/KubectlJobRunnerFinishedJob.test.ts +58 -0
- 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/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/RemediationKubectlCopyParity.test.ts +2 -0
- package/Tests/Server/Utils/AutoRemediation/CommandPlanExecutor.test.ts +2 -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/CustomField/CustomFieldRename.test.ts +586 -0
- package/Tests/Server/Utils/DataSource/EgressGuard.test.ts +246 -10
- package/Tests/Server/Utils/DataSource/EgressGuardDeploymentConfig.test.ts +226 -0
- package/Tests/Server/Utils/DataSource/EgressGuardPinning.test.ts +131 -0
- package/Tests/Server/Utils/DataSource/HttpFetch.test.ts +4 -0
- package/Tests/Server/Utils/EgressPolicyEnvironment.ts +45 -0
- package/Tests/Server/Utils/Mail/PinnedSmtpSocket.test.ts +409 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaObservationBuilderUnits.test.ts +23 -0
- package/Tests/Server/Utils/SSRFProtection.test.ts +4 -0
- package/Tests/Server/Utils/SSRFProtectionCloudServiceAddresses.test.ts +4 -0
- package/Tests/Server/Utils/SSRFProtectionPrivateNetwork.test.ts +4 -0
- package/Tests/Server/Utils/SSRFProtectionResolutionDetail.test.ts +314 -0
- package/Tests/Server/Utils/StatusPage/IncidentStatusPageScope.test.ts +1699 -0
- package/Tests/Server/Utils/StatusPage/IncidentStatusPageScopeQueriesPostgres.test.ts +508 -0
- package/Tests/Server/Utils/StatusPage/IncidentSubscriberAudienceCallerPermission.test.ts +246 -0
- package/Tests/Server/Utils/StatusPage/IncidentTemplateVariableBuilder.test.ts +1348 -0
- package/Tests/Server/Utils/StatusPage/StatusPageReadAccess.test.ts +221 -0
- package/Tests/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeNotice.test.ts +132 -0
- package/Tests/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeToken.test.ts +155 -0
- package/Tests/Server/Utils/StatusPage/SubscriberIncidentEmailBuilder.test.ts +708 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationClaim.test.ts +255 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationClaimPostgres.test.ts +528 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationDeliveryRecord.test.ts +1238 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationFanOut.test.ts +472 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationPreviewBuilder.test.ts +1168 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationRunLimit.test.ts +275 -0
- package/Tests/Server/Utils/StatusPage/SubscriberNotificationTiming.test.ts +131 -0
- package/Tests/Server/Utils/StatusPageResource.test.ts +98 -0
- 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 +45 -3
- package/Tests/Server/Utils/VM/VMRunnerPrivateNetworkWiring.test.ts +17 -0
- package/Tests/Server/Utils/VM/VMRunnerSsrf.test.ts +75 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsChats.test.ts +25 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsGroupChatNames.test.ts +3119 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsGroupChatNamesPostgres.test.ts +1721 -0
- package/Tests/Types/CustomField/CustomFieldSavedViews.test.ts +247 -0
- package/Tests/Types/CustomField/CustomFieldTemplateValues.test.ts +186 -0
- package/Tests/Types/CustomField/CustomFieldTypeCorrespondence.test.ts +48 -0
- package/Tests/Types/CustomField/CustomFieldValueFormat.test.ts +215 -0
- package/Tests/Types/CustomField/CustomFieldValueValidator.test.ts +343 -0
- package/Tests/Types/CustomField/CustomFieldVariableKey.test.ts +364 -0
- package/Tests/Types/Kubernetes/KubernetesAgentChartAiAccess.test.ts +581 -113
- package/Tests/Types/Kubernetes/KubernetesAiAgentAccessContract.test.ts +510 -0
- package/Tests/Types/SafeHtml.test.ts +102 -0
- package/Tests/Types/StatusPage/IncidentCreatedRenotify.test.ts +419 -0
- package/Tests/Types/StatusPage/IncidentCreatedResend.test.ts +118 -0
- package/Tests/Types/StatusPage/IncidentScopeAddedPagesNotification.test.ts +558 -0
- package/Tests/Types/StatusPage/IncidentSubscriberAudience.test.ts +284 -0
- package/Tests/Types/StatusPage/StatusPageSubscriberUnsubscribe.test.ts +341 -0
- package/Tests/Types/StatusPage/SubscriberNotificationPreview.test.ts +196 -0
- package/Tests/Types/StatusPage/SubscriberNotificationResend.test.ts +201 -0
- package/Tests/Types/StatusPage/SubscriberNotificationTemplateCompiler.test.ts +277 -0
- package/Tests/Types/StatusPage/SubscriberNotificationTemplatePreview.test.ts +179 -0
- package/Tests/Types/StatusPage/SubscriberNotificationTemplateVariables.test.ts +324 -0
- package/Tests/Types/StatusPage/SubscriberUpdateNotification.test.ts +60 -13
- 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/CustomFields/CustomFieldFormFields.test.ts +432 -0
- package/Tests/UI/Components/CustomFields/CustomFieldModelFormFields.test.tsx +685 -0
- package/Tests/UI/Components/CustomFields/CustomFieldsDetailOrder.test.tsx +469 -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/Forms/ModelFormCustomFieldInputs.test.tsx +325 -0
- package/Tests/UI/Components/Forms/ModelFormDropdownOptionsRefused.test.tsx +358 -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/CustomFieldColumns.test.tsx +22 -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/Monitor/NetworkPathView.test.tsx +289 -0
- package/Tests/UI/Rum/ChunkLoader.test.ts +201 -0
- package/Tests/UI/Rum/FidelityNotices.test.ts +54 -0
- 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/Dashboard/DashboardTimeRangeZoom.test.ts +104 -1
- package/Tests/Utils/Incident/IncidentNoteTemplateVariables.test.ts +623 -0
- package/Tests/Utils/Markdown/MarkdownEscape.test.ts +89 -0
- package/Tests/Utils/ProbeNetworkFailureUtil.test.ts +992 -0
- package/Tests/Utils/RequestFailedDetails.test.ts +575 -0
- package/Types/AI/AIRunType.ts +9 -4
- package/Types/AI/InvestigationNotStartedReason.ts +6 -0
- package/Types/AutoRemediation/AiRemediationCommandPlan.ts +14 -16
- package/Types/AutoRemediation/AiRemediationCommandPolicyVerdict.ts +28 -0
- package/Types/CustomField/CustomFieldOrder.ts +55 -0
- package/Types/CustomField/CustomFieldSavedViews.ts +225 -0
- package/Types/CustomField/CustomFieldTemplateMerge.ts +71 -0
- package/Types/CustomField/CustomFieldType.ts +14 -0
- package/Types/CustomField/CustomFieldValueFormat.ts +161 -0
- package/Types/CustomField/CustomFieldValueValidator.ts +488 -0
- package/Types/CustomField/CustomFieldVariableKey.ts +211 -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/SafeHtml.ts +93 -0
- package/Types/StatusPage/IncidentCreatedRenotify.ts +224 -0
- package/Types/StatusPage/IncidentCreatedResend.ts +108 -0
- package/Types/StatusPage/IncidentScopeAddedPagesNotification.ts +343 -0
- package/Types/StatusPage/IncidentSubscriberAudience.ts +332 -0
- package/Types/StatusPage/StatusPageSubscriberUnsubscribe.ts +405 -0
- package/Types/StatusPage/SubscriberNotificationInterruption.ts +32 -0
- package/Types/StatusPage/SubscriberNotificationPreview.ts +322 -0
- package/Types/StatusPage/SubscriberNotificationResend.ts +132 -0
- package/Types/StatusPage/SubscriberNotificationTemplateCompiler.ts +180 -0
- package/Types/StatusPage/SubscriberNotificationTemplatePreview.ts +301 -0
- package/Types/StatusPage/SubscriberNotificationTemplateVariables.ts +217 -4
- package/Types/StatusPage/SubscriberUpdateNotification.ts +32 -11
- 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 +28 -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/CustomFields/CustomFieldFormFields.ts +317 -0
- package/UI/Components/CustomFields/CustomFieldModelFormFields.tsx +395 -0
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +95 -55
- package/UI/Components/EntityDropdown/EntityDropdown.tsx +107 -11
- package/UI/Components/Forms/Fields/FormField.tsx +10 -0
- package/UI/Components/Forms/ModelForm.tsx +70 -8
- package/UI/Components/Forms/Validation.ts +1 -1
- 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/ModelFormModal/ModelFormModal.tsx +2 -4
- package/UI/Components/ModelTable/AnalyticsModelTable.tsx +2 -6
- package/UI/Components/ModelTable/BaseModelTable.tsx +21 -9
- package/UI/Components/ModelTable/CustomFieldColumns.tsx +14 -1
- package/UI/Components/ModelTable/ModelTable.tsx +6 -7
- 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/UI/Utils/SensitiveUrlToken.ts +10 -5
- package/Utils/API.ts +247 -2
- package/Utils/AiRemediation/CommandPolicy.ts +1 -1
- package/Utils/AiRemediation/KubectlPolicy.ts +1 -1
- package/Utils/Dashboard/DashboardTimeRangeZoom.ts +46 -2
- package/Utils/Incident/IncidentNoteTemplateVariables.ts +304 -0
- package/Utils/Markdown/MarkdownEscape.ts +65 -0
- package/Utils/ProbeNetworkFailureUtil.ts +673 -0
- package/build/dist/Models/DatabaseModels/Incident.js +267 -1
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentCustomField.js +207 -1
- package/build/dist/Models/DatabaseModels/IncidentCustomField.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentEpisode.js +31 -0
- package/build/dist/Models/DatabaseModels/IncidentEpisode.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js +124 -1
- package/build/dist/Models/DatabaseModels/IncidentTemplate.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -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/Project.js +56 -5
- package/build/dist/Models/DatabaseModels/Project.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/RunnerJob.js +74 -0
- package/build/dist/Models/DatabaseModels/RunnerJob.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +56 -0
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageSubscriber.js +131 -0
- package/build/dist/Models/DatabaseModels/StatusPageSubscriber.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/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 +144 -24
- package/build/dist/Server/API/AutoRemediationAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +100 -1
- package/build/dist/Server/API/IncidentAPI.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/StatusPageAPI.js +417 -176
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/API/StatusPageSubscriberAPI.js +52 -13
- package/build/dist/Server/API/StatusPageSubscriberAPI.js.map +1 -1
- 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/1795300000000-SkipHiddenIncidentCreatedNotifications.js +41 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795300000000-SkipHiddenIncidentCreatedNotifications.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795400000000-AddIncidentStatusPageScope.js +57 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795400000000-AddIncidentStatusPageScope.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795500000000-AddIncidentTemplateStatusPageScopeFlag.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795500000000-AddIncidentTemplateStatusPageScopeFlag.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795600000000-AddStatusPageSubscriberUnsubscribeToken.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795600000000-AddStatusPageSubscriberUnsubscribeToken.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795700000000-AddStatusPageSubscriberIsAddedByTeam.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795700000000-AddStatusPageSubscriberIsAddedByTeam.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795800000000-AddIncidentCustomFieldCreateAndNotificationSettings.js +89 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795800000000-AddIncidentCustomFieldCreateAndNotificationSettings.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795900000000-AddSubscriberNotificationClaimedAt.js +29 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1795900000000-AddSubscriberNotificationClaimedAt.js.map +1 -0
- 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/Index.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Semaphore.js +3 -0
- package/build/dist/Server/Infrastructure/Semaphore.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +89 -3
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -1
- package/build/dist/Server/Middleware/SubscriberNotificationPreviewRateLimit.js +149 -0
- package/build/dist/Server/Middleware/SubscriberNotificationPreviewRateLimit.js.map +1 -0
- package/build/dist/Server/Middleware/SubscriberNotificationTestSendRateLimit.js +190 -0
- package/build/dist/Server/Middleware/SubscriberNotificationTestSendRateLimit.js.map +1 -0
- package/build/dist/Server/Middleware/TelemetryIngest.js +34 -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/AutoRemediationRuleService.js +1 -1
- package/build/dist/Server/Services/AutoRemediationRuleService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +56 -7
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentCustomFieldService.js +204 -8
- package/build/dist/Server/Services/IncidentCustomFieldService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js +24 -0
- package/build/dist/Server/Services/IncidentEpisodePublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeService.js +14 -0
- package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js +26 -0
- package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentPublicNoteService.js +26 -1
- package/build/dist/Server/Services/IncidentPublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +1251 -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/IncidentStateTimelineService.js +12 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/IncidentTemplateService.js +83 -0
- package/build/dist/Server/Services/IncidentTemplateService.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/ProjectService.js +22 -0
- package/build/dist/Server/Services/ProjectService.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/RunnerJobService.js +178 -92
- 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/ScheduledMaintenancePublicNoteService.js +26 -1
- package/build/dist/Server/Services/ScheduledMaintenancePublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +582 -20
- 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/SmsService.js +2 -22
- package/build/dist/Server/Services/SmsService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +47 -9
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js +237 -32
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateStatusPageService.js +109 -0
- package/build/dist/Server/Services/StatusPageSubscriberNotificationTemplateStatusPageService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +925 -99
- package/build/dist/Server/Services/StatusPageSubscriberService.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/Types/Markdown.js +110 -6
- package/build/dist/Server/Types/Markdown.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Email.js +55 -6
- package/build/dist/Server/Types/Workflow/Components/Email.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 +29 -15
- package/build/dist/Server/Utils/AI/Remediation/RemediationCommandTools.js.map +1 -1
- package/build/dist/Server/Utils/AI/Remediation/RemediationExecutionRunner.js +56 -20
- package/build/dist/Server/Utils/AI/Remediation/RemediationExecutionRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js +39 -5
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.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 +4 -2
- package/build/dist/Server/Utils/AutoRemediation/CommandPlanExecutor.js.map +1 -1
- package/build/dist/Server/Utils/CustomField/CustomFieldRename.js +211 -0
- package/build/dist/Server/Utils/CustomField/CustomFieldRename.js.map +1 -0
- package/build/dist/Server/Utils/DataSource/EgressGuard.js +41 -12
- package/build/dist/Server/Utils/DataSource/EgressGuard.js.map +1 -1
- package/build/dist/Server/Utils/Mail/PinnedSmtpSocket.js +101 -0
- package/build/dist/Server/Utils/Mail/PinnedSmtpSocket.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js +9 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/SSRFProtection.js +48 -6
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/StatusPage/IncidentStatusPageScope.js +631 -0
- package/build/dist/Server/Utils/StatusPage/IncidentStatusPageScope.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/IncidentSubscriberAudienceBuilder.js +403 -0
- package/build/dist/Server/Utils/StatusPage/IncidentSubscriberAudienceBuilder.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/IncidentTemplateVariableBuilder.js +451 -0
- package/build/dist/Server/Utils/StatusPage/IncidentTemplateVariableBuilder.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageExclusion.js +13 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageExclusion.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageReadAccess.js +91 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageReadAccess.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeNotice.js +101 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeNotice.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeToken.js +47 -0
- package/build/dist/Server/Utils/StatusPage/StatusPageSubscriberUnsubscribeToken.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberIncidentEmailBuilder.js +273 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberIncidentEmailBuilder.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationClaim.js +73 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationClaim.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationDeliveryRecord.js +722 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationDeliveryRecord.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationFanOut.js +102 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationFanOut.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationPreviewBuilder.js +527 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationPreviewBuilder.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationResendAccess.js +278 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationResendAccess.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationRunLimit.js +137 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationRunLimit.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationTiming.js +103 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberNotificationTiming.js.map +1 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberTemplateIncidentRecordAccess.js +114 -0
- package/build/dist/Server/Utils/StatusPage/SubscriberTemplateIncidentRecordAccess.js.map +1 -0
- package/build/dist/Server/Utils/StatusPageResource.js +39 -7
- package/build/dist/Server/Utils/StatusPageResource.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/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +1 -0
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Server/Utils/Workflow/OAuth2TokenClient.js +3 -0
- package/build/dist/Server/Utils/Workflow/OAuth2TokenClient.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +505 -42
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Types/AI/AIRunType.js +9 -4
- package/build/dist/Types/AI/AIRunType.js.map +1 -1
- package/build/dist/Types/AutoRemediation/AiRemediationCommandPlan.js +10 -16
- 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/CustomField/CustomFieldOrder.js +36 -0
- package/build/dist/Types/CustomField/CustomFieldOrder.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldSavedViews.js +135 -0
- package/build/dist/Types/CustomField/CustomFieldSavedViews.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldTemplateMerge.js +27 -0
- package/build/dist/Types/CustomField/CustomFieldTemplateMerge.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldType.js +12 -0
- package/build/dist/Types/CustomField/CustomFieldType.js.map +1 -1
- package/build/dist/Types/CustomField/CustomFieldValueFormat.js +126 -0
- package/build/dist/Types/CustomField/CustomFieldValueFormat.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldValueValidator.js +280 -0
- package/build/dist/Types/CustomField/CustomFieldValueValidator.js.map +1 -0
- package/build/dist/Types/CustomField/CustomFieldVariableKey.js +150 -0
- package/build/dist/Types/CustomField/CustomFieldVariableKey.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/SafeHtml.js +84 -0
- package/build/dist/Types/SafeHtml.js.map +1 -0
- package/build/dist/Types/StatusPage/IncidentCreatedRenotify.js +117 -0
- package/build/dist/Types/StatusPage/IncidentCreatedRenotify.js.map +1 -0
- package/build/dist/Types/StatusPage/IncidentCreatedResend.js +86 -0
- package/build/dist/Types/StatusPage/IncidentCreatedResend.js.map +1 -0
- package/build/dist/Types/StatusPage/IncidentScopeAddedPagesNotification.js +246 -0
- package/build/dist/Types/StatusPage/IncidentScopeAddedPagesNotification.js.map +1 -0
- package/build/dist/Types/StatusPage/IncidentSubscriberAudience.js +183 -0
- package/build/dist/Types/StatusPage/IncidentSubscriberAudience.js.map +1 -0
- package/build/dist/Types/StatusPage/StatusPageSubscriberUnsubscribe.js +277 -0
- package/build/dist/Types/StatusPage/StatusPageSubscriberUnsubscribe.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationInterruption.js +27 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationInterruption.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationPreview.js +190 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationPreview.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationResend.js +102 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationResend.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateCompiler.js +97 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateCompiler.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplatePreview.js +175 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplatePreview.js.map +1 -0
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateVariables.js +144 -4
- package/build/dist/Types/StatusPage/SubscriberNotificationTemplateVariables.js.map +1 -1
- package/build/dist/Types/StatusPage/SubscriberUpdateNotification.js +29 -9
- package/build/dist/Types/StatusPage/SubscriberUpdateNotification.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 +25 -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/CustomFields/CustomFieldFormFields.js +169 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldFormFields.js.map +1 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldModelFormFields.js +212 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldModelFormFields.js.map +1 -0
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +64 -49
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.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/Forms/ModelForm.js +39 -5
- package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
- package/build/dist/UI/Components/Forms/Validation.js +1 -1
- package/build/dist/UI/Components/Forms/Validation.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/ModelFormModal/ModelFormModal.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/AnalyticsModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +12 -2
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/CustomFieldColumns.js +13 -1
- package/build/dist/UI/Components/ModelTable/CustomFieldColumns.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/ModelTable.js +1 -1
- package/build/dist/UI/Components/ModelTable/ModelTable.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/UI/Utils/SensitiveUrlToken.js +10 -5
- package/build/dist/UI/Utils/SensitiveUrlToken.js.map +1 -1
- package/build/dist/Utils/API.js +177 -1
- package/build/dist/Utils/API.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/Dashboard/DashboardTimeRangeZoom.js +27 -1
- package/build/dist/Utils/Dashboard/DashboardTimeRangeZoom.js.map +1 -1
- package/build/dist/Utils/Incident/IncidentNoteTemplateVariables.js +155 -0
- package/build/dist/Utils/Incident/IncidentNoteTemplateVariables.js.map +1 -0
- package/build/dist/Utils/Markdown/MarkdownEscape.js +48 -0
- package/build/dist/Utils/Markdown/MarkdownEscape.js.map +1 -1
- package/build/dist/Utils/ProbeNetworkFailureUtil.js +460 -0
- package/build/dist/Utils/ProbeNetworkFailureUtil.js.map +1 -0
- package/package.json +1 -1
|
@@ -10,15 +10,33 @@ import {
|
|
|
10
10
|
KubernetesAiAccessOfferedFields,
|
|
11
11
|
KubernetesAiAccessSavedSettings,
|
|
12
12
|
KubernetesAiAccessSettingsFormValues,
|
|
13
|
-
buildKubernetesAiRunnerOptions,
|
|
14
|
-
describeRunnerWriteAccess,
|
|
15
|
-
getAiAccessConnectCardMode,
|
|
16
13
|
getKubernetesAiAccessLooseningChanges,
|
|
17
14
|
getKubernetesAiAccessOfferedFields,
|
|
18
15
|
getKubernetesAiAccessSettingsChanges,
|
|
19
16
|
getKubernetesAiAccessSettingsInitialValues,
|
|
17
|
+
isRemediationModeOpenToEveryEditor,
|
|
20
18
|
validateKubectlAllowlistText,
|
|
21
|
-
} from "../../../../App/FeatureSet/Dashboard/src/Pages/Kubernetes/
|
|
19
|
+
} from "../../../../App/FeatureSet/Dashboard/src/Pages/Kubernetes/Utils/KubernetesAiAccessSettings";
|
|
20
|
+
import {
|
|
21
|
+
AI_AGENT_GONE_TEXT,
|
|
22
|
+
AI_AGENT_SIGNED_OFF_TEXT,
|
|
23
|
+
AI_AGENT_SILENT_TEXT,
|
|
24
|
+
canSwitchToAiAgent,
|
|
25
|
+
getAiAgentCardCommand,
|
|
26
|
+
getAiAgentCardState,
|
|
27
|
+
getAiAgentGapAction,
|
|
28
|
+
getAiAgentMetaParts,
|
|
29
|
+
getAiAgentOfflineReason,
|
|
30
|
+
getAiAgentOverviewState,
|
|
31
|
+
getAiAgentPodNamespace,
|
|
32
|
+
getAiAgentStateSentence,
|
|
33
|
+
getAiAgentSummary,
|
|
34
|
+
getAttentionGaps,
|
|
35
|
+
getAutomaticInvestigation,
|
|
36
|
+
isAdvancedRunnerTarget,
|
|
37
|
+
isLegacyRunnerTarget,
|
|
38
|
+
shouldShowWriteAccessCommands,
|
|
39
|
+
} from "../../../../App/FeatureSet/Dashboard/src/Pages/Kubernetes/Utils/KubernetesAiAgentStatus";
|
|
22
40
|
import { isKubernetesAgentRunnerRow } from "../../../../App/FeatureSet/Dashboard/src/Pages/Kubernetes/Utils/KubernetesAgentRunner";
|
|
23
41
|
import {
|
|
24
42
|
RunnerFormRestrictions,
|
|
@@ -26,10 +44,11 @@ import {
|
|
|
26
44
|
getRunnerFormFields,
|
|
27
45
|
getRunnerFormRestrictions,
|
|
28
46
|
} from "../../../../App/FeatureSet/Dashboard/src/Pages/Settings/RunnerFormFields";
|
|
47
|
+
import KubernetesAiAgentService from "../../../Server/Services/KubernetesAiAgentService";
|
|
29
48
|
import KubernetesClusterAiAccessService, {
|
|
30
49
|
KubernetesClusterAiAccessProjectGates,
|
|
31
|
-
getKubernetesAgentRunnerNameForCluster,
|
|
32
50
|
} from "../../../Server/Services/KubernetesClusterAiAccessService";
|
|
51
|
+
import KubernetesClusterFeedService from "../../../Server/Services/KubernetesClusterFeedService";
|
|
33
52
|
import KubernetesClusterService, {
|
|
34
53
|
normalizeKubectlAllowlistForWrite,
|
|
35
54
|
} from "../../../Server/Services/KubernetesClusterService";
|
|
@@ -37,10 +56,12 @@ import RunbookCredentialService from "../../../Server/Services/RunbookCredential
|
|
|
37
56
|
import RunnerService, {
|
|
38
57
|
Service as RunnerServiceClass,
|
|
39
58
|
} from "../../../Server/Services/RunnerService";
|
|
59
|
+
import UserService from "../../../Server/Services/UserService";
|
|
40
60
|
import CreateBy from "../../../Server/Types/Database/CreateBy";
|
|
41
61
|
import { OnCreate, OnUpdate } from "../../../Server/Types/Database/Hooks";
|
|
42
62
|
import UpdateBy from "../../../Server/Types/Database/UpdateBy";
|
|
43
63
|
import logger from "../../../Server/Utils/Logger";
|
|
64
|
+
import KubernetesAiAgent from "../../../Models/DatabaseModels/KubernetesAiAgent";
|
|
44
65
|
import KubernetesCluster from "../../../Models/DatabaseModels/KubernetesCluster";
|
|
45
66
|
import RunbookCredential from "../../../Models/DatabaseModels/RunbookCredential";
|
|
46
67
|
import Runner from "../../../Models/DatabaseModels/Runner";
|
|
@@ -59,22 +80,24 @@ import Permission, {
|
|
|
59
80
|
UserTenantAccessPermission,
|
|
60
81
|
} from "../../../Types/Permission";
|
|
61
82
|
import RunbookCredentialType from "../../../Types/Runbook/RunbookCredentialType";
|
|
62
|
-
import { DropdownOption } from "../../../UI/Components/Dropdown/Dropdown";
|
|
63
83
|
import Field from "../../../UI/Components/Forms/Types/Field";
|
|
64
84
|
import FormValues from "../../../UI/Components/Forms/Types/FormValues";
|
|
65
85
|
|
|
66
86
|
/*
|
|
67
|
-
* The AI page against the server it talks to — run for real, with
|
|
68
|
-
* the database stubbed:
|
|
87
|
+
* The AI agent page against the server it talks to — run for real, with
|
|
88
|
+
* only the database stubbed:
|
|
69
89
|
*
|
|
70
90
|
* - who may loosen: the page's rule (getKubernetesAiAccessLooseningChanges)
|
|
71
91
|
* gives the verdict KubernetesClusterService's write hook gives, for the
|
|
72
|
-
* same saved settings
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* - the
|
|
76
|
-
*
|
|
77
|
-
*
|
|
92
|
+
* same saved settings, the same change and the same answer to "does this
|
|
93
|
+
* cluster have a Kubernetes AI agent?" — Off -> Ask for approval and
|
|
94
|
+
* clearing a binding while an agent exists included;
|
|
95
|
+
* - the status the real service computes drives the page's card: every
|
|
96
|
+
* state of the "Kubernetes AI agent" card, the Needs attention rows, the
|
|
97
|
+
* write-access commands and the Overview card, from the real resolution
|
|
98
|
+
* of the access target;
|
|
99
|
+
* - the page's allowlist validation agrees with the server's;
|
|
100
|
+
* - the Runner pages and RunnerService agree on which rows are the chart's.
|
|
78
101
|
*/
|
|
79
102
|
|
|
80
103
|
const PROJECT_ID: ObjectID = new ObjectID(
|
|
@@ -87,6 +110,7 @@ const RUNNER_ID: string = "44444444-4444-4444-8444-444444444444";
|
|
|
87
110
|
const OTHER_RUNNER_ID: string = "77777777-7777-4777-8777-777777777777";
|
|
88
111
|
const CREDENTIAL_ID: string = "55555555-5555-4555-8555-555555555555";
|
|
89
112
|
const OTHER_CREDENTIAL_ID: string = "88888888-8888-4888-8888-888888888888";
|
|
113
|
+
const AGENT_ID: string = "99999999-9999-4999-8999-999999999990";
|
|
90
114
|
|
|
91
115
|
const SET_IMAGE_PATTERN: string = "kubectl set image deployment/web * -n web";
|
|
92
116
|
const PATCH_PATTERN: string = "kubectl patch deployment/web -n web -p *";
|
|
@@ -98,6 +122,8 @@ const READY_GATES: KubernetesClusterAiAccessProjectGates = {
|
|
|
98
122
|
isAutoRemediationEnabled: true,
|
|
99
123
|
isAiCommandExecutionEnabled: true,
|
|
100
124
|
hasLlmProvider: true,
|
|
125
|
+
aiBalanceBlocker: null,
|
|
126
|
+
automaticInvestigation: { incidents: true, alerts: false },
|
|
101
127
|
};
|
|
102
128
|
|
|
103
129
|
type Hooks = {
|
|
@@ -139,14 +165,17 @@ interface StoredSettings {
|
|
|
139
165
|
aiKubectlCommandAllowlist: unknown;
|
|
140
166
|
aiAccessRunnerId: string | null;
|
|
141
167
|
aiAccessCredentialId: string | null;
|
|
168
|
+
hasAiAgent: boolean;
|
|
142
169
|
}
|
|
143
170
|
|
|
171
|
+
// A cluster bound to an advanced Runner, with no AI agent unless said.
|
|
144
172
|
function stored(overrides: Partial<StoredSettings> = {}): StoredSettings {
|
|
145
173
|
return {
|
|
146
174
|
aiRemediationMode: KubernetesAiRemediationMode.Automatic,
|
|
147
175
|
aiKubectlCommandAllowlist: [SET_IMAGE_PATTERN, PATCH_PATTERN],
|
|
148
176
|
aiAccessRunnerId: RUNNER_ID,
|
|
149
177
|
aiAccessCredentialId: null,
|
|
178
|
+
hasAiAgent: false,
|
|
150
179
|
...overrides,
|
|
151
180
|
};
|
|
152
181
|
}
|
|
@@ -160,13 +189,40 @@ function asPageSaved(
|
|
|
160
189
|
aiRemediationMode: settings.aiRemediationMode,
|
|
161
190
|
aiKubectlCommandAllowlist: settings.aiKubectlCommandAllowlist,
|
|
162
191
|
aiAccessRunnerId: settings.aiAccessRunnerId,
|
|
163
|
-
aiAccessRunnerName: "bash-runner",
|
|
192
|
+
aiAccessRunnerName: settings.aiAccessRunnerId ? "bash-runner" : null,
|
|
164
193
|
aiAccessCredentialId: settings.aiAccessCredentialId,
|
|
165
194
|
aiAccessCredentialName: settings.aiAccessCredentialId ? "prod token" : null,
|
|
166
195
|
};
|
|
167
196
|
}
|
|
168
197
|
|
|
169
|
-
|
|
198
|
+
function makeAgentRow(
|
|
199
|
+
overrides: Record<string, unknown> = {},
|
|
200
|
+
): KubernetesAiAgent {
|
|
201
|
+
return Object.assign(new KubernetesAiAgent(), {
|
|
202
|
+
id: new ObjectID(AGENT_ID),
|
|
203
|
+
_id: AGENT_ID,
|
|
204
|
+
projectId: PROJECT_ID,
|
|
205
|
+
kubernetesClusterId: CLUSTER_ID,
|
|
206
|
+
connectionStatus: "connected",
|
|
207
|
+
lastAliveAt: OneUptimeDate.getCurrentDate(),
|
|
208
|
+
lastRegisteredAt: OneUptimeDate.getCurrentDate(),
|
|
209
|
+
agentVersion: "14.1.0",
|
|
210
|
+
posture: {
|
|
211
|
+
clusterIdentifier: "prod-us",
|
|
212
|
+
inCluster: true,
|
|
213
|
+
allowWrites: false,
|
|
214
|
+
writeNamespaces: [],
|
|
215
|
+
podNamespace: "monitoring",
|
|
216
|
+
kubectlVersion: "v1.31.2",
|
|
217
|
+
},
|
|
218
|
+
...overrides,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/*
|
|
223
|
+
* Serves `settings` as the cluster the server's write hook reads first,
|
|
224
|
+
* and answers "which of these clusters has an AI agent?" the same way.
|
|
225
|
+
*/
|
|
170
226
|
function serveStoredCluster(settings: StoredSettings): void {
|
|
171
227
|
jest.spyOn(KubernetesClusterService, "findBy").mockResolvedValue([
|
|
172
228
|
{
|
|
@@ -184,6 +240,20 @@ function serveStoredCluster(settings: StoredSettings): void {
|
|
|
184
240
|
: null,
|
|
185
241
|
} as unknown as KubernetesCluster,
|
|
186
242
|
]);
|
|
243
|
+
|
|
244
|
+
const agents: Map<string, KubernetesAiAgent> = new Map<
|
|
245
|
+
string,
|
|
246
|
+
KubernetesAiAgent
|
|
247
|
+
>();
|
|
248
|
+
if (settings.hasAiAgent) {
|
|
249
|
+
agents.set(CLUSTER_ID.toString(), makeAgentRow());
|
|
250
|
+
}
|
|
251
|
+
jest
|
|
252
|
+
.spyOn(KubernetesAiAgentService, "findForClusters")
|
|
253
|
+
.mockResolvedValue(agents);
|
|
254
|
+
jest
|
|
255
|
+
.spyOn(KubernetesAiAgentService, "findForCluster")
|
|
256
|
+
.mockResolvedValue(settings.hasAiAgent ? makeAgentRow() : null);
|
|
187
257
|
}
|
|
188
258
|
|
|
189
259
|
// Does the server refuse this write to a cluster editor as loosening?
|
|
@@ -218,6 +288,7 @@ function pageSaysLoosens(
|
|
|
218
288
|
getKubernetesAiAccessLooseningChanges({
|
|
219
289
|
saved: asPageSaved(settings),
|
|
220
290
|
changes,
|
|
291
|
+
hasAiAgent: settings.hasAiAgent,
|
|
221
292
|
}).length > 0
|
|
222
293
|
);
|
|
223
294
|
}
|
|
@@ -232,6 +303,8 @@ beforeEach(() => {
|
|
|
232
303
|
jest.spyOn(RunbookCredentialService, "findOneBy").mockResolvedValue({
|
|
233
304
|
id: new ObjectID(CREDENTIAL_ID),
|
|
234
305
|
credentialType: RunbookCredentialType.Kubernetes,
|
|
306
|
+
name: "prod token",
|
|
307
|
+
runners: [{ _id: RUNNER_ID, id: new ObjectID(RUNNER_ID) }],
|
|
235
308
|
} as unknown as RunbookCredential);
|
|
236
309
|
});
|
|
237
310
|
|
|
@@ -239,11 +312,6 @@ afterEach(() => {
|
|
|
239
312
|
jest.restoreAllMocks();
|
|
240
313
|
});
|
|
241
314
|
|
|
242
|
-
/*
|
|
243
|
-
* The finding (dashboard-ai-page-4, XP-7, SIA-4): the server's rule is
|
|
244
|
-
* relative to the saved settings, the page's was absolute, and the page
|
|
245
|
-
* hid tightening the server accepts from every cluster editor.
|
|
246
|
-
*/
|
|
247
315
|
describe("who may loosen: the page and the server agree", () => {
|
|
248
316
|
const CASES: Array<{
|
|
249
317
|
name: string;
|
|
@@ -271,6 +339,27 @@ describe("who may loosen: the page and the server agree", () => {
|
|
|
271
339
|
}),
|
|
272
340
|
changes: { aiRemediationMode: KubernetesAiRemediationMode.Automatic },
|
|
273
341
|
},
|
|
342
|
+
// Regression (§11): turning fixes on at all needs the admin set.
|
|
343
|
+
{
|
|
344
|
+
name: "Off -> Ask for approval",
|
|
345
|
+
settings: stored({
|
|
346
|
+
aiRemediationMode: KubernetesAiRemediationMode.Disabled,
|
|
347
|
+
}),
|
|
348
|
+
changes: {
|
|
349
|
+
aiRemediationMode: KubernetesAiRemediationMode.RequireApproval,
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: "Off -> Ask for approval on a cluster with an AI agent",
|
|
354
|
+
settings: stored({
|
|
355
|
+
aiRemediationMode: KubernetesAiRemediationMode.Disabled,
|
|
356
|
+
aiAccessRunnerId: null,
|
|
357
|
+
hasAiAgent: true,
|
|
358
|
+
}),
|
|
359
|
+
changes: {
|
|
360
|
+
aiRemediationMode: KubernetesAiRemediationMode.RequireApproval,
|
|
361
|
+
},
|
|
362
|
+
},
|
|
274
363
|
{
|
|
275
364
|
name: "Automatic -> Ask for approval",
|
|
276
365
|
settings: stored(),
|
|
@@ -278,6 +367,13 @@ describe("who may loosen: the page and the server agree", () => {
|
|
|
278
367
|
aiRemediationMode: KubernetesAiRemediationMode.RequireApproval,
|
|
279
368
|
},
|
|
280
369
|
},
|
|
370
|
+
{
|
|
371
|
+
name: "Ask for approval -> Off",
|
|
372
|
+
settings: stored({
|
|
373
|
+
aiRemediationMode: KubernetesAiRemediationMode.RequireApproval,
|
|
374
|
+
}),
|
|
375
|
+
changes: { aiRemediationMode: KubernetesAiRemediationMode.Disabled },
|
|
376
|
+
},
|
|
281
377
|
{
|
|
282
378
|
name: "re-send the saved mode",
|
|
283
379
|
settings: stored(),
|
|
@@ -321,27 +417,43 @@ describe("who may loosen: the page and the server agree", () => {
|
|
|
321
417
|
}),
|
|
322
418
|
changes: { aiKubectlCommandAllowlist: [ODDLY_SPACED_PATTERN] },
|
|
323
419
|
},
|
|
324
|
-
{
|
|
325
|
-
name: "keep a pattern stored with odd spacing, re-spaced",
|
|
326
|
-
settings: stored({
|
|
327
|
-
aiKubectlCommandAllowlist: [SET_IMAGE_PATTERN, ODDLY_SPACED_PATTERN],
|
|
328
|
-
}),
|
|
329
|
-
changes: {
|
|
330
|
-
aiKubectlCommandAllowlist: [
|
|
331
|
-
"kubectl scale deployment/web --replicas=* -n web",
|
|
332
|
-
],
|
|
333
|
-
},
|
|
334
|
-
},
|
|
335
420
|
{
|
|
336
421
|
name: "clear an allowlist stored as a plain string",
|
|
337
422
|
settings: stored({ aiKubectlCommandAllowlist: SET_IMAGE_PATTERN }),
|
|
338
423
|
changes: { aiKubectlCommandAllowlist: [] },
|
|
339
424
|
},
|
|
340
425
|
{
|
|
341
|
-
name: "unbind the Runner",
|
|
426
|
+
name: "unbind the Runner of a cluster without an AI agent",
|
|
342
427
|
settings: stored(),
|
|
343
428
|
changes: { aiAccessRunnerId: null },
|
|
344
429
|
},
|
|
430
|
+
// Regression (§11): with an agent, clearing hands the cluster to it.
|
|
431
|
+
{
|
|
432
|
+
name: "unbind the Runner of a cluster with an AI agent",
|
|
433
|
+
settings: stored({ hasAiAgent: true }),
|
|
434
|
+
changes: { aiAccessRunnerId: null },
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
name: "unbind the Runner and credential of a cluster with an AI agent",
|
|
438
|
+
settings: stored({
|
|
439
|
+
aiAccessCredentialId: CREDENTIAL_ID,
|
|
440
|
+
hasAiAgent: true,
|
|
441
|
+
}),
|
|
442
|
+
changes: { aiAccessRunnerId: null, aiAccessCredentialId: null },
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: "unbind the credential of a cluster with an AI agent",
|
|
446
|
+
settings: stored({
|
|
447
|
+
aiAccessCredentialId: CREDENTIAL_ID,
|
|
448
|
+
hasAiAgent: true,
|
|
449
|
+
}),
|
|
450
|
+
changes: { aiAccessCredentialId: null },
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
name: "unbind the credential of a cluster without an AI agent",
|
|
454
|
+
settings: stored({ aiAccessCredentialId: CREDENTIAL_ID }),
|
|
455
|
+
changes: { aiAccessCredentialId: null },
|
|
456
|
+
},
|
|
345
457
|
{
|
|
346
458
|
name: "bind another Runner",
|
|
347
459
|
settings: stored(),
|
|
@@ -349,14 +461,9 @@ describe("who may loosen: the page and the server agree", () => {
|
|
|
349
461
|
},
|
|
350
462
|
{
|
|
351
463
|
name: "re-send the bound Runner",
|
|
352
|
-
settings: stored(),
|
|
464
|
+
settings: stored({ hasAiAgent: true }),
|
|
353
465
|
changes: { aiAccessRunnerId: RUNNER_ID },
|
|
354
466
|
},
|
|
355
|
-
{
|
|
356
|
-
name: "unbind the credential",
|
|
357
|
-
settings: stored({ aiAccessCredentialId: CREDENTIAL_ID }),
|
|
358
|
-
changes: { aiAccessCredentialId: null },
|
|
359
|
-
},
|
|
360
467
|
{
|
|
361
468
|
name: "bind a credential",
|
|
362
469
|
settings: stored(),
|
|
@@ -369,9 +476,14 @@ describe("who may loosen: the page and the server agree", () => {
|
|
|
369
476
|
},
|
|
370
477
|
{
|
|
371
478
|
name: "turn investigation off",
|
|
372
|
-
settings: stored(),
|
|
479
|
+
settings: stored({ hasAiAgent: true }),
|
|
373
480
|
changes: { isAiInvestigationEnabled: false },
|
|
374
481
|
},
|
|
482
|
+
{
|
|
483
|
+
name: "turn investigation on",
|
|
484
|
+
settings: stored({ hasAiAgent: true }),
|
|
485
|
+
changes: { isAiInvestigationEnabled: true },
|
|
486
|
+
},
|
|
375
487
|
];
|
|
376
488
|
|
|
377
489
|
test("harness guard: the server refuses a member's loosening and accepts their tightening", async () => {
|
|
@@ -396,6 +508,31 @@ describe("who may loosen: the page and the server agree", () => {
|
|
|
396
508
|
});
|
|
397
509
|
});
|
|
398
510
|
}
|
|
511
|
+
|
|
512
|
+
// The modes the modal offers a member are exactly the ones the server accepts.
|
|
513
|
+
test("the modes offered to a member are the ones the server lets them save", async () => {
|
|
514
|
+
for (const savedMode of Object.values(KubernetesAiRemediationMode)) {
|
|
515
|
+
for (const mode of Object.values(KubernetesAiRemediationMode)) {
|
|
516
|
+
if (mode === savedMode) {
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
519
|
+
const settings: StoredSettings = stored({
|
|
520
|
+
aiRemediationMode: savedMode,
|
|
521
|
+
});
|
|
522
|
+
expect({
|
|
523
|
+
savedMode,
|
|
524
|
+
mode,
|
|
525
|
+
offered: isRemediationModeOpenToEveryEditor(mode, savedMode),
|
|
526
|
+
}).toEqual({
|
|
527
|
+
savedMode,
|
|
528
|
+
mode,
|
|
529
|
+
offered: !(await serverSaysLoosens(settings, {
|
|
530
|
+
aiRemediationMode: mode,
|
|
531
|
+
})),
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
});
|
|
399
536
|
});
|
|
400
537
|
|
|
401
538
|
/*
|
|
@@ -414,10 +551,17 @@ describe("a cluster editor's tightening through the form is accepted end to end"
|
|
|
414
551
|
name: "steps down from Bypass approval to Automatic",
|
|
415
552
|
settings: stored({
|
|
416
553
|
aiRemediationMode: KubernetesAiRemediationMode.BypassApproval,
|
|
554
|
+
hasAiAgent: true,
|
|
417
555
|
}),
|
|
418
556
|
edits: { aiRemediationMode: KubernetesAiRemediationMode.Automatic },
|
|
419
557
|
expected: { aiRemediationMode: KubernetesAiRemediationMode.Automatic },
|
|
420
558
|
},
|
|
559
|
+
{
|
|
560
|
+
name: "turns fixes off",
|
|
561
|
+
settings: stored({ hasAiAgent: true }),
|
|
562
|
+
edits: { aiRemediationMode: KubernetesAiRemediationMode.Disabled },
|
|
563
|
+
expected: { aiRemediationMode: KubernetesAiRemediationMode.Disabled },
|
|
564
|
+
},
|
|
421
565
|
{
|
|
422
566
|
name: "removes a pattern",
|
|
423
567
|
settings: stored(),
|
|
@@ -425,7 +569,6 @@ describe("a cluster editor's tightening through the form is accepted end to end"
|
|
|
425
569
|
expected: { aiKubectlCommandAllowlist: [PATCH_PATTERN] },
|
|
426
570
|
},
|
|
427
571
|
{
|
|
428
|
-
// The form shows the kept line re-spaced; it is sent as stored.
|
|
429
572
|
name: "removes a pattern next to one stored with odd spacing",
|
|
430
573
|
settings: stored({
|
|
431
574
|
aiKubectlCommandAllowlist: [SET_IMAGE_PATTERN, ODDLY_SPACED_PATTERN],
|
|
@@ -443,7 +586,7 @@ describe("a cluster editor's tightening through the form is accepted end to end"
|
|
|
443
586
|
expected: { aiKubectlCommandAllowlist: [] },
|
|
444
587
|
},
|
|
445
588
|
{
|
|
446
|
-
name: "unbinds the Runner and the credential",
|
|
589
|
+
name: "unbinds the Runner and the credential of a cluster without an AI agent",
|
|
447
590
|
settings: stored({ aiAccessCredentialId: CREDENTIAL_ID }),
|
|
448
591
|
edits: { clearAiAccessRunner: true, clearAiAccessCredential: true },
|
|
449
592
|
expected: { aiAccessRunnerId: null, aiAccessCredentialId: null },
|
|
@@ -459,6 +602,8 @@ describe("a cluster editor's tightening through the form is accepted end to end"
|
|
|
459
602
|
canConfigureUnattended: false,
|
|
460
603
|
isRunnerPickerAvailable: false,
|
|
461
604
|
isCredentialPickerAvailable: false,
|
|
605
|
+
isAdvancedBinding: saved.aiAccessRunnerId !== null,
|
|
606
|
+
hasAiAgent: edit.settings.hasAiAgent,
|
|
462
607
|
});
|
|
463
608
|
const changes: JSONObject = getKubernetesAiAccessSettingsChanges({
|
|
464
609
|
saved,
|
|
@@ -470,12 +615,45 @@ describe("a cluster editor's tightening through the form is accepted end to end"
|
|
|
470
615
|
});
|
|
471
616
|
|
|
472
617
|
expect(changes).toEqual(edit.expected);
|
|
473
|
-
expect(
|
|
474
|
-
|
|
475
|
-
|
|
618
|
+
expect(
|
|
619
|
+
getKubernetesAiAccessLooseningChanges({
|
|
620
|
+
saved,
|
|
621
|
+
changes,
|
|
622
|
+
hasAiAgent: edit.settings.hasAiAgent,
|
|
623
|
+
}),
|
|
624
|
+
).toEqual([]);
|
|
476
625
|
expect(await serverSaysLoosens(edit.settings, changes)).toBe(false);
|
|
477
626
|
});
|
|
478
627
|
}
|
|
628
|
+
|
|
629
|
+
/*
|
|
630
|
+
* The unbind switch is gone for a member once the cluster has an agent
|
|
631
|
+
* — and the server would refuse the write it used to send.
|
|
632
|
+
*/
|
|
633
|
+
test("a member is not offered the unbind the server would refuse", async () => {
|
|
634
|
+
const settings: StoredSettings = stored({
|
|
635
|
+
aiAccessCredentialId: CREDENTIAL_ID,
|
|
636
|
+
hasAiAgent: true,
|
|
637
|
+
});
|
|
638
|
+
const offered: KubernetesAiAccessOfferedFields =
|
|
639
|
+
getKubernetesAiAccessOfferedFields({
|
|
640
|
+
saved: asPageSaved(settings),
|
|
641
|
+
canConfigureUnattended: false,
|
|
642
|
+
isRunnerPickerAvailable: false,
|
|
643
|
+
isCredentialPickerAvailable: false,
|
|
644
|
+
isAdvancedBinding: true,
|
|
645
|
+
hasAiAgent: true,
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
expect(offered.runnerClear).toBe(false);
|
|
649
|
+
expect(offered.credentialClear).toBe(false);
|
|
650
|
+
expect(
|
|
651
|
+
await serverSaysLoosens(settings, {
|
|
652
|
+
aiAccessRunnerId: null,
|
|
653
|
+
aiAccessCredentialId: null,
|
|
654
|
+
}),
|
|
655
|
+
).toBe(true);
|
|
656
|
+
});
|
|
479
657
|
});
|
|
480
658
|
|
|
481
659
|
function fakeCluster(
|
|
@@ -487,16 +665,17 @@ function fakeCluster(
|
|
|
487
665
|
projectId: PROJECT_ID,
|
|
488
666
|
name: "prod-us",
|
|
489
667
|
clusterIdentifier: "prod-us",
|
|
490
|
-
aiAccessRunnerId:
|
|
668
|
+
aiAccessRunnerId: undefined,
|
|
491
669
|
aiAccessCredentialId: undefined,
|
|
492
670
|
isAiInvestigationEnabled: true,
|
|
493
|
-
aiRemediationMode: KubernetesAiRemediationMode.
|
|
671
|
+
aiRemediationMode: KubernetesAiRemediationMode.Disabled,
|
|
494
672
|
aiKubectlCommandAllowlist: undefined,
|
|
495
673
|
...overrides,
|
|
496
674
|
} as unknown as KubernetesCluster;
|
|
497
675
|
}
|
|
498
676
|
|
|
499
|
-
|
|
677
|
+
// The chart's previous in-cluster Runner of this cluster.
|
|
678
|
+
function fakeLegacyRunner(overrides: Record<string, unknown> = {}): Runner {
|
|
500
679
|
return {
|
|
501
680
|
id: new ObjectID(RUNNER_ID),
|
|
502
681
|
_id: RUNNER_ID,
|
|
@@ -514,14 +693,30 @@ function fakeRunner(overrides: Record<string, unknown> = {}): Runner {
|
|
|
514
693
|
} as unknown as Runner;
|
|
515
694
|
}
|
|
516
695
|
|
|
696
|
+
// A Runner an operator created, outside the chart.
|
|
697
|
+
function fakeAdvancedRunner(overrides: Record<string, unknown> = {}): Runner {
|
|
698
|
+
return {
|
|
699
|
+
id: new ObjectID(OTHER_RUNNER_ID),
|
|
700
|
+
_id: OTHER_RUNNER_ID,
|
|
701
|
+
name: "bash-runner",
|
|
702
|
+
lastAlive: OneUptimeDate.getCurrentDate(),
|
|
703
|
+
canRunAiCommands: true,
|
|
704
|
+
hostInfo: {},
|
|
705
|
+
...overrides,
|
|
706
|
+
} as unknown as Runner;
|
|
707
|
+
}
|
|
708
|
+
|
|
517
709
|
async function realStatus(data: {
|
|
518
710
|
cluster: KubernetesCluster;
|
|
519
|
-
runner
|
|
711
|
+
runner?: Runner | null;
|
|
712
|
+
agentRow?: KubernetesAiAgent | null;
|
|
713
|
+
gates?: KubernetesClusterAiAccessProjectGates;
|
|
520
714
|
}): Promise<KubernetesClusterAiAccessStatus> {
|
|
521
|
-
jest.spyOn(RunnerService, "findOneBy").mockResolvedValue(data.runner);
|
|
715
|
+
jest.spyOn(RunnerService, "findOneBy").mockResolvedValue(data.runner || null);
|
|
522
716
|
return await KubernetesClusterAiAccessService.getStatusForClusterModel({
|
|
523
717
|
cluster: data.cluster,
|
|
524
|
-
gates: READY_GATES,
|
|
718
|
+
gates: data.gates || READY_GATES,
|
|
719
|
+
aiAgentRow: data.agentRow ?? null,
|
|
525
720
|
});
|
|
526
721
|
}
|
|
527
722
|
|
|
@@ -532,119 +727,266 @@ function gapCodes(status: KubernetesClusterAiAccessStatus): Array<string> {
|
|
|
532
727
|
}
|
|
533
728
|
|
|
534
729
|
/*
|
|
535
|
-
* The server
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
* words, so it is checked against what the real status produces.
|
|
730
|
+
* The server resolves the access target (agent, previous Runner, advanced
|
|
731
|
+
* Runner, none) and the page reads the result. Each state of the card is
|
|
732
|
+
* checked against what the real status produces for it.
|
|
539
733
|
*/
|
|
540
|
-
describe("the
|
|
541
|
-
test("
|
|
734
|
+
describe("the AI agent card follows the real status", () => {
|
|
735
|
+
test("every status carries the agent and the automatic-investigation opt-ins", async () => {
|
|
542
736
|
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
543
|
-
cluster: fakeCluster(
|
|
544
|
-
|
|
737
|
+
cluster: fakeCluster(),
|
|
738
|
+
});
|
|
739
|
+
expect(status).toHaveProperty("aiAgent", null);
|
|
740
|
+
expect(getAutomaticInvestigation(status)).toEqual({
|
|
741
|
+
incidents: true,
|
|
742
|
+
alerts: false,
|
|
545
743
|
});
|
|
546
|
-
expect(gapCodes(status)).toEqual(["no_runner_bound"]);
|
|
547
|
-
expect(getAiAccessConnectCardMode(status)).toBe("connect");
|
|
548
744
|
});
|
|
549
745
|
|
|
550
|
-
test("
|
|
746
|
+
test("nothing installed: the install command, and Needs attention says so", async () => {
|
|
551
747
|
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
552
|
-
cluster: fakeCluster(
|
|
553
|
-
runner: fakeRunner(),
|
|
748
|
+
cluster: fakeCluster(),
|
|
554
749
|
});
|
|
555
|
-
expect(gapCodes(status)).
|
|
556
|
-
expect(
|
|
750
|
+
expect(gapCodes(status)).toContain("ai_agent_not_connected");
|
|
751
|
+
expect(getAiAgentCardState(status)).toBe("not_installed");
|
|
752
|
+
expect(getAiAgentCardCommand(status)).toBe("install");
|
|
753
|
+
expect(getAiAgentOverviewState(status).text).toBe("Not installed");
|
|
754
|
+
expect(
|
|
755
|
+
getAttentionGaps(status).map((gap: KubernetesAiAccessGap): string => {
|
|
756
|
+
return gap.code;
|
|
757
|
+
}),
|
|
758
|
+
).toContain("ai_agent_not_connected");
|
|
557
759
|
});
|
|
558
760
|
|
|
559
|
-
|
|
761
|
+
/*
|
|
762
|
+
* A default install: the agent connected, read-only, Fixes off. The one
|
|
763
|
+
* server gap is the fixes-off choice, so the page shows no Needs
|
|
764
|
+
* attention card and reads Ready.
|
|
765
|
+
*/
|
|
766
|
+
test("the agent online, fixes off: connected, ready, nothing needs attention", async () => {
|
|
560
767
|
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
561
768
|
cluster: fakeCluster(),
|
|
562
|
-
|
|
769
|
+
agentRow: makeAgentRow(),
|
|
563
770
|
});
|
|
564
|
-
expect(
|
|
565
|
-
expect(
|
|
566
|
-
expect(
|
|
567
|
-
|
|
568
|
-
);
|
|
771
|
+
expect(status.runner?.kind).toBe("ai_agent");
|
|
772
|
+
expect(status.accessMethod).toBe("in_cluster");
|
|
773
|
+
expect(getAiAgentSummary(status)?.id).toBe(AGENT_ID);
|
|
774
|
+
expect(getAiAgentCardState(status)).toBe("connected");
|
|
775
|
+
expect(gapCodes(status)).toEqual(["remediation_disabled"]);
|
|
776
|
+
expect(getAttentionGaps(status)).toEqual([]);
|
|
777
|
+
expect(status.isInvestigationReady).toBe(true);
|
|
778
|
+
expect(shouldShowWriteAccessCommands(status)).toBe(false);
|
|
779
|
+
expect(getAiAgentOverviewState(status).text).toBe("Connected");
|
|
569
780
|
});
|
|
570
781
|
|
|
571
|
-
test("
|
|
782
|
+
test("the agent offline: its logs, in the namespace it reported", async () => {
|
|
572
783
|
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
573
|
-
cluster: fakeCluster(
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
kubernetes: {
|
|
580
|
-
inCluster: true,
|
|
581
|
-
allowWrites: false,
|
|
582
|
-
clusterIdentifier: "prod-eu",
|
|
583
|
-
},
|
|
584
|
-
},
|
|
784
|
+
cluster: fakeCluster(),
|
|
785
|
+
agentRow: makeAgentRow({
|
|
786
|
+
lastAliveAt: OneUptimeDate.addRemoveMinutes(
|
|
787
|
+
OneUptimeDate.getCurrentDate(),
|
|
788
|
+
-30,
|
|
789
|
+
),
|
|
585
790
|
}),
|
|
586
791
|
});
|
|
587
|
-
expect(gapCodes(status)).toContain("
|
|
588
|
-
expect(
|
|
792
|
+
expect(gapCodes(status)).toContain("ai_agent_offline");
|
|
793
|
+
expect(getAiAgentCardState(status)).toBe("offline");
|
|
794
|
+
expect(getAiAgentCardCommand(status)).toBe("logs");
|
|
795
|
+
expect(getAiAgentPodNamespace(status)).toBe("monitoring");
|
|
796
|
+
expect(getAiAgentOverviewState(status).text).toBe("Offline");
|
|
797
|
+
// It never signed off: its heartbeats stopped.
|
|
798
|
+
expect(getAiAgentOfflineReason(status)).toBe("silent");
|
|
799
|
+
expect(getAiAgentStateSentence(status)).toBe(AI_AGENT_SILENT_TEXT);
|
|
589
800
|
});
|
|
590
|
-
});
|
|
591
801
|
|
|
592
|
-
/*
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
802
|
+
/*
|
|
803
|
+
* The server's two halves of "offline" (KubernetesAiAgentService.isOnline)
|
|
804
|
+
* are written by its own sign-off and reset. Each is run for real here —
|
|
805
|
+
* only the database write is captured and applied to the row — and the
|
|
806
|
+
* status the real service then computes must read as a sign-off on the
|
|
807
|
+
* page: offline at once, last seen seconds ago, and a sentence that does
|
|
808
|
+
* not claim five silent minutes.
|
|
809
|
+
*/
|
|
810
|
+
describe("the agent's own sign-off and an admin's reset", () => {
|
|
811
|
+
function captureWrites(row: KubernetesAiAgent): void {
|
|
812
|
+
jest
|
|
813
|
+
.spyOn(KubernetesAiAgentService, "updateColumnsByIdWithoutHooks")
|
|
814
|
+
.mockImplementation(async (input: unknown): Promise<void> => {
|
|
815
|
+
Object.assign(row, (input as { data: Record<string, unknown> }).data);
|
|
816
|
+
});
|
|
817
|
+
jest
|
|
818
|
+
.spyOn(KubernetesAiAgentService, "updateOneById")
|
|
819
|
+
.mockImplementation(async (input: unknown): Promise<number> => {
|
|
820
|
+
Object.assign(row, (input as { data: Record<string, unknown> }).data);
|
|
821
|
+
return 1;
|
|
822
|
+
});
|
|
823
|
+
jest
|
|
824
|
+
.spyOn(KubernetesAiAgentService, "findForCluster")
|
|
825
|
+
.mockResolvedValue(row);
|
|
826
|
+
jest
|
|
827
|
+
.spyOn(KubernetesClusterFeedService, "createKubernetesClusterFeedItem")
|
|
828
|
+
.mockResolvedValue(undefined as never);
|
|
829
|
+
jest
|
|
830
|
+
.spyOn(UserService, "getUserMarkdownString")
|
|
831
|
+
.mockResolvedValue("an admin");
|
|
832
|
+
jest.spyOn(logger, "info").mockImplementation((): void => {
|
|
833
|
+
return undefined;
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
async function expectSignedOff(row: KubernetesAiAgent): Promise<void> {
|
|
838
|
+
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
839
|
+
cluster: fakeCluster(),
|
|
840
|
+
agentRow: row,
|
|
841
|
+
});
|
|
842
|
+
expect(getAiAgentSummary(status)?.connectionStatus).toBe("disconnected");
|
|
843
|
+
expect(getAiAgentCardState(status)).toBe("offline");
|
|
844
|
+
expect(getAiAgentOverviewState(status).text).toBe("Offline");
|
|
845
|
+
expect(getAiAgentOfflineReason(status)).toBe("signed_off");
|
|
846
|
+
expect(getAiAgentStateSentence(status)).toBe(AI_AGENT_SIGNED_OFF_TEXT);
|
|
847
|
+
expect(getAiAgentStateSentence(status)).not.toContain(
|
|
848
|
+
"has not checked in",
|
|
849
|
+
);
|
|
850
|
+
expect(getAiAgentMetaParts(status)[0]).toMatch(/^last seen /);
|
|
851
|
+
expect(getAiAgentCardCommand(status)).toBe("logs");
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
test("a clean shutdown (a helm upgrade's old pod) reads as signed off", async () => {
|
|
855
|
+
const row: KubernetesAiAgent = makeAgentRow();
|
|
856
|
+
captureWrites(row);
|
|
857
|
+
|
|
858
|
+
await KubernetesAiAgentService.markDisconnected({
|
|
859
|
+
kubernetesAiAgentId: new ObjectID(AGENT_ID),
|
|
860
|
+
});
|
|
861
|
+
|
|
862
|
+
await expectSignedOff(row);
|
|
606
863
|
});
|
|
607
|
-
}
|
|
608
864
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
const other: string = `eks-${"a".repeat(length - 9)}-gren`;
|
|
613
|
-
expect(identifier.length).toBe(length);
|
|
865
|
+
test("Reset agent reads as signed off, not as five silent minutes", async () => {
|
|
866
|
+
const row: KubernetesAiAgent = makeAgentRow();
|
|
867
|
+
captureWrites(row);
|
|
614
868
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
],
|
|
620
|
-
clusterIdentifier: identifier,
|
|
621
|
-
boundRunnerId: null,
|
|
622
|
-
boundRunnerName: null,
|
|
869
|
+
await KubernetesAiAgentService.resetAgent({
|
|
870
|
+
projectId: PROJECT_ID,
|
|
871
|
+
kubernetesClusterId: CLUSTER_ID,
|
|
872
|
+
userId: ObjectID.generate(),
|
|
623
873
|
});
|
|
624
874
|
|
|
625
|
-
|
|
626
|
-
{
|
|
627
|
-
value: "r-this",
|
|
628
|
-
label: `${getKubernetesAgentRunnerNameForCluster(identifier)} (in-cluster Runner for this cluster)`,
|
|
629
|
-
},
|
|
630
|
-
]);
|
|
875
|
+
await expectSignedOff(row);
|
|
631
876
|
});
|
|
632
|
-
}
|
|
633
877
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
878
|
+
test("a sign-off it never came back from reads as gone", async () => {
|
|
879
|
+
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
880
|
+
cluster: fakeCluster(),
|
|
881
|
+
agentRow: makeAgentRow({
|
|
882
|
+
connectionStatus: "disconnected",
|
|
883
|
+
lastAliveAt: OneUptimeDate.addRemoveMinutes(
|
|
884
|
+
OneUptimeDate.getCurrentDate(),
|
|
885
|
+
-30,
|
|
886
|
+
),
|
|
887
|
+
}),
|
|
888
|
+
});
|
|
889
|
+
expect(getAiAgentCardState(status)).toBe("offline");
|
|
890
|
+
expect(getAiAgentOfflineReason(status)).toBe("gone");
|
|
891
|
+
expect(getAiAgentStateSentence(status)).toBe(AI_AGENT_GONE_TEXT);
|
|
892
|
+
});
|
|
893
|
+
});
|
|
894
|
+
|
|
895
|
+
test("fixes on with a read-only agent: the write-access commands and their gap", async () => {
|
|
896
|
+
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
897
|
+
cluster: fakeCluster({
|
|
898
|
+
aiRemediationMode: KubernetesAiRemediationMode.RequireApproval,
|
|
899
|
+
}),
|
|
900
|
+
agentRow: makeAgentRow(),
|
|
901
|
+
});
|
|
902
|
+
expect(gapCodes(status)).toContain("remediation_write_access_missing");
|
|
903
|
+
expect(shouldShowWriteAccessCommands(status)).toBe(true);
|
|
904
|
+
// Its action is the commands already on the page.
|
|
905
|
+
expect(
|
|
906
|
+
getAiAgentGapAction(
|
|
907
|
+
status.gaps.find((gap: KubernetesAiAccessGap): boolean => {
|
|
908
|
+
return gap.code === "remediation_write_access_missing";
|
|
909
|
+
})!,
|
|
910
|
+
status,
|
|
911
|
+
),
|
|
912
|
+
).toBeNull();
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
test("the previous in-cluster Runner, online and bound: works today", async () => {
|
|
916
|
+
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
917
|
+
cluster: fakeCluster({ aiAccessRunnerId: new ObjectID(RUNNER_ID) }),
|
|
918
|
+
runner: fakeLegacyRunner(),
|
|
919
|
+
});
|
|
920
|
+
expect(isLegacyRunnerTarget(status)).toBe(true);
|
|
921
|
+
expect(getAiAgentCardState(status)).toBe("legacy_runner");
|
|
922
|
+
expect(getAiAgentCardCommand(status)).toBe("install");
|
|
923
|
+
});
|
|
924
|
+
|
|
925
|
+
/*
|
|
926
|
+
* Rolling the chart back (or the seconds of a helm upgrade) leaves the
|
|
927
|
+
* legacy Runner online and the agent offline: the page follows the
|
|
928
|
+
* server to the Runner, not to an agent that is not there.
|
|
929
|
+
*/
|
|
930
|
+
test("a rollback: the previous Runner online and the agent offline resolves to the Runner", async () => {
|
|
931
|
+
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
932
|
+
cluster: fakeCluster({ aiAccessRunnerId: new ObjectID(RUNNER_ID) }),
|
|
933
|
+
runner: fakeLegacyRunner(),
|
|
934
|
+
agentRow: makeAgentRow({ connectionStatus: "disconnected" }),
|
|
935
|
+
});
|
|
936
|
+
expect(getAiAgentCardState(status)).toBe("legacy_runner");
|
|
937
|
+
expect(getAiAgentSummary(status)?.isOnline).toBe(false);
|
|
938
|
+
});
|
|
939
|
+
|
|
940
|
+
test("the agent online wins over the previous Runner bound", async () => {
|
|
941
|
+
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
942
|
+
cluster: fakeCluster({ aiAccessRunnerId: new ObjectID(RUNNER_ID) }),
|
|
943
|
+
runner: fakeLegacyRunner(),
|
|
944
|
+
agentRow: makeAgentRow(),
|
|
945
|
+
});
|
|
946
|
+
expect(getAiAgentCardState(status)).toBe("connected");
|
|
947
|
+
});
|
|
948
|
+
|
|
949
|
+
test("an advanced Runner wins over an online agent, and can be switched back to it", async () => {
|
|
950
|
+
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
951
|
+
cluster: fakeCluster({
|
|
952
|
+
aiAccessRunnerId: new ObjectID(OTHER_RUNNER_ID),
|
|
953
|
+
aiAccessCredentialId: new ObjectID(CREDENTIAL_ID),
|
|
954
|
+
}),
|
|
955
|
+
runner: fakeAdvancedRunner(),
|
|
956
|
+
agentRow: makeAgentRow(),
|
|
957
|
+
});
|
|
958
|
+
expect(isAdvancedRunnerTarget(status)).toBe(true);
|
|
959
|
+
expect(getAiAgentCardState(status)).toBe("advanced_runner");
|
|
960
|
+
expect(canSwitchToAiAgent(status)).toBe(true);
|
|
961
|
+
expect(getAiAgentCardCommand(status)).toBeNull();
|
|
962
|
+
});
|
|
963
|
+
|
|
964
|
+
test("project gates become Needs attention rows the page acts on", async () => {
|
|
965
|
+
const status: KubernetesClusterAiAccessStatus = await realStatus({
|
|
966
|
+
cluster: fakeCluster(),
|
|
967
|
+
agentRow: makeAgentRow(),
|
|
968
|
+
gates: {
|
|
969
|
+
...READY_GATES,
|
|
970
|
+
isAiEnabled: false,
|
|
971
|
+
hasLlmProvider: false,
|
|
972
|
+
aiBalanceBlocker: "The project's AI balance is used up.",
|
|
973
|
+
},
|
|
974
|
+
});
|
|
975
|
+
const actions: Record<string, string | null> = {};
|
|
976
|
+
for (const gap of getAttentionGaps(status)) {
|
|
977
|
+
actions[gap.code] = getAiAgentGapAction(gap, status);
|
|
978
|
+
}
|
|
979
|
+
expect(actions).toEqual({
|
|
980
|
+
project_ai_disabled: "open_ai_features",
|
|
981
|
+
llm_provider_missing: "open_llm_providers",
|
|
982
|
+
ai_balance_insufficient: "open_ai_credits",
|
|
983
|
+
});
|
|
639
984
|
});
|
|
640
985
|
});
|
|
641
986
|
|
|
642
987
|
/*
|
|
643
|
-
* One definition of a usable allowlist entry
|
|
644
|
-
*
|
|
645
|
-
* matcher reads but the server's validation still refuses on its own
|
|
646
|
-
* terms — a pattern without the leading "kubectl" — are the server's to
|
|
647
|
-
* change; see KubectlPolicy.describeAllowlistPatternProblem.)
|
|
988
|
+
* One definition of a usable allowlist entry: the page and the server's
|
|
989
|
+
* save validation give these entries the same answer.
|
|
648
990
|
*/
|
|
649
991
|
describe("allowlist validation: the page and the server agree", () => {
|
|
650
992
|
const ENTRIES: Array<{ name: string; patterns: Array<string> }> = [
|
|
@@ -689,7 +1031,7 @@ describe("allowlist validation: the page and the server agree", () => {
|
|
|
689
1031
|
* The Runner pages against RunnerService, run for real with only the
|
|
690
1032
|
* database read stubbed. The pages decide which rows are kubernetes-agent
|
|
691
1033
|
* rows with the server's rule, and their edit form posts nothing the
|
|
692
|
-
* server's write hook refuses
|
|
1034
|
+
* server's write hook refuses.
|
|
693
1035
|
*/
|
|
694
1036
|
describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
695
1037
|
interface RowCase {
|
|
@@ -714,10 +1056,6 @@ describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
|
714
1056
|
label: "a case-variant agent name",
|
|
715
1057
|
row: { name: "Kubernetes-Agent/prod", hostInfo: {} },
|
|
716
1058
|
},
|
|
717
|
-
{
|
|
718
|
-
label: "a padded upper-case agent name",
|
|
719
|
-
row: { name: " KUBERNETES-AGENT/prod ", hostInfo: {} },
|
|
720
|
-
},
|
|
721
1059
|
{
|
|
722
1060
|
label: "an agent by posture alone (a legacy rename)",
|
|
723
1061
|
row: { name: "prod-kubectl", hostInfo: AGENT_POSTURE },
|
|
@@ -753,7 +1091,6 @@ describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
|
753
1091
|
} as DatabaseCommonInteractionProps;
|
|
754
1092
|
}
|
|
755
1093
|
|
|
756
|
-
// Serves `row` as the Runner the update hook reads.
|
|
757
1094
|
function serveRunnerRow(row: RowCase["row"]): void {
|
|
758
1095
|
jest.spyOn(RunnerService, "findBy").mockResolvedValue([
|
|
759
1096
|
{
|
|
@@ -764,7 +1101,6 @@ describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
|
764
1101
|
]);
|
|
765
1102
|
}
|
|
766
1103
|
|
|
767
|
-
// What the hook says about a non-root update of `row`: null, or the refusal.
|
|
768
1104
|
async function serverRefusal(
|
|
769
1105
|
row: RowCase["row"],
|
|
770
1106
|
data: JSONObject,
|
|
@@ -788,7 +1124,6 @@ describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
|
788
1124
|
}
|
|
789
1125
|
}
|
|
790
1126
|
|
|
791
|
-
// The fields the detail page's edit form offers for `row`.
|
|
792
1127
|
function formFieldNames(row: RowCase["row"]): Array<string> {
|
|
793
1128
|
return getRunnerFormFields({
|
|
794
1129
|
withSteps: false,
|
|
@@ -810,7 +1145,7 @@ describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
|
810
1145
|
}
|
|
811
1146
|
});
|
|
812
1147
|
|
|
813
|
-
test("the form's locks are the hook's rules
|
|
1148
|
+
test("the form's locks are the hook's rules", () => {
|
|
814
1149
|
for (const rowCase of ROWS) {
|
|
815
1150
|
const restrictions: RunnerFormRestrictions = getRunnerFormRestrictions(
|
|
816
1151
|
rowCase.row,
|
|
@@ -828,35 +1163,6 @@ describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
|
828
1163
|
}
|
|
829
1164
|
});
|
|
830
1165
|
|
|
831
|
-
/*
|
|
832
|
-
* What the form posts for a row: every field it offers, the capability
|
|
833
|
-
* switches it offers as they are stored (off) and "Runs AI Remediation
|
|
834
|
-
* Commands" on, the name re-posted unchanged.
|
|
835
|
-
*/
|
|
836
|
-
test("the hook accepts everything the edit form posts, for every row", async () => {
|
|
837
|
-
for (const rowCase of ROWS) {
|
|
838
|
-
const fields: Array<string> = formFieldNames(rowCase.row);
|
|
839
|
-
const data: JSONObject = {};
|
|
840
|
-
|
|
841
|
-
if (fields.includes("name")) {
|
|
842
|
-
data["name"] = rowCase.row.name as string;
|
|
843
|
-
}
|
|
844
|
-
data["description"] = "Edited from the Runner page.";
|
|
845
|
-
if (fields.includes("canRunRunbooks")) {
|
|
846
|
-
data["canRunRunbooks"] = false;
|
|
847
|
-
}
|
|
848
|
-
if (fields.includes("canRunCodeFixTasks")) {
|
|
849
|
-
data["canRunCodeFixTasks"] = false;
|
|
850
|
-
}
|
|
851
|
-
data["canRunAiCommands"] = true;
|
|
852
|
-
|
|
853
|
-
expect({
|
|
854
|
-
row: rowCase.label,
|
|
855
|
-
refusal: await serverRefusal(rowCase.row, data),
|
|
856
|
-
}).toEqual({ row: rowCase.label, refusal: null });
|
|
857
|
-
}
|
|
858
|
-
});
|
|
859
|
-
|
|
860
1166
|
test("the hook refuses exactly what the form leaves out", async () => {
|
|
861
1167
|
for (const rowCase of ROWS) {
|
|
862
1168
|
const fields: Array<string> = formFieldNames(rowCase.row);
|
|
@@ -865,20 +1171,15 @@ describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
|
865
1171
|
(await serverRefusal(rowCase.row, { name: "renamed-runner" })) !== null;
|
|
866
1172
|
const runbooksRefused: boolean =
|
|
867
1173
|
(await serverRefusal(rowCase.row, { canRunRunbooks: true })) !== null;
|
|
868
|
-
const codeFixesRefused: boolean =
|
|
869
|
-
(await serverRefusal(rowCase.row, { canRunCodeFixTasks: true })) !==
|
|
870
|
-
null;
|
|
871
1174
|
|
|
872
1175
|
expect({
|
|
873
1176
|
row: rowCase.label,
|
|
874
1177
|
renameRefused,
|
|
875
1178
|
runbooksRefused,
|
|
876
|
-
codeFixesRefused,
|
|
877
1179
|
}).toEqual({
|
|
878
1180
|
row: rowCase.label,
|
|
879
1181
|
renameRefused: !fields.includes("name"),
|
|
880
1182
|
runbooksRefused: !fields.includes("canRunRunbooks"),
|
|
881
|
-
codeFixesRefused: !fields.includes("canRunCodeFixTasks"),
|
|
882
1183
|
});
|
|
883
1184
|
}
|
|
884
1185
|
});
|
|
@@ -887,11 +1188,9 @@ describe("the Runner pages and RunnerService agree on agent rows", () => {
|
|
|
887
1188
|
for (const name of [
|
|
888
1189
|
"kubernetes-agent/prod",
|
|
889
1190
|
"Kubernetes-Agent/prod",
|
|
890
|
-
" KUBERNETES-AGENT/prod",
|
|
891
1191
|
"prod-runner",
|
|
892
1192
|
"kubernetes-agent",
|
|
893
1193
|
"kubernetes-agent-office",
|
|
894
|
-
"my-kubernetes-agent/prod",
|
|
895
1194
|
]) {
|
|
896
1195
|
let serverRefuses: boolean = false;
|
|
897
1196
|
try {
|