summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/root/usr/share
AgeCommit message (Collapse)Author
2022-12-17luci-base, luci-mod-status: expose LuCI version via ubusJo-Philipp Wich
Instead of scraping the LuCI version from Lua sources, fetch it via ubus in order to be independent from the Lua runtime. Fixes: #6154 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-11-10luci-base: fix ubus luci/getConntrackHelpers reporting with firewall3Jo-Philipp Wich
The uci package name used to iterate the loaded configuration sections must correspond to the file name being loaded. Fixes: https://github.com/openwrt/openwrt/issues/11215 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25luci-base: don't fail getInitList if no indexes can be determinedJo-Philipp Wich
Gracefully handle missing indexes in the luci rpcd plugin getInitList procedure. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25treewide: separate Lua runtime resourcesJo-Philipp Wich
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-07-08luci-base: use different cookie names for HTTP and HTTPSJo-Philipp Wich
Since HTTP cookies may not overwrite HTTPS ("secure") ones, users are frequently unable to log into LuCI when a stale, "secure" `sysauth` cookie is still present in the browser as it commonly happens after e.g. a sysupgrade operation or when frequently jumping between HTTP and HTTPS access. Rework the dispatcher to set either a `sysauth_http` or `sysauth_https` cookie, depending on the HTTPS state of the server connection and accept both cookie names when verifying the session ID. This allows users to log into a HTTP-only LuCI instance while a stale, "secure" HTTPS cookie is still present. Requires commit 2b0539ef9d ("lucihttp: update to latest Git HEAD") to function properly. Fixes: #5843 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-11luci-base: dispatcher: rework dispatching and menu filtering logicJo-Philipp Wich
- Prefer nodes that do not require authentication over nodes that do - Honour ACL dependencies while resolving firstchild nodes - Consider currently active session while scanning menu tree instead of only loading effective ACLs when a login node is encountered - Do not consider nodes for firstchild dispatching which specify a special "firstchild_ineligible" property - Hide menu nodes that have no accessible children Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-06-16luci-base: move vpn sectionFlorian Eckert
Move the VPN configuration section behind the network configuration. The normal workflow is add/edit the network and then add/edit a vpn configuration. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-06-02luci-base: grant uci rename permissionsJo-Philipp Wich
When doing an initial wireless configuration migration, LuCI needs to perform a series of rename calls which weren't allowed so far. Ref: https://forum.openwrt.org/t/config-migration-endless-loop/64340 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-25luci-base: make logout link depend on luci-base ACLJo-Philipp Wich
Fixes: #3966 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-17luci-base: fix trainling comma in ACL specificationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16luci-base: implement JSON endpoint to fetch menu informationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-09treewide: reorganize base ACLsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-20luci-base: accept alternative logread locationDirk Brenken
* 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-01-25luci-base: allow loading translations when not authenticatedJo-Philipp Wich
Fixes: #3563 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-29luci-mod-status: reimplement route status page as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-22luci-mod-status: reimplement log pages as client side viewsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-22luci-mod-status: reimplement iptables status page as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-22luci-mod-status: replace iptables controller actions with cgi-io callsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-18luci-mod-network: replace controller address check action with cgi-io scriptJo-Philipp Wich
This change removes the last bit of Lua code from luci-mod-network. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16luci-mod-network: reimplement diagnostics page as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16luci-base: convert menu nodes to JSONJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-08luci-base, luci-mod-network: migrate getDUIDHints method to C pluginJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03luci-base, luci-app-firewall: port custom rules to client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03luci-base, luci-mod-status: convert process status to client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03luci-base, luci-mod-network: invoke ifdown directly in interface overviewJo-Philipp Wich
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-03luci-base, luci-mod-status: convert realtime stats to client side viewsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-app-opkg: add ipk upload featureRichard Yu
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-01luci-mod-network: interfaces.js: issue iface restart via file/exec rpc callJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-mod-network: wireless.js: issue wifi restart via file/exec rpc callJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-mod-status: reimplement index status page as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-base, luci-mod-system: replace luci/setUmount with fs.exec callsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-base, luci-mod-system: replace luci/setReboot with fs.execJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-base: consolidate network.js data acquisitionJo-Philipp Wich
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-01luci-base: migrate luci/getNetworkDevices to C pluginJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-base: migrate luci/getWirelessDevices to C pluginJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-base, luci-mod-network, luci-app-firewall: migrate luci/getHostHintsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-base, luci-mod-network: migrate luci/getDHCPLeases to C pluginJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01luci-base: migrate luci/getBoardJSON to C pluginJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-16Merge pull request #3145 from ptpt52/refine-flash-resetJo-Philipp Wich
luci-mod-system: refine flash reset
2019-10-11luci-base: widgets.js: add user and group selectRichard Yu
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
2019-10-07luci-mod-system: refine flash resetChen Minqiang
We determine flash reset capability by checking overlayfs in /proc/mounts Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2019-10-07luci-base: add reboot rpc callJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-02luci-mod-system: flash.js: fix "rootfs_data" partition detectionJo-Philipp Wich
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-02luci-mod-system: use "system" new "validate_firmware_image" ubus methodRafał Miłecki
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-09-24luci-mod-system: reimplement flashops as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-21luci-mod-system: remplement fstab settings as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-16luci-mod-system: remplement password change as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-15luci-mod-system: reimplement SSH key mgmt as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12luci-mod-system: reimplent system/crontab as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12luci-base: whitelist file/write actions on /etc/rc.localJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>