diff --git a/frontend-modern/src/components/Dashboard/GuestDrawer.discovery.test.tsx b/frontend-modern/src/components/Dashboard/GuestDrawer.discovery.test.tsx new file mode 100644 index 000000000..1dcbe11ea --- /dev/null +++ b/frontend-modern/src/components/Dashboard/GuestDrawer.discovery.test.tsx @@ -0,0 +1,65 @@ +import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { GuestDrawer } from './GuestDrawer'; + +vi.mock('../Discovery/DiscoveryTab', () => ({ + DiscoveryTab: () =>
- Pulse Pro brings advanced diagnostics to your Kubernetes clusters. Identify bottlenecks, security risks, and configuration drift in seconds. + Pulse Pro brings advanced diagnostics to your Kubernetes clusters. Identify + bottlenecks, security risks, and configuration drift in seconds.
= (props) => type="button" onClick={handleAnalyzeCluster} disabled={analysisLoading() || !analysisClusterId() || !aiConfigured()} - class={`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors ${analysisLoading() || !analysisClusterId() || !aiConfigured() - ? 'bg-gray-200 dark:bg-gray-700 text-gray-500 dark:text-gray-400 cursor-not-allowed' - : 'bg-blue-600 text-white hover:bg-blue-700' - }`} + class={`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors ${ + analysisLoading() || !analysisClusterId() || !aiConfigured() + ? 'bg-gray-200 dark:bg-gray-700 text-gray-500 dark:text-gray-400 cursor-not-allowed' + : 'bg-blue-600 text-white hover:bg-blue-700' + }`} > {analysisLoading() ? 'Analyzing...' : 'Analyze'}| toggleSort('name')}>Cluster{sortIndicator('name')} | -toggleSort('status')}>Status{sortIndicator('status')} | -Nodes | -Pods | -Deployments | -Version | -Last Seen | +toggleSort('name')} + > + Cluster{sortIndicator('name')} + | +toggleSort('status')} + > + Status{sortIndicator('status')} + | ++ Nodes + | ++ Pods + | ++ Deployments + | ++ Version + | ++ Last Seen + | No clusters match the current filters. | - }> ++ No clusters match the current filters. + | + + } + > {(cluster) => { const indicator = () => getStatusIndicator(cluster.status); const nodes = () => summarizeNodes(cluster.nodes); @@ -1215,21 +1411,41 @@ export const KubernetesClusters: Component
- 0 ? 'text-amber-600 dark:text-amber-400' : ''}>{nodes().total - nodes().notReady}
+ 0 ? 'text-amber-600 dark:text-amber-400' : ''
+ }
+ >
+ {nodes().total - nodes().notReady}
+
/{nodes().total}
|
- 0 ? 'text-amber-600 dark:text-amber-400' : ''}>{pods().total - pods().unhealthy}
+ 0 ? 'text-amber-600 dark:text-amber-400' : ''
+ }
+ >
+ {pods().total - pods().unhealthy}
+
/{pods().total}
|
- 0 ? 'text-amber-600 dark:text-amber-400' : ''}>{deployments().total - deployments().unhealthy}
+ 0
+ ? 'text-amber-600 dark:text-amber-400'
+ : ''
+ }
+ >
+ {deployments().total - deployments().unhealthy}
+
/{deployments().total}
|
|---|