diff --git a/old/app.js b/old/app.js new file mode 100644 index 0000000..ff1f7b2 --- /dev/null +++ b/old/app.js @@ -0,0 +1,83 @@ +const DAEMON_URL = 'http://127.0.0.1:12345'; + +document.addEventListener('DOMContentLoaded', () => { + fetchInstances(); + document.getElementById('refresh-btn').addEventListener('click', fetchInstances); +}); + + +async function fetchInstances() { + const tableBody = document.getElementById('instances-table-body'); + + try { + const response = await fetch(`${DAEMON_URL}/instances/list`); + if (!response.ok) throw new Error(`Server returned code: ${response.status}`); + + const instances = await response.json(); + renderTable(instances); + } catch (error) { + console.error('Failed fetching telemetry data:', error); + tableBody.innerHTML = `
| Instance Name | +Version | +Port | +Status | +Actions | +
|---|---|---|---|---|
| Connecting to daemon infrastructure... | +||||