Commit graph

27 commits

Author SHA1 Message Date
Evan Benn
22101eb50a luci-base: Make uci mode strings match iwinfo mode strings
uci mesh was being displayed as 'Mesh', while iwinfo mesh was being
reported as 'Mesh Point'. Unify those. Update getActiveModeI18n to deal
with all the values iwinfo returns. Fix the incorrect 'Mash'
translation.

Signed-off-by: Evan Benn <evan.benn@morsemicro.com>
2023-12-15 09:11:10 +11:00
Jo-Philipp Wich
673f38246a treewide: separate Lua runtime resources
Move classes required for Lua runtime support into a new `luci-lua-runtime`
package. Also replace the `luci.http` and `luci.util` classes in
`luci-lib-base` with stubbed versions interacting with the ucode based
runtime environment.

Finally merge `luci-base-ucode` into the remainders of `luci-base`.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:37 +02:00
Florian Eckert
a70c5705e4 luci-compat: fix common cbi-page-actions position
With legacy applications, the common page actions "Save and Apply" are
not displayed correctly, so that they are not aligned on the right as
with javascript applications. To fix the alignment, the control-group
css class is removed.

This was determined with the application 'luci-app-nft-qos'
with the theme 'luci-theme-bootstrap'.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-08-03 09:08:58 +02:00
Jo-Philipp Wich
03bb0e2493 luci-compat: fix evaluating or() and and() datatype expressions
Fixes: #5705
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-03-10 13:31:11 +01:00
Helge Mader
58447640eb luci-base: prevent empty field for adding new entry
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-08-11 08:48:41 +02:00
Jo-Philipp Wich
2155868175 luci-compat: update markup for CBI TableSections
Update legacy CBI markup to use actual table, tr, th and td elements
instead of using div element corresponding table classes.

Fixes compatibility with OpenWrt 2020 theme.

Ref: https://github.com/openwrt/luci/issues/4972
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-04-09 14:29:12 +02:00
Giovanni Giacobbi
af422b1924 treewide: removed trailing whitespaces and extra newlines in 'modules'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
2021-01-20 17:48:16 +02:00
Mirko Vogt
555faf6f7c luci-compat: Fix typo in wildcard which is supposed to grant all perms.
Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
2020-12-06 14:41:59 +01:00
Oldřich Jedlička
4775d1ad22 luci-compat: Replace legend element with h3.
The legend HTML element is allowed only as first element in fieldset, so
use h3 instead, which is rendered the same within themes.

Fixed #3149.

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2020-10-24 19:19:03 +02:00
Florian Eckert
133a1ae3f4 luci-compat: add btn class to all button inputs
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-20 16:23:46 +02:00
Jo-Philipp Wich
102124115d luci-base: move old cbi icons to luci-compat
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-07 19:40:29 +02:00
Jo-Philipp Wich
fd24221d9e luci-compat: apply permission constraints from dispatcher
Since template scopes aren't shared we cannot pass the writable state from
the map templates to the page footer.

Fixes: #3937
Fixes: ffd627f2a ("luci-compat: disable legacy cbi forms on insufficient ACLs")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-20 09:44:14 +02:00
Jo-Philipp Wich
ffd627f2a1 luci-compat: disable legacy cbi forms on insufficient ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-19 17:17:26 +02:00
Jo-Philipp Wich
06fea062b7 luci-compat: add wildcard ACL allowing access to all uci configurations
Ref: https://github.com/openwrt/luci/issues/3917
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-15 14:58:54 +02:00
Jo-Philipp Wich
04b62708f5 luci-compat: footer.htm: tweak CSS classes
- Use .btn CSS class for page action buttons
 - Use .control-group class for page action div

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-23 21:41:22 +01:00
Jo-Philipp Wich
878d662282 luci-compat: upload.htm: expose root_directory and initial_directory
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-20 19:40:46 +01:00
Jo-Philipp Wich
09b2d8a8ac luci-base: move tools.webadmin to luci-compat
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-30 10:37:48 +01:00
Hannu Nyman
06e6552c8a
Merge pull request #3434 from tano-systems/luci-base-network-fix
luci-compat: network.lua: fix typo
2019-12-27 12:13:15 +02:00
Anton Kikin
07925b253a luci-compat: network.lua: fix typo
Fixes: 72247ee09

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-12-27 02:32:15 +03:00
Jo-Philipp Wich
8362ab8d28
Merge pull request #1951 from tano-systems/luci-base-network-fix
luci-base: network.lua: bridge information request functions fixes
2019-12-25 18:32:05 +01:00
Balázs Úr
d0bc86bcc3 luci-base: fix typos
Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
2019-12-17 11:41:00 +01:00
Anton Kikin
72247ee09f luci-base: network.lua: fix bridge related functions
This commit fixes these bugs:

1. Functions interface.bridge_id() and interface.bridge_stp() uses self.br field
   that is not exists at all

2. Function interface.is_bridgeport() return true only for bridge interface, not for
   bridge port interfaces.

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-12-07 22:28:17 +03:00
Anton Kikin
45725dfca6 luci-base: network.lua: fix interface.ports() function return value
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-12-07 22:28:17 +03:00
Jo-Philipp Wich
13e9e3e9e8 treewide: fix "Unhandled token" errors with Lua CBI maps
The `data-type` attribute is used to bind datatype validators to a widget
while some templates used the same attribute to denote the name of the
underlying widget.

Change the `data-type` attributes referring to the widget name to
`data-widget` in order to stop the JS token error spam.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-16 18:25:52 +01:00
Jo-Philipp Wich
857cd8c7fa luci-compat: network.lua: recognize wifi interfaces with nonstandard names
Ref: https://github.com/openwrt/luci/issues/3306
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-14 11:13:43 +01:00
Jo-Philipp Wich
d5dff8f9a5 treewide: move server side CBI support to luci-compat
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 20:49:31 +01:00
Jo-Philipp Wich
284918bfaf treewide: move templates and libraries not used by the core to luci-compat
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 17:56:58 +01:00