New firmware available status message

hello - using the snapshot builds, i see an option on the luci status page to check for new firmware when the status page opens. i'm curious about the logic for firmware checking, and found this message confusing: why is it offering 23.05, when i'm on snapshot, and when 24.10 also exists?

It does say oldstable....

yup, it does say 'oldstable', but of course there are lots of old stable releases, including 24.10.0, and I would think that 'new stable' would be 24.10.1 Is this feature documented anywhere? i'm thinking this is still in development....
why not just have a 'check for update' button? The check box does not seem to be protected or hideable, and in its current rendition, checking or unchecking it displayes the UCI code for changing behavior. this seems indirect. plus do you really want all that traffic to the upgrade website every time someome looks at their router status?

Yes, I concur, this behavior is incorrect. Glancing at it quickly without my brain in gear, I suspect the compareVersions function isn't dealing with "SNAPSHOT" properly.

All that oldstable, stable and upcoming stuff is coming from https://downloads.openwrt.org/.versions.json

Do you like to play with javascript, or should I dig into it?

@efahl - thanks for locating the code. i'd just be hacking away and making things worse, so I defer to you

1 Like

IMO, SNAPSHOT builds should always be considered as the "latest" builds, and therefore, the 11_upgrades.js file shouldn't even try to check for later versions IMHO...

(unless we are to account for the upcoming_version field of .versions.json :thinking:)

This should be an easy fix...
I'll send a PR soon

1 Like

@ghoffman Could you please try the 11_upgrades.js from this link -

Just copy paste the contents of that file to /www/luci-static/resources/view/status/include/11_upgrades.js, replacing the existing file.

Or, follow these instructions -

cd /www/luci-static/resources/view/status/include
cp 11_upgrades.js 11_upgrades.js.bak
wget https://raw.githubusercontent.com/subnut/openwrt-luci/refs/heads/fix-11_upgrades.js/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/status/include/11_upgrades.js

The expected behaviour is this —

  • "Look online for upgrades upon status page load" checkbox is no longer shown
  • "New Firmware Available" popup is no longer shown

@ghoffman Lemme know the results!

After you are done checking, you can simply revert my changes by running these commands -

cd /www/luci-static/resources/view/status/include
mv 11_upgrades.js.bak 11_upgrades.js

Cheers!


EDIT: Please note that the code I linked above doesn't consider the value of the upcoming_version field of .versions.json, as I haven't been able to find any documentation regarding the .versions.json file. If anybody knows what the upcoming_version field is supposed to contain, lemme know! Some documentation would be nice too :sweat_smile:

It contains the RC versions as they are published. It will next hold (making the tag up) 25.10.0-rc1 as soon as that's released, then 25.10.0-rc2 and so on, then upcoming_version will go back to being an empty string whenever 25.10.0 is released.

1 Like

unfortunately, no go. before I clear by browsewr cache, the same check box and popup load.
if i use an incognitor window, i get the screen below. i've check that your modded 11_upgrades.js survives a reboot, so i dont think it's a luci caching issue.

Beyond the functional notes correctly shared here, as I’ve noted in the relevant commit it doesn’t make sense to have the checkbox for this option (when unchecked) just float by itself as the only option on the status page. It’s extremely out of place.

The checkbox should be a part of the ASU settings page (which it is not), with its resultant functionality showing on the main status page (as it does).

2 Likes

@ghoffman I'm sorry. My JS has gotten a bit rusty, and I ended up making a silly mistake :sweat_smile:.
I have updated the code, and it should be fixed now.

Please try again and let me know!


EDIT: @Edrikk I agree. But, I am not skilled enough in JS to implement said changes myself...

2 Likes

i disliked the check box so much that i uninstalled luci-app-attendedsysupgrade. i appreciate your endorsement of the illogic of its design.

@subnut -
the new code takes the checkbox off the opening status page. it's as if the function is not there, and there is no option to re-enable it or a button to click to check.
even if i enable the function with

 uci set luci.main.check_for_newer_firmwares='1'

the banner and checkbox are gone from the main status page and from the attended sysupgrade page.
i'm not sure this was the intended effect.