feat: Implement initial web application structure with routes, static assets, and task log metadata caching.
Some checks failed
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:
Bruno Charest 2026-03-03 14:10:19 -05:00
parent 57bfe02e32
commit 608f4b9197
6 changed files with 61 additions and 9 deletions

View File

@ -10,10 +10,12 @@ DEBUG_MODE=NO
# --- API Authentication ---
# REQUIRED: Set a strong, unique API key
# Generate a random API key using: python -c "import secrets; print(secrets.token_hex(32))"
API_KEY=CHANGE_ME_TO_A_STRONG_API_KEY
# --- JWT Authentication ---
# REQUIRED: Set a strong secret key (min 32 chars)
# Generate a random JWT secret key using: python -c "import secrets; print(secrets.token_hex(32))"
JWT_SECRET_KEY=CHANGE_ME_TO_A_STRONG_SECRET_KEY_MIN_32_CHARS
JWT_EXPIRE_MINUTES=60

View File

@ -896,7 +896,7 @@ class DashboardManager {
this.apiCall('/api/hosts').catch(() => []),
this.apiCall('/api/tasks').catch(() => []),
this.apiCall('/api/logs').catch(() => []),
this.apiCall('/api/metrics').catch(() => ({})),
this.apiCall('/api/monitoring').catch(() => ({})),
this.apiCall('/api/ansible/inventory').catch(() => ({ hosts: [], groups: [] })),
this.apiCall('/api/ansible/playbooks').catch(() => ({ playbooks: [] })),
this.apiCall('/api/tasks/logs').catch(() => ({ logs: [], count: 0 })),
@ -907,7 +907,7 @@ class DashboardManager {
this.apiCall('/api/tasks/logs?source_type=adhoc&limit=500&offset=0').catch(() => ({ logs: [], total_count: 0, has_more: false })),
this.apiCall('/api/schedules').catch(() => ({ schedules: [], count: 0 })),
this.apiCall('/api/schedules/stats').catch(() => ({ stats: {}, upcoming: [] })),
this.apiCall('/api/metrics/all-hosts').catch(() => ({})),
this.apiCall('/api/monitoring/all-hosts').catch(() => ({})),
this.apiCall('/api/builtin-playbooks').catch(() => []),
this.apiCall('/api/server/logs?limit=500&offset=0').catch(() => ({ logs: [] })),
this.apiCall('/api/alerts/unread-count').catch(() => ({ unread: 0 }))
@ -979,7 +979,7 @@ class DashboardManager {
async loadMetrics() {
try {
const metrics = await this.apiCall('/api/metrics');
const metrics = await this.apiCall('/api/monitoring');
this.updateMetricsDisplay(metrics);
} catch (error) {
console.error('Erreur chargement métriques:', error);
@ -1569,7 +1569,7 @@ class DashboardManager {
if (!selectEl) return;
try {
const data = await this.apiCall('/api/metrics/collection-schedule');
const data = await this.apiCall('/api/monitoring/collection-schedule');
const interval = data?.interval || 'off';
this.metricsCollectionInterval = interval;
selectEl.value = interval;
@ -1587,7 +1587,7 @@ class DashboardManager {
const interval = selectEl.value || 'off';
try {
await this.apiCall('/api/metrics/collection-schedule', {
await this.apiCall('/api/monitoring/collection-schedule', {
method: 'POST',
body: JSON.stringify({ interval })
});
@ -3084,7 +3084,7 @@ class DashboardManager {
// Load host metrics from API
async loadHostMetrics() {
try {
this.hostMetrics = await this.apiCall('/api/metrics/all-hosts').catch(() => ({}));
this.hostMetrics = await this.apiCall('/api/monitoring/all-hosts').catch(() => ({}));
} catch (error) {
console.error('Error loading host metrics:', error);
this.hostMetrics = {};

View File

@ -47,7 +47,7 @@ api_router.include_router(bootstrap_router, prefix="/bootstrap", tags=["Bootstra
api_router.include_router(health_router, prefix="/health", tags=["Health"])
api_router.include_router(notifications_router, prefix="/notifications", tags=["Notifications"])
api_router.include_router(help_router, prefix="/help", tags=["Help"])
api_router.include_router(metrics_router, prefix="/metrics", tags=["Metrics"])
api_router.include_router(metrics_router, prefix="/monitoring", tags=["Metrics"])
api_router.include_router(builtin_playbooks_router, prefix="/builtin-playbooks", tags=["Builtin Playbooks"])
api_router.include_router(server_router, prefix="/server", tags=["Server"])
api_router.include_router(alerts_router, prefix="/alerts", tags=["Alerts"])

View File

@ -264,7 +264,7 @@ L'API REST est accessible sur le port configuré. Authentification via header `A
| `/api/ansible/execute` | POST | Exécute un playbook |
| `/api/schedules` | GET | Liste les planifications |
| `/api/schedules` | POST | Crée une planification |
| `/api/metrics` | GET | Métriques du dashboard |
| `/api/monitoring` | GET | Métriques du dashboard |
| `/api/auth/login` | POST | Authentification utilisateur |
| `/api/auth/me` | GET | Informations utilisateur courant |

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,50 @@
# ✅ Mise à jour système
## Informations
| Propriété | Valeur |
|-----------|--------|
| **ID** | `383a0a3b73eb4d5c99c269e0666396f0` |
| **Nom** | Mise à jour système |
| **Cible** | `openclaw.lab.home` |
| **Statut** | completed |
| **Type** | Manuel |
| **Progression** | 100% |
| **Début** | 2026-03-03T18:48:55.963535+00:00 |
| **Fin** | 2026-03-03T18:49:05.376513+00:00 |
| **Durée** | 9.4s |
## Sortie
```
Using /mnt/c/dev/git/python/homelab-automation-api-v2/ansible/ansible.cfg as config file
PLAY [Upgrade packages on target host] *****************************************
TASK [Gathering Facts] *********************************************************
ok: [openclaw.lab.home]
TASK [Detect distribution] *****************************************************
ok: [openclaw.lab.home]
TASK [Upgrade on Debian/Ubuntu] ************************************************
ok: [openclaw.lab.home] => {"changed": false, "msg": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nCalculating upgrade...\n0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\n", "stderr": "", "stderr_lines": [], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nCalculating upgrade...\n0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Calculating upgrade...", "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."]}
TASK [Upgrade on Alpine] *******************************************************
skipping: [openclaw.lab.home] => {"changed": false, "false_condition": "ansible_facts['os_family'] == 'Alpine'", "skip_reason": "Conditional result was False"}
TASK [Upgrade on RedHat family] ************************************************
skipping: [openclaw.lab.home] => {"changed": false, "false_condition": "ansible_facts['os_family'] == 'RedHat'", "skip_reason": "Conditional result was False"}
TASK [Upgrade on FreeBSD] ******************************************************
skipping: [openclaw.lab.home] => {"changed": false, "false_condition": "ansible_facts['os_family'] == 'FreeBSD'", "skip_reason": "Conditional result was False"}
PLAY RECAP *********************************************************************
openclaw.lab.home : ok=3 changed=0 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0
```
---
*Généré automatiquement par Homelab Automation Dashboard*
*Date: 2026-03-03T18:49:05.395437+00:00*