Commit Graph

18670 Commits

Author SHA1 Message Date
Paul Donald
1b5a552a7a luci-base: load luci preferences early
Follow-up to 315dbfc749

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit cb085c73dd)
2026-02-04 01:50:49 +01:00
Paul Donald
5a27324104 luci-base: load luci preferences early
Follow-up to 315dbfc749

In order to look at any saved uci value, the luci config
must be loaded before we render the page, so we can determine
stored preferences, for things like table filter, without
encumbering all consumers of configurable elements to load
the luci uci configuration.

All (Table) elements extend CBIAbstractElement, so load
there.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 01c53bec37)
2026-02-03 20:36:40 +01:00
Carlo Szelinsky
a3ae785d33 luci-base: poe and PSE details & configuration
Adds PoE/PSE configuration support for modern linux (PSE-PD).
This change is based on the PSE-PD backport (from 6.17)
and netifd|ubus changes.

* Add getPSE() [receive all status information]
and hasPSE() [has the device PSE hardware?]

* Changes ACL permissions to query network.device status information

* Add two new PoE icons (PoE active with link up + link down) for
the port status page

* Changes port status to show PoE information, next to link information
and data transfer.

* Add a new tab for PoE/PSE to the device configuration,
which will only be displayed if the device supports PSE

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
(cherry picked from commit 8e493db75a)
2026-02-03 20:36:18 +01:00
Paul Donald
cba8b2e524 luci-proto-wireguard: fix i18n compile error
Message contains an embedded URL.
Better move it out of the translatable string

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit b8c049a1ed)
2026-02-03 06:59:41 +01:00
Paul Donald
bcb1ca4a9e luci-mod-system: refresh repokeys
Remove manual UI setup and implement JSONMap.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit eb4c153155)
2026-02-03 06:49:32 +01:00
Paul Donald
a393db3ac8 luci-mod-network: enable row filtering for interfaces overview
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 4f433cc918)
2026-02-03 06:49:32 +01:00
Paul Donald
94e9bd9ad5 luci-app-firewall: enable row filtering for firewall rules
This is an area users seem to have most trouble searching
(via the browser window search), and firewall tables
tend to be the largest tables. Enable search.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit d9036435d5)
2026-02-03 06:49:32 +01:00
Paul Donald
be36775e60 luci-mod-system: expose table filters via flag
Filters might not be everyone's aesthetics, so hide filters
by default and expose a global flag which can be set under
System -> System -> Language and Style. Only tables which
have .filterrow set to true will show filters.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit d2511f4bfe)
2026-02-03 06:49:32 +01:00
Paul Donald
e98c79c9b9 luci-base: enable table filtering via .filterrow
filter() is already available to pre-filter any data we
want to display in a table prior to render, although this
is primarily to filter on data types in a config file.

Now it is possible to display a header row (thead)
with text fields to search a table column. Set the table
property .filterrow to true to enable. It is null by default
so the filter header row is disabled. The filters work
cumulatively, so they can be used in combination.

Stabilize column widths so when nothing shows due to
filters, the filter header rows don't eat up all the table
width and jump around if action buttons are present at the
right end of data rows.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 315dbfc749)
2026-02-03 06:49:32 +01:00
Paul Donald
7b0d6ebf13 luci-base: refresh table generation
Tables are now structured with standard HTML tags:

table -> thead -> tr rows
table -> tbody -> tr rows
table -> tfoot -> tr rows

- wrap table header rows in a thead element
- wrap table body rows in a tbody element
- wrap footer rowss in a tfoot element

Footer row data can be provided by initializing any of the
form table types with .footer set to a string or function, or
overriding the renderFooterRows method.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 2da63d766a)
2026-02-03 06:49:32 +01:00
Paul Donald
451549a018 luci-base: actions title for actions buttons group
Customizable title.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit da19afa0bd)
2026-02-03 06:49:32 +01:00
Paul Donald
bf530b3b19 luci-base: restore titles class
follow-up to 720c96ce5b

