luci-app-attendedsysupgrade: fix branch detection
authorPaul Spooren <[email protected]>
Wed, 5 May 2021 16:09:08 +0000 (18:09 +0200)
committerPaul Spooren <[email protected]>
Wed, 5 May 2021 16:14:32 +0000 (06:14 -1000)
commit85e9ee31239c4e912613005f4c222f13c34e9a36
treecd74aab4edb1a972bab23b254c3d07973b158270
parentc1c92b5506c1a1b97bbd6bc285b106c205e96e40
luci-app-attendedsysupgrade: fix branch detection

The running branch determines which upgrades are suggested. A jump to a
newer branch (e.g. 19.07.8 to 21.02.1) is only suggested if the advanced
mode is enable, since it may break the router.

OpenWrt versions end in either `-SNAPSHOT`, `.X-rcY` or `.x`. All these
suffixes are removed, resulting in the branch name.

Previously the `-SNAPSHOT` suffix wasn't removed resulting in wrong
branch names.

Also clean up some log spam.

Signed-off-by: Paul Spooren <[email protected]>
applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js