feat(health): tile opens local/remote URL with one-click alt + LAN-only marker

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-08 00:57:48 +10:00
parent a3662f6ff2
commit d91e5e75c8
3 changed files with 55 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ import { el, mount } from '../dom.js';
import { api } from '../api.js';
import { littleblueAvatar } from '../components/littleblue_avatar.js';
import { serviceTile } from '../components/service_tile.js';
import { isRemoteHost } from './service_url.js';
const TITLE = { agents: 'Agents', infrastructure: 'Infrastructure', media: 'Media', other: 'Other' };
let host, timer, scanning = false;
@@ -38,13 +39,14 @@ async function load() {
if (!host) return;
try {
const groups = await api.get('/api/health/services');
const remote = isRemoteHost(location.hostname);
const sections = groups.map(g =>
el('div', { class: 'lb-section' },
el('div', { class: 'lb-group' },
el('span', { class: 'gname' }, TITLE[g.category] || g.category),
el('span', { class: 'gcount' }, `${g.healthy}/${g.total} healthy`),
el('span', { class: 'line' })),
el('div', { class: 'tiles' }, g.services.map(serviceTile))));
el('div', { class: 'tiles' }, g.services.map(s => serviceTile(s, remote)))));
const disc = await discoveredSection();
mount(host,
el('div', { class: 'lbwrap' }, littleblueAvatar(),