While ::before CSS styling has been deactivated, and
'content' removed, cbi-value-first-field is a bit
ambiguous. So, restore cbi-section-table-titles, and
replace the ::before tags in CSS.

Remove also the data-title for title rows. We already
insert titles for named headers and rows via HTML and
not via CSS after the mentioned commit.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 94da6ead86)
2026-02-03 06:49:32 +01:00
Paul Donald
6bfda7c192 luci-base: render button for drag handle
follow-up to 4d04877e0f

divs look OK in all themes but for Openwrt2020, but button
looks fine everywhere (as it was before above commit).

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit e365958f7d)
2026-02-01 19:44:48 +01:00
Paul Donald
0a62819fe2 luci-base: do not coerce objects to strings
When getting values from the form, especially in a JSONMap,
some objects may be nested, and as such, it's not much use
to return '[object Object]'. Return the object instead, so
the caller can do something useful with it. This makes
multidimensional maps much easier to use.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 2682aecc7f)
2026-02-01 19:44:48 +01:00
Paul Donald
77f5c60546 luci-app-nut: fix value misspelling
monitor recognizes hostsync not hotsync

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 80f9b0d012)
2026-01-31 16:09:49 +01:00
Hannu Nyman
cc3c976621 treewide: backport translations
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2026-01-30 21:55:36 +02:00
Stan Grishin
81517f546a luci-app-adblock-fast: update to 1.2.1-r3
* bugfix: check if name passed to setInitAction of rpcd script matches the
  package name
* feature: add cron job support to WebUI (thanks @Aethersailor)
* add support for dnsmasq_sanity_check and dnsmasq_validity_check to UI

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 9277cc6faf)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-01-29 10:36:56 -08:00
Paul Donald
7a3f5e3015 luci-mod-system: make repokeys more future proof
Detect future release key names based on pattern.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit a8328056e4)
2026-01-29 19:17:46 +01:00
Paul Donald
140075ee51 luci-base: fix tab handling in modal dialogues
When adding tabs in modal dialogues, the old code of simply assigning
s.tabs = this.tabs was problematic because it was an array of objects
whose behaviour would cause a traceback when s.tab is called in e.g.
a protocol handler Modal when it was reopened.

Now verify the properties do not already exist before assigning them.

This means one can define s.tab(...) in a Modal UI without a try
block (which would even then sometimes fail).

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 9a07b1b79d)
2026-01-29 19:17:46 +01:00
Paul Donald
8574bb6f18 luci-app-splash: drop old Lua app
See https://github.com/openwrt/luci/issues/7310

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit fd8c8a4fe3)
2026-01-29 06:09:11 +01:00
Paul Donald
5ece50479a luci-base: fix click and drag handling
Previously when a table has the sortable property true, the
whole row was draggable but without any useful effect on desktop
or mobile. Only commencing the drag from the drag button worked
as intended. This interfered with text selections or other actions
in the table row.

Now the drag and touch events are bound to the drag button only.
The result is the same but the row contents are now selectable.

This change works on both desktop and touch only devices like
mobile.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 4d04877e0f)
2026-01-29 06:05:44 +01:00
Dirk Brenken
996a73ba9a luci-app-adblock: sync with adblock 4.5.0-4
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 30341aeba9)
2026-01-28 20:17:26 +01:00
Paul Donald
e4209fc268 luci-app-attendedsysupgrade: spell fix
Closes https://github.com/openwrt/luci/pull/8259

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit a52d779164)
2026-01-24 15:31:40 +01:00
Dirk Brenken
c592cc2452 luci-app-adblock: sync with adblock 4.5.0-2
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit e3478e4ebb)
2026-01-24 14:43:08 +01:00
Brian White
5221e21662 luci-theme-material: fix unreadable text
Fix low-contrast text in dark mode that caused
labels to be hard to read.

