feat: finish the host-metrics plugin, move host status into core (B16)

This commit is contained in:
LukeGus committed 2026-09-24 11:21:23 -05:00
1 parent 14eb558b85
commit 0a3f05d99d
308 files changed
+53073 -8985

No files matched your search

+13 -1
View File
@@ -8,7 +8,11 @@ import {
import { resolveGuacdOptions } from "./guacd-config.js";
import { registerRoutes } from "./routes.js";
import { createLiveSessions } from "./live-sessions.js";
import { normalizeImportedHost } from "./host-settings.js";
import {
normalizeImportedHost,
PORT_KEY,
readHostSettings,
} from "./host-settings.js";
import { createLogger } from "./log.js";
export async function activate(ctx: PluginContext) {
@@ -103,6 +107,14 @@ export async function activate(ctx: PluginContext) {
"remote-desktop.hostImportNormalizer",
normalizeImportedHost,
);
// Core's status dot pings these hosts on the protocol's own port.
for (const protocol of ["rdp", "vnc", "telnet"] as const) {
ctx.hosts.status.registerPort(protocol, async (hostId) => {
const settings = await readHostSettings(ctx, hostId);
return settings[PORT_KEY[protocol]] as number;
});
}
}
export async function deactivate() {}