Commit Graph

18393 Commits

Author SHA1 Message Date
a52db00cab luci-app-olsr: fix const reassignment to let
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-24 17:41:25 +02:00
d3cbf6e685 luci-base: widgets: fix const -> let variable which is later reassigned
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-24 17:41:25 +02:00
985d454eaf luci-mod-network: create separate tabs in dhcp.js
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>
2025-10-24 15:57:43 +02:00
dfb4e3233a luci-mod-network: split PXE into dnsmasq/odhcpd functions in dhcp.js
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>
2025-10-24 15:57:43 +02:00
000ba488d8 luci-mod-network: add a odhcpd tab to dhcp.js
Add a separate tab with the global odhcpd settings.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-24 15:57:43 +02:00
fef09faa72 luci-mod-network: move leases cfg to own function in dhcp.js
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>
2025-10-24 15:57:43 +02:00
2e8aebcbdb luci-mod-network: move dnsmasq cfg to own function in dhcp.js
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>
2025-10-24 15:57:43 +02:00
40642e453e luci-mod-network: reorder tabs in dhcp.js
This is just in preparation for the following patches.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-24 15:57:43 +02:00
57afc27d2d luci-mod-network: simplify cbi_update_table in dhcp.js
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>
2025-10-24 15:57:43 +02:00
495380a926 luci-mod-network: remove customi18n() from dhcp.js
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>
2025-10-24 15:57:43 +02:00
2ec14910dd luci-mod-network: remove firewall loading in dhcp.js
This is just a leftover from the dns/dhcp split. It isn't used in
dhcp.js.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-24 15:57:43 +02:00
7626b810be luci-mod-network: move var ipaddrs in dhcp.js
Move var ipaddrs down to the sole place where it is used.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-24 15:57:43 +02:00
7e1b545bfa luci-mod-network: change && to || for DHCP tab predicates
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>
2025-10-24 15:36:09 +02:00
545de2a4b5 luci-base: add ability to hide section titles
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>
2025-10-23 17:05:03 +02:00
1b8564ead6 luci-app-frpc: Add the bind_addr & bind_port options to the visitor role.
Fix: https://github.com/openwrt/luci/issues/8024

Signed-off-by: Roc Lai <laipeng668@qq.com>
2025-10-23 03:06:02 +02:00
0563adb234 luci-app: fix translation strings
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>
2025-10-23 00:16:35 +02:00
598b7cac5a luci-mod-network: remove unused dns_search property
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>
2025-10-22 22:30:13 +02:00
8c07e199e1 luci-app-travelmate: sync with update 2.2.1-3
Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-10-22 21:02:44 +02:00
3aefa56473 luci-mod-status: routes: prevent null error if the commands don't resolve
Closes #8026

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-22 01:22:04 +02:00
6e263428bd luci-mod-status: partial revert of styling changes
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>
2025-10-21 16:25:47 +02:00
2acb1ec14d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (45 of 45 strings)

Translation: OpenWrt/LuCI/applications/cloudflared
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationscloudflared/zh_Hans/

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (46 of 46 strings)

Translation: OpenWrt/LuCI/applications/xfrpc
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsxfrpc/zh_Hans/

Translated using Weblate (Persian)

