Commit graph

2070 commits

Author SHA1 Message Date
Jo-Philipp Wich
524ce90c4e luci-base: resync base translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 14:24:27 +02:00
Jo-Philipp Wich
aef1c2fca0 luci-mod-admin-full: differentiate between disabled and not associated wireless
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 14:08:38 +02:00
Jo-Philipp Wich
4f0dfb6ab0 luci-mod-admin-full: tweak interface and wireless overview markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 09:37:53 +02:00
Jo-Philipp Wich
22e4a2420c luci-base: tweak tblsection markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 09:37:08 +02:00
Jo-Philipp Wich
777ffa9487 luci-mod-admin-full: small wifi overview markup fix
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:58:11 +02:00
Jo-Philipp Wich
b7bf164fea luci-mod-admin-full: produce valid JSON in status/realtime/connections_status
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:55:16 +02:00
Jo-Philipp Wich
85bc16605d luci-base: add icons for alias interfaces
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:59 +02:00
Jo-Philipp Wich
c4dca36795 luci-mod-admin-full: rework interface overview page
Convert interface enable, disable and delete actions to proper cbi
operations so that we can benefit from the apply/rollback workflow
when performing critical interface operations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:10 +02:00
Jo-Philipp Wich
54c9a77bd3 luci-mod-admin-full: expose errors, description and up state in net status
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:10 +02:00
Jo-Philipp Wich
94be4881a0 luci-base: add error reporting and basic support for dynamic interfaces
This allows exposing virtual ubus-based network interfaces in LuCI.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:10 +02:00
Jo-Philipp Wich
be2b83c9f5 luci-mod-admin-full: reimplement wireless overview page as cbi model
This will offer apply/rollback workflow for tasks like deleting or shutting
down wireless networks.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:10 +02:00
Jo-Philipp Wich
d4e52ca03b luci-base: apply_widget: various fixes
- Fix button styles in failure message
 - Pause XHR polling during apply/rollback sessions
 - Throttle confirm requests to 1 request/second

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:10 +02:00
Jo-Philipp Wich
674b090d34 luci-base: xhr.js: use JSON.parse() and pass request duration to callbacks
JSON.parse() is supported on all modern browsers and a far better
solution than the hakish and potentially dangerous eval().

Also calculate the duration of request and pass it as 3rd argument to the
callback function, this makes it easier to calculate request delays or
poll intervals in code using XHR.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:10 +02:00
Jo-Philipp Wich
6f773999ac luci-mod-admin-full: improve text contrast in realtime graphs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-11 08:07:23 +02:00
Jo-Philipp Wich
4a083f6d23 luci-base: fix placement of CBI strings
Commit c0de036b3 ("treewide: always include cbi.js") improperly removed the
cbi.js script include from header.htm, leaving behind the string dictionary.

Move the JSON dictionary to the parent <form> element and delete the
leftover </script> element.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 17:04:10 +02:00
Jo-Philipp Wich
8e10118843 luci-mod-admin-full: rework connection status table handling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 11:51:43 +02:00
Jo-Philipp Wich
6cda8e6dab luci-base: cbi.js: avoid setting empty cell title attributes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 11:51:43 +02:00
Jo-Philipp Wich
260d2cc44e luci-base: cbi.js: add NodeList.forEach() polyfill for IE 11
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 11:51:43 +02:00
Jo-Philipp Wich
c0de036b31 treewide: always include cbi.js
Include cbi.js in the main header template like it is done for xhr.js and
remove the page specific includes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 11:51:43 +02:00
Jo-Philipp Wich
069c0c93e1 luci-mod-admin-full: use sans-serif fonts for realtime graph legends
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 11:51:43 +02:00
Jo-Philipp Wich
7c404d72ea luci-mod-admin-full: small markup fixes for placeholder texts
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 11:51:43 +02:00
Jo-Philipp Wich
ecedfe5dcc luci-mod-admin-full: style and script fixes for realtime bandwidth graph
- add Math.log2() polyfill for IE 11
 - use sans-serif font for time axis

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-09 11:51:43 +02:00
Krystian Kozak
4b8e0f8347 luci-base: update Polish translation
Updated Polish translations.

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
2018-07-07 14:48:51 +02:00
INAGAKI Hiroshi
057c71a671 luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-07-07 17:57:24 +09:00
Yurii
26d90f0c10 luci-base: update Ukrainian translation
Updated with the latest synchronization of the translation, corrections and additions translation.

Signed-off-by: Yurii yuripet@gmail.com
Squashed 2 commits
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-07-04 21:23:56 +03:00
amitabha
84f86ad7b4 base.po: Update chinese translations.
Fix some Chinese translations.
Signed-off-by: Angus Ding <angus.ding@gmail.com>
2018-07-05 01:29:35 +08:00
Jo-Philipp Wich
04bec56956 luci-base: resync translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-03 18:47:54 +02:00
Jo-Philipp Wich
e489a82ac3 luci-mod-admin-full: rework flashops page markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-03 18:03:30 +02:00
Florian Eckert
50b88a435f luci-mod-admin-full: fix flashops url generation for config tab
If a firmware image is not valid then url generation for the config tab
is wrong. To fix this use the luci.dispatcher.build_url function.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-07-03 17:45:35 +02:00
Florian Eckert
65ba4b8b8a luci-mod-admin-full: check backup.tar.gz on apply
If an uploaded backup.tar.gz is not valid we will not get a respond from
LuCI. The system will perform a reboot without applying the "tar.gz"
even though the backup import failed.

To fix this check if the backup archive is valid with the command
"gunzip -t <archive>" and if the validation fails render the flashops page
with a hint. On the other hand apply the backup archive and perform a
reboot as before.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-07-03 17:45:12 +02:00
Ansuel Smith
ddbde3caaa luci-mod-admin-full: improve reboot page
This fix problem with empty controller, the check function will never stop to
check if the device finish to reboot and we set more tries to wait the router
for a longer times.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[reworked markup, simplified logic, removed superfluous alert]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-03 17:34:10 +02:00
Jo-Philipp Wich
7b43e67219 luci-mod-admin-full: improve Y-axis scaling in bandwidth graph
Calculate a peak that causes the vertical scale to use even values.

Fixes #1424.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-03 10:58:14 +02:00
Hannu Nyman
1510111fa0
Merge pull request #1925 from YuriPet/master
luci-app-firewall & luci-base: update Ukrainian translation
2018-07-02 18:35:04 +03:00
Jo-Philipp Wich
4097a63330 luci-mod-admin-full: fix uci revert success message
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-02 09:43:08 +02:00
Jo-Philipp Wich
30eaba02f1 luci-mod-admin-full: cleanup markup on flashops page
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-02 08:46:26 +02:00
Jo-Philipp Wich
b693baaa6e luci-mod-admin-full: rework wireless network status indicator
Rework markup and logic of the wireless network status indicator to match
that of the interface status widget.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-02 08:46:26 +02:00
Jo-Philipp Wich
3aba615029 luci-base: rework "in request" flagging logic for menu nodes
The previous implementation failed to mark active nodes under some
circumstances.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-02 08:46:26 +02:00
Yurii
d0298e4cda
luci-base: update Ukrainian translation
Updated with the latest synchronization of the translation.

Signed-off-by: Yurii yuripet@gmail.com
2018-07-01 23:51:38 +03:00
INAGAKI Hiroshi
ca0a086a2d i18n: sync translations
Synchronized translations with sources.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-30 23:10:45 +09:00
Jo-Philipp Wich
c405b23abd luci-mod-admin-full: unify DHCP lease status code
Merge the DHCP lease status code of the status overview and DHCP/DNS pages
into a single shared partial template.