Signed-off-by: Brian White <brianwhitedev1996@gmail.com>
(cherry picked from commit ef8ef56430)
2026-01-24 08:38:01 +01:00
Paul Donald
e67cfe8971 luci-base: add validator array support
While it's possible to stack validation using .datatype semantics,
e.g. o.datatype = 'and(foo,bar)' and those execute serially, they
depend on the internal validation factory and the built-ins there.

Now, one can define multiple functions in the calling code (passed
in an array) which execute serially. All validation functions
shall return true to succeed.

e.g.

```js
function foo(sid, val) {
 return val.includes('foo');
}

function bar(sid, val) {
 return val.includes('bar');
}

o = s.option(form.Value, 'foobar', _('foobar'));
o.default = 'foobar';
o.validate = [foo, bar];
```

This helps make validation less complex when special data-types
with high cardinality are in play. Previously, reuse of the this
context when calling sub functions was also lost.

The validate property passed to the new ui widget in form.js

```js
new ui.XX(..., { ... validate: this.getValidator(section_id), ...});
```

takes this.getValidator, which either binds a single validation
function or calls all of the validators, if the form element's
this.validate was an [array]. The result and effect are the same.

If a ui element is manually instantiated (when it's not being
called via form.js and this.getValidator might be unavailable),
passing an array to options.validate works identically:

```js
function foo(val) {
 return val.includes('foo');
}

function bar(val) {
 return val.includes('bar');
}

new ui.XX(..., { ... validate: [foo, bar], ...});
```

And the validation factory calls them serially.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit ed4a3fa933)
2026-01-23 22:49:20 +01:00
Paul Donald
8ddef1a791 luci-base: add IPv6 LL and ULA validation
Also fix a bug in apply that assigned undefined to a value if
this.apply was used multiple times in the same caller.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 04b289c16d)
2026-01-23 22:49:20 +01:00
NaOH Lin
b1dfd1d899 luci-app-attendedsysupgrade: fix syntax error
Add the missing semicolon at the end of line 5.
Fix the syntax error popup on the LuCI homepage.
Related to 11_upgrades.js.

Fixes: f746a52979

Signed-off-by: NaOH Lin <c2h5ohf@gmail.com>
(cherry picked from commit 20fd3ca00f)
2026-01-23 22:49:04 +01:00
Norman Gehrsitz
987137f4fd luci-app-acme: support --cert-profile option
This makes the new --cert-profile option from https://github.com/openwrt/packages/pull/28237 available in Luci.

Signed-off-by: Norman Gehrsitz <git@gehrsitz.eu>
(cherry picked from commit 18d41ebb18)
2026-01-23 22:48:53 +01:00
Paul Donald
1509d5c1c5 luci-app-ocserv: convert to JS
See: https://github.com/openwrt/luci/issues/7310

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 17645e6dd8)
2026-01-23 22:46:12 +01:00
Paul Donald
01801c0a78 luci-base: dispatcher; improve wildcard routing
When a menu JSON describes an endpoint like

 "admin/app/edit/*" : { ...

and the user navigates to

 admin/app/edit/

instead of the URI which supplies an ID to edit, like

 admin/app/edit/myfoobarthing

we now can use 'alias' and 'rewrite' to redirect
transparently for more generic endpoints.
Without this, it's possible to navigate to

 admin/app/edit/

and the corresponding view does not receive a suitable
path/ID to derive data from, when views use anything
derived via L.env.requestpath.

This menu JSON

  "admin/app/entry/*": {
    "action": {
      "type": "view",
      "path": "app/entry"
    }
  },

  "admin/app/entries": {
    "title": "entries",
    "order": 5,
    "action": {
      "type": "view",
      "path": "app/entries"
    }
  },

  "admin/app/entry": {
    "action": {
      "type": "alias",
      "path": "admin/app/entries"
    }
  },

Produces JSON with a wildcardaction element

  "entry":
  {
    "satisfied": true,
    "wildcard": true,
    "action":
    {
      "type": "alias",
      "path": "admin/app/entries"
    },
    "wildcardaction":
    {
      "type": "view",
      "path": "app/entry"
    }
  },
  "entries":
  {
    "satisfied": true,
    "action":
    {
      "type": "view",
      "path": "app/entries"
    },
    "order": 5,
    "title": "entries"
  },

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit df90c60a72)
2026-01-23 04:34:38 +01:00
Paul Donald
d4e45b4084 luci-base: amend rpc to handle objects in param
This allows more complex and nested call constructions. Example:

