From 711e0012cb12d4c7d661338c5dc85918fa482133 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Sat, 11 Jan 2025 07:54:51 +1100 Subject: [PATCH] sort by port #949 --- front/network.php | 4 ++-- front/plugins/ui_settings/config.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/front/network.php b/front/network.php index 275ce95c..ba8f0af0 100755 --- a/front/network.php +++ b/front/network.php @@ -488,7 +488,7 @@ function createPane($node_mac, $node_name, $node_status, $node_type, $node_ports return; } - sortTopologyBy = createArray(getSetting("UI_TOPOLOGY_SORT")) + orderTopologyBy = createArray(getSetting("UI_TOPOLOGY_ORDER")) devicesListnew = rawData["data"].map(item => { return { @@ -509,7 +509,7 @@ function createPane($node_mac, $node_name, $node_status, $node_type, $node_ports return isNaN(parsed) ? Infinity : parsed; }; - switch (sortTopologyBy[0]) { + switch (orderTopologyBy[0]) { case "Name": // First sort by name alphabetically const nameCompare = a.name.localeCompare(b.name); diff --git a/front/plugins/ui_settings/config.json b/front/plugins/ui_settings/config.json index 4e435cbe..a49f9d79 100755 --- a/front/plugins/ui_settings/config.json +++ b/front/plugins/ui_settings/config.json @@ -495,7 +495,7 @@ ] }, { - "function": "TOPOLOGY_SORT", + "function": "TOPOLOGY_ORDER", "type": { "dataType": "array", "elements": [ @@ -512,7 +512,7 @@ "name": [ { "language_code": "en_us", - "string": "Sort by in Network" + "string": "Order by in Network" } ], "description": [