Also remove some redundant markup on the index page and wireless assoc list
templates.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-28 09:42:17 +02:00
Jo-Philipp Wich
c61c5deac4 luci-base: luci.tools.status: add host_hints to DHCPv6 leases
Attempt to derive a MAC from the DHCPv6 lease DUID and use it to look up
a host hint. If a hint is found, add it to the lease information.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-28 09:42:17 +02:00
Jo-Philipp Wich
ccbb17d260
Merge pull request #1915 from Ansuel/upgrade
luci-base: update luasrcdiet
2018-06-27 16:43:36 +02:00
Ansuel Smith
b5d5e5bf13
luci-base: update luasrcdiet
Tested and works with no problem.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-06-27 16:41:02 +02:00
Jo-Philipp Wich
8d7869f672 luci-mod-admin-full: properly remap ports in switch status display
Fixes: 60c5d15e9 ("luci-mod-admin-full: fix possible switch status layout bug")
Fixes: bbf096c79 ("luci-mod-admin-full: cleanup markup")
Reported-at: https://forum.lede-project.org/t/x/15897/19
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-26 19:51:36 +02:00
Jo-Philipp Wich
60c5d15e9e luci-mod-admin-full: fix possible switch status layout bug
In some cases we might get status information for more ports than which are
actually usable, prevent overflowing the port status row in this case.

Reported-at: https://forum.lede-project.org/t/x/15897/14
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-26 15:24:16 +02:00
Jo-Philipp Wich
62f5c22f8c
Merge pull request #1912 from Ansuel/fixassoci
luci-mod-admin-full: fix missing wifi_assoclist
2018-06-26 14:34:58 +02:00
Ansuel Smith
5818a90dfd
luci-mod-admin-full: fix missing wifi_assoclist
With #e5ba594d77eed77d31d4b9b8c0e86026eb5a5fac the list of the connected device broke up. This fix this problem by creating a proper request link.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-06-26 14:30:36 +02:00
Jo-Philipp Wich
0d9a64b3b4
Merge pull request #1881 from TDT-AG/pr/20180614-luci-mod-admin-full-fix-ssh-key-textarea
luci-mod-admin-full: fix empty SSH-Keys textarea issue
2018-06-25 11:41:41 +02:00
zjw
6ff7f34ee8 luci-mod-admin-full: report SNR unit as dB, not dBm
Fixes: #1880
Reported-by: "zjw"
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25 11:39:24 +02:00
Jo-Philipp Wich
002c4d1d5f luci-base: add "Name" label to autogenerated title column
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25 11:12:25 +02:00
Jo-Philipp Wich
18d92aca53 luci-base: annotate tblsection description row as well
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25 09:51:18 +02:00
Jo-Philipp Wich
b79982e5df luci-mod-admin-full: fix average traffic calculation in realtime bandwidth
Fixes #1908.
Suggested-by: "mgalyean"
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25 09:33:07 +02:00
Jo-Philipp Wich
ff55e7f6b5 luci-mod-admin-full: fix initializing realtime graphs
Commit 69782ccbc ("luci-base: xhr.js: defer starting poll queue") changed
the way XHR poll queues are started which broke the timing on the realtime
graph pages.