const container_create = rpc.declare({
	object: 'frob',
	method: 'glob',
	params: { foo: { }, bar: { } },
});

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit fddc70391f)
2026-01-23 04:34:38 +01:00
Eric Fahlgren
78cb406864 luci-mod-status: clean up presentation of dhcp section
When no dhcp services are available, return null rather than an
empty container, thus suppressing display of the section altogether.

Add a title to the outer container so that the hide/show button
has something to control.

When both v4 and v6 tables are empty, display a message indicating
this rather than showing nothing below the title.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
(cherry picked from commit 05f90a2044)
2026-01-23 04:24:50 +01:00
LASER-Yi
5e524e8e0f luci-base: fix JSDoc errors in form.Flag and form.Button
Fix incorrect @lends, @name, @class, and @classdesc annotations to match the actual
public API (LuCI.form.Flag and LuCI.form.Button).

Signed-off-by: LASER-Yi <liangyi0007@gmail.com>
(cherry picked from commit d52b59cbf0)
2026-01-23 04:24:50 +01:00
Eric Fahlgren
4a7c587a2c luci-app-attendedsysupgrade: rework check-for-new-firmware
Do a complete overhaul of the firmware check:

When the Status -> Overview page is loaded, we check if the
configuration is set.  If not, we ask the user to choose between
enabled or disabled.  Once this is done, it never appears again
(much like the "set password" logic in the shell).

As a result, there is no longer a persistent section on the Overview
page with a simple toggle eating real estate and playing havoc with
the Hide/Show button scheme.

When the setting is enabled, then every time Status -> Overview
is loaded, we do the firmware check and display an alert notice
as before.  But, the alert notice now contains a button to disable
the alerts, so navigation is still simple, you don't have to dig
around to figure out how to turn it off.

The logic for version comparisons was cleaned up and simplified.

Fixes: #7925
Fixes: #8226
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
(cherry picked from commit 2aa6aba3bc)
2026-01-23 04:24:50 +01:00
Tokisaki Galaxy
28d3454703 luci-app-tailscale-community: add new application
This commit adds a new LuCI application for managing Tailscale on OpenWrt.

The application provides a web interface to view service status,
list network peers, and configure various Tailscale settings,
such as exit nodes, advertised routes, and daemon options.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Signed-off-by: Tokisaki Galaxy <moebest@outlook.jp>
(cherry picked from commit 471ac6b59c)
2026-01-23 04:24:01 +01:00
Konstantin Glukhov
11a338bb01 luci-mod-status: resolve service names for ports
- Parse and map ports to corresponding service names.
- Display service names when DNS lookups are enabled.

Rationale:

Enhance endpoint readability by showing service names where available,
improving clarity of source/destination information.

Signed-off-by: Konstantin Glukhov <KGlukhov@Hotmail.com>
(cherry picked from commit 62fd5284f6)
2026-01-23 04:24:01 +01:00
Ramon Van Gorkom
b96b91fe23 luci-base: make some tables better searchable
This changes the "name" in specific tables from being painted to
being rendered. This allows the use of "ctrl-f" in browsers to e.g.
search for firewall rule names.

Closes https://github.com/openwrt/luci/issues/7708
Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
Link: https://github.com/openwrt/luci/pull/8191
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 720c96ce5b)
2026-01-23 04:10:49 +01:00
Eric Fahlgren
766b3b0ba8 luci-theme-openwrt-2020: add missing selector
The .label.notice selector is defined in the bootstrap theme, and
used in luci-base, but is not present in the openwrt2020 theme.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
(cherry picked from commit d074b87514)
2026-01-21 23:16:01 +01:00
Paul Donald
5a9a5a6dfe luci-theme: fix theme header title
dispatched.title is sometimes null, especially where menu JSON
does not declare a title for a page.

