feat: Implement initial web application structure with routes, static assets, and task log metadata caching.
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 14:10:19 -05:00
parent 57bfe02e32
commit 608f4b9197
6 changed files with 61 additions and 9 deletions
+6 -6
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 = {};
+1 -1
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"])
+1 -1
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 |