projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
77d6b28
)
luci-base: network.js: sort interface statuses by metric, then name
author
Jo-Philipp Wich
<jo@mein.io>
Mon, 1 Mar 2021 09:42:10 +0000
(10:42 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Mon, 1 Mar 2021 09:42:10 +0000
(10:42 +0100)
Fixes: #4693
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/network.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/network.js
b/modules/luci-base/htdocs/luci-static/resources/network.js
index 1f749c593cacffeddd02de6f4c2f64bc77ffa65e..1e24915f979ff700a7961cfef1f86c0227b15344 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/network.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/network.js
@@
-1453,6
+1453,18
@@
Network = baseclass.extend(/** @lends LuCI.network.prototype */ {
}
}
+ rv.sort(function(a, b) {
+ if (a.metric != b.metric)
+ return (a.metric - b.metric);
+
+ if (a.interface < b.interface)
+ return -1;
+ else if (a.interface > b.interface)
+ return 1;
+
+ return 0;
+ });
+
return rv;
}, this));
},