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 4c88296eb3..e9c009a9f2 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 @@ -340,6 +340,11 @@ return view.extend({ } } + // allow to re-install running firmware in advanced mode + if (this.data.advanced_mode == 1) { + candidates.unshift([version, revision]) + } + if (candidates.length) { var m, s, o; @@ -356,7 +361,12 @@ return view.extend({ s = map.section(form.NamedSection, 'request', '', '', 'Use defaults for the safest update'); o = s.option(form.ListValue, 'version', 'Select firmware version'); for (let candidate of candidates) { - o.value(candidate[0], candidate[1] ? `${candidate[0]} - ${candidate[1]}` : candidate[0]); + if (candidate[0] == version && candidate[1] == revision) { + o.value(candidate[0], _('[installed] %s') + .format(candidate[1] ? `${candidate[0]} - ${candidate[1]}` : candidate[0])); + } else { + o.value(candidate[0], candidate[1] ? `${candidate[0]} - ${candidate[1]}` : candidate[0]); + } } if (this.data.advanced_mode == 1) {