Fix the problem by manually starting the poller after registering the request
handlers.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25 09:19:59 +02:00
Jo-Philipp Wich
e5ba594d77 luci-base, luci-mod-admin-full: unify wifi assoclist code
Merge the assoclist code of the status overview and wireless overview pages
into a single shared partial template.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25 09:01:33 +02:00
Jo-Philipp Wich
86c6c60a0d luci-mod-admin-full: replace status page legend tags with h3 (#1907)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-25 09:00:07 +02:00
Jo-Philipp Wich
b4d78d2042 luci-mod-admin-full: packages: display available packages by default
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-23 18:01:43 +02:00
Jo-Philipp Wich
bbf096c79e luci-mod-admin-full: cleanup markup
Globally cleanup template markup to support responsive design changes in
OpenWrt theme.

Rework handling of dynamic status tables, consolidate hand-written markup,
fix small render bugs in various places and annotate tables where needed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-23 18:01:39 +02:00
Jo-Philipp Wich
d0b91bcca2 luci-base: globally cleanup markup
- add responsive attributes to partial cbi templates
 - unify and fix button style classes
 - fix styling of sysauth dialog
 - rework firewall_zoneforwards widget

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-23 17:13:22 +02:00
Jo-Philipp Wich
c4bd6fb7b9 luci-base: cbi.js: add tooltip handling and responsive table helper code
- make findParent() globally available
 - add code for initializing rich cbi tooltips
 - introduce cbi_update_table() helper to auto-assign responsive attributes
   to table markup

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-22 15:14:40 +02:00
Jo-Philipp Wich
69782ccbcc luci-base: xhr.js: defer starting poll queue
Defer the start of the queue poll loop until the document has been loaded.

This allows all XHR.poll() invocations on the page to register their
handlers before the first batch of requests is made.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-22 09:42:15 +02:00
Yurii
fef02b31e6
luci-base: update Ukrainian translation 2018-06-17 23:38:38 +03:00
INAGAKI Hiroshi
fe591dd1cc i18n: fix syntax errors in Ukrainian po
"Content-Type: text/plain; charset=UTF-8" was wrote twice in each
of base.po and firewall.po, and one was an incorrect place which
was the cause of the errors.

And, The escape in abbr HTML tag was incorrect, so I fixed it.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-16 23:36:18 +09:00
Florian Eckert
0251603f0a luci-mod-admin-full: fix empty SSH-Keys issue
If you delete all ssh keys in the textarea then LuCI will rais an error.
So if you added one ssh-key to the textarea and then you want to delete them
again that is not possbile in LuCI.
To fix this remove "rmempty" attribute and add a remove function which will
called if the textarea is empty.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-06-14 11:50:55 +02:00
Kevin Darbyshire-Bryant
8f67019713 wireguard: update wireguard url
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-06-11 11:43:39 +01:00
Yurii
0c410c848b
luci-base: update Ukrainian translation
Updated Polish translations.

Signed-off-by: Yurii <yuripet@gmail.com>
2018-06-10 16:56:13 +03:00
Krystian Kozak
ad5f768c40 luci-base: update Polish translation
Updated Polish translations.

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
2018-06-10 11:25:54 +02:00
Hannu Nyman
fad02ac8d7
Merge pull request #1868 from sotux/master-zh_CN
Update Simplified Chinese translation
2018-06-09 17:53:27 +03:00
Jo-Philipp Wich
e7866c7dcc luci-mod-admin-full: add suggested italian translations
Merge two italian translations suggested in #1870 and add back two missing
dots accidentially removed from the translations in a previous commit.

Fixes: 588c8618b ("luci-mod-admin-full: fix translation interpolation in JS confirm() calls")
Suggested-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08 16:05:48 +02:00
Jo-Philipp Wich
588c8618b6 luci-mod-admin-full: fix translation interpolation in JS confirm() calls
Use luci.http.write_json() in conjunction with translate() to write out
unescaped translation strings in a manner suitable for interpolation inside
JavaScript.

Fixes #1870
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08 15:48:26 +02:00
Jo-Philipp Wich
0e0ee2fed5 luci-mod-admin-full: git rid of embedded newlines in translation strings
Also switch one usage of raw '<%_ ... %>' interpolation to '<%: ... %>' in
order to avoid issues with translations using apostrophes.

Globally resnyc translations after the fix.

Fixes #1866.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08 13:50:14 +02:00
Zheng Qian
2e7fa89e1a luci-base: update Simplified Chinese translation
Signed-off-by: Zheng Qian <sotux82@gmail.com>
2018-06-08 16:43:40 +08:00
Jo-Philipp Wich
74be6f3974 treewide: switch firewall zone, network and iface lists to dropdown code
Also switch the weekday and monthday lists in the firewall rule details to
cbi dropdowns, vastly uncluttering the form.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08 08:19:20 +02:00
Jo-Philipp Wich
9d48490729 luci-base: add markup, JS and CSS for new dropdown
This commit introduces the required code for a new, markup based dropdown
widget which can be used as a styleable alternative to select boxes or
radio/checkbox button groups.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08 08:14:36 +02:00
Jo-Philipp Wich
4cca96ef09 luci-base: support option aliases in luci.cbi
AbstractValue descendants may now specify a new optional property `alias`
which refers to a uci option to read/write/remove that differs from the
option name itself.

This is mainly useful for widgets that are toggled based on dependencies,
e.g. for alternating between SingleValue and MultiValue, but which are
intented to write into the same uci option.

Such a setup was previously possible already by overriding the .cfgvalue(),
.write() and .remove() callbacks with custom implementations, but that
required a lot of boiler plate code and was rather fragile.

With the `alias` property, CBI now takes care of the details and tracks
aliased fields within a section accordingly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-08 07:25:54 +02:00
Jo-Philipp Wich
7be3f0400c luci-base: fix some minor luci.model.uci issues
- Properly serialize option delete changelogs
 - Do not perform a section create if a nil value is passed to set()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-06 21:45:49 +02:00
Jo-Philipp Wich
2d352a9251 luci-base: cbi: atomically reorder uci sections
Since the switch to ubus uci operations we do not have a local application-
side cursor cache anymore, instead uci operations happen synchronously in
the rpcd backend server.

This may cause cbi section reorder operations involving multiple elements
to fail, because anonymous section hashes may change due to rehashing
between consecutive ubus uci reorder calls.

In order to avoid that problem, use the ubus uci batch reorder extension,
which allows to pass a complete (or partial) list of section ids in the
desired order in one call, bypassing the volatile section id problem.

Fixes #1844.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-06-03 20:02:44 +02:00
INAGAKI Hiroshi
f28784b61e luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-01 02:45:53 +09:00
INAGAKI Hiroshi
2d196614f4 luci-base: sync translations
Synchronized translations with sources.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-06-01 02:20:05 +09:00
Jo-Philipp Wich
a64ab077d7 luci-mod-freifunk: use common alert message markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-31 19:08:14 +02:00
Jo-Philipp Wich
29b391d7bc luci-base: use common alert message markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-31 19:06:48 +02:00
Jo-Philipp Wich
724cc29978 luci-mod-admin-full: use common alert message markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-31 19:00:56 +02:00
Jo-Philipp Wich
298d164dd7 luci-base: update coxpcall() implementation, fix runtime error reporting
Sync our coxpcall() implementation to the newest upstream version in order to
get access to the inner backtrace information and propagate these traces to
the browser in luci.dispatcher.dispatch().

This should make tracking down runtime errors much easier.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-31 17:45:49 +02:00
Jo-Philipp Wich
5427395649 luci-base: add full page overlay during apply
After applying uci configuration, a full map reload is required in many
cases as the anonymous section identifiers might have been rehashed, causing
the rendered map to go out of sync.

To avoid that, add both a full page overlay preventing further page
interaction and let the apply widget forcibly reload the current view once
the operation is complete.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-31 15:38:42 +02:00
Jo-Philipp Wich
7bd1bcaf30 luci-mod-admin-full: fix status page render glitch on Chrome
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-31 07:38:40 +02:00
Jo-Philipp Wich
c3da1fc232 luci-base: cbi.js: remove unused serialize functions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-30 16:04:07 +02:00
Jo-Philipp Wich
d1df5a6b7d luci-base: cbi.js: fix cbi_row_swap() after recent table markup changes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-30 15:59:52 +02:00
Jo-Philipp Wich
0d2ae8d653 luci-mod-admin-full: rework network and wifi status displays
Use a more compact flex layout instead of the tabular display.
Also rename "WAN status" to "Upstream" to avoid future confusion about
wan interfaces vs. defaultroute interfaces.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-30 14:59:24 +02:00
Ansuel Smith
f0094cc06e luci-mod-admin-full: fix revert page
This fix the strange redirect link, a bug with uwsgi where the controller
is empty and a bug with the revert page showing the apply content empty.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[drop unrelated revert.html template change]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-30 14:59:24 +02:00
Ansuel Smith
b8f32b6da7
luci-admin-full: add architecture info
Referring to this, #1698 , we add architecture info and we show Unknown instead of ?. This is usefull if someone needs to install opkg packages manually.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-05-28 15:38:57 +02:00
Jo-Philipp Wich
067d7dc9f7 treewide: convert HTML tables to div
Mostly convert HTML tables to div based markup to allow for easier styling
in the future. Also change JS accessor code accordingly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-28 15:18:45 +02:00
Jo-Philipp Wich
79c82237e3 luci-base: add element creation helper to cbi.js
Add a new helper function `E()` to cbi.js which can be used to conveniently
build HTML markup.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-28 15:18:45 +02:00
Hannu Nyman
6f630b5e66
Merge pull request #1834 from Ansuel/fixpo
luci-base: fix broken translation
2018-05-27 22:07:52 +03:00
Ansuel Smith
c29ffe4dfc
luci-base: fix broken translation
Currently this translation refer to an old string, sync to the new one.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-05-27 21:01:33 +02:00
Yusuf Soyipek
2d053d39d0
Update base.po
Some of the shortcomings in Turkish were added.
2018-05-27 16:17:15 +03:00
Hannu Nyman
9de9a71a9f i18n: one more fix for Polish translation
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-05-25 17:11:47 +03:00
Hannu Nyman
36654b7f4d i18n: sync, fix and cleanup translations
* sync translations (aiccu removal)
* remove some other old strings
* fix Polish translation

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-05-25 16:44:50 +03:00
Ansuel Smith
da1e655294
luci-base: fix dispacher fail
http.getenv("SCRIPT_NAME") fail if it's not provided. This can happen in the login screen when we don't have any script to load.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-05-23 02:52:08 +02:00
INAGAKI Hiroshi
b01471b1fc luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-21 01:04:53 +09:00
INAGAKI Hiroshi
b1fd056fa5 i18n: sync translations
Synchronized translations with sources.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-21 01:04:53 +09:00
Jo-Philipp Wich
37a4a1c070 luci-mod-admin-full: fix crash on wireless when no networks are declared
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-19 23:28:14 +02:00
Jo-Philipp Wich
fdbb417abe luci-mod-admin-full: do not override iface section in wireless cbi map
Do override the iface section id upon commit to avoid clobbering the resulting
configuration. The manual config sync is not needed anymore after switching
to uncached ubus uci operations.

Fixes #1770.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-19 23:26:34 +02:00
Jo-Philipp Wich
64da34b13c luci-base: handle potential crash in luci.model.network.interface.get_i18n()
Should prevent the crash mentioned in #1779.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-19 22:11:08 +02:00
Jo-Philipp Wich
9ed48ef2a6 luci-base: break circular luci.config <> luci.model.uci dependency
On certain environments, mainly with the embedded uhttpd interpreter, the
luci.config class cannot be loaded due to a circular dependency with the
luci.model.uci class.

Break up the dependency by deferring the loading of luci.config in
luci.model.uci until it is actually needed.

Fixes #1803, FS#1553.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-19 13:07:37 +02:00
Jo-Philipp Wich
364c271a84 luci-mod-rpc: fix unresolved controller reference in rpc_auth()
Fixes the following error:

   .../rpc.lua:85: attempt to index global 'ctrl' (a nil value)

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-18 16:58:17 +02:00
Jo-Philipp Wich
828202ef52
Merge pull request #1769 from jow-/master
UCI apply/rollback workflow
2018-05-18 16:44:33 +02:00
Jo-Philipp Wich
80cb4fef8c luci-base: raise maximum POST value size to 100KB
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-18 16:43:29 +02:00
Hannu Nyman
521554f4a7
Merge pull request #1748 from hnyman/wifidata
luci-base: show wifi chip identification on overview
2018-05-18 12:51:24 +03:00
Rixerx
3782e74cf8 luci-base: update Polish translation
Signed-off-by: Rixerx <krystian.kozak20@gmail.com>
2018-05-15 11:40:27 +02:00
Yousong Zhou
2f0f456b71 luci-base: harden cookie sysauth=
A simple scan of the code indicates that currently no code in the repo
is accessing the sysauth= cookie

Closes openwrt/luci#1555

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-13 18:30:47 +08:00
Yousong Zhou
b810d99503 luci-mod-freifunk: fix redirect url
location.hostname lacks port info

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07 22:27:58 +08:00
Yousong Zhou
c91ba4babc luci-mod-admin-full: use fs.glob instead nixio.fs.glob
It's how the module was named when "require"d and used by other code in
the same function

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07 21:19:35 +08:00
Florian Eckert
690ae5c211 luci-mod-admin-full: no menu entry for leds if "/sys/class/leds" is empty
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07 21:14:48 +08:00
Florian Eckert
da4fab0462 luci-mod-admin-full: change supports_reset() test for factory reset
The check "supports_reset" only covers /proc/mtd partitions. If we have
this the commands checks for names like ubi or rootfs_data. If this is
found the system is possible for a factory reset.  But on x86 the
situation is different.  We have no /proc/mtd partitions because this
system do not use a bare metall flash.

To solve this issue check if we have an overlay and if so we could do a
factory reset. This could be applied for system which uses bare metal
flash and system which uses FTL or harddisks.

Jffs2reset is the current command used for factory reset.  It will try
to find volume "rootfs_data" and if it's mounted will delete all files
under directory /overlay

luci-mod-admin-mini also has check for reset available, but we leave it
alone for now as it uses "mtd -r erase rootfs_data"

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07 20:36:40 +08:00
Florian Eckert
6f3007980b luci-base: reload log on uci system change
If log configuration get changed in uci system no new values are applied
until reboot. Add /etc/init.d/log reload to exec option will solve this
issue.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-05-07 14:37:35 +08:00
Florian Eckert
3cb7452eba luci-base: fix i18n de typo for rc.local
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-05-07 13:51:18 +08:00
Jo-Philipp Wich
9f796fad3a luci-base: add transitional /etc/init.d/ucitrack
Ship an /etc/init.d/ucitrack for spawning a virtual service with the sole
purpose to track the configurations and dependencies formerly handled by
luci-reload.

Once all LuCI supported services ship with procd compatible init scripts,
the uci track support can be dropped.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05 23:11:23 +02:00
Jo-Philipp Wich
fd1ddcc419 luci-mod-admin-full: rework wifi configuration
- localize variables
- get rid of redirects breaking apply workflow
- auto-adjust unusable channels when switching country
- use apply/rollback workflow when enabling/disabling networks

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05 23:11:23 +02:00
Jo-Philipp Wich
8deb949551 treewide: rework uci apply workflow
Switch to rpcd based uci apply/rollback workflow which helps to avoid soft-
bricking devices by requiring an explicit confirmation call after config
apply.

When a user now clicks "Save & Apply", LuCI first issues a call to uci apply
which commits and reloads configuration, then goes into a polling countdown
mode where it repeatedly attempts to call uci confirm.

If the committed configuration is sane, the confirm call will go through and
cancel rpcd's pending rollback timer.

If the configuration change leads to a loss of connectivity (e.g. due to bad
firewall rules or similar), the rollback mechanism will kick in after the
timeout and revert configuration files and pending changes to the pre-apply
state.

In order to cover such rare cases where a lost of connectivity is expected
and desired, the user is offered an "unchecked" apply option after timing
out, which allows committing and applying the changes anyway, without the
extra safety checks.

As a consequence of this change, the luci-reload mechanism is now completely
unsused since rpcd uses ubus config reload signals to reload affected
services, which means that only procd-enabled services will receive proper
reload treatment with the new workflow.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05 23:11:23 +02:00
Jo-Philipp Wich
7cca313959 luci-base: enable uci session isolation
Switch to per-session save directories to decouple LuCI configuration changes
from system wide ones.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05 23:11:23 +02:00
Jo-Philipp Wich
055b621cf5 luci-mod-rpc: more auth/login fixes, expose further libraries
The previous attempt to fix authentication broke login functionality so
rework the code once again, this time with referencing helper functions
directly via the controller scope.

Furthermore, properly expose luci.sys.wifi.getiwinfo() and luci.ip.

For getiwinfo(), the RPC wrapped function accepts one further optional
parameter specifying the operation to invoke on the iwinfo instance.
If no operation is specified, a summary object containing all info
without country and scan list is returned.

Example to obtain iwinfo summary object:
  curl --cookie sysauth=... \
       --data '{"method": "wifi.getiwinfo", "params": ["wlan0"]}' \
		"http://192.168.1.1/cgi-bin/luci/rpc/sys"

Example to obtain iwinfo scan list:
  curl --cookie sysauth=... \
       --data '{"method": "wifi.getiwinfo", "params": ["wlan0", "scanlist"]}' \
		"http://192.168.1.1/cgi-bin/luci/rpc/sys"

The exposed luci.ip class uses a similar approach to allow invoking
instance methods on cidr objects. The new(), IPv4(), IPv6() and MAC()
constructors accept two further optional arguments, with the first
specifying the instance method to invoke and the second the value to
pass to the instance method.

Example to get list of IPv4 neighbours (ARP entries):
  curl --cookie sysauth=... \
       --data '{"method": "neighbors", "params": [{"family": 4}]}' \
		"http://192.168.1.1/cgi-bin/luci/rpc/ip"

Example to add 100 hosts to a network address:
  curl --cookie sysauth=... \
       --data '{"method": "IPv4", "params": ["192.168.0.1", "255.255.255.0", "add", 1000]}' \
		"http://192.168.1.1/cgi-bin/luci/rpc/ip"

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05 23:11:07 +02:00
Jo-Philipp Wich
34821b15a5 luci-base: xhr.js: fix timeout setting with IE 11
Internet Explorer 11 requires the timeout to be applied after the open()
call, otherwise an invlaid state exception will be raised

Fixes aa6c97154 ("luci-base: extend xhr.js")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05 21:16:53 +02:00
Hannu Nyman
4edc9256fa luci-base: show wifi chip identification on overview
Show the correct wifi chip identification in case iwinfo
recognises the chip.

So far the wifidev.get_i18n function has practically always
returned just "Generic", but use iwinfo.hardware_name to
fetch the name.

In case iwinfo returns the default "Generic MAC80211", there
is a double 80211 in the final string, which is a cosmetic bug.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-05-05 21:20:41 +03:00
Jo-Philipp Wich
6a1cdca345 luci-mod-rpc: fix authentication via query string parameter
Localize the `authenticatior()` and `session_retrieve()` functions into the
`index()` function scope so that they're retained when extracting the
function into the dispatcher bytecode cache.

Also allow access to the global scope since upvalues do not work reliably
due to the out-of-context byte code caching of index functions.

Fixes https://github.com/openwrt/luci/issues/1300#issuecomment-381352765
Fixes feefc600e ("luci-mod-rpc: rework authentication and session handling")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05 19:56:26 +02:00
Jo-Philipp Wich
b0f3946570 luci-base: support hiding the "Back to Overview" button in cbi maps
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-03 08:25:26 +02:00
Jo-Philipp Wich
07de9190d8 Revert "luci-base: support hiding the "Back to Overview" button in cbi maps"
This reverts commit 52cf265c9d.

I accidentally committed unrelated changes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-03 08:24:36 +02:00
Jo-Philipp Wich
52cf265c9d luci-base: support hiding the "Back to Overview" button in cbi maps
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-03 08:22:55 +02:00
Ricardo Lamego
e55a5fa386 Fixing small typo
indentifies > identifies
2018-05-02 21:01:53 +01:00
Hannu Nyman
c946efee0f
Merge pull request #1775 from musashino205/l10n/base-upd-ja
luci-base: update Japanese translation
2018-05-02 18:40:08 +03:00
INAGAKI Hiroshi
27af493779 luci-base: update Japanese translation
Updated Japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-03 00:25:41 +09:00
Jo-Philipp Wich
9adbd79faa luci-mod-admin-full: canonicalize configured static lease MAC
When reading the configured mac address of the static lease, filter it
through luci.ip.checkmac() to canonicalize and uppercase the value for
mapping it against the combo box host hints.

Fixes #1772.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-02 16:55:22 +02:00
INAGAKI Hiroshi
0efc6daecf luci-base: sync translations
Synchronized translations with sources.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-05-02 23:53:48 +09:00
Jo-Philipp Wich
8335997df5
Merge pull request #1705 from Mushoz/add-igmp-snooping
luci-mod-admin-full: add igmp snooping option
2018-05-02 16:31:27 +02:00
Hannu Nyman
8656ab726d
Merge pull request #1767 from SvenRoederer/patch-2
luci-mod-freifunk: align spacing
2018-04-28 08:48:09 +03:00
Jo-Philipp Wich
aa6c97154e luci-base: extend xhr.js
Add timeout options to get() and post() and introduce XHR.stop() to support
stopping a poll operation.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-26 09:40:17 +02:00
Jo-Philipp Wich
8459ec0ec8 luci-base: add simple CORS handling to luci.dispatcher
Support a new boolean property `cors` which - if set to true - causes the
dispatcher to positively answer CORS OPTIONS requests after authentication
without actually running the dispatching target.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-26 08:26:30 +02:00
Jo-Philipp Wich
7d13ec6010 luci-base: handle bodies of non-POST requests as well
Decode the HTTP message bodies of any request carrying a Content-Length
header, not just those in POST requests.

This allows handling parameters in other methods, OPTIONS in particular.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-26 08:26:19 +02:00
Sven Roederer
c4460f09a5
luci-mod-freifunk: align spacing
remove some tailing tabs and an empty line in OSMLatLon.htm

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2018-04-25 21:13:00 +02:00
INAGAKI Hiroshi
f55a1faeaa luci-base: update japanese translation
Updated japanese translations.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-04-26 00:30:23 +09:00
Jo-Philipp Wich
11f4a50b3f luci-base: additionally return error code strings in luci.util.ubus()
Add a 3rd return value to luci.util.ubus() containing the string value
of the error return value.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-24 19:22:55 +02:00
Jo-Philipp Wich
914c661b58 luci-base: ensure that file upload values have length
Ensure that the (table) length of a file upload value has nonzero length
by initializing the first table index with the file name.

This fixes tests in the form

    x = luci.http.formvalue(...)
    if x and #x > 0 then ... end

Fixes #1763.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-24 13:44:40 +02:00
Jo-Philipp Wich
82abf9add9 luci-base: decode plus signs in x-www-form-urlencoded POST data
Depends on 5ef51b2ab ("lucihttp: update to latest HEAD").
Fixes #1755.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-22 12:03:23 +02:00
Jo-Philipp Wich
628048772d luci-base: ship rpcd uci access ACL
Ship an ACL definition for granting full read/write access to uci
configuration files via ubus rpc. This is a precondition for enabling
uci session isolation later on.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-21 14:59:41 +02:00
Jo-Philipp Wich
172155eb46 luci-base: properly handle repeated POST parameters
Restore the old luci.http behaviour of converting repeated POST params into
single tables holding all values instead of letting each repeated parameter
overwrite the value of the preceeding one.

Fixes, among other things, the handling of CBI dynamic list values.

Fixes #1752
Fixes 59dea0230 ("luci-base: switch to lucihttp based POST data processing")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-19 12:00:13 +02:00
Jo-Philipp Wich
9b22c9c1e1 luci-base: implement session handling in luci.model.uci
Introduce luci.model.uci.set_session_id() and luci.model.uci.get_session_id()
to set and get the effective session ID respectively.

When a session ID is set, it is sent as `ubus_rpc_session` attribute to rpcd,
causing it to use per-session change directories, isolating LuCI changes from
the global system uci state.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-19 11:42:12 +02:00
Jo-Philipp Wich
fc8f825e2f luci-base: drop dependency on libuci-lua
LuCI itself now uses ubus calls to interact with uci configuration while
the remaining direct libuci-lua users have been updated to either depend
on the binding library or to use luci.model.uci.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:54:53 +02:00
Jo-Philipp Wich
b4040aacb0 libs: move http.protocol.{date,mime,conditionals} to luci-lib-httpprotoutils
Also adjust the dependencies of components depending on these classes and
flatten the namespace from luci.http.protocol.* to luci.http.*

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:21:27 +02:00
Jo-Philipp Wich
eb4571c6dc luci-base: fold luci.http.protocol into luci.http
With only the decoder routines remaining in luci.http.protocol, it makes no
sense to keep the low level protocol class around, so fold the remaining code
into the central luci.http class.

Also adjust the few direct users of luci.http.protocol accordingly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:21:27 +02:00
Jo-Philipp Wich
8f66de12c1 luci-base: refactor luci.http
- Rewrite getcookie() to use liblucihttp header value parsing
 - Rewrite setfilehandler() to use local variables and have cleaner code
 - Fix build_querystring() to actually *en*code the given params

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:21:27 +02:00
Jo-Philipp Wich
db0d5b33d0 luci-base: drop luci.util.dtable()
The dtable() function has no user in the entire LuCI repo, so drop it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:21:27 +02:00
Jo-Philipp Wich
1d5a3123ed Revert "luci-base: add urldecode() and urlencode() C implementations"
This reverts commit ad7dc4a492.

Since we're using liblucihttp now, that library is the appropriate place to
add such decoding helper functions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:21:27 +02:00
Jo-Philipp Wich
59dea0230c luci-base: switch to lucihttp based POST data processing
Use the liblucihttp provided multipart and x-www-urlencoded body parsers
and drop the old Lua parsing code.

The C based data parsers are way faster than their old Lua counterparts
while producing less string garbage and more correct results.

While refactoring the luci.http.protocol code, also drop unused functions
and dead code, heavily reducing the module size.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:21:27 +02:00
Jo-Philipp Wich
f52c8d0b7f luci-base: switch to lucihttp.urldecode() and lucihttp.urlencode()
Drop the Lua implementation in luci.http.protocol and use the optimized C
variants of liblucihttp instead.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18 16:21:27 +02:00
Qian Zheng
8e087a3d53 luci-base: zh_CN: update Simplified Chinese translation
Signed-off-by: Zheng Qian <sotux82@gmail.com>
2018-04-18 09:22:07 +08:00
Hannu Nyman
b2eceb0bcc i18n: sync translations, cleanup
* sync translations
* clean-up old strings from adblock

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-10 18:27:07 +03:00
Hannu Nyman
d42ce28e20
Merge pull request #1742 from fantom-x/dhcp_cachesize_max
luci-mod-admin-full: limit dns cachesize to 10000
2018-04-10 17:36:29 +03:00
Jo-Philipp Wich
2b516423a0 luci-base: fix rendering of 404 HTML error template
This 404 error template rendering has been broken for a long time due to bad
function environment level in luci.template when invoking the rendering from
the toplevel dispatcher context.

Fix this issue by adding a local function indirection, essentially adding an
additional stack frame.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-10 12:03:15 +02:00
Jo-Philipp Wich
48a5864f06 luci-base: error404: do not access request env directly
Instead of attempting to access the request environment directly (which does
not work anyway using the CGI SGI), use the already sanitized
dispatcher.context.request property to print out the not found url.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-10 12:01:43 +02:00
Jo-Philipp Wich
b194b8882e luci-base: don't propagate null bytes in path information
It is possible to inject unescaped markup using a double encoded null byte
via PATH_INFO on certain leaf nodes.

Since there is no legitimate reason to handle null bytes in any part of the
requested url, simply skip over such bytes when parsing the PATH_INFO value.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-10 11:41:32 +02:00
Jo-Philipp Wich
ad7dc4a492 luci-base: add urldecode() and urlencode() C implementations
The C implementations of urlencode and urldecode are considerably faster
than their current Lua counterparts.

On an AMD Geode system, the C variant is up to ten times faster when
decoding strings and up to four times faster when encoding them.

The functions are also designed to only allocate new strings when any
actual changes are required, otherwise they reuse the existing input
strings, reducing the overal memory usage somewhat.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-10 11:41:32 +02:00
Marc Benoit
fbeea4ee33 luci-mod-admin-full: limit dns cachesize to 10000
The value of cachesize is hardcoded to 10000 in
dnsmasq-2.79/src/option.c to 10000 max

    case 'c':  /* --cache-size */
      {
        int size;

        if (!atoi_check(arg, &size))
          ret_err(gen_err);
        else
          {
            /* zero is OK, and means no caching. */

            if (size < 0)
              size = 0;
            else if (size > 10000)
              size = 10000;

            daemon->cachesize = size;
          }
        break;
      }

Tested on Netgear R7800
Signed-off-by: Marc Benoit <marcb62185@gmail.com>
2018-04-09 20:51:14 -04:00
Marc Benoit
28d10632a1 luci-mod-admin-full: allow setting dns cachesize
In the case of more powerful routers the default
cachesize value == 150 is too small and can easily
be extended to 1,000's and 10,000's of entries.
It makes sense to make it easy configurable.

Tested on Netgear R7800

Signed-off-by: Marc Benoit <marcb62185@gmail.com>

Fix whitespace, edit the proposed help text.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-09 17:17:02 +03:00
Jo-Philipp Wich
b1b5723516 luci-base: consider empty parameters as well when testing POST requirement
The cbi class will react on an empty "cbi.submit" parameter as well so we
must intercept GET requests using that too.

Fixes 186e690c0 ("luci-base: dispatcher: reject non-POST requests with any cbi.submit value")

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-09 07:19:28 +02:00
Hannu Nyman
0ab0303527 i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-08 20:38:30 +03:00
Hannu Nyman
c7369830b6 timezone data: update to 2018d
Update timezone data to 2018d

http://mm.icann.org/pipermail/tz-announce/2018-March/000049.html

  In 2018, Palestine starts DST on March 24, not March 31.
     Adjust future predictions accordingly.
  Casey Station in Antarctica changed from +11 to +08

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-07 23:26:29 +03:00
Jo-Philipp Wich
8c636c87ee luci-base: fix luci.model.uci.get_first()
Properly propagate the config parameter to the foreach iterator in order
to fix get_first() lookups.

Fixes #1734.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-07 14:09:18 +02:00
Jo-Philipp Wich
5c31937a0f luci-base: escape path strings and field parameter
Prevent various XSS vectors by not interpolating field and path values
verbatim into script and html contexts.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-07 11:43:44 +02:00
Jo-Philipp Wich
b00b676923 luci-base: properly initialize cbi.js on SimpleForms
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 16:39:39 +02:00
Jo-Philipp Wich
14da6e85a6 luci-mod-admin-full: dispatch SimpleForm models using the form() action
This fixes issues dicovered by check-controllers.sh

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 12:10:16 +02:00
Jo-Philipp Wich
ec2ad15305 luci-mod-freifunk: dispatch SimpleForm model using the form() action
This fixes issues dicovered by check-controllers.sh

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 12:07:50 +02:00
Jo-Philipp Wich
bf71ae5f1b luci-base: emit a warning if cbi() delegates a SimpleForm instance
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 12:07:49 +02:00
Jo-Philipp Wich
24ac0d81ee luci-base: implement luci.model.uci.get_state()
Introduce a get_state() function which can be used to access legacy
uci state variables. This is usually not needed anymore but some
packages (mainly mwan3) still rely on this.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 09:24:36 +02:00
Jo-Philipp Wich
4d6c5d284b luci-proto-ipv6: clarify 6in4 local address hint
Make the hint message more explicit to tell users that the prefix size needs
to be specified as well.

Fixes #1559.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 08:49:41 +02:00
Jo-Philipp Wich
feefc600ed luci-mod-rpc: rework authentication and session handling
- Use the ubus session.login procedure to authenticate credentials
 - Fix testing of allowed usernames
 - Support authentication via sysauth cookie

Fixes #1300, #1700, #1711

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 07:56:56 +02:00
Jo-Philipp Wich
d6b4a3d45a luci-mod-admin-full: fix request path access in uci controller
Fixes #1725
Fixes 731ed77c0 ("treewide: improve handling of page redirections in uci change views")

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06 06:58:32 +02:00
Jo-Philipp Wich
bfc98bec4d luci-mod-admin-full: escape display parameter
Prevent reflected XSS through the reset button by url encoding the
display parameter.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 23:03:01 +02:00
Jo-Philipp Wich
731ed77c0b treewide: improve handling of page redirections in uci change views
Instead of passing the full LuCI request url, pass the relative resolved
request path instead and filter the received value through the lookup()
dispatcher function to only allow paths to actual internal pages.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 23:03:01 +02:00
Jo-Philipp Wich
7b04d0bbcf luci-base: introduce luci.dispatcher.lookup()
The lookup function takes multiple, possibly malformed path fragments,
splits them on slashes, constructs a temporary path and looks up the
result in the dispatch tree.

If a matching node has been found, the function will return both the
node reference and the canonical url to it.

If no corresponding node is found, the function returns nil.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 23:03:01 +02:00
Jo-Philipp Wich
ac2210376d
Merge pull request #1709 from dibdot/get_interface-fix
luci-base/network.lua: fix get_interface function
2018-04-05 09:49:49 +02:00
Jo-Philipp Wich
c0d9c4f3ce treewide: filter shell arguments through shellquote() where applicable
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 09:37:43 +02:00
Jo-Philipp Wich
45cefe71f6 luci-base: introduce luci.util.shellquote()
Introduce a new function luci.util.shellquote() which encloses the given
string argument in single quotes and escapes any embedded single quote
characters.

This function is intended to be used when interpolating untrusted input
into shell commands.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 09:37:43 +02:00
Jo-Philipp Wich
9e4b8a9138 luci-mod-admin-full: fix possible shell injection in bandwith status
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 00:33:09 +02:00
Jo-Philipp Wich
9db5fa93af luci-base: fix possible shell injection in luci.tools.status.switch_status()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 00:32:56 +02:00
Jo-Philipp Wich
186e690c08 luci-base: dispatcher: reject non-POST requests with any cbi.submit value
Due to the fact that luci.model.cbi reacts on any "cbi.submit" value while
the dispatcher only required POST for cbi.submit == 1, the CSRF token
protection could be bypassed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05 00:15:22 +02:00
Jo-Philipp Wich
053c343ef1 luci-base: use FULL_REQUEST_URI on login form templates
Switch from using the REQUEST_URI CGI variable directly to the canonicalized
FULL_REQUEST_URI property.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-04 23:30:49 +02:00
Jo-Philipp Wich
8c617c02b5 luci-base: add FULL_REQUEST_URI template property
Introduce a new template property FULL_REQUEST_URI which returns the full
canonicalized request URL built from SCRIPT_NAME, PATH_INFO and QUERY_STRING.

This new property is safer to use compared to using the raw REQUEST_URI CGI
environment variable directly as this value is essentially untrusted user
input which may contain embedded escaped slashes, double forward slashes and
other oddities allowing XSS exploitation or request redirection.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-04 23:24:31 +02:00
Jo-Philipp Wich
94ea907707 luci-mod-admin-full: use strict hostname validation for dhcp hosts
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-04 23:21:53 +02:00
Jo-Philipp Wich
70ffbe65a0 luci-base: add a strict flag to the hostname validator
Some applications, e.g. dnsmasq, do not allow hostnames starting with an
underscore, therefor extend the existing hostname datatype validator with
a `strict` which disallows a leading underscore.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-04 23:21:53 +02:00
Jo-Philipp Wich
4024d4f224 luci-base: switch to ubus uci operations
Switch luci.model.uci to use ubus uci calls instead of driving libuci-lua
directly.

This prepares support for more advanced features such as per-session change
isolation and configuration rollback on errors.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-04 23:21:53 +02:00
Qian Zheng
46a2b5ebea luci-base: zh_CN: update Simplified Chinese translation
Signed-off-by: Qian Zheng <sotux82@gmail.com>
2018-04-02 11:49:47 +08:00
Dirk Brenken
87c2d95264 luci-base/network.lua: fix get_interface function
* fix wrong private function call to handle
  section id as parameter (fix for #1687)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-03-31 07:11:02 +02:00
INAGAKI Hiroshi
caf4421603 i18n: sync translations
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-03-29 12:51:13 +09:00
Jaap Buurman
6c5bfff53c luc-mod-admin-full: add igmp snooping option
Signed-off-by: Jaap Buurman <jaapbuurman@gmail.com>
2018-03-28 15:59:29 +02:00
Florian Eckert
70783f5802 luci-base: fix colspans calculation in tblsection
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-03-27 10:39:55 +02:00
Dirk Brenken
29d8770983 luci-base/util.lua: enhance checklib function
* enhance the checklib function in util.lua to check the 'fullpathexe'
  as well, e.g. this fixes runtime errors on the dhcp/dns template in
  environments without dnsmasq

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-03-22 10:40:42 +01:00
Jo-Philipp Wich
005f4fb7d4
Merge pull request #1654 from TDT-AG/pr/20180301-luci-several-fixes
luci-app-firewall/luci-base/luci-mod-admin-full: some fixes and improvements
2018-03-15 09:52:22 +01:00
Jo-Philipp Wich
28e3b32854 treewide: unify mac address handling
Use the new luci.ip MAC address facilities to parse and verify MAC addresses
in a common way, instead of relying on various ad-hoc solutions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-12 16:12:18 +01:00
Jo-Philipp Wich
dfba318140 luci-base: fix documentation spelling mistakes in luci.http.protocol
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-12 16:04:52 +01:00
Jo-Philipp Wich
6d253abd99 luci-base: fix documentation spelling mistakes in luci.util
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-12 16:03:58 +01:00
Jo-Philipp Wich
62630fbf88 luci-base: fix parsing of ethers(5)
The /etc/ethers file may contain any number of white space characters
between the mac address and the IP/hostname field, so extend the pattern
to allow for that.

Man ethers(5) also states that the IP field may be a symbolic hostname,
so test whether the name is an IP address or hostname before adding it
to the hints structure.

Fixes #1674.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-11 18:26:31 +01:00
Hannu Nyman
bf04031171
Merge pull request #1675 from dibdot/material-fix
luci-base/firewall_zonelist: fix visual interface/background alignment
2018-03-09 18:54:32 +02:00
Dirk Brenken
21fbe39858 luci-base/firewall_zonelist: fix visual interface/background alignment
* fix for #1667, tested with all standard themes

Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-03-09 08:13:03 +01:00
Jo-Philipp Wich
bf49505ea0 luci-base: properly handle undefined IPv6 local-address information
If IPv6 prefix assignment is disabled, the "local-address" structure
might exist, but be empty which causes the adress formatting in the
network model class to bail out.

Verify the completeness of the "local-address" structure before using
it in order to avoid runtime errors.

Fixes #1657.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-02 14:42:52 +01:00
Jo-Philipp Wich
852ec6e28b luci-base, luci-mod-admin-full: store backup vars in luci configuration
Keep the ifname and bridge state backup variables in /etc/config/luci to not
pollute /etc/config/network.

Fixes #1655.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-02 12:44:35 +01:00
Florian Eckert
10fbf9b2e4 luci-mod-admin-full: add hint on backup restore
Add a hint to backup restore that files could remain on the system.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-03-01 12:33:43 +01:00
Florian Eckert
fa756d1fbb luci-base: fix browser.htm template
If cbi_init() is not called first browser gif will not be found.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-03-01 12:31:50 +01:00
Jo-Philipp Wich
461df8b0dc luci-base: do not assume a fixed host address in delegated prefix (#1484)
OpenWrt/LEDE introduced the "local-address" field a while back to expose the
effective local host address of the delegated prefix, so use that information
instead of assuming `[prefix]:1`.

Fixes #1484.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-16 17:05:52 +01:00
Jo-Philipp Wich
de4f1c9046 luci-base: rework client side IP validation types and support "hostid" type
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-16 17:05:48 +01:00
Jo-Philipp Wich
3e1e4d5eb6 luci-base: fix Lua-side ip6hostid() datatype validation
A valid host ID as accepted by netifd must meet the following criteria:

 - Is either one of the two special "random" or "eui64" strings
 - Or is a valid IPv6 address according to inet_pton(AF_INET6)
 - Has the first 64 bit set to zero

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-16 17:05:48 +01:00
Hannu Nyman
76f9f5e94d
Merge pull request #1627 from user7887/luci-ru
i18n-ru: fixed russian translation
2018-02-08 18:17:02 +02:00
Vladimir
c21d22c017 i18n-ru: fixed russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-02-07 17:37:34 +03:00
Jo-Philipp Wich
e6cfe35baf luci-mod-admin-full: prevent unknown sysctl key warnings on status page
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-04 19:20:32 +01:00
Hannu Nyman
eae2f37b62 timezone data: update to 2018c
Update timezone data to 2018c

http://mm.icann.org/pipermail/tz-announce/2018-January/000048.html

   Briefly:
   Sao Tome and Príncipe switched from +00 to +01.
   Brazil's DST will now start on November's first Sunday.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-02-02 18:21:58 +02:00
Vladimir
4567512bdd i18n-ru: fixed and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-30 17:35:30 +03:00
Vladimir
7133c51012 i18n-ru: fixed and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-29 18:03:37 +03:00
Vladimir
d74ff878e1 i18n-ru: fixed and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-26 16:57:15 +03:00
Vladimir
3467df984f i18n-ru: fixed simple-adblock strin&rus translation
Signed-off-by: Vladimir <picfun@ya.ru>

refine

refine
2018-01-23 13:40:18 +03:00
Vladimir
1295b6ca38 i18n-ru: fixed russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-21 19:48:47 +03:00
Vladimir
8a929a9551 i18n-sync base.po changes
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-20 16:09:35 +03:00
Vladimir
bb87aac852 i18n-ru: Edits on the general pattern of Russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-20 14:02:48 +03:00
Hannu Nyman
7062250701 luci-mod-admin-full: fix typos on dhcp page
Based on #1568

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-01-20 10:51:29 +02:00
Jo-Philipp Wich
a441721d32 luci-base: log login attempts
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-17 18:49:42 +01:00
Vladimir
94f7c302bb i18n-sync change, added project info...
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-16 21:06:05 +03:00
Qian Zheng
ba741b40c3 luci-base: zh_CN: update Simplified Chinese translation
Signed-off-by: Qian Zheng <sotux82@gmail.com>
2018-01-16 20:22:37 +08:00
Vladimir
7541a2705e added project info, were reviewed in graphical mode, ready for a stable release
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-14 23:15:59 +03:00
Mathias Kresin
cfdeaa91fa luci-mod-admin-full: set 0 db DSL SNR offset by default
If no DSL SNR offset is set for the dsl line the first entry from the
dropdown list is pre-selected by default, which would apply a -10 db
offset by default.

Pre-select the 0 db option if nothing else is specified in the uci config
files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-01-13 07:46:36 +01:00
Vladimir
72b9aa414e fixed russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-12 23:11:58 +03:00
Vladimir
26d60e9c7f fixed and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-12 19:39:21 +03:00
Vladimir
7cdb92bfd0 fixed russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-11 23:17:43 +03:00
Vladimir
5d48227363 Correction by script i18n-sync.sh with editing of Russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-11 19:22:07 +03:00
Vladimir
7e3d52ec08 fixed and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-11 01:43:46 +03:00
Vladimir
6a9ceee72b i18n: Added and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
[squashed commits]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-09 08:17:07 +01:00
Martin Schiller
673a8bd76f luci-mod-admin-full: led config: add support for Switch Port Mask
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-01-09 08:11:23 +01:00
Arjen de Korte
96f6a79eb2 luci-mod-admin-full: fix incorrect length of DUID-LL
The length of DUID-LL is 80 bits (16 bit DUID type, 16 bit hardware type, 48 bit mac)
which corresponds to 20 nibbles. Also lower the minimum required length of DUID to
20 nibbles in order to allow entering a DUID-LL.

Signed-off-by: Arjen de Korte <build+github@de-korte.org>
2018-01-09 08:08:55 +01:00
Jo-Philipp Wich
e034f271d8 luci-base: adjust translations
- Modify labels for mesh forwarding and 802.11b rate options
 - Synchronize translations
 - Complete german base translation

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-09 08:03:03 +01:00
Sven Roederer
a6b41271b7 luci-mod-admin-full: Add 802.11b legacy_rates support
this was added to LEDE with ed62d91f4b5296a4aa883ce975d76f590ef4e910 and defaults to enable.

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
2018-01-09 07:09:31 +01:00
Sven Roederer
63255ec38b luci-mod-admin-full: Add mesh_fwding support
* make it only visible for 802.11s mesh-networks
* have it enabled by default

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
[add empty line before meshfwd assignment]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-09 07:08:08 +01:00
Jo-Philipp Wich
08b40acc4e luci-mod-admin-full: allow setting DSL SNR offset for VDSL
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-08 10:31:03 +01:00
Hannu Nyman
6e1bd7e42d
Merge pull request #1509 from user7887/luci-ru
fixed and updated russian translation
2018-01-08 09:18:23 +02:00
Vladimir
ad3ee48813 fixed and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-08 01:48:03 +03:00
Kishan Gondaliya
267bf83db0 luci-mod-admin-full: Add meshId support
Signed-off-by: Kishan Gondaliya <kishanpgondaliya@gmail.com>
[move mode before the SSID / Mesh ID setting]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-07 19:38:23 +01:00
Vladimir
cdb506d1b4 fixed and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
2018-01-06 22:34:40 +03:00
Hannu Nyman
bd52bf4625 i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-01-06 09:40:39 +02:00
Jo-Philipp Wich
dac0cce6b9 luci-mod-admin-full: remove unused button cbi model
Remove the unused admin_system/buttons cbi model. It has been broken,
was not exposed in the controller and the corresponding support code
which only ever was available for the ath25 target has been dropped in
with https://git.lede-project.org/0a3d721in June 2016.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-03 23:25:35 +01:00
Vladimir
76b12b242a fixed and updated russian translation
Signed-off-by: Vladimir <picfun@ya.ru>
[renamed swedish advanced-reboot.po as well, fixed a syntax error,
 filtered updated files through ./build/i18n-sync.sh]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-03 21:44:55 +01:00
Jo-Philipp Wich
75e9338b87 luci-base: fix luci.sys.wifi.getiwinfo() on radio names
Fall back to using a phy-wide iwinfo handle if the vif query yields no result.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-03 21:27:49 +01:00
Jo-Philipp Wich
dbb694c699 luci-mod-admin-full: allow a wider range of DSL SNR margins
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-02 18:26:16 +01:00
Jo-Philipp Wich
c8b48f9524 luci-base: reorder private functions
The _wifi_sid_by_ifname() function depends on _wifi_state_by_ifname()
so reorder the private helper functions accordingly to avoid nil value
call attempts.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-02 00:30:53 +01:00
Jo-Philipp Wich
f9b8d7ff7b luci-base: rework wireless state handling (#1179)
- fix mapping of ubus wireless state to uci declared vifs
 - fix leaking foreign vif info into per-phy iwinfo stats

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-02 00:24:10 +01:00
Jo-Philipp Wich
f2162a9a66 luci-base: require current libuci-lua
Upcoming changes will require libuci-lua features not present in
versions prior to version 2018-01-01.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-01 17:10:31 +01:00
Hannu Nyman
878a64f538 typo: fileystem --> filesystem
fix typo:
sed -i "s/fileystem/filesystem/"

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-12-28 14:15:16 +02:00