From 2c7b18b0f6fc04eb4005a7b8cc9d5051b27b7100 Mon Sep 17 00:00:00 2001 From: Eric Fahlgren Date: Thu, 23 Jan 2025 15:15:23 -0800 Subject: [PATCH] luci-app-attendedsysupgrade: sort latest version array The Attended Sysupgrade app requires that the array of latest versions be in order from newest release to oldest. Ensure that this is true even when upstream presents them in arbitrary order. Signed-off-by: Eric Fahlgren --- .../luci-static/resources/view/attendedsysupgrade/overview.js | 3 +++ 1 file changed, 3 insertions(+) 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 b97416f2b7..32698b3d02 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 @@ -450,6 +450,9 @@ return view.extend({ } else { const latest = response.json().latest; + // ensure order: newest to oldest release + latest.sort().reverse(); + for (let remote_version of latest) { let remote_branch = get_branch(remote_version); -- 2.30.2