Also, while we're here, wrap these in i18n tags, since the
JSON titles are often translated (they're included in po matter).

Closes #8222

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 9fe1334fd5)
2026-01-21 22:39:48 +01:00
Eric Fahlgren
3fdd24d09a luci-mod-status: improve hide/show button placement and size
Align the hide/show buttons with the header of the section that
they control.  Make the buttons as tall as the header line, very
much improving accessibility on mobile.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
(cherry picked from commit d43fee9733)
2026-01-21 22:39:48 +01:00
Stan Grishin
4be7835900 Merge pull request #8242 from stangri/openwrt-25.12-luci-app-advanced-reboot
[25.12] luci-app-advanced-reboot: bugfix: actual partition switch
2026-01-21 13:26:51 -08:00
Stan Grishin
669c7ad8aa luci-app-advanced-reboot: bugfix: actual partition switch
At some point after r7, when I no longer had the dual boot device readily
available for testing, a regression was introduced that the RPCD script
would not actually perform the partition switch.
Thanks to @bd0426 for report and @Jackie264 for fixing the issue.

advanced-reboot.js
* simplify partition number validation in handleAlternativeReboot
* reformat text copy

RPCD script
* obtain OpenWrt version from "$OPENWRT_RELEASE" not "$PRETTY_NAME" for
  the snapshot compatibility
* refactor parameter processing for boot_partition function
* add logging/better output on error in boot_partition

test.sh
* introduce a test file for heartbeat check of the RPCD script

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 6b271164d8)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-01-21 18:32:49 +00:00
Stan Grishin
e48f2ced4f Merge pull request #8237 from stangri/openwrt-25.12-luci-app-https-dns-proxy
[25.12] luci-app-https-dns-proxy: update to 2025.12.29-3
2026-01-21 10:31:43 -08:00
Stan Grishin
5d21579299 luci-app-https-dns-proxy: update to 2025.12.29-3
status.js:
* update the donate anchor
* replace RPCD call with direct ubus pull of service info for faster
  operation

Overview page include javascript file:
* replace RPCD call with ubus pull

RPCD script:
* remove obsolete getRuntime method
* bugfix: prevent execution of arbitrary code (thanks @iwallplace)

ACL file:
* remove obsolete getRuntime access and add access to service list

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 721ec94145)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
2026-01-21 02:32:13 +00:00
Daniel F. Dickinson
8d9defc6a2 luci-app-radicale3: fix bcrypt/libpass detection
Update call to `rpc-sys packagelist` to list all packages, not just
top-level packages, so that we can actually check if python3-libpass
and python3-bcrypt are installed.

Without this bcrypt authentication will not be made available to the
user.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
(cherry picked from commit aca7cc1756)
2026-01-20 15:28:14 +01:00
Dirk Brenken
e5179ccf4d luci-app-adblock: sync with adblock 4.5.0-1
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit b72dad0a00)
2026-01-19 18:39:44 +01:00
Daniel F. Dickinson
1ba60ed890 luci-app-radicale3: use ip6 bracket notation
Update iphostport validation to use bracket notation for ipv6 IP
addresses. Radicale understands it, and it is the preferred notation
when using an IP address and port, together.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
(cherry picked from commit 637c075193)
2026-01-19 16:08:37 +01:00
Paul Donald
fbeef69a5a luci-base: fix null error
When working with JSONMap backed data sources in tables, sort
triggers a null error because this.state is not available.
Prevent the null error if it is unavailable.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit b5cb136860)
2026-01-18 18:36:36 +01:00
Paul Donald
cc594d0656 luci-base: document delbtntitle clonebtntitle
We also implement delbtntitle functionality for various *Table
types. This means one can implement a table and rename its
Delete button like so:

s.delbtntitle = _('Kill it with fire!');

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit f894913007)
2026-01-18 18:36:36 +01:00