diff --git a/internal/locales/de.json b/internal/locales/de.json index 9fd58a7..5984bb6 100644 --- a/internal/locales/de.json +++ b/internal/locales/de.json @@ -275,6 +275,8 @@ "servers.actions.test_success": "Verbindung erfolgreich", "servers.actions.test_failure": "Verbindung fehlgeschlagen", "servers.actions.restart": "Fail2ban neu starten", + "servers.actions.reload": "Fail2ban neu laden", + "servers.actions.reload_tooltip": "Für lokale Connectors ist nur ein Neuladen der Konfiguration über die Socket-Verbindung möglich. Der Container kann den Fail2ban-Dienst nicht mit systemctl neu starten. Für einen vollständigen Neustart führen Sie 'systemctl restart fail2ban' direkt auf dem Host-System aus.", "servers.actions.delete": "Löschen", "servers.actions.delete_confirm": "Diesen Servereintrag löschen?", "servers.form.select_key": "Privaten Schlüssel auswählen", diff --git a/internal/locales/de_ch.json b/internal/locales/de_ch.json index 994d325..f1a0c42 100644 --- a/internal/locales/de_ch.json +++ b/internal/locales/de_ch.json @@ -275,6 +275,8 @@ "servers.actions.test_success": "Verbindig erfolgriich", "servers.actions.test_failure": "Verbindig nöd möglich", "servers.actions.restart": "Fail2ban neu starte", + "servers.actions.reload": "Fail2ban neu lade", + "servers.actions.reload_tooltip": "Für lokali Connectors isch nur es Neulade vo de Konfiguration über d Socket-Verbindig möglich. Dr Container cha dr Fail2ban-Dienst nid mit systemctl neu starte. Für en vollständige Neustart füehre Sie 'systemctl restart fail2ban' direkt uf em Host-System us.", "servers.actions.delete": "Lösche", "servers.actions.delete_confirm": "Dä Servereintrag lösche?", "servers.form.select_key": "Priväte Schlissel ufwähle", diff --git a/internal/locales/en.json b/internal/locales/en.json index b08fe6a..d39b1ae 100644 --- a/internal/locales/en.json +++ b/internal/locales/en.json @@ -275,6 +275,8 @@ "servers.actions.test_success": "Connection successful", "servers.actions.test_failure": "Connection failed", "servers.actions.restart": "Restart Fail2ban", + "servers.actions.reload": "Reload Fail2ban", + "servers.actions.reload_tooltip": "For local connectors, only a configuration reload is possible via the socket connection. The container cannot restart the Fail2ban service using systemctl. To perform a full restart, run 'systemctl restart fail2ban' directly on the host system.", "servers.actions.delete": "Delete", "servers.actions.delete_confirm": "Delete this server entry?", "servers.form.select_key": "Select Private Key", diff --git a/internal/locales/es.json b/internal/locales/es.json index 5661cf8..16bd448 100644 --- a/internal/locales/es.json +++ b/internal/locales/es.json @@ -275,6 +275,8 @@ "servers.actions.test_success": "Conexión exitosa", "servers.actions.test_failure": "Conexión fallida", "servers.actions.restart": "Reiniciar Fail2ban", + "servers.actions.reload": "Recargar Fail2ban", + "servers.actions.reload_tooltip": "Para los conectores locales, solo es posible recargar la configuración a través de la conexión socket. El contenedor no puede reiniciar el servicio Fail2ban usando systemctl. Para realizar un reinicio completo, ejecute 'systemctl restart fail2ban' directamente en el sistema host.", "servers.actions.delete": "Eliminar", "servers.actions.delete_confirm": "¿Eliminar este servidor?", "servers.form.select_key": "Seleccionar clave privada", diff --git a/internal/locales/fr.json b/internal/locales/fr.json index 243230d..69bcd90 100644 --- a/internal/locales/fr.json +++ b/internal/locales/fr.json @@ -275,6 +275,8 @@ "servers.actions.test_success": "Connexion réussie", "servers.actions.test_failure": "Échec de la connexion", "servers.actions.restart": "Redémarrer Fail2ban", + "servers.actions.reload": "Recharger Fail2ban", + "servers.actions.reload_tooltip": "Pour les connecteurs locaux, seul un rechargement de la configuration est possible via la connexion socket. Le conteneur ne peut pas redémarrer le service Fail2ban en utilisant systemctl. Pour effectuer un redémarrage complet, exécutez 'systemctl restart fail2ban' directement sur le système hôte.", "servers.actions.delete": "Supprimer", "servers.actions.delete_confirm": "Supprimer ce serveur ?", "servers.form.select_key": "Sélectionner la clé privée", diff --git a/internal/locales/it.json b/internal/locales/it.json index 9826af1..c733bc4 100644 --- a/internal/locales/it.json +++ b/internal/locales/it.json @@ -275,6 +275,8 @@ "servers.actions.test_success": "Connessione riuscita", "servers.actions.test_failure": "Connessione fallita", "servers.actions.restart": "Riavvia Fail2ban", + "servers.actions.reload": "Ricarica Fail2ban", + "servers.actions.reload_tooltip": "Per i connettori locali, è possibile solo un ricaricamento della configurazione tramite la connessione socket. Il contenitore non può riavviare il servizio Fail2ban utilizzando systemctl. Per eseguire un riavvio completo, eseguire 'systemctl restart fail2ban' direttamente sul sistema host.", "servers.actions.delete": "Elimina", "servers.actions.delete_confirm": "Eliminare questo server?", "servers.form.select_key": "Seleziona chiave privata", diff --git a/pkg/web/static/js/core.js b/pkg/web/static/js/core.js index e2f8286..3f87565 100644 --- a/pkg/web/static/js/core.js +++ b/pkg/web/static/js/core.js @@ -225,7 +225,8 @@ function initializeSearch() { function updateRestartBanner() { var banner = document.getElementById('restartBanner'); if (!banner) return; - if (currentServer && currentServer.restartNeeded) { + // Don't show restart banner for local connectors - they only reload, not restart + if (currentServer && currentServer.restartNeeded && currentServer.type !== 'local') { banner.style.display = 'block'; } else { banner.style.display = 'none'; diff --git a/pkg/web/static/js/servers.js b/pkg/web/static/js/servers.js index 5baa0ab..a8593f1 100644 --- a/pkg/web/static/js/servers.js +++ b/pkg/web/static/js/servers.js @@ -189,7 +189,9 @@ function renderServerManagerList() { + ' ' + (server.isDefault ? '' : '') + ' ' - + (server.enabled ? '' : '') + + (server.enabled ? (server.type === 'local' + ? '' + : '') : '') + ' ' + ' ' + ' ' @@ -198,7 +200,21 @@ function renderServerManagerList() { }).join(''); list.innerHTML = html; - if (typeof updateTranslations === 'function') updateTranslations(); + if (typeof updateTranslations === 'function') { + updateTranslations(); + // Set tooltip text for reload buttons after translations are updated + setTimeout(function() { + serversCache.forEach(function(server) { + if (server.enabled && server.type === 'local') { + var buttons = list.querySelectorAll('button[data-i18n="servers.actions.reload"]'); + buttons.forEach(function(btn) { + var tooltipText = t('servers.actions.reload_tooltip', 'For local connectors, only a configuration reload is possible via the socket connection. The container cannot restart the Fail2ban service using systemctl. To perform a full restart, run \'systemctl restart fail2ban\' directly on the host system.'); + btn.setAttribute('title', tooltipText); + }); + } + }); + }, 100); + } } function resetServerForm() { @@ -531,7 +547,12 @@ function restartFail2banServer(serverId) { showToast("No server selected", 'error'); return; } - if (!confirm("Keep in mind that while fail2ban is restarting, logs are not being parsed and no IP addresses are blocked. Restart fail2ban on this server now? This will take some time.")) return; + var server = serversCache.find(function(s) { return s.id === serverId; }); + var isLocal = server && server.type === 'local'; + var confirmMsg = isLocal + ? "Reload Fail2ban configuration on this server now? This will reload the configuration without restarting the service." + : "Keep in mind that while fail2ban is restarting, logs are not being parsed and no IP addresses are blocked. Restart fail2ban on this server now? This will take some time."; + if (!confirm(confirmMsg)) return; showLoading(true); fetch('/api/fail2ban/restart?serverId=' + encodeURIComponent(serverId), { method: 'POST',