+
{
+ if (!mutation.isPending) {
+ onClose()
+ }
+ }}
+ aria-hidden
+ />
+
+
,
+ document.body,
+ )
+}
diff --git a/apps/web/src/components/layout/Topbar.tsx b/apps/web/src/components/layout/Topbar.tsx
index 214cb4f..a4f7d34 100644
--- a/apps/web/src/components/layout/Topbar.tsx
+++ b/apps/web/src/components/layout/Topbar.tsx
@@ -20,6 +20,7 @@ import {
DropdownSeparator,
} from '@/components/ui/dropdown'
import { useHosts } from '@/hooks/useHosts'
+import { hostDisplayName } from '@/lib/host-name'
import { MOCK_NOTIFICATIONS, MOCK_WORKSPACE } from '@/lib/mock'
import { initialsFor } from '@/lib/format'
import { statusTone } from '@/lib/status'
@@ -68,6 +69,7 @@ function GlobalSearch() {
return (hostsQuery.data ?? [])
.filter(
(host) =>
+ hostDisplayName(host).toLowerCase().includes(value) ||
host.hostname.toLowerCase().includes(value) ||
host.os.toLowerCase().includes(value) ||
host.uuid.toLowerCase().includes(value),
@@ -143,10 +145,10 @@ function GlobalSearch() {
- {host.hostname}
+ {hostDisplayName(host)}
- {host.os} · {host.architecture}
+ {host.hostname} · {host.os} · {host.architecture}
diff --git a/apps/web/src/features/hosts/HostDetailsPage.tsx b/apps/web/src/features/hosts/HostDetailsPage.tsx
index c895d23..9dcd1c6 100644
--- a/apps/web/src/features/hosts/HostDetailsPage.tsx
+++ b/apps/web/src/features/hosts/HostDetailsPage.tsx
@@ -54,6 +54,7 @@ import {
formatRelativeTime,
osLabel,
} from '@/lib/format'
+import { hostDisplayName } from '@/lib/host-name'
import type { HostResources } from '@/lib/metrics'
import { useDocumentTitle } from '@/hooks/useDocumentTitle'
@@ -83,7 +84,8 @@ export function HostDetailsPage() {
const hostsQuery = useHosts()
const host = hostsQuery.data?.find((entry) => entry.id === hostId)
- useDocumentTitle(host?.hostname ?? (hostsQuery.isLoading ? 'Host' : 'Host not found'))
+ const hostLabel = host ? hostDisplayName(host) : undefined
+ useDocumentTitle(hostLabel ?? (hostsQuery.isLoading ? 'Host' : 'Host not found'))
const containersQuery = useContainers(hostId)
const containers = containersQuery.data?.containers ?? []
const { resources } = useHostMetrics(hostId)
@@ -155,6 +157,7 @@ export function HostDetailsPage() {
}
const refreshing = hostsQuery.isFetching || containersQuery.isFetching
+ const label = hostDisplayName(host)
return (
@@ -165,7 +168,7 @@ export function HostDetailsPage() {
Hosts
- {host.hostname}
+ {label}
}
title={
@@ -173,12 +176,14 @@ export function HostDetailsPage() {
- {host.hostname}
+ {label}
}
description={
+ {host.hostname}
+
{osLabel(host.os)}
{host.architecture}
@@ -253,7 +258,7 @@ export function HostDetailsPage() {
onAction={commands.run}
onInspect={setInspecting}
onViewLogs={setViewingLogs}
- emptyDescription={`${host.hostname} has no containers. Anything the Docker daemon reports will appear here within 20 seconds.`}
+ emptyDescription={`${label} has no containers. Anything the Docker daemon reports will appear here within 20 seconds.`}
/>
)
) : null}
@@ -363,6 +368,7 @@ function OverviewTab({