Skip to content

luci-app-qosify: add Reload Rules and Check Devices - #9048

Open
choppyc79 wants to merge 1 commit into
openwrt:masterfrom
choppyc79:luci-app-qosify-reload-check
Open

choppyc79 wants to merge 1 commit into
openwrt:masterfrom
choppyc79:luci-app-qosify-reload-check

Conversation

@choppyc79

Copy link
Copy Markdown
Contributor

Pull request details

Description

Adds two qosify ubus calls the page did not expose:

  • Reload Rules (Overview, next to Reload): ubus call qosify reload.
    qosify_map_reload() re-reads the files in the defaults list and leaves
    the qdiscs, interface config and dynamic entries alone. Reload is a full
    config push via reload_service().
  • Check Devices (Advanced): ubus call qosify check_devices.
    qosify_iface_check() starts a section whose device now exists and stops
    one whose device has gone, without a restart. It returns before its 10 ms
    timer fires, so the page waits before refreshing.

Both are declared with reject: true, since an empty reply would otherwise
hide a failed call. Both methods are in qosify 1501e09 (24.10/25.12) and
master.

ACL: write group gains qosify reload and check_devices.

Maintainer

@choppyc79


Tested on

OpenWrt version: SNAPSHOT r36237-2ed2c210c3
LuCI version: 26.257.37274~f4eebd4
Web browser(s): Google Chrome


Checklist

  • (Nice to have) Includes what Issue it closes (e.g. openwrt/luci#issue-number).
  • (Nice to have) Includes what it depends on (e.g. openwrt/packages#pr-number in sister repo).

A rules edit only needs the mapping files re-read, but the only way to
get that from the page is Reload, the init script's reload_service(),
which pushes the whole config. Add Reload Rules next to it: ubus call
qosify reload runs qosify_map_reload(), which re-reads the files in the
defaults list and leaves the qdiscs, the interface config and the
dynamically added entries alone.

Add Check Devices to the Advanced tab: ubus call qosify check_devices
runs qosify_iface_check(), which starts a section whose device now
exists and stops one whose device has gone, so a device that appears
after qosify started is picked up without a restart rebuilding every
qdisc. The method arms a 10 ms uloop timer and returns before the pass
runs, so the page waits before refreshing the service state.

Both methods return an empty reply, so they are declared with
reject: true; without it a failed call would report success. Both are
in qosify 1501e09 (24.10, 25.12) and master. Grant them in the write
ACL group.

po/templates/qosify.pot regenerated with build/i18n-scan.pl.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BoEgybb68JiJnqmasx6Sfh
Signed-off-by: Ash Clarke <clarkeaj@hotmail.co.uk>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants