summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-attendedsysupgrade/htdocs/luci-static
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2021-04-29 22:53:09 +0200
committerPaul Spooren <mail@aparcar.org>2021-04-29 10:56:23 -1000
commit9184721fab65934fe016c132a8f11a2308742f92 (patch)
tree2f438f5ca38c68de241677d596b6abfe783707fe /applications/luci-app-attendedsysupgrade/htdocs/luci-static
parentd555639cbb2e1f595c3ffed1c653dcf3a57039fa (diff)
luci-app-attendedsysupgrade: hide branch update
Branch updates (e.g. 19.07 to 21.02) are risky and shouldn't be suggested by default. Hide those unless the advanced mode is enabled. Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'applications/luci-app-attendedsysupgrade/htdocs/luci-static')
-rw-r--r--applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js
index cbb0b9a778..c5d21c2f3a 100644
--- a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js
+++ b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js
@@ -217,6 +217,7 @@ function request_sysupgrade(server_url, data) {
function check_sysupgrade(server_url, current_version, target, board_name, packages) {
displayStatus("notice spinning", E('p', _('Searching for an available sysupgrade')));
var current_branch = current_version.split(".").slice(0, 2).join(".");
+ var advanced_mode = uci.get_first('attendedsysupgrade', 'client', 'advanced_mode') || 0;
var candidates = [];
fetch(server_url + "/api/latest")
.then(response => response.json())
@@ -232,10 +233,10 @@ function check_sysupgrade(server_url, current_version, target, board_name, packa
break;
}
- // warn user that a new major release would be installed
- //if (current_branch != branch) {
- // branch["warn_branch_jump"] = true;
- //}
+ // skip branch upgrades outside the advanced mode
+ if (current_branch != branch && advanced_mode == 0) {
+ continue;
+ }
candidates.unshift(version);
@@ -247,7 +248,6 @@ function check_sysupgrade(server_url, current_version, target, board_name, packa
}
if (candidates) {
var m, s, o;
- var advanced_mode = uci.get_first('attendedsysupgrade', 'client', 'advanced_mode') || 0;
console.log(candidates);