UNPKG

@zenithcore/core

Version:

Core functionality for ZenithKernel framework

38 lines (34 loc) 1.1 kB
<!DOCTYPE html> <html> <head> <title>Zenith Admin</title> <style> body { font-family: sans-serif; padding: 2rem; } </style> </head> <body> <h1>Zenith Admin Dashboard</h1> <div id="systems"></div> <div id="events"></div> <script> async function fetchSystems() { const res = await fetch("/admin/systems"); const data = await res.json(); document.getElementById("systems").innerHTML = ` <h2>Systems</h2> <ul>${data.map(s => `<li>${s.name} (E:${s.entity})</li>`).join("")}</ul> `; } fetchSystems(); const log = msg => { const el = document.getElementById("events"); el.innerHTML += `<div>🟢 ${msg}</div>`; }; const socket = new WebSocket("ws://" + location.host); socket.onmessage = e => { const msg = JSON.parse(e.data); if (msg.event === "system:loaded") log(`System loaded: ${msg.payload.name}`); if (msg.event === "system:unloaded") log(`System removed: ${msg.payload.name}`); if (msg.event === "docs-update") log(`Docs updated`); }; </script> </body> </html>