Skip to content

Commit

Permalink
sort by port #949
Browse files Browse the repository at this point in the history
  • Loading branch information
jokob-sk committed Jan 10, 2025
1 parent ea2e845 commit 711e001
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions front/network.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions front/plugins/ui_settings/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
]
},
{
"function": "TOPOLOGY_SORT",
"function": "TOPOLOGY_ORDER",
"type": {
"dataType": "array",
"elements": [
Expand All @@ -512,7 +512,7 @@
"name": [
{
"language_code": "en_us",
"string": "Sort by in Network"
"string": "Order by in Network"
}
],
"description": [
Expand Down

0 comments on commit 711e001

Please sign in to comment.