luci-app-attendedsysupgrade: make image selection consistent across all EFI targets
authorEric Fahlgren <ericfahlgren@gmail.com>
Sun, 17 Nov 2024 16:33:56 +0000 (08:33 -0800)
committerPaul Donald <newtwen+github@gmail.com>
Sun, 15 Dec 2024 18:13:09 +0000 (19:13 +0100)
Image selection for armsr and loongarch is currently broken, as
they are not recognized as a "combined" image target.  Add a list
of the appropriate targets to make maintenance easy.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js

index 08856611d8e969c49c6c83c682d76b6c5e7a4936..83161215da95bd48ed5fe16eb11f6f9bc7c1e9fb 100644 (file)
@@ -83,8 +83,9 @@ return view.extend({
                        return (e.filesystem == firmware.filesystem);
                }
                var typeFilter = function(e) {
-                       if (firmware.target.indexOf("x86") != -1) {
-                               // x86 images can be combined-efi (EFI) or combined (BIOS)
+                       let efi_targets = ['armsr', 'loongarch', 'x86'];
+                       let efi_capable = efi_targets.some((tgt) => firmware.target.startsWith(tgt));
+                       if (efi_capable) {
                                if (data.efi) {
                                        return (e.type == 'combined-efi');
                                } else {