Age | Commit message (Collapse) | Author |
|
system-wide: fix escaping of magic chars
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes openwrt/luci#2624
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
Fixes openwrt/luci#2624
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
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>
|
|
* 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>
|
|
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>
|
|
* fix for openwrt/packages#9148
Signed-off-by: Dirk Brenken <dev@brenken.org>
|
|
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>
|
|
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>
|
|
luci-base: drop ipv6 lease status when IPV6 is not support
|
|
luci-mod-admin-full: add dependency for channel auto
|
|
Fixes: #2690
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Do not show 'auto' channel option if hostapd is
not compiled with CONFIG_ACS
Signed-off-by: Enrique Giraldo <hgiraldos@gmail.com>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add missing is_auto getter function.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
|
|
* add a new 'cidr' alias datatype to fix #2671
Signed-off-by: Dirk Brenken <dev@brenken.org>
|
|
luci-base: add cbi tsection error msg option
|
|
Fixes: #2646
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Fixes: b33192a03 ("luci-base: support cidr list notation for option ipaddr and ip6addr")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
When an interface configuration specifies both "option ipaddr 1.2.3.4/24"
and "option netmask", then netifd will ignore the netmask in favor to the
prefix encoded in the cidr string.
Support this variant as well by treating a sole cidr string value as
singöe-item cidr list.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
|
|
Fixes #2366.
Fixes: 76e9c0305 ("luci-base: rework ui tabbing code")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Instantiate tab menus on the client side
- Simplify server side markup generation
- Show error indicators in cbi tabs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Use the same ordering logic for building the dispatch tree and for
querying the children of a given node.
Fixes #2338.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This feature was never used, is hardly documented and appears to be
designed to fiddle with the internal dispatch tree state.
Given that, simply drop the related code to simplify the dispatcher
class somewhat.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ref: https://github.com/openwrt/luci/issues/2327
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce a new script file luci.js which is included by default and
intended to be the common location of functions currently scattered
in cbi.js and xhr.js.
The luci.js file provides a LuCI() class which - among other things -
implements helpers to construct URL paths and making HTTP requests.
A singleton instance of the class is instantiated as window.L upon
load and preset with the necessary environment information.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Commit 94d8c9a7a accidentally overwrite the rewording of strings made in
an earlier commit.
Fixes: 94d8c9a7a ("luci-base: simplify apply widget code")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Send a custom LuCI X-Header to indicate that a login is required to access
the requested resource. This is mainly intended for xhr.js to be able to
intercept such responses and popup an authentication dialog.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a button to each row in the wireless assoclist table to allow
disconnecting clients using the ubus del_client method if the underlying
radio interface supports it.
Ref: https://github.com/openwrt/luci/pull/2271
Submitted-by: Wang805447391 <805447391@qq.com>
[move deauth function to luci-base next to the existing assoclist function,
require post security, fix parameter check condition, hide button if not
supported by the radio, disable button after call, squash commits, fix
whitespace, reword subject, add commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a dummy validator for the server side so that we can start using unique
in client side JS code.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
update luci-app-olsr to the new jsoninfo library
|
|
luci-base: allow optional default value for file browser
|
|
Move the old luci.model.ipkg utility class into a separate package and
let the components using it depend on the new library package.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Drop embedded CSS in favor to new global rules
- Drop extraneous include of cbi.js
- Use showModal() facilities
- Fix a cosmetic bug in countdown timeout handling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|