@skyhook-io/radar-app 1.6.2 → 1.8.0
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 +8 -2
- package/src/App.tsx +110 -45
- package/src/api/client.ts +10 -6
- package/src/components/ConnectionErrorView.tsx +5 -2
- package/src/components/DebugOverlay.tsx +4 -2
- package/src/components/UserMenu.tsx +5 -2
- package/src/components/audit/AuditSettingsDialog.tsx +14 -10
- package/src/components/audit/AuditView.tsx +3 -1
- package/src/components/compare/useCompareLauncher.tsx +6 -3
- package/src/components/cost/CostView.tsx +13 -4
- package/src/components/helm/ChartBrowser.tsx +6 -4
- package/src/components/helm/HelmReleaseDrawer.tsx +25 -13
- package/src/components/helm/HelmView.tsx +7 -6
- package/src/components/helm/InstallWizard.tsx +3 -2
- package/src/components/helm/OwnedResources.tsx +24 -13
- package/src/components/helm/RevisionHistory.tsx +2 -1
- package/src/components/helm/ValuesViewer.tsx +4 -2
- package/src/components/home/ClusterHealthCard.tsx +21 -18
- package/src/components/home/HelmSummary.tsx +3 -1
- package/src/components/home/HomeView.tsx +9 -2
- package/src/components/home/MCPSetupDialog.tsx +10 -4
- package/src/components/nav/PrimaryNavRail.tsx +5 -2
- package/src/components/portforward/PortForwardButton.tsx +14 -8
- package/src/components/resource/PrometheusChartsGrid.tsx +9 -2
- package/src/components/resource/RestartChart.tsx +6 -5
- package/src/components/resource/RightsizingStrip.tsx +4 -1
- package/src/components/resource-drawer/ResourceDrawer.tsx +3 -1
- package/src/components/resources/ImageFilesystemModal.tsx +16 -8
- package/src/components/resources/PodFilesystemModal.tsx +4 -2
- package/src/components/settings/SettingsDialog.tsx +371 -141
- package/src/components/traffic/TrafficFilterSidebar.tsx +8 -43
- package/src/components/traffic/TrafficFlowList.tsx +13 -4
- package/src/components/traffic/TrafficGraph.tsx +8 -3
- package/src/components/traffic/TrafficView.tsx +4 -2
- package/src/components/ui/Omnibar.tsx +0 -1
- package/src/components/workload/WorkloadView.tsx +15 -10
- package/src/context/NavCustomization.tsx +48 -9
- package/src/index.ts +1 -1
|
@@ -316,15 +316,16 @@ export function ChartBrowser({ onChartSelect }: ChartBrowserProps) {
|
|
|
316
316
|
) : (
|
|
317
317
|
<div className="text-sm mt-1 flex flex-col items-center gap-2">
|
|
318
318
|
<p>Your repositories may be out of date.</p>
|
|
319
|
+
<Tooltip content={canHelmWrite ? 'Run helm repo update on every configured repository' : helmWriteReason}>
|
|
319
320
|
<button
|
|
320
321
|
onClick={handleUpdateAllRepos}
|
|
321
322
|
disabled={isBatchUpdating || !canHelmWrite}
|
|
322
|
-
className="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs btn-brand rounded disabled:opacity-50"
|
|
323
|
-
title={canHelmWrite ? 'Run helm repo update on every configured repository' : helmWriteReason}
|
|
323
|
+
className="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs btn-brand rounded disabled:opacity-50 disabled:pointer-events-none"
|
|
324
324
|
>
|
|
325
325
|
<RefreshCw className={`w-3.5 h-3.5 ${isBatchUpdating ? 'animate-spin' : ''}`} />
|
|
326
326
|
{isBatchUpdating ? 'Updating…' : 'Update all repositories'}
|
|
327
327
|
</button>
|
|
328
|
+
</Tooltip>
|
|
328
329
|
<button
|
|
329
330
|
onClick={() => setChartSource('artifacthub')}
|
|
330
331
|
className="text-xs text-blue-400 hover:underline"
|
|
@@ -436,14 +437,15 @@ function RepoDropdownItem({ repo, isSelected, onSelect, onUpdate, isUpdating, ca
|
|
|
436
437
|
</span>
|
|
437
438
|
)}
|
|
438
439
|
</button>
|
|
440
|
+
<Tooltip content={canUpdate ? "Update repository" : (cantUpdateReason ?? "Helm write permissions required")}>
|
|
439
441
|
<button
|
|
440
442
|
onClick={(e) => { e.stopPropagation(); onUpdate() }}
|
|
441
443
|
disabled={isUpdating || !canUpdate}
|
|
442
|
-
className="p-1 text-theme-text-tertiary hover:text-theme-text-primary opacity-0 group-hover:opacity-100 transition-opacity disabled:opacity-50"
|
|
443
|
-
title={canUpdate ? "Update repository" : (cantUpdateReason ?? "Helm write permissions required")}
|
|
444
|
+
className="p-1 text-theme-text-tertiary hover:text-theme-text-primary opacity-0 group-hover:opacity-100 transition-opacity disabled:opacity-50 disabled:pointer-events-none"
|
|
444
445
|
>
|
|
445
446
|
<RefreshCw className={clsx('w-3.5 h-3.5', isUpdating && 'animate-spin')} />
|
|
446
447
|
</button>
|
|
448
|
+
</Tooltip>
|
|
447
449
|
</div>
|
|
448
450
|
)
|
|
449
451
|
}
|
|
@@ -10,6 +10,7 @@ import { clsx } from 'clsx'
|
|
|
10
10
|
import { useHelmRelease, useHelmManifest, useHelmValues, useHelmManifestDiff, useHelmUpgradeInfo, useHelmUninstall, upgradeWithProgress, rollbackWithProgress } from '../../api/client'
|
|
11
11
|
import { useQueryClient } from '@tanstack/react-query'
|
|
12
12
|
import { ConfirmDialog } from '../ui/ConfirmDialog'
|
|
13
|
+
import { Tooltip } from '../ui/Tooltip'
|
|
13
14
|
import { Markdown } from '../ui/Markdown'
|
|
14
15
|
import type { SelectedHelmRelease, HelmHook, ChartDependency } from '../../types'
|
|
15
16
|
import type { NavigateToResource } from '../../utils/navigation'
|
|
@@ -334,63 +335,72 @@ export function HelmReleaseDrawer({ release, onClose, onNavigateToResource, isOp
|
|
|
334
335
|
checking...
|
|
335
336
|
</span>
|
|
336
337
|
) : upgradeError ? (
|
|
338
|
+
<Tooltip content={upgradeErrorMessage ?? ''}>
|
|
337
339
|
<span
|
|
338
340
|
className="badge bg-theme-hover/50 text-theme-text-secondary"
|
|
339
|
-
title={upgradeErrorMessage}
|
|
340
341
|
>
|
|
341
342
|
upgrade check failed
|
|
342
343
|
</span>
|
|
344
|
+
</Tooltip>
|
|
343
345
|
) : upgradeInfo?.updateAvailable ? (
|
|
346
|
+
<Tooltip content={canHelmWrite ? `Click to upgrade: ${upgradeInfo.currentVersion} → ${upgradeInfo.latestVersion}${upgradeInfo.repositoryName ? ` (${upgradeInfo.repositoryName})` : ''}` : helmActReason}>
|
|
344
347
|
<button
|
|
345
348
|
onClick={() => setShowUpgradeConfirm(true)}
|
|
346
349
|
disabled={!canHelmWrite}
|
|
347
350
|
className={clsx(
|
|
348
|
-
'badge transition-colors', SEVERITY_BADGE.warning,
|
|
351
|
+
'badge transition-colors disabled:pointer-events-none', SEVERITY_BADGE.warning,
|
|
349
352
|
canHelmWrite ? 'hover:bg-amber-500/30 cursor-pointer' : 'opacity-50 cursor-not-allowed'
|
|
350
353
|
)}
|
|
351
|
-
title={canHelmWrite ? `Click to upgrade: ${upgradeInfo.currentVersion} → ${upgradeInfo.latestVersion}${upgradeInfo.repositoryName ? ` (${upgradeInfo.repositoryName})` : ''}` : helmActReason}
|
|
352
354
|
>
|
|
353
355
|
<ArrowUpCircle className="w-3 h-3" />
|
|
354
356
|
{upgradeInfo.latestVersion}
|
|
355
357
|
</button>
|
|
358
|
+
</Tooltip>
|
|
356
359
|
) : upgradeInfo && !upgradeInfo.error ? (
|
|
357
|
-
<
|
|
360
|
+
<Tooltip content="Chart is up to date">
|
|
361
|
+
<span className={clsx('badge', SEVERITY_BADGE.success)}>
|
|
358
362
|
latest
|
|
359
363
|
</span>
|
|
364
|
+
</Tooltip>
|
|
360
365
|
) : upgradeInfo?.error ? (
|
|
366
|
+
<Tooltip content={upgradeInfo.error}>
|
|
361
367
|
<span
|
|
362
368
|
className="badge bg-theme-hover/50 text-theme-text-secondary"
|
|
363
|
-
title={upgradeInfo.error}
|
|
364
369
|
>
|
|
365
370
|
upstream unknown
|
|
366
371
|
</span>
|
|
372
|
+
</Tooltip>
|
|
367
373
|
) : null}
|
|
368
374
|
</div>
|
|
369
375
|
<div className="flex items-center gap-1">
|
|
376
|
+
<Tooltip content="Refresh">
|
|
370
377
|
<button
|
|
371
378
|
onClick={refetch}
|
|
372
379
|
disabled={isRefreshAnimating}
|
|
373
|
-
className="p-1.5 text-theme-text-secondary hover:text-theme-text-primary hover:bg-theme-elevated rounded disabled:opacity-50"
|
|
374
|
-
title="Refresh"
|
|
380
|
+
className="p-1.5 text-theme-text-secondary hover:text-theme-text-primary hover:bg-theme-elevated rounded disabled:opacity-50 disabled:pointer-events-none"
|
|
375
381
|
>
|
|
376
382
|
<RefreshCw className={clsx('w-4 h-4', isRefreshAnimating && 'animate-spin')} />
|
|
377
383
|
</button>
|
|
384
|
+
</Tooltip>
|
|
385
|
+
<Tooltip content={canHelmWrite ? 'Uninstall release' : helmActReason}>
|
|
378
386
|
<button
|
|
379
387
|
onClick={() => setShowUninstallConfirm(true)}
|
|
380
388
|
disabled={!canHelmWrite}
|
|
381
389
|
className={clsx(
|
|
382
|
-
'p-1.5 rounded',
|
|
390
|
+
'p-1.5 rounded disabled:pointer-events-none',
|
|
383
391
|
canHelmWrite
|
|
384
392
|
? 'text-theme-text-secondary hover:text-red-400 hover:bg-red-500/10'
|
|
385
393
|
: 'text-theme-text-disabled cursor-not-allowed'
|
|
386
394
|
)}
|
|
387
|
-
title={canHelmWrite ? 'Uninstall release' : helmActReason}
|
|
388
395
|
>
|
|
389
396
|
<Trash2 className="w-4 h-4" />
|
|
390
397
|
</button>
|
|
391
|
-
|
|
398
|
+
</Tooltip>
|
|
399
|
+
<Tooltip content="Close (Esc)">
|
|
400
|
+
<button onClick={onClose} className="p-1.5 text-theme-text-secondary hover:text-theme-text-primary hover:bg-theme-elevated rounded">
|
|
392
401
|
<X className="w-4 h-4" />
|
|
393
402
|
</button>
|
|
403
|
+
</Tooltip>
|
|
394
404
|
</div>
|
|
395
405
|
</div>
|
|
396
406
|
|
|
@@ -399,28 +409,30 @@ export function HelmReleaseDrawer({ release, onClose, onNavigateToResource, isOp
|
|
|
399
409
|
<div className="flex items-center gap-2">
|
|
400
410
|
<Package className="w-5 h-5 text-purple-400" />
|
|
401
411
|
<h2 className="text-lg font-semibold text-theme-text-primary truncate">{release.name}</h2>
|
|
412
|
+
<Tooltip content="Copy name" wrapperClassName="shrink-0">
|
|
402
413
|
<button
|
|
403
414
|
onClick={() => copyToClipboard(release.name, 'name')}
|
|
404
415
|
className="p-1 text-theme-text-secondary hover:text-theme-text-primary hover:bg-theme-elevated rounded shrink-0"
|
|
405
|
-
title="Copy name"
|
|
406
416
|
>
|
|
407
417
|
{copied === 'name' ? <Check className="w-3.5 h-3.5 text-green-400" /> : <Copy className="w-3.5 h-3.5" />}
|
|
408
418
|
</button>
|
|
419
|
+
</Tooltip>
|
|
409
420
|
</div>
|
|
410
421
|
<p className="text-sm text-theme-text-tertiary">{release.namespace}</p>
|
|
411
422
|
{releaseDetail?.managedByFluxHelmRelease && (
|
|
423
|
+
<Tooltip content={`Installed by Flux helm-controller via HelmRelease ${releaseDetail.managedByFluxHelmRelease}. Changes here would be reverted at the next reconcile.`} wrapperClassName="mt-1">
|
|
412
424
|
<button
|
|
413
425
|
type="button"
|
|
414
426
|
onClick={() => {
|
|
415
427
|
const [ns, name] = releaseDetail.managedByFluxHelmRelease!.split('/')
|
|
416
428
|
navigate(`/gitops/detail/helmreleases/${encodeURIComponent(ns || '_')}/${encodeURIComponent(name)}`)
|
|
417
429
|
}}
|
|
418
|
-
className="
|
|
419
|
-
title={`Installed by Flux helm-controller via HelmRelease ${releaseDetail.managedByFluxHelmRelease}. Changes here would be reverted at the next reconcile.`}
|
|
430
|
+
className="inline-flex items-center gap-1 rounded border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[11px] text-amber-700 dark:text-amber-400 hover:bg-amber-500/20 transition-colors"
|
|
420
431
|
>
|
|
421
432
|
<GitBranch className="w-3 h-3" />
|
|
422
433
|
Managed by Flux · {releaseDetail.managedByFluxHelmRelease}
|
|
423
434
|
</button>
|
|
435
|
+
</Tooltip>
|
|
424
436
|
)}
|
|
425
437
|
</div>
|
|
426
438
|
|
|
@@ -15,23 +15,23 @@ import { InstallWizard } from './InstallWizard'
|
|
|
15
15
|
type ViewTab = 'releases' | 'charts'
|
|
16
16
|
|
|
17
17
|
interface HelmViewProps {
|
|
18
|
-
|
|
18
|
+
namespaces: string[]
|
|
19
19
|
selectedRelease?: SelectedHelmRelease | null
|
|
20
20
|
onReleaseClick?: (namespace: string, name: string, storageNamespace?: string) => void
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export function HelmView({
|
|
23
|
+
export function HelmView({ namespaces, selectedRelease, onReleaseClick }: HelmViewProps) {
|
|
24
24
|
const [activeTab, setActiveTab] = useState<ViewTab>('releases')
|
|
25
25
|
const [searchTerm, setSearchTerm] = useState('')
|
|
26
26
|
const [selectedChart, setSelectedChart] = useState<{ repo: string; chart: string; version: string; source: ChartSource } | null>(null)
|
|
27
27
|
|
|
28
|
-
const { data: releases, isLoading, error: releasesError, refetch: refetchReleases } = useHelmReleases(
|
|
28
|
+
const { data: releases, isLoading, error: releasesError, refetch: refetchReleases } = useHelmReleases(namespaces)
|
|
29
29
|
const isForbidden = isForbiddenError(releasesError)
|
|
30
30
|
const releasesErrorMessage = releasesError instanceof Error ? releasesError.message : 'Failed to load Helm releases'
|
|
31
31
|
|
|
32
32
|
// Lazy load upgrade info after releases are loaded
|
|
33
33
|
const { data: upgradeInfo, isLoading: upgradeLoading, error: upgradeError, refetch: refetchUpgradeInfo } = useHelmBatchUpgradeInfo(
|
|
34
|
-
|
|
34
|
+
namespaces,
|
|
35
35
|
Boolean(releases && releases.length > 0)
|
|
36
36
|
)
|
|
37
37
|
const upgradeErrorMessage = upgradeError instanceof Error ? upgradeError.message : 'Upgrade checks failed'
|
|
@@ -226,14 +226,15 @@ export function HelmView({ namespace, selectedRelease, onReleaseClick }: HelmVie
|
|
|
226
226
|
className="w-full max-w-md pl-10 pr-4 py-2 bg-theme-elevated border border-theme-border-light rounded-lg text-sm text-theme-text-primary placeholder-theme-text-disabled focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
227
227
|
/>
|
|
228
228
|
</div>
|
|
229
|
+
<Tooltip content="Refresh">
|
|
229
230
|
<button
|
|
230
231
|
onClick={handleRefresh}
|
|
231
232
|
disabled={isRefreshAnimating}
|
|
232
|
-
className="p-2 text-theme-text-secondary hover:text-theme-text-primary hover:bg-theme-elevated rounded-lg disabled:opacity-50"
|
|
233
|
-
title="Refresh"
|
|
233
|
+
className="p-2 text-theme-text-secondary hover:text-theme-text-primary hover:bg-theme-elevated rounded-lg disabled:opacity-50 disabled:pointer-events-none"
|
|
234
234
|
>
|
|
235
235
|
<RefreshCw className={clsx('w-4 h-4', isRefreshAnimating && 'animate-spin')} />
|
|
236
236
|
</button>
|
|
237
|
+
</Tooltip>
|
|
237
238
|
</div>
|
|
238
239
|
|
|
239
240
|
{/* Releases Table */}
|
|
@@ -411,11 +411,11 @@ export function InstallWizard({ repo, chartName, version, source, repoUrl, defau
|
|
|
411
411
|
Cancel
|
|
412
412
|
</button>
|
|
413
413
|
{step === 'review' ? (
|
|
414
|
+
<Tooltip content={!canHelmWrite ? helmActReason : ''}>
|
|
414
415
|
<button
|
|
415
416
|
onClick={handleInstall}
|
|
416
417
|
disabled={!canInstall || isInstalling || !canHelmWrite}
|
|
417
|
-
className="flex items-center gap-2 px-4 py-2 text-sm font-medium btn-brand rounded-lg disabled:cursor-not-allowed"
|
|
418
|
-
title={!canHelmWrite ? helmActReason : undefined}
|
|
418
|
+
className="flex items-center gap-2 px-4 py-2 text-sm font-medium btn-brand rounded-lg disabled:cursor-not-allowed disabled:pointer-events-none"
|
|
419
419
|
>
|
|
420
420
|
{isInstalling ? (
|
|
421
421
|
<Loader2 className="w-4 h-4 animate-spin" />
|
|
@@ -424,6 +424,7 @@ export function InstallWizard({ repo, chartName, version, source, repoUrl, defau
|
|
|
424
424
|
)}
|
|
425
425
|
Install
|
|
426
426
|
</button>
|
|
427
|
+
</Tooltip>
|
|
427
428
|
) : (
|
|
428
429
|
<button
|
|
429
430
|
onClick={() => setStep(step === 'info' ? 'values' : 'review')}
|
|
@@ -13,6 +13,7 @@ import { useAvailablePorts } from '../../api/client'
|
|
|
13
13
|
import { apiUrl, getAuthHeaders, getCredentialsMode } from '../../api/config'
|
|
14
14
|
import { useNamespacedCapabilities } from '../../contexts/CapabilitiesContext'
|
|
15
15
|
import { pluralize } from '@skyhook-io/k8s-ui'
|
|
16
|
+
import { Tooltip } from '../ui/Tooltip'
|
|
16
17
|
|
|
17
18
|
interface OwnedResourcesProps {
|
|
18
19
|
resources: HelmOwnedResource[]
|
|
@@ -103,13 +104,14 @@ export function OwnedResources({ resources, onNavigate }: OwnedResourcesProps) {
|
|
|
103
104
|
) : (
|
|
104
105
|
<span className="flex items-center gap-2">
|
|
105
106
|
Showing {filteredResources.length} of {resources.length} resources
|
|
107
|
+
<Tooltip content="Clear filter">
|
|
106
108
|
<button
|
|
107
109
|
onClick={() => setHealthFilter('all')}
|
|
108
110
|
className="p-0.5 text-theme-text-tertiary hover:text-theme-text-primary hover:bg-theme-elevated rounded"
|
|
109
|
-
title="Clear filter"
|
|
110
111
|
>
|
|
111
112
|
<X className="w-3.5 h-3.5" />
|
|
112
113
|
</button>
|
|
114
|
+
</Tooltip>
|
|
113
115
|
</span>
|
|
114
116
|
)}
|
|
115
117
|
</div>
|
|
@@ -255,39 +257,44 @@ function ResourceItem({ resource, onNavigate }: ResourceItemProps) {
|
|
|
255
257
|
|
|
256
258
|
{/* Status badge */}
|
|
257
259
|
{resource.status && (
|
|
260
|
+
<Tooltip content={resource.message || resource.status}>
|
|
258
261
|
<span
|
|
259
262
|
className={clsx('badge-sm', getResourceStatusColor(resource.status || ''))}
|
|
260
|
-
title={resource.message || resource.status}
|
|
261
263
|
>
|
|
262
264
|
{resource.status}
|
|
263
265
|
</span>
|
|
266
|
+
</Tooltip>
|
|
264
267
|
)}
|
|
265
268
|
|
|
266
269
|
{/* Issue summary (e.g., "OOMKilled", "CrashLoopBackOff") */}
|
|
267
270
|
{resource.issue && (
|
|
271
|
+
<Tooltip content={resource.summary || resource.issue}>
|
|
268
272
|
<span
|
|
269
273
|
className="text-xs text-red-400"
|
|
270
|
-
title={resource.summary || resource.issue}
|
|
271
274
|
>
|
|
272
275
|
{resource.issue}
|
|
273
276
|
</span>
|
|
277
|
+
</Tooltip>
|
|
274
278
|
)}
|
|
275
279
|
|
|
276
280
|
{/* Error icon with message tooltip */}
|
|
277
281
|
{isError && resource.message && !resource.issue && (
|
|
278
|
-
<
|
|
282
|
+
<Tooltip content={resource.message}>
|
|
283
|
+
<span>
|
|
279
284
|
<AlertCircle className="w-3.5 h-3.5 text-red-400" />
|
|
280
285
|
</span>
|
|
286
|
+
</Tooltip>
|
|
281
287
|
)}
|
|
282
288
|
|
|
283
289
|
{canNavigate && (
|
|
290
|
+
<Tooltip content="View details">
|
|
284
291
|
<button
|
|
285
292
|
onClick={handleClick}
|
|
286
293
|
className="p-1 text-theme-text-tertiary opacity-0 group-hover:opacity-100 hover:text-theme-text-primary hover:bg-theme-elevated rounded transition-all"
|
|
287
|
-
title="View details"
|
|
288
294
|
>
|
|
289
295
|
<ExternalLink className="w-3.5 h-3.5" />
|
|
290
296
|
</button>
|
|
297
|
+
</Tooltip>
|
|
291
298
|
)}
|
|
292
299
|
</div>
|
|
293
300
|
</div>
|
|
@@ -383,35 +390,37 @@ function PodQuickActions({ namespace, podName, isRunning }: PodQuickActionsProps
|
|
|
383
390
|
|
|
384
391
|
{/* Terminal */}
|
|
385
392
|
{isRunning && canExec && (
|
|
393
|
+
<Tooltip content="Open terminal">
|
|
386
394
|
<button
|
|
387
395
|
onClick={(e) => { e.stopPropagation(); handleOpenTerminal() }}
|
|
388
396
|
disabled={isLoadingAction}
|
|
389
|
-
className="p-1 text-theme-text-tertiary hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors disabled:opacity-50"
|
|
390
|
-
title="Open terminal"
|
|
397
|
+
className="p-1 text-theme-text-tertiary hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors disabled:opacity-50 disabled:pointer-events-none"
|
|
391
398
|
>
|
|
392
399
|
<Terminal className="w-3.5 h-3.5" />
|
|
393
400
|
</button>
|
|
401
|
+
</Tooltip>
|
|
394
402
|
)}
|
|
395
403
|
|
|
396
404
|
{/* Logs */}
|
|
397
405
|
{canViewLogs && (
|
|
406
|
+
<Tooltip content="View logs">
|
|
398
407
|
<button
|
|
399
408
|
onClick={(e) => { e.stopPropagation(); handleOpenLogs() }}
|
|
400
409
|
disabled={isLoadingAction}
|
|
401
|
-
className="p-1 text-theme-text-tertiary hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors disabled:opacity-50"
|
|
402
|
-
title="View logs"
|
|
410
|
+
className="p-1 text-theme-text-tertiary hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors disabled:opacity-50 disabled:pointer-events-none"
|
|
403
411
|
>
|
|
404
412
|
<FileText className="w-3.5 h-3.5" />
|
|
405
413
|
</button>
|
|
414
|
+
</Tooltip>
|
|
406
415
|
)}
|
|
407
416
|
|
|
408
417
|
{/* Port Forward */}
|
|
409
418
|
{canPortForward && !portsLoading && ports.length > 0 && (
|
|
419
|
+
<Tooltip content={`Port forward :${ports[0].port}`}>
|
|
410
420
|
<button
|
|
411
421
|
onClick={(e) => { e.stopPropagation(); handlePortForward(ports[0].port) }}
|
|
412
422
|
disabled={startPortForward.isPending}
|
|
413
|
-
className="p-1 text-theme-text-tertiary hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors disabled:opacity-50"
|
|
414
|
-
title={`Port forward :${ports[0].port}`}
|
|
423
|
+
className="p-1 text-theme-text-tertiary hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors disabled:opacity-50 disabled:pointer-events-none"
|
|
415
424
|
>
|
|
416
425
|
{startPortForward.isPending ? (
|
|
417
426
|
<Loader2 className="w-3.5 h-3.5 animate-spin" />
|
|
@@ -419,6 +428,7 @@ function PodQuickActions({ namespace, podName, isRunning }: PodQuickActionsProps
|
|
|
419
428
|
<Plug className="w-3.5 h-3.5" />
|
|
420
429
|
)}
|
|
421
430
|
</button>
|
|
431
|
+
</Tooltip>
|
|
422
432
|
)}
|
|
423
433
|
</div>
|
|
424
434
|
)
|
|
@@ -449,11 +459,11 @@ function ServiceQuickActions({ namespace, serviceName }: ServiceQuickActionsProp
|
|
|
449
459
|
|
|
450
460
|
return (
|
|
451
461
|
<div className="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity">
|
|
462
|
+
<Tooltip content={`Port forward :${ports[0].port}`}>
|
|
452
463
|
<button
|
|
453
464
|
onClick={(e) => { e.stopPropagation(); handlePortForward(ports[0].port) }}
|
|
454
465
|
disabled={startPortForward.isPending}
|
|
455
|
-
className="p-1 text-theme-text-tertiary hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors disabled:opacity-50"
|
|
456
|
-
title={`Port forward :${ports[0].port}`}
|
|
466
|
+
className="p-1 text-theme-text-tertiary hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors disabled:opacity-50 disabled:pointer-events-none"
|
|
457
467
|
>
|
|
458
468
|
{startPortForward.isPending ? (
|
|
459
469
|
<Loader2 className="w-3.5 h-3.5 animate-spin" />
|
|
@@ -461,6 +471,7 @@ function ServiceQuickActions({ namespace, serviceName }: ServiceQuickActionsProp
|
|
|
461
471
|
<Plug className="w-3.5 h-3.5" />
|
|
462
472
|
)}
|
|
463
473
|
</button>
|
|
474
|
+
</Tooltip>
|
|
464
475
|
</div>
|
|
465
476
|
)
|
|
466
477
|
}
|
|
@@ -4,6 +4,7 @@ import { clsx } from 'clsx'
|
|
|
4
4
|
import type { HelmRevision } from '../../types'
|
|
5
5
|
import { getStatusColor, formatDate, formatAge } from './helm-utils'
|
|
6
6
|
import { SEVERITY_BADGE } from '../../utils/badge-colors'
|
|
7
|
+
import { Tooltip } from '../ui/Tooltip'
|
|
7
8
|
|
|
8
9
|
interface RevisionHistoryProps {
|
|
9
10
|
history: HelmRevision[]
|
|
@@ -108,7 +109,7 @@ export function RevisionHistory({ history, currentRevision, onViewRevision, onCo
|
|
|
108
109
|
</div>
|
|
109
110
|
|
|
110
111
|
<div className="flex items-center gap-4 mt-1 text-xs text-theme-text-tertiary">
|
|
111
|
-
<
|
|
112
|
+
<Tooltip content={revision.updated}><span>{formatDate(revision.updated)}</span></Tooltip>
|
|
112
113
|
<span>{formatAge(revision.updated)} ago</span>
|
|
113
114
|
</div>
|
|
114
115
|
|
|
@@ -9,6 +9,7 @@ import { YamlEditor } from '../ui/YamlEditor'
|
|
|
9
9
|
import { useHelmPreviewValues, useHelmApplyValues } from '../../api/client'
|
|
10
10
|
import { useCanHelmAct } from '../../api/client'
|
|
11
11
|
import { ValuesDiffPreview } from './ValuesDiffPreview'
|
|
12
|
+
import { Tooltip } from '../ui/Tooltip'
|
|
12
13
|
|
|
13
14
|
interface ValuesViewerProps {
|
|
14
15
|
values?: HelmValues
|
|
@@ -227,11 +228,11 @@ export function ValuesViewer({
|
|
|
227
228
|
)}
|
|
228
229
|
Preview
|
|
229
230
|
</button>
|
|
231
|
+
<Tooltip content={!canHelmWrite ? helmActReason : ''}>
|
|
230
232
|
<button
|
|
231
233
|
onClick={handleApply}
|
|
232
234
|
disabled={!!yamlError || applyMutation.isPending || !canHelmWrite}
|
|
233
|
-
className="flex items-center gap-1 px-2.5 py-1 text-xs btn-brand rounded disabled:cursor-not-allowed"
|
|
234
|
-
title={!canHelmWrite ? helmActReason : undefined}
|
|
235
|
+
className="flex items-center gap-1 px-2.5 py-1 text-xs btn-brand rounded disabled:cursor-not-allowed disabled:pointer-events-none"
|
|
235
236
|
>
|
|
236
237
|
{applyMutation.isPending ? (
|
|
237
238
|
<Loader2 className="w-3.5 h-3.5 animate-spin" />
|
|
@@ -240,6 +241,7 @@ export function ValuesViewer({
|
|
|
240
241
|
)}
|
|
241
242
|
Apply
|
|
242
243
|
</button>
|
|
244
|
+
</Tooltip>
|
|
243
245
|
</>
|
|
244
246
|
)}
|
|
245
247
|
</div>
|
|
@@ -219,24 +219,24 @@ export function ClusterHealthCard({
|
|
|
219
219
|
its top bar; rendering it again here is redundant and
|
|
220
220
|
makes the card feel like a label rather than content. */}
|
|
221
221
|
{!isCloud && (
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
// kubeconfig context path.
|
|
230
|
-
title={isInCluster ? undefined : cluster.name}
|
|
231
|
-
>
|
|
222
|
+
// In-cluster mode's cluster.name is the literal "in-cluster"
|
|
223
|
+
// sentinel, which would leak via the hover tooltip even though
|
|
224
|
+
// the visible text falls back to the platform label. Render no
|
|
225
|
+
// tooltip in that case; local mode keeps it so users can hover
|
|
226
|
+
// to see the full kubeconfig context path.
|
|
227
|
+
<Tooltip content={isInCluster ? '' : cluster.name} wrapperClassName="!block min-w-0">
|
|
228
|
+
<h2 className="text-xl font-semibold text-theme-text-primary truncate leading-tight mb-1.5">
|
|
232
229
|
{headlineName}
|
|
233
230
|
</h2>
|
|
231
|
+
</Tooltip>
|
|
234
232
|
)}
|
|
235
233
|
<div className="flex flex-col gap-0.5 text-xs text-theme-text-tertiary">
|
|
236
234
|
{(parsedContext.account || parsedContext.region) && (
|
|
237
|
-
<
|
|
235
|
+
<Tooltip content={[parsedContext.account, parsedContext.region].filter(Boolean).join(' · ')} wrapperClassName="min-w-0">
|
|
236
|
+
<span className="truncate font-mono">
|
|
238
237
|
{[parsedContext.account, parsedContext.region].filter(Boolean).join(' · ')}
|
|
239
238
|
</span>
|
|
239
|
+
</Tooltip>
|
|
240
240
|
)}
|
|
241
241
|
{cluster.version && (
|
|
242
242
|
<span>Kubernetes {cluster.version}</span>
|
|
@@ -247,12 +247,11 @@ export function ClusterHealthCard({
|
|
|
247
247
|
(in-cluster has no meaningful context name, cloud
|
|
248
248
|
shell already renders the canonical name). */}
|
|
249
249
|
{cluster.name && cluster.name !== headlineName && deployment.mode === 'local' && (
|
|
250
|
-
<
|
|
251
|
-
|
|
252
|
-
title={cluster.name}
|
|
253
|
-
>
|
|
250
|
+
<Tooltip content={cluster.name}>
|
|
251
|
+
<span className="font-mono text-[10px] text-theme-text-disabled break-all leading-snug pt-0.5">
|
|
254
252
|
{cluster.name}
|
|
255
253
|
</span>
|
|
254
|
+
</Tooltip>
|
|
256
255
|
)}
|
|
257
256
|
</div>
|
|
258
257
|
{nodeVersionSkew && (
|
|
@@ -290,9 +289,11 @@ export function ClusterHealthCard({
|
|
|
290
289
|
<Radio className="w-3.5 h-3.5 text-purple-400 animate-pulse shrink-0" />
|
|
291
290
|
<div className="flex flex-col gap-0.5 min-w-0 flex-1 text-left">
|
|
292
291
|
<span className="text-xs font-medium text-purple-400">MCP Server Live</span>
|
|
293
|
-
<
|
|
292
|
+
<Tooltip content={mcpUrl} wrapperClassName="min-w-0">
|
|
293
|
+
<span className="text-[10px] text-theme-text-tertiary truncate font-mono">
|
|
294
294
|
HTTP · {mcpUrl}
|
|
295
295
|
</span>
|
|
296
|
+
</Tooltip>
|
|
296
297
|
</div>
|
|
297
298
|
<Info className="w-3.5 h-3.5 text-purple-400/60 shrink-0" />
|
|
298
299
|
</button>
|
|
@@ -443,24 +444,26 @@ export function ClusterHealthCard({
|
|
|
443
444
|
{/* Left column: Warning indicators (aligned with cluster info) */}
|
|
444
445
|
<div className="flex flex-col justify-center gap-1 w-1/4 shrink-0 pr-4 border-r border-theme-border/50">
|
|
445
446
|
{health.warningEvents > 0 && (
|
|
447
|
+
<Tooltip content="Native Kubernetes Warning events (e.g., ImagePullBackOff, FailedScheduling)" wrapperClassName="w-fit">
|
|
446
448
|
<button
|
|
447
449
|
onClick={onWarningEventsClick}
|
|
448
|
-
title="Native Kubernetes Warning events (e.g., ImagePullBackOff, FailedScheduling)"
|
|
449
450
|
className="badge status-degraded w-fit gap-1.5 hover:opacity-80 transition-opacity"
|
|
450
451
|
>
|
|
451
452
|
<AlertTriangle className="w-3.5 h-3.5 shrink-0" />
|
|
452
453
|
<span><span className="font-mono">{health.warningEvents}</span> Warning Events</span>
|
|
453
454
|
</button>
|
|
455
|
+
</Tooltip>
|
|
454
456
|
)}
|
|
455
457
|
{issueCount > 0 && (
|
|
458
|
+
<Tooltip content="View grouped live operational issues" wrapperClassName="w-fit">
|
|
456
459
|
<button
|
|
457
460
|
onClick={onIssuesClick}
|
|
458
|
-
title="View grouped live operational issues"
|
|
459
461
|
className={clsx('badge w-fit gap-1.5 hover:opacity-80 transition-opacity', hasCriticalIssues ? 'status-unhealthy' : 'status-degraded')}
|
|
460
462
|
>
|
|
461
463
|
<AlertTriangle className="w-3.5 h-3.5 shrink-0" />
|
|
462
464
|
<span>{pluralize(issueCount, 'Active Issue')}</span>
|
|
463
465
|
</button>
|
|
466
|
+
</Tooltip>
|
|
464
467
|
)}
|
|
465
468
|
</div>
|
|
466
469
|
|
|
@@ -88,11 +88,13 @@ export function HelmSummary({ data, onNavigate }: HelmSummaryProps) {
|
|
|
88
88
|
<span className="text-xs font-medium text-theme-text-secondary">
|
|
89
89
|
{data.errorCode === 'unconfigured' ? 'Helm not configured' : 'Helm unavailable'}
|
|
90
90
|
</span>
|
|
91
|
-
<
|
|
91
|
+
<Tooltip content={data.error} wrapperClassName="!block mt-1 min-w-0 text-center">
|
|
92
|
+
<span className="text-[11px] text-center px-2 truncate max-w-full">
|
|
92
93
|
{data.errorCode === 'unconfigured'
|
|
93
94
|
? 'Set rbac.helm=true in the Radar Helm chart values.'
|
|
94
95
|
: data.error}
|
|
95
96
|
</span>
|
|
97
|
+
</Tooltip>
|
|
96
98
|
</div>
|
|
97
99
|
) : !data.releases || data.releases.length === 0 ? (
|
|
98
100
|
<div className="flex items-center justify-center h-full py-4 text-xs text-theme-text-tertiary">
|
|
@@ -29,9 +29,16 @@ interface HomeViewProps {
|
|
|
29
29
|
onNavigateToView: (view: ExtendedMainView, params?: Record<string, string>) => void
|
|
30
30
|
onNavigateToResourceKind: (kind: string, group?: string, filters?: Record<string, string[]>) => void
|
|
31
31
|
onNavigateToResource: (resource: SelectedResource) => void
|
|
32
|
+
/**
|
|
33
|
+
* Optional override for the Certificate Health card's click. When an embedded
|
|
34
|
+
* host (Radar Cloud) takes Certs over with its own fleet page, it passes this
|
|
35
|
+
* to route there instead of Radar's TLS-secrets resource list. Omitted in
|
|
36
|
+
* standalone OSS → the card drills into secrets as before.
|
|
37
|
+
*/
|
|
38
|
+
onNavigateToCerts?: () => void
|
|
32
39
|
}
|
|
33
40
|
|
|
34
|
-
export function HomeView({ namespaces, topology, onNavigateToView, onNavigateToResourceKind, onNavigateToResource }: HomeViewProps) {
|
|
41
|
+
export function HomeView({ namespaces, topology, onNavigateToView, onNavigateToResourceKind, onNavigateToResource, onNavigateToCerts }: HomeViewProps) {
|
|
35
42
|
const { data, isLoading, error } = useDashboard(namespaces)
|
|
36
43
|
const { data: issuesData, isLoading: issuesLoading, isFetching: issuesFetching, error: issuesError } = useIssues(namespaces)
|
|
37
44
|
const issues = issuesData?.issues ?? []
|
|
@@ -165,7 +172,7 @@ export function HomeView({ namespaces, topology, onNavigateToView, onNavigateToR
|
|
|
165
172
|
<BandItem>
|
|
166
173
|
<CertificateHealthCard
|
|
167
174
|
data={data.certificateHealth}
|
|
168
|
-
onNavigate={() => onNavigateToResourceKind('secrets', undefined, { type: ['TLS'] })}
|
|
175
|
+
onNavigate={onNavigateToCerts ?? (() => onNavigateToResourceKind('secrets', undefined, { type: ['TLS'] }))}
|
|
169
176
|
/>
|
|
170
177
|
</BandItem>
|
|
171
178
|
)}
|
|
@@ -2,6 +2,7 @@ import { useRef, useEffect, useState, useCallback } from 'react'
|
|
|
2
2
|
import { X, Copy, Check, Radio, Terminal, MessageSquare, Code2, ChevronRight, Pin } from 'lucide-react'
|
|
3
3
|
import { apiUrl, getAuthHeaders, getCredentialsMode } from '../../api/config'
|
|
4
4
|
import { MCP_TOOL_CATALOG } from './mcpToolCatalog'
|
|
5
|
+
import { Tooltip } from '../ui/Tooltip'
|
|
5
6
|
|
|
6
7
|
interface MCPSetupDialogProps {
|
|
7
8
|
open: boolean
|
|
@@ -19,13 +20,14 @@ function CopyButton({ text }: { text: string }) {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
return (
|
|
23
|
+
<Tooltip content="Copy to clipboard" position="left" wrapperClassName="absolute top-2 right-2">
|
|
22
24
|
<button
|
|
23
25
|
onClick={handleCopy}
|
|
24
|
-
className="
|
|
25
|
-
title="Copy to clipboard"
|
|
26
|
+
className="p-1.5 rounded-md bg-theme-elevated/50 hover:bg-theme-elevated text-theme-text-tertiary hover:text-theme-text-secondary transition-colors"
|
|
26
27
|
>
|
|
27
28
|
{copied ? <Check className="w-3.5 h-3.5 text-green-500" /> : <Copy className="w-3.5 h-3.5" />}
|
|
28
29
|
</button>
|
|
30
|
+
</Tooltip>
|
|
29
31
|
)
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -308,19 +310,23 @@ export function MCPSetupDialog({ open, onClose, mcpUrl }: MCPSetupDialogProps) {
|
|
|
308
310
|
<div className="flex items-center gap-2">
|
|
309
311
|
<code className="inline-code text-[11px]">{tool.name}</code>
|
|
310
312
|
{tool.write && (
|
|
311
|
-
<
|
|
313
|
+
<Tooltip content="Write tool — annotated as destructive">
|
|
314
|
+
<span className="badge-sm bg-amber-500/10 text-amber-600 dark:text-amber-400">
|
|
312
315
|
write
|
|
313
316
|
</span>
|
|
317
|
+
</Tooltip>
|
|
314
318
|
)}
|
|
315
319
|
</div>
|
|
316
320
|
<p className="text-[11px] text-theme-text-tertiary leading-relaxed">{tool.desc}</p>
|
|
317
321
|
{tool.params.length > 0 && (
|
|
318
322
|
<div className="flex flex-wrap gap-1.5 pt-0.5">
|
|
319
323
|
{tool.params.map((p) => (
|
|
320
|
-
<
|
|
324
|
+
<Tooltip key={p.arg} content={p.desc}>
|
|
325
|
+
<span className="inline-code text-[11px]">
|
|
321
326
|
<span>{p.arg}</span>
|
|
322
327
|
{p.required && <span className="text-red-400">*</span>}
|
|
323
328
|
</span>
|
|
329
|
+
</Tooltip>
|
|
324
330
|
))}
|
|
325
331
|
</div>
|
|
326
332
|
)}
|