luci-base: revise array sorting
authorJo-Philipp Wich <jo@mein.io>
Wed, 27 Jul 2022 15:19:08 +0000 (17:19 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 27 Jul 2022 15:32:58 +0000 (17:32 +0200)
commit37422e891a47f15659356ce75b6f6cce831e0041
treed1e16dfb79a16f13d0fb368fac75fad7a0d27f16
parent8199b2ce9a7d36359aedea1ad9dab157134a46c2
luci-base: revise array sorting

Refactor various sort operations throughout luci-base to use the new
L.naturalCompare() comparator function.

This primarily ensures that embedded numbers are sorted numerically and
not in a lexicographical way.

It also simplifies some code as a side effect.

Ref: #5899
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/form.js
modules/luci-base/htdocs/luci-static/resources/network.js
modules/luci-base/htdocs/luci-static/resources/tools/widgets.js
modules/luci-base/htdocs/luci-static/resources/ui.js