@skyhook-io/radar-app 1.9.4 → 1.9.6
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/package.json +9 -9
- package/src/App.tsx +10 -2
- package/src/api/client.authRedirect.test.ts +194 -0
- package/src/api/client.trace.test.ts +37 -0
- package/src/api/client.ts +315 -1
- package/src/api/config.test.ts +19 -0
- package/src/components/CloudConnectFlow.tsx +605 -0
- package/src/components/CloudFunnelButton.tsx +522 -0
- package/src/components/ConnectionErrorView.tsx +2 -1
- package/src/components/UserMenu.tsx +3 -2
- package/src/components/diagnose/DiagnoseSurface.tsx +2 -1
- package/src/components/home/ClusterHealthCard.tsx +10 -5
- package/src/components/home/mcpToolCatalog.ts +7 -5
- package/src/components/nav/PrimaryNavRail.tsx +4 -1
- package/src/components/resources/ImageFilesystemModal.tsx +4 -1
- package/src/components/settings/SettingsDialog.tsx +11 -4
- package/src/components/traffic/TrafficWizard.tsx +4 -2
- package/src/components/workload/WorkloadView.tsx +558 -12
- package/src/main.tsx +7 -1
- package/src/vite-env.d.ts +8 -0
|
@@ -2,6 +2,7 @@ import { useState, useRef, useEffect, useMemo, useCallback } from 'react'
|
|
|
2
2
|
import { createPortal } from 'react-dom'
|
|
3
3
|
import { X, Folder, File, Link2, ChevronRight, ChevronDown, AlertTriangle, Loader2, Search, Download, HardDrive, Shield, ShieldCheck, Terminal, Copy, Check, RefreshCw } from 'lucide-react'
|
|
4
4
|
import radarLoadingIcon from '@skyhook-io/k8s-ui/assets/radar/radar-icon-loading.svg'
|
|
5
|
+
import { assetUrl } from '@skyhook-io/k8s-ui'
|
|
5
6
|
import { clsx } from 'clsx'
|
|
6
7
|
import { useImageMetadata, ApiError } from '../../api/client'
|
|
7
8
|
import type { FileNode, ImageFilesystem } from '../../types'
|
|
@@ -11,6 +12,8 @@ import { Tooltip } from '../ui/Tooltip'
|
|
|
11
12
|
import { apiUrl, getAuthHeaders, getCredentialsMode } from '../../api/config'
|
|
12
13
|
import { Input } from '@skyhook-io/k8s-ui'
|
|
13
14
|
|
|
15
|
+
const radarLoadingIconUrl = assetUrl(radarLoadingIcon)
|
|
16
|
+
|
|
14
17
|
// Manual fetch function for filesystem (not a hook - gives us full control)
|
|
15
18
|
async function fetchImageFilesystem(
|
|
16
19
|
image: string,
|
|
@@ -182,7 +185,7 @@ export function ImageFilesystemModal({
|
|
|
182
185
|
{/* Loading state */}
|
|
183
186
|
{isLoading && (
|
|
184
187
|
<div className="flex flex-col items-center justify-center gap-3 h-64">
|
|
185
|
-
<img src={
|
|
188
|
+
<img src={radarLoadingIconUrl} alt="" aria-hidden className="w-11 h-11" />
|
|
186
189
|
<span className="text-sm text-theme-text-secondary">
|
|
187
190
|
{isLoadingMetadata ? 'Checking image…' : 'Downloading image layers…'}
|
|
188
191
|
</span>
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { clsx } from 'clsx'
|
|
10
10
|
import { useAnimatedUnmount } from '../../hooks/useAnimatedUnmount'
|
|
11
11
|
import { TRANSITION_BACKDROP, TRANSITION_PANEL } from '../../utils/animation'
|
|
12
|
-
import { apiUrl, getAuthHeaders, getCredentialsMode } from '../../api/config'
|
|
12
|
+
import { apiUrl, getAuthHeaders, getCredentialsMode, routePath } from '../../api/config'
|
|
13
13
|
import {
|
|
14
14
|
useCloudRole, useVersionCheck, useClusterInfo, usePrometheusStatus, useArgoStatus,
|
|
15
15
|
} from '../../api/client'
|
|
@@ -20,6 +20,14 @@ import { AISettingsSection, type AIDraft } from '../diagnose/AISettings'
|
|
|
20
20
|
import { MyPermissionsContent } from './MyPermissionsDialog'
|
|
21
21
|
import { useDiagnose } from '../diagnose/DiagnoseContext'
|
|
22
22
|
|
|
23
|
+
// The loopback URL an MCP client is told to connect to. Shared by the overview
|
|
24
|
+
// row and the MCP section: both must carry the base path, or the URL they
|
|
25
|
+
// advertise 404s under a subpath deployment.
|
|
26
|
+
function mcpLoopbackUrl(): string {
|
|
27
|
+
const port = Number(window.location.port) || 80
|
|
28
|
+
return `http://localhost:${port}${routePath('/mcp')}`
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
interface Config {
|
|
24
32
|
kubeconfig?: string
|
|
25
33
|
kubeconfigDirs?: string[]
|
|
@@ -842,8 +850,7 @@ function OverviewPanel({ active, onNavigate }: { active: boolean; onNavigate: (s
|
|
|
842
850
|
const agentLabel =
|
|
843
851
|
diag.agents.find((a) => a.name === diag.selectedAgent)?.label ?? diag.agents[0]?.label
|
|
844
852
|
const mcpOn = capabilities.mcpEnabled
|
|
845
|
-
const
|
|
846
|
-
const mcpUrl = `http://localhost:${port}/mcp`
|
|
853
|
+
const mcpUrl = mcpLoopbackUrl()
|
|
847
854
|
|
|
848
855
|
const rows: OverviewRow[] = [
|
|
849
856
|
{
|
|
@@ -1119,7 +1126,7 @@ function MCPSection({
|
|
|
1119
1126
|
const [copied, setCopied] = useState(false)
|
|
1120
1127
|
|
|
1121
1128
|
const currentPort = Number(window.location.port) || 80
|
|
1122
|
-
const mcpUrl =
|
|
1129
|
+
const mcpUrl = mcpLoopbackUrl()
|
|
1123
1130
|
|
|
1124
1131
|
const handleCopy = () => {
|
|
1125
1132
|
navigator.clipboard.writeText(mcpUrl)
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react'
|
|
2
2
|
import type { TrafficSourcesResponse, TrafficWizardState } from '../../types'
|
|
3
3
|
import { CheckCircle2, XCircle, AlertTriangle, Copy, ExternalLink, ArrowRight, ArrowLeft, Package } from 'lucide-react'
|
|
4
|
-
import { PaneLoader } from '@skyhook-io/k8s-ui'
|
|
4
|
+
import { assetUrl, PaneLoader } from '@skyhook-io/k8s-ui'
|
|
5
5
|
import radarLoadingIcon from '@skyhook-io/k8s-ui/assets/radar/radar-icon-loading.svg'
|
|
6
6
|
import { InstallWizard } from '../helm/InstallWizard'
|
|
7
7
|
|
|
8
|
+
const radarLoadingIconUrl = assetUrl(radarLoadingIcon)
|
|
9
|
+
|
|
8
10
|
interface TrafficWizardProps {
|
|
9
11
|
state: TrafficWizardState
|
|
10
12
|
setState: (state: TrafficWizardState) => void
|
|
@@ -100,7 +102,7 @@ export function TrafficWizard({
|
|
|
100
102
|
<div className="flex items-center justify-center h-full w-full">
|
|
101
103
|
<div className="max-w-md w-full p-6 space-y-6">
|
|
102
104
|
<div className="flex flex-col items-center gap-3">
|
|
103
|
-
<img src={
|
|
105
|
+
<img src={radarLoadingIconUrl} alt="" aria-hidden className="h-11 w-11" />
|
|
104
106
|
<h2 className="text-lg font-medium text-theme-text-primary">Waiting for traffic source…</h2>
|
|
105
107
|
<p className="text-sm text-theme-text-secondary">
|
|
106
108
|
Checking for availability
|