pi_admin/templates/index.html aktualisiert

This commit is contained in:
2026-03-03 21:22:37 +00:00
parent b9c8d0eff3
commit 43c4da2ab7

View File

@@ -25,6 +25,45 @@
</div> </div>
</div> </div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@5.1.0/css/xterm.css" />
<script src="https://cdn.jsdelivr.net/npm/xterm@5.1.0/lib/xterm.js"></script>
<div class="flex flex-col h-full">
<div class="flex flex-1 overflow-hidden">
</div>
<div class="h-1/3 border-t border-gray-600 bg-black flex">
<div id="install-log" class="w-1/2 p-2 text-xs font-mono overflow-y-auto text-green-400 border-r border-gray-700">
> System bereit. Warte auf Befehle...
</div>
<div id="terminal" class="w-1/2"></div>
</div>
</div>
<script>
// Xterm.js Initialisierung
const term = new Terminal({ theme: { background: '#000' }, cursorBlink: true });
term.open(document.getElementById('terminal'));
term.write('Verfügbare Terminals: Wähle einen Node aus...\r\n');
// WebSocket für Installation-Logs
const logWs = new WebSocket(`ws://${location.host}/ws/install_logs`);
logWs.onmessage = (event) => {
const logDiv = document.getElementById('install-log');
logDiv.innerHTML += `<div>${event.data}</div>`;
logDiv.scrollTop = logDiv.scrollHeight;
};
function startInstallation(ip, user, pass) {
// Diese Funktion wird gerufen, wenn ein neuer Node hinzugefügt wird
fetch('/api/setup_node', {
method: 'POST',
body: JSON.stringify({ip, user, pass})
});
}
</script>
<script> <script>
const ws = new WebSocket(`ws://${location.host}/ws/chat`); const ws = new WebSocket(`ws://${location.host}/ws/chat`);
const chatWindow = document.getElementById('chat-window'); const chatWindow = document.getElementById('chat-window');