Currently translated at 100.0% (50 of 50 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (50 of 50 strings)

Translated using Weblate (Portuguese)

Currently translated at 85.7% (24 of 28 strings)

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 100.0% (28 of 28 strings)

Translation: OpenWrt/LuCI/applications/udpxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsudpxy/zh_Hant/

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (60 of 60 strings)

Translation: OpenWrt/LuCI/applications/ttyd
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsttyd/zh_Hans/

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (171 of 171 strings)

Translation: OpenWrt/LuCI/applications/mwan3
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsmwan3/zh_Hans/

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (168 of 168 strings)

Translation: OpenWrt/LuCI/applications/aria2
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsaria2/zh_Hans/

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (197 of 197 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/zh_Hans/

Translated using Weblate (Polish)

Currently translated at 100.0% (284 of 284 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (40 of 40 strings)

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 100.0% (2588 of 2588 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/zh_Hant/

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (2639 of 2639 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/zh_Hans/

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (2639 of 2639 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/zh_Hans/

Translated using Weblate (Polish)

Currently translated at 100.0% (2639 of 2639 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/pl/

Translated using Weblate (Spanish)

Currently translated at 100.0% (2639 of 2639 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/es/

Translated using Weblate (Georgian)

Currently translated at 11.2% (296 of 2639 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ka/

Translated using Weblate (Georgian)

Currently translated at 68.6% (195 of 284 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (51 of 51 strings)

Translation: OpenWrt/LuCI/applications/acme
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsacme/it/

Translated using Weblate (Italian)

Currently translated at 100.0% (26 of 26 strings)

Translation: OpenWrt/LuCI/applications/dcwapd
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsdcwapd/it/

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 100.0% (2588 of 2588 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/zh_Hant/

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (2639 of 2639 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/zh_Hans/

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Co-authored-by: DragonBluep <yangshiji66@outlook.com>
Co-authored-by: Franco Castillo <castillofrancodamian@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: KING APPS <kiperking1@gmail.com>
Co-authored-by: Meano Lee <meanocat@gmail.com>
Co-authored-by: Piotr Kołtun <pkoltungm@gmail.com>
Co-authored-by: Random <random-r@users.noreply.hosted.weblate.org>
Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Co-authored-by: ZW <roc_fe@users.noreply.hosted.weblate.org>
Co-authored-by: nKsyn <e.nksyn@gmail.com>
Co-authored-by: ssantos <ssantos@web.de>
Signed-off-by: DragonBluep <yangshiji66@outlook.com>
Signed-off-by: Franco Castillo <castillofrancodamian@gmail.com>
Signed-off-by: Meano Lee <meanocat@gmail.com>
Signed-off-by: Piotr Kołtun <pkoltungm@gmail.com>
Signed-off-by: Random <random-r@users.noreply.hosted.weblate.org>
Signed-off-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Signed-off-by: ZW <roc_fe@users.noreply.hosted.weblate.org>
Signed-off-by: nKsyn <e.nksyn@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsfirewall/ka/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsfirewall/pl/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsnatmap/pt/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsp910nd/pt/
Translate-URL: https://hosted.weblate.org/projects/openwrt/lucimodulesluci-mod-dashboard/fa/
Translation: OpenWrt/LuCI/applications/firewall
Translation: OpenWrt/LuCI/applications/natmap
Translation: OpenWrt/LuCI/applications/p910nd
Translation: OpenWrt/LuCI/modules/luci-mod-dashboard
2025-10-21 17:16:28 +03:00
f83fe35dae modules: fix default values
fix default values for luci-base and luci-mod-{dashboard,status,system}

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-21 16:12:03 +02:00
2382578209 luci-app-acme: fix ACL JSON
follow-up fix for fd830434cb

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-21 13:03:38 +02:00
fd830434cb luci-app-*: migrate LogreadBox consumers to use new permission ACLs
"ubus": {
			"log": [ "read" ]
		}

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-20 21:11:11 +02:00
b59e51a831 luci-mod-status: update syslog viewer to use the remodeled CBILogreadBox
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-20 21:11:11 +02:00
0a6180d1cc luci-base: remodel the LogreadBox after the syslog viewer
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>
2025-10-20 21:11:10 +02:00
523b3ea372 luci-mod-*: initialize default values
follow-up to
e67465da5e
b0004ad39c
71ea35fc7f

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-20 21:10:54 +02:00
91a94ce360 luci-theme-bootstrap: add width for localtime
set an appropriate width for #localtime

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 20:40:46 +02:00
71ea35fc7f luci-mod-dashboard: use localized time
use localized time

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 20:40:46 +02:00
b0004ad39c luci-mod-system: use localized time
use localized time

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 20:40:46 +02:00
e67465da5e luci-mod-status: use localized time
use localized time

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 20:40:46 +02:00
edb481a1ac luci-mod-status: remove redundant spaces
remove redundant spaces in nftables.js.

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 14:52:28 +02:00
d9a087e48c luci-base: use zone names without spaces
See build: stop zoneinfo builder scripts changing '_' -> ' '
f36f014229

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-20 14:41:08 +02:00
f36f014229 build: stop zoneinfo builder scripts changing '_' -> ' '
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>
2025-10-20 14:38:28 +02:00
b47c94cabb luci-mod-system: fix JSMIN Error
jsmin cannot handle regular expressions in this format, so use RegExp() instead.

fixes: #8020

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 12:46:02 +02:00
2f000b5e15 luci-mod-network: add global DUID cfg option
This exposes the default DHCP DUID config option in the LuCI interface.

For reference:
https://github.com/openwrt/openwrt/pull/20359
https://github.com/openwrt/odhcpd/pull/274

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-19 23:31:19 +02:00
f67c6769ed luci-app-travelmate: sync with update 2.2.1-2
Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-10-19 20:23:36 +02:00
8640ed2b6b luci-mod-network: remove unused permissions from dns
Now that all options have been organized per view, remove unused acl
permissions from dns.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
88f86a3fba luci-mod-network: remove unused code from dhcp/dns
Now that all options have been organized per view, remove unused code from
both.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
e1cdccbccd luci-mod-network: retitle dhcp/dns views
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>
2025-10-18 23:51:38 +02:00
09eac9485c luci-mod-network: organize "pxe_tftp" tab in dhcp/dns views
Delete the tab from dns.js, sort the options that belong to it in dhcp.js.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
87329d12e2 luci-mod-network: organize "relay" tab in dhcp/dns views
Delete the tab from dns.js, sort the options that belong to it in dhcp.js.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
aa5e89ab5a luci-mod-network: organize "ipsets" tab in dhcp/dns views
Delete the tab from dhcp.js, sort the options that belong to it in dns.js.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
dac2f40115 luci-mod-network: organize "leases" tab in dhcp/dns views
Delete the tab from dns.js, sort the options that belong to it in dhcp.js.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
c901bbcdd0 luci-mod-network: organize "files" tab in dhcp/dns views
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>
2025-10-18 23:51:38 +02:00
744a0b3758 luci-mod-network: organize "logging" tab in dhcp/dns views
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>
2025-10-18 23:51:38 +02:00
8a502e1755 luci-mod-network: organize "limits" tab in dhcp/dns views
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>
2025-10-18 23:51:38 +02:00
15dfb9f089 luci-mod-network: organize "forward" tab in dhcp/dns views
Delete the tab from dhcp.js, sort the options that belong to it in dns.js.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
f56371878c luci-mod-network: organize "filteropts" tab in dhcp/dns views
Delete the tab from dhcp.js, sort the options that belong to it in dns.js.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
45eac368f0 luci-mod-network: organize "dnssec" tab in dhcp/dns views
Delete the tab from dhcp.js, sort the options that belong to it in dns.js.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00