This commit is contained in:
2026-03-07 00:33:27 +01:00
parent 2f673e8710
commit 497ad6c017
2 changed files with 141 additions and 5 deletions

View File

@@ -353,11 +353,34 @@
}
return;
}
if (consoleNotice) {
consoleNotice.textContent = 'Bestehende Konsole kann nicht direkt gesteuert werden Befehl wird in neuer Konsole ausgeführt.';
consoleNotice.style.display = 'block';
}
submitOpen();
const formData = new FormData(consoleForm);
if (presetSelect) formData.set('terminal_preset_id', '');
const url = new URL(window.location.href);
url.searchParams.set('send_active_json', '1');
fetch(url.toString(), { method: 'POST', body: formData, cache: 'no-store' })
.then((res) => res.json())
.then((data) => {
if (data.ok) {
if (consoleNotice) {
consoleNotice.textContent = data.notice || 'Befehl wurde in der bestehenden Konsole ausgeführt.';
consoleNotice.style.display = 'block';
}
if (consoleError) consoleError.style.display = 'none';
return;
}
if (consoleNotice) {
consoleNotice.textContent = data.error || 'Bestehende Konsole nicht verfügbar Befehl wird in neuer Konsole ausgeführt.';
consoleNotice.style.display = 'block';
}
submitOpen();
})
.catch(() => {
if (consoleNotice) {
consoleNotice.textContent = 'Bestehende Konsole nicht verfügbar Befehl wird in neuer Konsole ausgeführt.';
consoleNotice.style.display = 'block';
}
submitOpen();
});
});
}
}