luci-app-attendedsysupgrade: enforce correct imagebuilder version
authorDaniel Nilsson <daniel.nilsson94@outlook.com>
Sun, 16 Jun 2024 15:56:52 +0000 (17:56 +0200)
committerPaul Spooren <mail@aparcar.org>
Sun, 16 Jun 2024 16:49:21 +0000 (18:49 +0200)
By passing the version_code parameter, we can error out if the imagebuilder that
responded to the request isn't the same, mirroring the current behavior of auc.

Signed-off-by: Daniel Nilsson <daniel.nilsson94@outlook.com>
applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js

index 0e6ae9d20cca100e8f9e8a6b7c2bfabb893d82cd..3d40f992fabc1305de22d66a279670be930ee48a 100644 (file)
@@ -476,6 +476,7 @@ return view.extend({
                                        request: {
                                                profile,
                                                version: candidates[0][0],
+                                               version_code: revision,
                                                packages: Object.keys(packages).sort(),
                                        },
                                };
@@ -536,6 +537,7 @@ return view.extend({
                                                                                                ...firmware,
                                                                                                packages: mapdata.request.packages,
                                                                                                version: mapdata.request.version,
+                                                                                               version_code: mapdata.request.version_code,
                                                                                                profile: mapdata.request.profile
                                                                                        };
                                                                                        this.pollFn = L.bind(function () {