Commit graph

97 commits

Author SHA1 Message Date
Jo-Philipp Wich
5fe88f8caf
Merge pull request #3769 from dibdot/logread-fix
luci-base: accept alternative logread location
2020-04-08 09:19:09 +02:00
Jo-Philipp Wich
e331e32b2c
Merge pull request #3749 from Ansuel/fix_relayd
luci-base: fix error 404 on missing relay protocol
2020-04-08 09:15:38 +02:00
jjm2473
97780a9ce1 ucitrack: fix bug for exec with params
In file `/etc/config/ucitrack`
```
config fstab
        option exec '/sbin/block mount'
```
`/sbin/block mount` never be called after fstab changed.

Signed-off-by: jjm2473 <1129525450@qq.com>
2020-03-23 01:05:31 +08:00
Dirk Brenken
085f3f7809
luci-base: accept alternative logread location
* minimal change to accept the usual logread location
  plus the alternative location (/usr/sbin/logread)
  used by syslog-ng (see openwrt/packages/issues/11535 for reference)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2020-03-20 16:11:31 +01:00
Jo-Philipp Wich
38289bc975 luci-base: ensure that ubus path uses trailing slash
Without the trailing slash, probing endpoint availability will fail.

Fixes: 529bde440 ("luci-base: make rpc webserver path configurable")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-13 23:57:19 +01:00
Ansuel Smith
d8e1aef150
luci-base: add relayd to getFeature list
Add /sbin/block to the generic Feature list to make
it easily accessible by getProtocolHandlers

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-03-12 16:40:25 +01:00
Jo-Philipp Wich
81cf99a507 luci-base: extend rollback timeout to 90 seconds
Ref: #3628
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-13 19:26:33 +01:00
Jo-Philipp Wich
6d59a6400e luci-base: make swconfig port state parsing more robust
Since swconfig output varies wildly among different switch drivers, rely
on a simpler more robust parsing approach to find the required information.

Ref: https://forum.openwrt.org/t/cannot-read-property-link/50766
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-28 18:16:44 +01:00
Jo-Philipp Wich
8978aaf6b6 luci-base: allow loading translations when not authenticated
Fixes: #3563
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-25 23:28:56 +01:00
Jo-Philipp Wich
679e59f4f3
Merge pull request #3522 from swg0101/systemcert
luci-base/mod-network: corrections to previous commit
2020-01-17 08:26:46 +01:00
David Lam
cbb1c3cf93
luci-base: correct rpcd bad access mode
Corrects the bad access mode from a previous commit that did not allow rpcd luci to execute.

Signed-off-by: David Lam <david@thedavid.net>
2020-01-16 14:49:42 -08:00
Jo-Philipp Wich
b65588ebc6
Merge pull request #3511 from Ansuel/no-hard
luci-base: remove hardcoded cgi-bin path
2020-01-16 15:36:05 +01:00
Jo-Philipp Wich
f545b29aaf
Merge pull request #3517 from Ansuel/ubus_short
luci-base: make rpc webserver path configurable
2020-01-16 15:33:25 +01:00
Ansuel Smith
529bde4408
luci-base: make rpc webserver path configurable
Currently the ubus path that provide the webserver is hardcoded to be /ubus.
Change this to make it configurable from the luci config file.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-01-16 15:16:09 +01:00
Ansuel Smith
5e6ec8562f
luci-base: remove hardcoded cgi-bin path
Currently LuCI can be loaded only when placed in the root of the server as the cgi-bin path are hardcoded. Change the index.html to load the cgi-bin path from the current level.
Also add a new entry in the env Object to make the cgi_base path easily accessible.
This variable will be based on the position of /cgi-bin/luci.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-01-16 15:02:14 +01:00
David Lam
27b21c2a62
luci-base: add system cert bundle detection
Add detection mechanism for system cert CA bundle installed by the
ca-bundle package. Used by LuCI to detect whether the "Use system
certificates" certificate validation option should be enabled.

