Create three main tabs ("dnsmasq", "odhcpd", "Leases") in dhcp.js and
sort the previous tabs under these main tabs.
Signed-off-by: David Härdeman <david@hardeman.nu>
This makes it clearer which daemon each part belongs to. But more
importantly, it lays the ground for the next patch.
Signed-off-by: David Härdeman <david@hardeman.nu>
This makes it a bit clearer what is specific to leases and also
prepares for the following patches. No actual code changes.
Signed-off-by: David Härdeman <david@hardeman.nu>
This makes it a bit clearer what is specific to dnsmasq and also
prepares for the following patches. No actual code changes.
Signed-off-by: David Härdeman <david@hardeman.nu>
cbi_update_table() can already take a string suitable for
.querySelector() as its first argument. In addition, it will do the
right thing if the element isn't found, so this can be simplified a bit.
Signed-off-by: David Härdeman <david@hardeman.nu>
The single user isn't really enough to warrant this function, so remove
it to prepare for the following patches.
Signed-off-by: David Härdeman <david@hardeman.nu>
Each prerequisite inside a { } forms an and condition.
Each {} prerequisite forms an or condition.
The tab wasn't displayed because odhcpd was not installed. The condition set
required both. Now only require one or the other to display the DHCP tab.
Closes#8033
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
The rationale here is that tabbed CBIMaps were introduced in commit
082fd9ff10.
With tabbed maps, code could typically look like this:
m = new form.Map('foobar', _('FooBar'));
m.tabbed = true;
s = m.section(form.TypedSection, 'foo', _('foo Settings'));
The problem is that the title of "s" will be used as the name of the tab
rendered in "m", but also rendered as an <h3> right below the tab. IOW,
the same information will be presented twice, which looks weird.
Doing this instead...
m = new form.Map('foobar', _('FooBar'));
m.tabbed = true;
s = m.section(form.TypedSection, 'foo');
...means that the superfluous <h3> won't be rendered (since "s" has no
title), but the tab will then simply have the name of the section
("foo"), which can't be translated (bad).
After this change, the tabbed map can be written like this:
m = new form.Map('foobar', _('FooBar'));
m.tabbed = true;
s = m.section(form.TypedSection, 'foo', _('foo Settings'));
s.hidetitle = true;
Which will give the Map tab the name "foo Settings", but won't add a
title for the TypedSection right under the tab.
Signed-off-by: David Härdeman <david@hardeman.nu>
The current handling method introduces extraneous spaces into the translations.
For instance, 'System Log', which is correctly translated to Japanese as 'システムログ' (without extra spaces), is being displayed as 'システム ログ' under the current approach.
Other CJK/Southeast Asian languages are experiencing similar issues, including Chinese, Thai, and Lao.
Therefore, these elements should be translated together as a single unit, rather than separately.
Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
The same functionality is fulfilled by the "domain" property. Two fields which
have the same semantics and purpose. None of odhcpd, dnsmasq or odhcp6c use the
dns_search property.
See also:
https://github.com/openwrt/odhcpd/issues/206
The local device might anyway use the "search" entries from /etc/resolv.conf at
the lower layers, but IPv6 RA and DHCPv6 is controlled by the "domain" property,
which is distributed to clients.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
follow-up to 788e47034b
Some of the CSS changes have knock-on effects and change behaviour in
other display areas, especially when the CSS is minified.
Simplified to change between label flavours on hide/show status.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Remodeled the CBILogreadBox after the syslog viewer. Also
updated to use ubus log read, and drops the use of the logread binary
(logread is broken on snapshots). The JSON output from ubus is nice
enough to work with.
One potential drawback is that all log entries are sent to the browser
(as it always has been), and no on-device pre-filtering is available yet
except for line count.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Zone names are correct when they contain an underscore, especially when
the zone names are used as input to functions and libraries.
See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
e.g.
Africa/Addis_Ababa
Africa/Dar_es_Salaam
Pacific/Port_Moresby
This can be revised in future if some GUI aesthetic is required.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
And remove a confusing reference to dnsmasq at the top of each page, the
message is a bit of a non-sequitur and doesn't really add any useful
information.
Signed-off-by: David Härdeman <david@hardeman.nu>
Sort the options in the "files" tab so that they are all grouped together in
the order they appear in the UI and delete ones that are specific to DNS from
dhcp.js and vice versa.
Retitle the tab for the dhcp view from "Resolv & Hosts Files" to "Files".
Signed-off-by: David Härdeman <david@hardeman.nu>
Sort the options in the "logging" tab so that they are all grouped together in
the order they appear in the UI and delete ones that are specific to DNS from
dhcp.js and vice versa.
Note that this means that the "logfacility" option is present in both views,
since it controls the general logfacility of dnsmasq, both for DNS and DHCP.
We might consider adding a help text blurb explaining that, but I've
intentionally not changed any code in these patches.
Signed-off-by: David Härdeman <david@hardeman.nu>
Sort the options in the "limits" tab so that they are all grouped together in
the order they appear in the UI and delete ones that are specific to DNS from
dhcp.js and vice versa.
Only one option is relevant to the dhcp view, so move it to the "general" tab.
Signed-off-by: David Härdeman <david@hardeman.nu>