feat: Implement web-based SSH terminal with session management, command logging, and host interaction.
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled

This commit is contained in:
2026-03-03 13:37:52 -05:00
parent d29eefcef4
commit 57bfe02e32
10 changed files with 245 additions and 33 deletions
@@ -0,0 +1,58 @@
# ✅ Vérification de santé
## Informations
| Propriété | Valeur |
|-----------|--------|
| **ID** | `11e8f1d9d9744a8d8b4f05f7c3cb9dbc` |
| **Nom** | Vérification de santé |
| **Cible** | `media-1.lab.home` |
| **Statut** | completed |
| **Type** | Manuel |
| **Progression** | 100% |
| **Début** | 2026-03-03T18:14:51.218241+00:00 |
| **Fin** | 2026-03-03T18:14:56.699977+00:00 |
| **Durée** | 5.5s |
## Sortie
```
Using /mnt/c/dev/git/python/homelab-automation-api-v2/ansible/ansible.cfg as config file
PLAY [Health check on target host] *********************************************
TASK [Check if host is reachable (ping)] ***************************************
ok: [media-1.lab.home] => {"changed": false, "ping": "pong"}
TASK [Gather minimal facts] ****************************************************
ok: [media-1.lab.home]
TASK [Get system uptime] *******************************************************
ok: [media-1.lab.home] => {"changed": false, "cmd": ["uptime"], "delta": "0:00:00.002924", "end": "2026-03-03 13:14:52.271861", "msg": "", "rc": 0, "start": "2026-03-03 13:14:52.268937", "stderr": "", "stderr_lines": [], "stdout": " 13:14:52 up 6 days, 5:52, 0 users, load average: 0.37, 0.36, 0.28", "stdout_lines": [" 13:14:52 up 6 days, 5:52, 0 users, load average: 0.37, 0.36, 0.28"]}
TASK [Get disk usage] **********************************************************
ok: [media-1.lab.home] => {"changed": false, "cmd": "df -h / | tail -1 | awk '{print $5}'", "delta": "0:00:00.003590", "end": "2026-03-03 13:14:52.721041", "msg": "", "rc": 0, "start": "2026-03-03 13:14:52.717451", "stderr": "", "stderr_lines": [], "stdout": "85%", "stdout_lines": ["85%"]}
TASK [Get memory usage (Linux)] ************************************************
ok: [media-1.lab.home] => {"changed": false, "cmd": "if command -v free >/dev/null 2>&1; then\n free -m | grep Mem | awk '{printf \"%.1f%%\", $3/$2 * 100}'\nelse\n # Fallback for systems without free command\n cat /proc/meminfo | awk '/MemTotal/{total=$2} /MemAvailable/{avail=$2} END{printf \"%.1f%%\", (total-avail)/total*100}'\nfi\n", "delta": "0:00:00.010986", "end": "2026-03-03 13:14:53.179070", "msg": "", "rc": 0, "start": "2026-03-03 13:14:53.168084", "stderr": "", "stderr_lines": [], "stdout": "9.3%", "stdout_lines": ["9.3%"]}
TASK [Get CPU temperature (ARM/SBC)] *******************************************
ok: [media-1.lab.home] => {"changed": false, "cmd": "if [ -f /sys/class/thermal/thermal_zone0/temp ]; then\n temp=$(cat /sys/class/thermal/thermal_zone0/temp)\n # Use awk instead of bc for better compatibility\n echo \"${temp}\" | awk '{printf \"%.1f°C\", $1/1000}'\nelse\n echo \"N/A\"\nfi\n", "delta": "0:00:00.002847", "end": "2026-03-03 13:14:53.629279", "msg": "", "rc": 0, "start": "2026-03-03 13:14:53.626432", "stderr": "", "stderr_lines": [], "stdout": "N/A", "stdout_lines": ["N/A"]}
TASK [Get CPU load] ************************************************************
ok: [media-1.lab.home] => {"changed": false, "cmd": "if [ -f /proc/loadavg ]; then\n cat /proc/loadavg | awk '{print $1}'\nelse\n uptime | awk -F'load average:' '{print $2}' | awk -F',' '{print $1}' | tr -d ' '\nfi\n", "delta": "0:00:00.003757", "end": "2026-03-03 13:14:54.084586", "msg": "", "rc": 0, "start": "2026-03-03 13:14:54.080829", "stderr": "", "stderr_lines": [], "stdout": "0.38", "stdout_lines": ["0.38"]}
TASK [Display health status] ***************************************************
ok: [media-1.lab.home] => {
"msg": "═══════════════════════════════════════\nHost: media-1.lab.home\nStatus: OK\n═══════════════════════════════════════\nUptime: 13:14:52 up 6 days, 5:52, 0 users, load average: 0.37, 0.36, 0.28\nDisk Usage: 85%\nMemory Usage: 9.3%\nCPU Load: 0.38\nCPU Temp: N/A\n═══════════════════════════════════════\n"
}
PLAY RECAP *********************************************************************
media-1.lab.home : ok=8 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```
---
*Généré automatiquement par Homelab Automation Dashboard*
*Date: 2026-03-03T18:14:56.724153+00:00*
@@ -0,0 +1,35 @@
# ❌ Vérification de santé
## Informations
| Propriété | Valeur |
|-----------|--------|
| **ID** | `e1cbbcd7f94b4314a2cada7121d88f98` |
| **Nom** | Vérification de santé |
| **Cible** | `openclaw.lab.home` |
| **Statut** | failed |
| **Type** | Manuel |
| **Progression** | 100% |
| **Début** | 2026-03-03T18:17:05.574697+00:00 |
| **Fin** | 2026-03-03T18:17:06.639749+00:00 |
| **Durée** | 1.1s |
## Sortie
```
Using /mnt/c/dev/git/python/homelab-automation-api-v2/ansible/ansible.cfg as config file
PLAY [Health check on target host] *********************************************
TASK [Check if host is reachable (ping)] ***************************************
fatal: [openclaw.lab.home]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '192.168.30.111' (ED25519) to the list of known hosts.\r\[email protected]: Permission denied (publickey,password).", "unreachable": true}
PLAY RECAP *********************************************************************
openclaw.lab.home : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
```
---
*Généré automatiquement par Homelab Automation Dashboard*
*Date: 2026-03-03T18:17:06.656631+00:00*
@@ -0,0 +1,58 @@
# ✅ Vérification de santé
## Informations
| Propriété | Valeur |
|-----------|--------|
| **ID** | `7a57e331ad3846d583e613c02f09cfa9` |
| **Nom** | Vérification de santé |
| **Cible** | `openclaw.lab.home` |
| **Statut** | completed |
| **Type** | Manuel |
| **Progression** | 100% |
| **Début** | 2026-03-03T18:18:46.347326+00:00 |
| **Fin** | 2026-03-03T18:18:51.383461+00:00 |
| **Durée** | 5.0s |
## Sortie
```
Using /mnt/c/dev/git/python/homelab-automation-api-v2/ansible/ansible.cfg as config file
PLAY [Health check on target host] *********************************************
TASK [Check if host is reachable (ping)] ***************************************
ok: [openclaw.lab.home] => {"changed": false, "ping": "pong"}
TASK [Gather minimal facts] ****************************************************
ok: [openclaw.lab.home]
TASK [Get system uptime] *******************************************************
ok: [openclaw.lab.home] => {"changed": false, "cmd": ["uptime"], "delta": "0:00:00.005568", "end": "2026-03-03 13:18:49.842547", "msg": "", "rc": 0, "start": "2026-03-03 13:18:49.836979", "stderr": "", "stderr_lines": [], "stdout": " 13:18:49 up 2 days, 13:12, 2 users, load average: 0.05, 0.01, 0.00", "stdout_lines": [" 13:18:49 up 2 days, 13:12, 2 users, load average: 0.05, 0.01, 0.00"]}
TASK [Get disk usage] **********************************************************
ok: [openclaw.lab.home] => {"changed": false, "cmd": "df -h / | tail -1 | awk '{print $5}'", "delta": "0:00:00.005402", "end": "2026-03-03 13:18:50.270457", "msg": "", "rc": 0, "start": "2026-03-03 13:18:50.265055", "stderr": "", "stderr_lines": [], "stdout": "96%", "stdout_lines": ["96%"]}
TASK [Get memory usage (Linux)] ************************************************
ok: [openclaw.lab.home] => {"changed": false, "cmd": "if command -v free >/dev/null 2>&1; then\n free -m | grep Mem | awk '{printf \"%.1f%%\", $3/$2 * 100}'\nelse\n # Fallback for systems without free command\n cat /proc/meminfo | awk '/MemTotal/{total=$2} /MemAvailable/{avail=$2} END{printf \"%.1f%%\", (total-avail)/total*100}'\nfi\n", "delta": "0:00:00.006000", "end": "2026-03-03 13:18:50.670294", "msg": "", "rc": 0, "start": "2026-03-03 13:18:50.664294", "stderr": "", "stderr_lines": [], "stdout": "34.0%", "stdout_lines": ["34.0%"]}
TASK [Get CPU temperature (ARM/SBC)] *******************************************
ok: [openclaw.lab.home] => {"changed": false, "cmd": "if [ -f /sys/class/thermal/thermal_zone0/temp ]; then\n temp=$(cat /sys/class/thermal/thermal_zone0/temp)\n # Use awk instead of bc for better compatibility\n echo \"${temp}\" | awk '{printf \"%.1f°C\", $1/1000}'\nelse\n echo \"N/A\"\nfi\n", "delta": "0:00:00.003576", "end": "2026-03-03 13:18:51.050744", "msg": "", "rc": 0, "start": "2026-03-03 13:18:51.047168", "stderr": "", "stderr_lines": [], "stdout": "N/A", "stdout_lines": ["N/A"]}
TASK [Get CPU load] ************************************************************
ok: [openclaw.lab.home] => {"changed": false, "cmd": "if [ -f /proc/loadavg ]; then\n cat /proc/loadavg | awk '{print $1}'\nelse\n uptime | awk -F'load average:' '{print $2}' | awk -F',' '{print $1}' | tr -d ' '\nfi\n", "delta": "0:00:00.004421", "end": "2026-03-03 13:18:51.419246", "msg": "", "rc": 0, "start": "2026-03-03 13:18:51.414825", "stderr": "", "stderr_lines": [], "stdout": "0.05", "stdout_lines": ["0.05"]}
TASK [Display health status] ***************************************************
ok: [openclaw.lab.home] => {
"msg": "═══════════════════════════════════════\nHost: openclaw.lab.home\nStatus: OK\n═══════════════════════════════════════\nUptime: 13:18:49 up 2 days, 13:12, 2 users, load average: 0.05, 0.01, 0.00\nDisk Usage: 96%\nMemory Usage: 34.0%\nCPU Load: 0.05\nCPU Temp: N/A\n═══════════════════════════════════════\n"
}
PLAY RECAP *********************************************************************
openclaw.lab.home : ok=8 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
```
---
*Généré automatiquement par Homelab Automation Dashboard*
*Date: 2026-03-03T18:18:51.401631+00:00*