Signed-off-by: David Lam <david@thedavid.net>
2020-01-16 01:15:40 -08:00
Jo-Philipp Wich
16d049f7cd luci-mod-status: reimplement route status page as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-29 23:03:58 +01:00
Jo-Philipp Wich
939b371bc7 luci-mod-status: reimplement log pages as client side views
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-22 23:20:23 +01:00
Jo-Philipp Wich
b9bb34612e luci-mod-status: reimplement iptables status page as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-22 23:20:23 +01:00
Jo-Philipp Wich
43a4481e10 luci-mod-status: replace iptables controller actions with cgi-io calls
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-22 23:20:23 +01:00
Jo-Philipp Wich
3a657b8ab5 luci-mod-network: replace controller address check action with cgi-io script
This change removes the last bit of Lua code from luci-mod-network.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-18 21:33:29 +01:00
Jo-Philipp Wich
ab07b8c4d9 luci-mod-network: reimplement diagnostics page as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 18:07:18 +01:00
Jo-Philipp Wich
16853bcd2e luci-base: convert menu nodes to JSON
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 18:07:17 +01:00
Jo-Philipp Wich
392ba53eff luci-base, luci-mod-network: migrate getDUIDHints method to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-08 10:25:30 +01:00
Jo-Philipp Wich
9e57fbb2c3 luci-base, luci-app-firewall: port custom rules to client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 20:34:57 +01:00
Jo-Philipp Wich
a43b1c6468 luci-base, luci-mod-status: convert process status to client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 20:07:58 +01:00
Jo-Philipp Wich
8d512f13ec luci-base: add luci/getProcessList RPC method
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 20:03:25 +01:00
Jo-Philipp Wich
f16a47042c luci-base, luci-mod-network: invoke ifdown directly in interface overview
Replace the `iface_down` endpoint with a direct invocation of `/sbin/ifdown`
and replace the interface connectivity check with a call to the new
`remote_addr` endpoint.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 17:56:58 +01:00
Jo-Philipp Wich
cfb5af89e1 luci-base, luci-mod-status: convert realtime stats to client side views
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 17:56:58 +01:00
Jo-Philipp Wich
a2f43983b6 luci-base: add luci/getRealtimeStats and luci/getConntrackList rpc methods
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03 17:56:58 +01:00
Richard Yu
c360cdd1f0 luci-app-opkg: add ipk upload feature
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
[fix duplicate upload errors, remove temporary file, tweak style]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
c72c78bed9 luci-mod-network: interfaces.js: issue iface restart via file/exec rpc call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
6aa4b83f24 luci-mod-network: wireless.js: issue wifi restart via file/exec rpc call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
c85af3d761 luci-mod-status: reimplement index status page as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
5ce16764ad luci-base, luci-mod-system: replace luci/setUmount with fs.exec calls
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
c67d2ddc2c luci-base, luci-mod-system: replace luci/setReboot with fs.exec
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
6e633b3ed2 luci-base: consolidate network.js data acquisition
The new luci-rpc/getNetworkDevices procedure offers netdev enumeration
with included IPv4 and IPv6 address information as well as 64bit traffic
counters, so we can remove the calls to network.device/status and
luci/getIfaddrs now as we're able to obtain all info from a single source.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
cc1cbdaf32 luci-base: migrate luci/getNetworkDevices to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
a96e7a664f luci-base: migrate luci/getWirelessDevices to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
37b6092aef luci-base, luci-mod-network, luci-app-firewall: migrate luci/getHostHints
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
5ff35d8be4 luci-base, luci-mod-network: migrate luci/getDHCPLeases to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
d21ebcfbbc luci-base: migrate luci/getBoardJSON to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01 12:03:33 +01:00
Jo-Philipp Wich
3d11af11a7
Merge pull request #3145 from ptpt52/refine-flash-reset
luci-mod-system: refine flash reset
2019-10-16 21:31:26 +02:00
Richard Yu
02a0291d14
luci-base: widgets.js: add user and group select
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
2019-10-11 01:05:08 +08:00
Chen Minqiang
29aad47121 luci-mod-system: refine flash reset
We determine flash reset capability by checking overlayfs in /proc/mounts

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2019-10-07 23:37:35 +08:00
Jo-Philipp Wich
1d68853cce luci-base: add reboot rpc call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07 11:53:39 +02:00
Jo-Philipp Wich
020ac1e08d luci-mod-system: flash.js: fix "rootfs_data" partition detection
The `/sys/devices/virtual/mtd/` information is not available on all
devices so rely on the contents of `/proc/mtd` instead to check for
the existence of the `rootfs_data` partition.

Fixes: #3136
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-02 13:02:04 +02:00
Rafał Miłecki
7c108683c6 luci-mod-system: use "system" new "validate_firmware_image" ubus method
This new ubus method provides more properly-formatted details about
firmware file. Use it to check if uploaded image is valid.

The old "sysupgrade --test" method is left for now to provide stderr
output.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[Added missing ACL, add default value for the ubus failure case]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-02 09:46:18 +02:00
Jo-Philipp Wich
2a5c5f47f9 luci-mod-system: reimplement flashops as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24 14:21:08 +02:00
Jo-Philipp Wich
71e265a7f0 luci-mod-system: remplement fstab settings as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-21 18:36:31 +02:00