projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
luci-base: network.js: sort interface statuses by metric, then name
[project/luci.git]
/
modules
/
luci-base
/
htdocs
/
luci-static
/
resources
/
network.js
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));
},