feat: sequences v2, bridges, and sim-controller
Rework sequences (engine, seqplay, envelope, API, web UI), add bridge support, add the host sim-controller and rig simulation tests, and update docs, presets and project tooling config. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d664026ee5
commit
2543673bd8
68 files changed
+5761
-460
No files matched your search
@@ -81,6 +81,51 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}, 5000);
|
||||
};
|
||||
|
||||
const rebootButton = document.getElementById('reboot-btn');
|
||||
if (rebootButton) {
|
||||
rebootButton.addEventListener('click', async () => {
|
||||
if (!confirm('Reboot the controller now? The page will be unavailable for a few seconds.')) return;
|
||||
rebootButton.disabled = true;
|
||||
try {
|
||||
await fetch('/reboot', { method: 'POST' });
|
||||
rebootButton.textContent = 'Rebooting…';
|
||||
setTimeout(() => location.reload(), 8000);
|
||||
} catch (error) {
|
||||
rebootButton.disabled = false;
|
||||
console.error('Reboot failed:', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function loadNetworkStatus() {
|
||||
const box = document.getElementById('network-status');
|
||||
if (!box) return;
|
||||
const row = (label, value) => {
|
||||
const r = document.createElement('div');
|
||||
const b = document.createElement('strong');
|
||||
b.textContent = label + ': ';
|
||||
r.append(b, value);
|
||||
return r;
|
||||
};
|
||||
try {
|
||||
const st = await fetch('/status', { cache: 'no-store' }).then((r) => r.json());
|
||||
box.textContent = '';
|
||||
const eth = st.eth || { ip: st.ip };
|
||||
const up = eth.ip && eth.ip !== '0.0.0.0';
|
||||
box.append(row('Ethernet', up ? eth.ip + (eth.mask ? ' / ' + eth.mask : '') + (eth.gw && eth.gw !== '0.0.0.0' ? ', gateway ' + eth.gw : '') : 'no address'));
|
||||
if (st.ap) {
|
||||
box.append(row('Access point', st.ap_ip || '192.168.5.1'));
|
||||
const clients = Array.isArray(st.ap_clients) ? st.ap_clients : [];
|
||||
box.append(row('Wi-Fi clients', clients.length ? clients.map((c) => c.ip + ' (' + c.mac + ')').join(', ') : 'none'));
|
||||
} else {
|
||||
box.append(row('Access point', 'off'));
|
||||
}
|
||||
if (st.mac) box.append(row('MAC', st.mac));
|
||||
} catch (error) {
|
||||
box.textContent = 'Could not read network status.';
|
||||
}
|
||||
}
|
||||
|
||||
async function loadDeviceSettings() {
|
||||
try {
|
||||
const response = await fetch('/settings');
|
||||
@@ -101,6 +146,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
setApToggle(data.ap_enabled !== false);
|
||||
const apPw = document.getElementById('ap-password-input');
|
||||
if (apPw) apPw.value = data.ap_password || '';
|
||||
const bridge = document.getElementById('bridge-input');
|
||||
if (bridge) bridge.value = data.bridge || '';
|
||||
staticIpsList.innerHTML = '';
|
||||
(Array.isArray(data.static_ips) ? data.static_ips : []).forEach(addStaticIpRow);
|
||||
}
|
||||
@@ -196,6 +243,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
panel.classList.toggle('active', on);
|
||||
panel.hidden = !on;
|
||||
}
|
||||
if (tabId === 'network') loadNetworkStatus();
|
||||
settingsModal.classList.toggle('settings-modal--led-tool', tabId === 'led-tool');
|
||||
if (ledToolIframe) {
|
||||
// Loaded on demand, so the Controller tab costs no requests
|
||||
@@ -292,6 +340,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
hostname,
|
||||
static_ips: staticIps,
|
||||
ap_password: apPassword,
|
||||
bridge: (document.getElementById('bridge-input') || { value: '' }).value.trim(),
|
||||
ap_enabled: !apToggle || apToggle.getAttribute('aria-pressed') === 'true',
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user