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

@@ -316,6 +316,7 @@
"Gen_AddDevice": "デバイス追加",
"Gen_Add_All": "すべて追加",
"Gen_All_Devices": "全デバイス",
"Gen_Archived": "",
"Gen_AreYouSure": "本当によろしいですか?",
"Gen_Backup": "バックアップを実行",
"Gen_Cancel": "キャンセル",
@@ -326,8 +327,10 @@
"Gen_Delete": "削除",
"Gen_DeleteAll": "全削除",
"Gen_Description": "説明",
"Gen_Down": "",
"Gen_Error": "エラー",
"Gen_Filter": "フィルター",
"Gen_Flapping": "",
"Gen_Generate": "生成",
"Gen_InvalidMac": "無効なMacアドレス。",
"Gen_Invalid_Value": "無効な値が入力されました",
@@ -350,6 +353,7 @@
"Gen_SelectIcon": "<i class=\"fa-solid fa-chevron-down fa-fade\"></i>",
"Gen_SelectToPreview": "プレビューを選択",
"Gen_Selected_Devices": "選択したデバイス:",
"Gen_Sleeping": "",
"Gen_Subnet": "サブネット",
"Gen_Switch": "スイッチ",
"Gen_Upd": "アップデートが正常に完了しました",