diff --git a/MEMORY.md b/MEMORY.md index 927f318..37bea8f 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -2,6 +2,12 @@ ## Ultima modifica: 31/08/2026 +## 31/08/2026 — Rinominate le tab della scheda Server + grafica Missing (solo UI/testi) +- **Rinominazione tab** (`front/server.form.php:118,123,128`): "Linked clients"→**"Managed clients" / Clienti gestiti** (asset GLPI con agent installato e collegamento attivo); "Unlinked clients"→**"Linkable clients" / Clienti Collegabili** (asset con agent installato ma non collegato a un asset GLPI); "Missing clients"→**"Clients to manage" / Clienti da gestire** (asset GLPI nella sede del server SENZA agent installato — "Connect" crea il link ma va poi installato il client). Aggiornate le traduzioni it/de/en (`.po`+`.mo` ricompilati con msgfmt) e rimosse le vecchie stringhe "Linked/Unlinked/Missing clients" dal catalogo. +- **Grafica tab Missing** (`src/Server.php` `showMissingClientsTab`): rimossi il campo di ricerca `#missing-search`, gli header `class="sortable"`+`` (stile non definito in CSS), l'id `missing-table` e tutto il blocco JS ordinamento/filtro → la tabella ora usa lo stesso `` delle tab Linked/Unlinked. +- **Redirect "Connect"** (`front/server.form.php:31`): dopo il link_asset la pagina riapre sulla scheda "Clienti non collegati" (Unlinked/Clients to manage) aggiungendo `#tab-unlinked` al redirect (il JS già presente riattiva la tab dall'hash). +- Nessun bump versione (nessuna modifica DB, regola 6). Verifiche IA: `php -l` OK, msgfmt OK, git diff autorevisione OK. **Verifica UI utente OBBLIGATORIA**: controllare etichette traduczione, grafica Missing uniforme, redirect su scheda corretta. + ## 31/08/2026 — Audit statico: fix 7 bug (solo UI/codice, nessuna modifica DB) Audit statico (IA) + confronto contro sorgente C++ del backend UrBackup e core GLPI 11. Nessun bug di classe critico (crash/XSS/SQLi), ma diversi output errati corretti. 1. **Bug 1 — Livello log sempre vuoto** (`AssetTab.php:728`): l'API `livelog` restituisce `loglevel` (int 1=ERROR,2=WARNING,3=INFO,4=DEBUG), il codice leggeva `level`/`severity` (mai presenti). Aggiunto `formatLogLevel()` che mappa `loglevel`→stringa. diff --git a/README.md b/README.md index 46d2846..258dd3d 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ plugin_urbackup/ - Fixed the inverted IP lookup JOIN (`glpi_networknames` ↔ `glpi_ipaddresses`) so the IP column in Linked/Missing clients is correct - Made the missing/unlinked clients queries server-scoped (`plugin_urbackup_servers_id`) and the API data session cache key unique per asset (itemtype+id) - `server_test.ajax.php`: entity-aware `check()` authorization; added `public/js/urbackup.js` (registered via `ADD_JAVASCRIPT`) that sends the `X-Glpi-Csrf-Token` header on plugin AJAX POSTs; `dropdown_host.ajax.php` now requires READ right +- Renamed the server form client tabs to be clearer: "Linked clients" → "Managed clients", "Unlinked clients" → "Linkable clients", "Missing clients" → "Clients to manage"; removed the sort/search on the missing clients table to match the other tab layouts; updated it_IT/de_DE/en_GB translations and recompiled locales ### 0.7.2 - UrBackup on Computer is now configurable: new `enable_computer` setting on the plugin configuration page (previously always enabled, hardcoded) diff --git a/front/server.form.php b/front/server.form.php index ccc8df7..43654a1 100644 --- a/front/server.form.php +++ b/front/server.form.php @@ -115,17 +115,17 @@ if ($ID > 0) { diff --git a/locales/de_DE.mo b/locales/de_DE.mo index 30b89fb..e91829f 100644 Binary files a/locales/de_DE.mo and b/locales/de_DE.mo differ diff --git a/locales/de_DE.po b/locales/de_DE.po index bf7df9b..be13f82 100644 --- a/locales/de_DE.po +++ b/locales/de_DE.po @@ -306,8 +306,8 @@ msgstr "Stufe" msgid "Linked assets" msgstr "Verknüpfte Assets" -msgid "Linked clients" -msgstr "Verknüpfte Clients" +msgid "Managed clients" +msgstr "Verwaltete Clients" msgid "Linked server" msgstr "Verknüpfter Server" @@ -324,8 +324,8 @@ msgstr "Nachricht" msgid "Method not allowed" msgstr "Methode nicht erlaubt" -msgid "Missing clients" -msgstr "Fehlende Clients" +msgid "Clients to manage" +msgstr "Zu verwaltende Clients" msgid "Name" msgstr "Name" @@ -504,8 +504,8 @@ msgstr "cURL konnte nicht initialisiert werden." msgid "Unknown" msgstr "Unbekannt" -msgid "Unlinked clients" -msgstr "Nicht verknüpfte Clients" +msgid "Linkable clients" +msgstr "Verknüpfbare Clients" msgid "Update" msgstr "Aktualisieren" diff --git a/locales/en_GB.mo b/locales/en_GB.mo index 6a60c44..40d6a26 100644 Binary files a/locales/en_GB.mo and b/locales/en_GB.mo differ diff --git a/locales/en_GB.po b/locales/en_GB.po index 8b0bf11..d4c8b38 100644 --- a/locales/en_GB.po +++ b/locales/en_GB.po @@ -301,8 +301,8 @@ msgstr "Level" msgid "Linked assets" msgstr "Linked assets" -msgid "Linked clients" -msgstr "Linked clients" +msgid "Managed clients" +msgstr "Managed clients" msgid "Linked server" msgstr "Linked server" @@ -319,8 +319,8 @@ msgstr "Message" msgid "Method not allowed" msgstr "Method not allowed" -msgid "Missing clients" -msgstr "Missing clients" +msgid "Clients to manage" +msgstr "Clients to manage" msgid "Name" msgstr "Name" @@ -496,8 +496,8 @@ msgstr "Unable to initialize cURL." msgid "Unknown" msgstr "Unknown" -msgid "Unlinked clients" -msgstr "Unlinked clients" +msgid "Linkable clients" +msgstr "Linkable clients" msgid "Update" msgstr "Update" diff --git a/locales/it_IT.mo b/locales/it_IT.mo index ae65a19..27c8e2a 100644 Binary files a/locales/it_IT.mo and b/locales/it_IT.mo differ diff --git a/locales/it_IT.po b/locales/it_IT.po index 26fc430..b6f70a1 100644 --- a/locales/it_IT.po +++ b/locales/it_IT.po @@ -306,8 +306,8 @@ msgstr "Livello" msgid "Linked assets" msgstr "Asset collegati" -msgid "Linked clients" -msgstr "Clienti collegati" +msgid "Managed clients" +msgstr "Clienti gestiti" msgid "Linked server" msgstr "Server collegato" @@ -324,8 +324,8 @@ msgstr "Messaggio" msgid "Method not allowed" msgstr "Metodo non consentito" -msgid "Missing clients" -msgstr "Client mancanti" +msgid "Clients to manage" +msgstr "Clienti da gestire" msgid "Name" msgstr "Nome" @@ -505,8 +505,8 @@ msgstr "Impossibile inizializzare cURL." msgid "Unknown" msgstr "Sconosciuto" -msgid "Unlinked clients" -msgstr "Clienti non collegati" +msgid "Linkable clients" +msgstr "Clienti Collegabili" msgid "Update" msgstr "Aggiorna" diff --git a/src/Server.php b/src/Server.php index 01cde7a..1ef6032 100644 --- a/src/Server.php +++ b/src/Server.php @@ -1372,24 +1372,20 @@ class Server extends CommonDBTM return; } - echo '
'; - echo ''; - echo '
'; - $formAction = PLUGIN_URBACKUP_WEB_DIR . '/front/server.form.php'; - echo '
'; + echo '
'; echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; if ($canWrite) { - echo ''; + echo ''; } echo ''; echo ''; @@ -1434,50 +1430,6 @@ class Server extends CommonDBTM echo ''; echo '
' . htmlspecialchars(__('Name')) . ' ' . htmlspecialchars(Entity::getTypeName(1)) . ' ' . htmlspecialchars(Location::getTypeName(1)) . ' ' . htmlspecialchars(__('Inventory number')) . ' ' . htmlspecialchars(__('IP address', 'urbackup')) . ' ' . htmlspecialchars(State::getTypeName(1)) . ' ' . htmlspecialchars(User::getTypeName(1)) . ' ' . htmlspecialchars(Group::getTypeName(1)) . ' ' . htmlspecialchars(__('Name')) . '' . htmlspecialchars(Entity::getTypeName(1)) . '' . htmlspecialchars(Location::getTypeName(1)) . '' . htmlspecialchars(__('Inventory number')) . '' . htmlspecialchars(__('IP address', 'urbackup')) . '' . htmlspecialchars(State::getTypeName(1)) . '' . htmlspecialchars(User::getTypeName(1)) . '' . htmlspecialchars(Group::getTypeName(1)) . '' . htmlspecialchars(__('Actions', 'urbackup')) . '' . htmlspecialchars(__('Actions', 'urbackup')) . '
'; - - echo <<<'JAVASCRIPT' - -JAVASCRIPT; } private static function getCachedName(string $classname, int $id, array &$cache): string