-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luci-app-firewall: fix zone log option #7648
Conversation
but how then to disable logging? |
@@ -293,11 +293,40 @@ return view.extend({ | |||
for (var i = 0; i < ctHelpers.length; i++) | |||
o.value(ctHelpers[i].name, E('<span><span class="hide-close">%s (%s)</span><span class="hide-open">%s</span></span>'.format(ctHelpers[i].description, ctHelpers[i].name.toUpperCase(), ctHelpers[i].name.toUpperCase()))); | |||
|
|||
o = s.taboption('advanced', form.Flag, 'log', _('Enable logging on this zone')); | |||
o = s.taboption('advanced', form.MultiValue, 'log', _('Enable logging for selected tables in this zone:'), _('Log matched packets on the selected tables to syslog.')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just a dropdown? Looks over complicated and difficult to maintain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean LuCI.ui.Dropdown?
I´d have to take a look at how to implement that, seems that needs something like form.MultiValue.extend
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MultiValue is a Dropdown, I think. (inherit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe shorten the UI heading to Enable logging
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the heading.
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/zones.js
Outdated
Show resolved
Hide resolved
Changes the zone log checkbox to a multivalue selection as the underlying uci option is a bitfield. Signed-off-by: Jan Froch <[email protected]>
0052dc5
to
1189fb4
Compare
Merged. Thanks @JFroch |
Signed-off-by: <[email protected]>
row (viagit commit --signoff
)<package name>: title
first line subject for packagesPKG_VERSION
in the MakefileThis PR changes the zone log checkbox to a multivalue selection.
From the documentation: