bda568b25c
Go service for Proxmox homelab cluster provisioning. Handles PXE boot, Proxmox autoinstall (answer file generation), cluster join via SSH, and Infrastructure API registration. - Host state machine (registered → pxe_ready → installing → ready) - dnsmasq supervisor with MAC-based allowlist - iPXE script and Proxmox answer file generation - First-boot phone-home → cluster join → infra registration - Operation locking with expiry (409 on conflict) - SSE event hub for real-time dashboard updates - Admin dashboard (host grid, detail, registration form) - Config-driven server types with hot-reload - Docker deployment (multi-stage fat image) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
565 B
JavaScript
24 lines
565 B
JavaScript
(function() {
|
|
const dot = document.getElementById('sse-dot');
|
|
let es;
|
|
|
|
function connect() {
|
|
es = new EventSource('/events');
|
|
es.addEventListener('hello', () => {
|
|
dot.classList.remove('disconnected');
|
|
});
|
|
es.addEventListener('host.state_changed', (e) => {
|
|
// Reload the page to reflect state changes
|
|
// Future: HTMX swap individual tiles
|
|
window.location.reload();
|
|
});
|
|
es.onerror = () => {
|
|
dot.classList.add('disconnected');
|
|
es.close();
|
|
setTimeout(connect, 3000);
|
|
};
|
|
}
|
|
|
|
connect();
|
|
})();
|