luci-base: network.js: sort interface statuses by metric, then name
Fixes: #4693 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
77d6b28935
commit
0ee422b4c0
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
return rv;
|
||||||
}, this));
|
}, this));
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue