summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs
AgeCommit message (Collapse)Author
2020-01-16luci-base: cbi.js: collapse whitespace before language string hashingJo-Philipp Wich
To mirror the behavior of the Lua runtime, we need to collapse whitepace in translation source strings before doing the string table lookup. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-16Merge pull request #3511 from Ansuel/no-hardJo-Philipp Wich
luci-base: remove hardcoded cgi-bin path
2020-01-16luci-base: make rpc webserver path configurableAnsuel Smith
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-16luci-base: remove hardcoded cgi-bin pathAnsuel Smith
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-15luci-base: form.js: fix immediate validation of activated optionsJo-Philipp Wich
When form options are activated because their dependencies are satisified, ensure that an immediate validation is triggered to highlight potential errors without having the user to activate another form control first. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-30luci-base: form.js: implement AbstractValue.getUIElement()Jo-Philipp Wich
Introduce a new method `getUIElement()` which simplifies obtaining the underlying per-section UI widget class instance for a from option object. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-30luci-base: ui.js: implement UIDropdown.{add,clear}Choices()Jo-Philipp Wich
The new `addChoices()` and `clearChoices()` functions allow clearing and adding new options to existing dropdown instances respectively. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-30luci-base: ui.js: expose UIElement class as AbstractElementJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-18luci-base: fs.js: properly escape arguments in exec_direct()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-18luci-base: fs.js: add read_direct() and exec_direct() functionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-17luci-base: fix typosBalázs Úr
Signed-off-by: Balázs Úr <balazs@urbalazs.hu>
2019-12-16luci-base: ui.js: allow custom validation in Dropdown and DynamicListJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-04luci-base: ui.js: ensure that select choice labels are properly escapedJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-04luci-base: ui.js: properly escape dynlist items for renderingJo-Philipp Wich
Ref: https://forum.openwrt.org/t/luci-theme-openwrt-reports-error/49736 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-26luci-base: luci.js: further nested Class.super() call fixesJo-Philipp Wich
Use stacks keyed by class id + symbol internally to not clobber the prototype scope pointer when repeatedly calling super() in invoked methods. Ref: https://github.com/openwrt/luci/issues/3316#issuecomment-558531111 Fixes: 374c23cda ("luci-base: luci.js: properly handle nested Class.super() calls") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-26luci-base: luci.js: properly handle nested Class.super() callsJo-Philipp Wich
Introduce a unique __id__ attribute per class and use that, together with the symbol name being looked up to, to form a unique key which is used to store the prototype scope pointer. This fixes cases where a call to super() invokes a procedure which is calling super() as well on a different class or symbol. Fixes: #3316 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-22luci-base: validation.js: fix "unique" validatorJo-Philipp Wich
Previous refactoring renamed the "data-type" attribute of widget markup containers to "data-widget", breaking the "unique" validator as it relies on it to lookup options. Fixes: #3341 Fixes: 13e9e3e9e ("treewide: fix "Unhandled token" errors with Lua CBI maps") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-16treewide: fix "Unhandled token" errors with Lua CBI mapsJo-Philipp Wich
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-15luci-base: Improve change application messageKevin Darbyshire-Bryant
As a native English speaker the luci message displayed when clicking 'Save & Apply' has a somewhat uncomfortable English phrasing of "Waiting for configuration to get applied". It could be improved by replacing 'get' with 'be' but once you've got that far you might as well replace this with the shorter & simpler "Applying configuration changes". This is also technically more correct since luci/openwrt should only be updating/restarting processes that are related to the changed areas, not changing the entire configuration. As a result of that, change both the 'success' and 'rolled back' messages to "Configuration changes have been applied" & "Configuration changes have been rolled back" Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2019-11-13luci-base: network.js: fix getDevices()Jo-Philipp Wich
- Don't filter virtual interfaces - Skip duplicate wireless devices Fixes: #3304 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-10luci-base: ui.js: show filename after selecting upload fileJo-Philipp Wich
Fixes: #3286 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-10luci-base: luci.js: add optional apply unchecked actionJo-Philipp Wich
Turn the "Save & Apply" button into a combo button which allows to toggle between apply with rollback and unchecked apply modes. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-10luci-base: ui.js: add ComboButton widgetJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-07luci-base: network.js: introduce further API functionsJo-Philipp Wich
- Add Network.getWifiNetworks() to simplify fetching *all* networks instead of building a list by iterating each radio first - Add Network.WifiNetwork.isClientDisconnectSupported() to check whether a wireless network supports client disconnections - Add Network.WifiNetwork.disconnectClient() to trigger client disconnections via hostapd Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-06luci-base: network.js: prevent duplicate wan interface reportingJo-Philipp Wich
Fixes: #3269 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-04luci-base: form.js: fix GridSection not using user-input name when addRichard Yu
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
2019-11-01luci-base, luci-mod-system: move file upload handling to ui.jsJo-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: migrate luci/getBoardJSON to C pluginJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-22luci-base: network.js: implement Protocol.getGateway6Addr()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-22luci-base: ui.js: prevent race condition in tab initializationJo-Philipp Wich
Fixes: #3150 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-21luci.base: fs.js: expose mode param in fs.write()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-18luci-base: network.js: simplify rpc error handlingJo-Philipp Wich
Use L.resolveDefault() catch unexpected RPC replies and rename declared rpc functions in a consistent manner. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-17luci-base: network.js: prefer netifd traffic stats over getifaddrs() onesJo-Philipp Wich
Overwrite the traffic statistics reported by getifaddrs() with the ones reported by the network.device/status procedure if available as the getifaddr() stats are limited to 32bit counters. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-15luci-base: static.js: make IPv6 assignment hint optionalJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-11luci-base: widgets.js: add user and group selectRichard Yu
Signed-off-by: Richard Yu <yurichard3839@gmail.com>
2019-10-07luci-base: form.js: fix anonymous section table titlesJo-Philipp Wich
When no section title is defined, the table renderer is supposed to use the uci section id as fallback when the table section is not declared to be anonymous. Fixes: #3147 Fixes: a90bf384b ("luci-base: form.js: harmonize title property handling") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07luci-base: form.js: treat inactive options as optionalJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07luci-base: ui.js: add pingDevice() and awaitReconnect() functionsJo-Philipp Wich
Import these functions from the flash.js for use with other views that might trigger a device reboot. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07luci-base: ui.js: use common fs.js class for filebrowser operationsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07luci-base: introduce common fs.js helper classJo-Philipp Wich
Introduce a new fs.js helper class to gather filesystem related RPC operations in a single file. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07luci-base: luci.js: add resolveDefault() helperJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-02luci-base: luci.js, rpc.js, uci.js, network.js: add JSDoc annotationsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-30luci-base: network.js: implement getMeshID() getterJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24luci-base: network.js: fix deleteNetwork() implementationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24luci-base: form.js: do not inherit map tabbing to nested sectionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24luci-base: form.js: allow overriding remove action in Table/GridSectionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>