Skip to content

Commit

Permalink
luci-mod-network: Add UserClass tab.
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
  • Loading branch information
systemcrash committed Jun 27, 2024
1 parent 1dbecc1 commit d8d5547
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ return view.extend({
s.tab('mac', _('MAC'));
s.tab('matchtags', _('Match Tags'));
s.tab('vc', _('VC'));
s.tab('uc', _('UC'));

s.taboption('filteropts', form.Flag, 'domainneeded',
_('Domain required'),
Expand Down Expand Up @@ -1249,6 +1250,31 @@ return view.extend({
so.rmempty = false;
so.optional = true;

o = s.taboption('uc', form.SectionValue, '__uc__', form.TableSection, 'userclass', null,
_('Match User Class (UC) strings sent by DHCP clients as a trigger to set tags on them.') + '<br /><br />' +
_('Use the <em>Add</em> Button to add a new UC.'));
ss = o.subsection;
ss.addremove = true;
ss.anonymous = true;
ss.sortable = true;
ss.nodescriptions = true;
ss.modaltitle = _('Edit UC');
ss.rowcolors = true;

so = ss.option(form.Value, 'userclass', _('Match User Class...'));
so.rmempty = false;
so.optional = false;

so = ss.option(form.Value, 'networkid', _('...to set this Tag'));
so.rmempty = false;
so.optional = false;

so = ss.option(form.Flag, 'force',
_('Force'),
_('Send options to clients that did not request them.'));
so.rmempty = false;
so.optional = true;

o = s.taboption('leases', CBILeaseStatus, '__status__');

if (has_dhcpv6)
Expand Down

0 comments on commit d8d5547

Please sign in to comment.