luci-app-attendedsysupgrade: fix branch detection
authorPaul Spooren <mail@aparcar.org>
Wed, 5 May 2021 16:09:08 +0000 (18:09 +0200)
committerPaul Spooren <mail@aparcar.org>
Fri, 7 May 2021 13:45:32 +0000 (03:45 -1000)
commit56c323505b3a705eab638c68db6f0780f2724790
treefe06ae32fca07e12b2fe3cc83135f99cc1551aeb
parent29d3ed290cb6548c8de8f9a8a4eb3169e7bf6f58
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 <mail@aparcar.org>
(cherry picked from commit 85e9ee31239c4e912613005f4c222f13c34e9a36)
applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js