Initial commit of AthonetTools

This commit is contained in:
2025-08-21 12:59:43 +00:00
commit cd932b8fcb
2483 changed files with 433999 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
// static/js/wizard/step3_deploy.js
export function mountStep3Deploy() {
const btn = document.getElementById('btn-run-gaf');
const outputDiv = document.getElementById('gaf-output');
if (!btn || !outputDiv) return;
btn.onclick = null;
btn.addEventListener('click', async () => {
btn.disabled = true;
btn.textContent = 'Running…';
outputDiv.textContent = '';
try {
const res = await fetch('/api/ansible/deploy', { method: 'POST' });
const text = await res.text();
outputDiv.textContent = text;
btn.textContent = 'Run';
btn.disabled = false;
} catch (err) {
outputDiv.textContent = `Error: ${err.message || err}`;
btn.textContent = 'Run';
btn.disabled = false;
}
});
}