Refactor network tree data structure and improve device status handling

- Updated the network tree data structure to use consistent naming conventions for device properties (e.g., devName, devMac).
- Enhanced the initTree function to utilize the new property names and improved the rendering of device nodes.
- Refactored the getStatusBadgeParts function to include additional parameters for archived and new device statuses.
- Introduced convenience functions (badgeFromDevice and badgeFromDataAttrs) to streamline badge generation from device objects and data attributes.
- Updated various language files to include new status labels and ensure consistency across translations.
- Modified the renderSmallBox function to allow for custom icon HTML, improving flexibility in UI components.
This commit is contained in:
Jokob @NetAlertX
2026-03-02 09:35:42 +00:00
parent 3e237bb452
commit 6724d250d4
28 changed files with 280 additions and 156 deletions

View File

@@ -320,6 +320,7 @@
"Gen_AddDevice": "Gerät hinzufügen",
"Gen_Add_All": "Alle hinzufügen",
"Gen_All_Devices": "Alle Geräte",
"Gen_Archived": "",
"Gen_AreYouSure": "Sind Sie sich sicher?",
"Gen_Backup": "Sichern",
"Gen_Cancel": "Abbrechen",
@@ -330,8 +331,10 @@
"Gen_Delete": "Löschen",
"Gen_DeleteAll": "Alles löschen",
"Gen_Description": "Beschreibung",
"Gen_Down": "",
"Gen_Error": "Fehler",
"Gen_Filter": "Filter",
"Gen_Flapping": "",
"Gen_Generate": "Generieren",
"Gen_InvalidMac": "Ungültige MAC-Adresse.",
"Gen_Invalid_Value": "",
@@ -354,6 +357,7 @@
"Gen_SelectIcon": "<i class=\"fa-solid fa-chevron-down fa-fade\"></i>",
"Gen_SelectToPreview": "Zur Vorschau auswählen",
"Gen_Selected_Devices": "Ausgewählte Geräte:",
"Gen_Sleeping": "",
"Gen_Subnet": "",
"Gen_Switch": "Umschalten",
"Gen_Upd": "Aktualisierung erfolgreich",