feat(health): expose external in /services payload and accept on add/edit
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ router.get('/services', asyncWrap(async (_req, res) => {
|
||||
const list = g.services.map(s => {
|
||||
const st = statuses[s.id];
|
||||
return {
|
||||
id: s.id, name: s.name, host: s.host, url: s.url, icon: iconSlug(s),
|
||||
id: s.id, name: s.name, host: s.host, url: s.url, external: s.external ?? null, icon: iconSlug(s),
|
||||
status: st?.status || 'unknown', latency_ms: st?.latency_ms ?? null,
|
||||
detail: st?.detail || null, checked_at: st?.checked_at || null
|
||||
};
|
||||
@@ -39,6 +39,7 @@ const svcBody = z.object({
|
||||
category: z.enum(['agents', 'infrastructure', 'media', 'other']).default('other'),
|
||||
host: z.string().max(120).optional(),
|
||||
url: z.string().url(),
|
||||
external: z.string().url().optional(),
|
||||
icon: z.string().max(64).optional(),
|
||||
check: checkCfg.optional()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user