summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc
AgeCommit message (Collapse)Author
2019-11-01luci-base: remove unused Lua codeJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-09luci-base: fix CSRF prevention for arcombine targetsJo-Philipp Wich
The dispatcher failed to propagate the child target post security requirements to the arcombine() dispatch target so far - fix this by recursively testing the post security requirements. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-28timezone data: update to 2019cHannu Nyman
Update timezone data to 2019c http://mm.icann.org/pipermail/tz-announce/2019-September/000057.html 2019c: * Fiji observes DST from 2019-11-10 to 2020-01-12. * Norfolk Island starts observing Australian-style DST. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-09-24luci-mod-system: reimplement flashops as client side viewJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12luci-base: sys.lua: fix init script enable actionJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12luci-base: fix list method handling in ubus-rpc protocol proxyJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-12luci-base: drop unused tools.status.switch_status() callJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11luci-base: view.htm: catch and render exceptions on view instantiationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10luci-base: use cgi-io and rpcd-mod-file to handle file upload and browsingJo-Philipp Wich
Remove the old server side support for file browsing and file uploading and switch to a client side widget instead which uses XMLHTTPRequests to upload files via cgi-io and RPC calls for file listing and status queries. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-10protocols: drop server side cbi implementations of protocol handlersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-15luci-base: use native ubus-rpc authorization protocolJo-Philipp Wich
Instead of granting complete ubus access under the active sysauth session, implement the ubus-rpc authorization mechanism and make the ubus proxy endpoint unauthenticated. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-08-06luci-base: add vpn menu sectionFlorian Eckert
There is always more vpn services. To make the LuCI menu look cleaner, a new top level menu "VPN" will be added with this commit. All luci-app-* that have something to do with VPN should move to this new menu entry. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-07-27luci-base: don't treat .rmempty flag as optional for ListValue widgetsJo-Philipp Wich
Restore the old CBI behaviour of not automatically rendering empty selection choices in ListValue select dropdowns when .rmempty is specified. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26luci-base: fix multiple parameter in cbi templatesAnton Kikin
In the dc0211803e commit, the parameter "multi" in ui.js is replaced with "multiple" everywhere. Thus, it must also be changed in the cbi templates. Fixes: dc0211803e Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
2019-07-19luci-base: render default values for all server side cbi map widgetsJo-Philipp Wich
Fixes: 9c7eb1dec ("luci-base: switch from server side to client side widget markup") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: mvalue.htm: fix reading back multi value optionsJo-Philipp Wich
Fixes: 2a229e50c ("luci-base: fix cbi mvalue templates") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: fix cbi mvalue templatesJo-Philipp Wich
Fixes: 9c7eb1dec ("luci-base: switch from server side to client side widget markup") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07Merge pull request #2806 from dibdot/magicJo-Philipp Wich
system-wide: fix escaping of magic chars
2019-07-07luci-base: fix handling of large ubus HTTP requestsJo-Philipp Wich
Properly handle ubus POST requests exceeding the default chunk size and fix a possible nil dereference when rejecting incoming requests due to bad JSON message framing. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add sys.init.reload() and sys.init.restart() actionsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: switch from server side to client side widget markupJo-Philipp Wich
Do not render standard widgets like checkboxes, select boxes, text input fields etc. on the server side anymore but utilize the ui.js primitives instead. This avoids logic duplication between server side cbi templates and JS widgets in the future. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add client based view actionsJo-Philipp Wich
Introduce a new view() target for CBI dispatch nodes, as long with the required template and plumbing work in luci.js to allow requiring view classes. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: replace uci change pages with client side modal dialogJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add ubus-http gatewayJo-Philipp Wich
Add an admin/ubus route mimicking the native uhttpd-mod-ubus protocol. The main difference to the native protocol is that this gateway requires no additional per-object/procedure ACL setup on the router side and that it is located under the same prefix as LuCI itself, allowing the reuse of the session login cookie. This route is meant to be a transitional mechanism until client side RPC calls are eventually migrated to uhttpd-mod-ubus completely. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: add ES6 Promise polyfill for IE < EdgeJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-06luci-base: hide autocomplete-preventing password input with bigger offsetYousong Zhou
Fixes openwrt/luci#2624 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-07-06luci-base: nowrap for password input and reveal buttonYousong Zhou
Fixes openwrt/luci#2624 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-07-05timezone data: update to 2019bHannu Nyman
Update timezone data to 2019b http://mm.icann.org/pipermail/tz-announce/2018-December/000055.html http://mm.icann.org/pipermail/tz/2019-July/028249.html 2019a: * Palestine "springs forward" on 2019-03-30 instead of 2019-03-23. * Brazil no longer observes DST. 2019b: * Palestine's 2019 spring-forward transition was on 03-29, not 03-30. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-06-29system-wide: fix escaping of magic charsDirk Brenken
* fix escaping of magic lua chars (#2800) * fix redundant second gsub line in shellstartsqescape function * fix return value of shellstartsqescape function Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-06-28luci-base: show niced processes on Status/Processes pageHannu Nyman
Modify the process status filter to allow also the processes with a nice value to be visible on the Status/Processes page. Filter out the top process itself. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-06-04luci-base: fix duid_to_mac reference in status.luaDirk Brenken
* fix for openwrt/packages#9148 Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-06-03luci-base: handle dhcp lease from odhcpdAnsuel Smith
Currently only the dnsmasq lease file is read for hostname hint. If someone use only odhcpd as dhcp daemon the hostname resolution on wifi_assoc list is broken. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2019-06-03luci-base: adds duid_to_mac to sys.luaAnsuel Smith
Move duid_to_mac function from status.lua to sys.lua. Implement translation from DUID-LL without header to MAC Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2019-05-25Merge pull request #2174 from rosysong/lease-statusFlorian Eckert
luci-base: drop ipv6 lease status when IPV6 is not support
2019-05-09Merge pull request #2687 from HenryGiraldo/masterJo-Philipp Wich
luci-mod-admin-full: add dependency for channel auto
2019-05-06luci-base: remove interface from zone upon deletionJo-Philipp Wich
Fixes: #2690 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-05-02luci-mod-admin-full: add dependency for channel autoEnrique Giraldo
Do not show 'auto' channel option if hostapd is not compiled with CONFIG_ACS Signed-off-by: Enrique Giraldo <hgiraldos@gmail.com>
2019-04-30luci-base: luci.model.network: simplify is_auto()Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-04-25luci-base: add is_auto functionFlorian Eckert
Add missing is_auto getter function. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-04-23luci-app-shadowsocks-libev: fix cidr datatypeDirk Brenken
* add a new 'cidr' alias datatype to fix #2671 Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-04-08Merge pull request #2642 from TDT-AG/pr/20190329-luci-baseJo-Philipp Wich
luci-base: add cbi tsection error msg option
2019-04-02luci-base: increase max size of network dropdownsJo-Philipp Wich
Fixes: #2646 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-03-29luci-base: add cbi tsection error msg optionFlorian Eckert
In some situation it is usefull to inform the use that this section could not get delete, because this config is referenced or is in use. Example pseudo code: function s.remove(self, sid) <check if secation could get deleted> if output == nil then self.error_msg = translatef("Unable to remove this section") return nil end end Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2019-02-12treewide: avoid double-escaping CBI section labelsJo-Philipp Wich
Since the section labels are already HTML-escaped implicitely by the striptags() function, we must not escape them again in attr() or ifattr(). Fixes: #2524 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-02-12luci-base: dispatcher: support raw values in attr() and ifattr()Jo-Philipp Wich
Extend the attr() and ifattr() template functions to take an optional further parameter indicating that the passed value should not be escaped. This is needed for cases where the input already is escaped through other means, e.g. when the value was previously filtered through the striptags() template helper. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-01-02timezone data: update to 2018iHannu Nyman
Update timezone data to 2018i http://mm.icann.org/pipermail/tz-announce/2018-December/000053.html http://mm.icann.org/pipermail/tz-announce/2018-December/000054.html 2018h: * Qyzylorda, Kazakhstan moved from +06 to +05 on 2018-12-21. * New zone Asia/Qostanay because Qostanay, Kazakhstan didn't move. * Metlakatla, Alaska observes PST this winter only. * Guess Morocco will continue to adjust clocks around Ramadan. * Add predictions for Iran from 2038 through 2090. 2018i: * São Tomé and Príncipe switches from +01 to +00 on 2019-01-01. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-12-29luci-base: rework filebrowser initializationJo-Philipp Wich
Do not call cbi_init() from the browser field template but lazily initialize the field, like it is being done for all other widgets as well. Fixes: #2398 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-20luci-base: use default poll intervalFlorian Eckert
Replace all XHR poll time number with -1 so they will use the default poll interval time value from "/etc/config/luci". If this is not set then 5 seconds as default is used. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-12-20modules: use configurable poll intervalFlorian Eckert
Make poll interval configurable. Use option from ---- config core 'main' option pollinterval '5' --- This will only be used if the interval option is less or equal zero. If the poll interval is not configured then a default value of 5 seconds is used. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-12-13luci-base: fix table compare upon writing ipaddr changesJo-Philipp Wich
Fixes: b33192a03 ("luci-base: support cidr list notation for option ipaddr and ip6addr") Signed-off-by: Jo-Philipp Wich <jo@mein.io>