APmanageur Wi-Fi V1.0
This commit is contained in:
1 parent
b8635b5162
commit
38c7ace89e
5 files changed
+155
-36
No files matched your search
+24
-3
@@ -8305,7 +8305,19 @@ ${vpnBadgeTopo}
|
||||
'déblocage': t('log_deblocage', '✓ Déblocage'),
|
||||
'démarrage': t('log_demarrage', '▶ Démarrage AP'),
|
||||
'arrêt': t('log_arret', '■ Arrêt AP'),
|
||||
'redémarrage': t('log_redemarrage', '↻ Redémarrage AP')
|
||||
'redémarrage': t('log_redemarrage', '↻ Redémarrage AP'),
|
||||
'planification_sauvegarde_modifiee': t('log_planif_sauvegarde', '📅 Planification sauvegarde'),
|
||||
'creation_sauvegarde_serveur': t('log_creation_sauvegarde', '💾 Sauvegarde créée'),
|
||||
'sauvegarde_automatique': t('log_sauvegarde_auto', '⏰ Sauvegarde automatique'),
|
||||
'suppression_sauvegarde': t('log_suppr_sauvegarde', '🗑️ Sauvegarde supprimée'),
|
||||
'import_configuration_complete': t('log_restauration_sauvegarde', '📥 Sauvegarde restaurée'),
|
||||
'configuration_stockage_distant': t('log_stockage_distant', '☁️ Stockage distant configuré'),
|
||||
'televersement_distant_manuel': t('log_televersement_distant', '☁️ Téléversement distant'),
|
||||
'recuperation_sauvegarde_distante': t('log_recup_distant', '☁️ Import depuis le drive'),
|
||||
'suppression_sauvegarde_distante': t('log_suppr_distant', '🗑️ Suppr. sur le drive'),
|
||||
'export_sauvegarde_complete': t('log_export_sauvegarde', '💾 Export sauvegarde'),
|
||||
'export_base_sqlite': t('log_export_sqlite', '💾 Export SQLite'),
|
||||
'export_configuration_json': t('log_export_json', '💾 Export JSON')
|
||||
};
|
||||
tbody.innerHTML = paged.map(log => {
|
||||
const ev = String(log.event || '').toLowerCase();
|
||||
@@ -8316,7 +8328,7 @@ ${vpnBadgeTopo}
|
||||
eventHtml = '<span style="color:var(--red);font-weight:600">' + t('log_deconnexion', '○ Déconnexion Wi-Fi') + '</span>';
|
||||
} else {
|
||||
const label = labels[log.event] || log.event;
|
||||
if (ev.includes('admin') || ev.includes('2fa') || ev === 'création' || ev === 'démarrage') {
|
||||
if (ev.includes('admin') || ev.includes('2fa') || ev === 'création' || ev === 'démarrage' || ev.includes('sauvegarde') || ev.includes('distant') || ev.includes('export')) {
|
||||
eventHtml = `<span style="color:var(--blue);font-weight:600">${label}</span>`;
|
||||
} else if (ev.includes('vpn') || ev === 'vpn_route' || ev === 'vpn_connect') {
|
||||
eventHtml = `<span style="color:var(--green);font-weight:600">${label}</span>`;
|
||||
@@ -8328,7 +8340,16 @@ ${vpnBadgeTopo}
|
||||
eventHtml = `<span style="font-weight:500">${label}</span>`;
|
||||
}
|
||||
}
|
||||
const macText = log.mac === 'AUTH' ? 'Authentification' : log.mac === 'CONFIG' ? 'Configuration' : log.mac === 'SYSTEM' ? 'Système' : (log.mac || '—');
|
||||
const macCategoryMap = {
|
||||
'AUTH': t('category_auth', 'Authentification'),
|
||||
'CONFIG': t('category_config', 'Configuration'),
|
||||
'SYSTEM': t('category_system', 'Système'),
|
||||
'BACKUP': t('category_backup', 'Sauvegarde'),
|
||||
'SETTINGS': t('category_settings', 'Paramètres'),
|
||||
'VPN': 'VPN',
|
||||
'AP': t('category_ap', 'Point d’accès')
|
||||
};
|
||||
const macText = macCategoryMap[log.mac] || (log.mac || '—');
|
||||
const vpnBadgeLog = log.vpn_profile_name ?
|
||||
(log.vpn_routed ? `<span class="pill pill-green pill-no-dot" style="font-size:10px;margin-left:6px;padding:2px 6px;vertical-align:middle" title="Routé via VPN">🛡️ ${escapeHtml(log.vpn_profile_name)}</span>` : `<span class="pill pill-no-dot" style="font-size:10px;margin-left:6px;padding:2px 6px;background:rgba(255,107,107,.15);color:var(--red);vertical-align:middle" title="Profil VPN coupé">⚠️ ${escapeHtml(log.vpn_profile_name)}</span>`) : '';
|
||||
return `<tr><td>${log.time}</td><td>${eventHtml}</td><td>${escapeHtml(log.name || 'Nom non communiqué')}${vpnBadgeLog}</td><td>${log.ip || '—'}</td><td>${macText}</td></tr>`;
|
||||
|
||||
Reference in new issue
Block a user