Repository navigation
luci-mod-system: fix LED configuration form - #9104
Merged
Merged
Conversation
innovara
force-pushed
the
led-trigger-default
branch
from
October 5, 2026 14:41
025a275 to
3d64e7a
Compare
openwrt-ai
reviewed
Oct 5, 2026
innovara
force-pushed
the
led-trigger-default
branch
from
October 14, 2026 12:23
3d64e7a to
e565921
Compare
openwrt-ai
reviewed
Oct 15, 2026
Contributor
|
innovara
force-pushed
the
led-trigger-default
branch
from
November 13, 2026 15:36
e565921 to
b8270de
Compare
Contributor
Author
|
@systemcrash the second commit here moves the Interval option you added in 17a2969 into the If you have a moment, a review of the other two commits would be much appreciated too. @abajk has already tested the whole PR. |
The LED init script falls back to the "none" trigger when a LED has no trigger option, but LuCI did not apply the same default. As a result, the edit dialog of such a LED showed whichever trigger was listed first, hid the options of the "none" trigger and, when saved, stored that trigger, changing how the LED behaves. The trigger description was not shown either, even after switching triggers. LEDs set up with ucidef_set_led_default() or ucidef_set_led_brightness() are current examples, as neither sets a trigger. Default the trigger to "none" to match the init script. Assisted-by: LLM Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
The LED init script only applies the interval option for the netdev trigger, but it was shown for every LED, both in the overview table and in the edit dialog. Move it to the netdev trigger as a modal-only option depending on trigger=netdev, like the other trigger-specific options. Assisted-by: LLM Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
With the "none" trigger, the LED init script sets the LED on or off according to its default option, but LuCI labelled it "Always off" and described it as always in default state off, which contradicts a ticked "Default state" checkbox. Label it "Static" and describe it as staying in the configured default state, on or off. Assisted-by: LLM Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
innovara
force-pushed
the
led-trigger-default
branch
from
November 13, 2026 16:53
b8270de to
1b129ce
Compare
Contributor
|
Thanks @innovara ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Three fixes to the LED configuration form, one commit each. #9105 and #9106 have been folded into this PR as suggested there.
1. Default LED trigger to none
The LED init script falls back to the
nonetrigger when a LED has notriggeroption, but LuCI did not apply the same default.As a result, the edit dialog of such a LED showed whichever trigger was listed first (e.g. Always on (kernel: default-on)), hid the options of the
nonetrigger and, when saved, stored that trigger, changing how the LED behaves. The trigger description was not shown either, even after switching triggers.LEDs set up with
ucidef_set_led_default()orucidef_set_led_brightness()are current examples, as neither sets a trigger. For instance, stock/etc/config/systemon a Linksys MX4200v2:Default the trigger to
noneto match the init script.Before:
After:
2. Only show LED interval for netdev trigger
The LED init script only applies the
intervaloption for thenetdevtrigger, but it was shown for every LED, both in the overview table and in the edit dialog.Move it to the
netdevtrigger as a modal-only option depending ontrigger=netdev, like the other trigger-specific options.Before:
After:
@systemcrash this moves the Interval option you added in 17a2969 into the
netdevtrigger, as the init script only applies it there. If showing it for every trigger was intentional, let me know.3. Describe none LED trigger as static
With the
nonetrigger, the LED init script sets the LED on or off according to itsdefaultoption, but LuCI labelled it Always off and described it as The LED is always in default state off., which contradicts a ticked Default state checkbox.Label it Static and describe it as The LED stays in the configured default state, on or off.
Before:
After: