Commit graph

9891 commits

Author SHA1 Message Date
Jo-Philipp Wich
0b44d33dd7 luci-mod-admin-full: properly reset internal device form field
In some cases the hidden internal device field was not reset, e.g. after
aborting a wifi scan and using the browser back buttons to navigate to the
overview page again.

In such a case, the previous device hidden field was still present and a new
one getting created, causing further wireless scan attempts to get invoked
with multiple radio names as parameter which fails.

Fix this issue by using the new generic cbi_submit() helper any by dropping
the faulty wifi_action() function.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 90f9c59a2d)
2018-07-20 07:56:46 +02:00
Jo-Philipp Wich
d7c868a05e luci-base: rework CBI footer template
- Make sure that hitting enter in the form hits the CBI save action and not
  apply or cancel
- Hide action panel if no actions are available
- CLeanup code

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c09e154560)
2018-07-20 07:56:38 +02:00
Jo-Philipp Wich
bea5187f3d luci-base: rework tblsection template
- Hide empty title and description rows
- Correct row striping offset
- Cleanup code

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f1fb7122e3)
2018-07-20 07:56:35 +02:00
Jo-Philipp Wich
24b924bfe4 luci-base: rework simpleform template
- Ensure that pressing enter in the form triggers the submit action and
  not a cbi skip or cancel
- Hide page actions when empty
- Cleanup code

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit bc562294b9)
2018-07-20 07:56:31 +02:00
Jo-Philipp Wich
392fd02383 luci-base: cbi.js: add cbi_submit() helper
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7b43e81c9b)
2018-07-20 07:56:12 +02:00
Jo-Philipp Wich
c0612e8208 luci-mod-admin-full: offer "Cancel" button in iface add dialog
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9bdd097f53)
2018-07-20 07:55:59 +02:00
Jo-Philipp Wich
94b6aa2a8e luci-base: remove unused icons
- The wifi_big.png / wifi_big_disabled.png icons were used on the wireless
   overview page which now uses badges with normal sized icons
 - The encryption.png / encryption_disabled.png icons were never used at all

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 92360f2d5b)
2018-07-17 20:52:24 +02:00
Anton Kikin
53686fd492 luci-base: update and improve Russian translation
Add missing translations and update existing not quite correct translations.
Replaced hyphens on em dashes where it is required by the Russian rules.

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
(cherry picked from commit de74dcec1b)
2018-07-17 20:52:24 +02:00
Anton Kikin
0b00ceef01 luci-base: fix Russian translation
Removed redundant <br> tags from translations.

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
(cherry picked from commit efb38849d9)
2018-07-17 20:52:24 +02:00
Stan Grishin
984a1afcf7 luci-app-simple-adblock: new start/stop button, better integration with simple-adblock
Signed-off-by: Stan Grishin <stangri@melmac.net>
(cherry picked from commit 768a72597c)
2018-07-17 20:52:24 +02:00
Yurii
a7e1edf936 luci-app-upnp: update Ukrainian translation
Corrections translation.

Signed-off-by: Yurii yuripet@gmail.com
(cherry picked from commit 4f5e1c7da5)
2018-07-17 20:52:24 +02:00
Yurii
8d882e5593 luci-base: update Ukrainian translation
Updated with the latest resync translation, corrections and additions translation.

Signed-off-by: Yurii yuripet@gmail.com
(cherry picked from commit 3859d444db)
2018-07-17 20:52:23 +02:00
amitabha
b49c62b2eb base.po: Update chinese translations.
Fix some Chinese translations.
Signed-off-by: Angus Ding <angus.ding@gmail.com>
(cherry picked from commit 92404498a1)
2018-07-17 20:52:23 +02:00
Anton Kikin
bf2c25e440 luci-base: fix Russian translation
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
(cherry picked from commit 6f29acdfb7)
2018-07-17 20:52:23 +02:00
Daniel Dickinson
edbcdef15c luci-base: Avoid block umount on fstab apply
Default behaviour of changes to fstab (Mount Points) was
to use /etc/init.d/fstab restart, however this unmounts
filesystems via block umount which can cause the device
to fail, so replace the initscript call with an exec
of 'block mount'.

Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
(cherry picked from commit 33b279c475)
2018-07-17 20:47:48 +02:00
Jo-Philipp Wich
efff0139be luci-base: resync translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-17 20:46:54 +02:00
Jo-Philipp Wich
b8b87182f6 luco-proto-ipv6: allow multiple prefixes for 6in4 and dhcpv6
Fixes FS#1361.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 60e7ea2fc8)
2018-07-17 16:20:15 +02:00
Jo-Philipp Wich
4da137e892 luci-base: fix field section add button/input field names
Some CBI map models, mainly the Network -> VLAN page, expect a valid
previous section ID in their Section:create() callback.

Previous refactoring of the tblsection markup broke this behaviour as
the "section" loop variable was accidentally localized, causing it to
be undefined outside of the loop body which caused the section add
button and name input fields to get rendered with a wrong "name"
attribute.

Fix this by moving the "section" variable declaration out of the loop
and by readding references to it in the non-anonymous section add case.

Fixes FS#1657
Fixes 002c4d1d5 ("luci-base: add "Name" label to autogenerated title column")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>

(cherry picked from commit fcc9cd6a9a)
2018-07-16 17:35:07 +02:00
Jo-Philipp Wich
911219898f luci-mod-admin-full: fix changing alias interface ifnames
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-15 17:35:28 +02:00
Jo-Philipp Wich
9cc24e6c62 luci-base: fix handling alias interfaces in ifacelist widget
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-15 17:35:28 +02:00
Jo-Philipp Wich
cd8fc00130 luci-base: luci.model.network: recognize alias interfaces
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-15 17:35:28 +02:00
Jo-Philipp Wich
d03537c2dd luci-mod-admin-full: improve interface overview display
Remove the guessing of primary interfaces for now as we cannot yet properly
track parent / child interface relations.

Instead, add tooltips to the interface icons displaying detailed physical
layer information per netdev.

For dynamic or true alias interfaces (using "@" notation), skip the
reporting of MAC and traffic stats.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-15 17:35:28 +02:00
Jo-Philipp Wich
8a7cd70d4d luci-theme-bootstrap: small style fix for link buttons
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-15 17:35:28 +02:00
Jo-Philipp Wich
98adc98f75 luci-mod-admin-full: fix wifi add and scan actions
Due to conversion to CBI, the inline forms are now nested and thus do not
work anymore.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f6ffc3d739)
2018-07-15 13:31:56 +02:00
Jo-Philipp Wich
f974cfe093 luci-base: update german translation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit f29b2a2652)
2018-07-15 12:29:39 +02:00
Krystian Kozak
16aa088cab luci-base: update Polish translation
Updated Polish translations.

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
(backported from commit 77b8aa50e0)
2018-07-15 12:28:47 +02:00
Jo-Philipp Wich
fb817df836 openwrt-18.06: merge master
Due to a huge number of fixes and diverging development histories, I decided
to completely merge the current LuCI master into the 18.06 release branch to
have a common code base for upcoming maintenance releases.

Some LuCI apps have minor style glitches yet but I do not deem them to be
release critical as non-default components need to be opkg-installed anyway
and the package repositories are continuously refreshed, so we do not need
to fix everything for OpenWrt 18.06.0-rc2.

The most important changes introduced by this merge are:

1) New HTTP handling library in C

  The new library should vastly reduce the required RAM for processing
  large POST bodies while implementing some slightly more strict parsing
  logic.

2) Apply/Rollback workflow

  The ubus rpcd based apply/rollback handling will automatically revert
  config changes if access to the device is lost for a certain period
  of time, this is mainly intended for preventing issues with bad
  config settings and the like.

  The feature is not 100% error-proof yet but it successfully prevents a
  large number of issues already. For final, the handling of the firewall
  conntrack cache needs to be fixed yet as adding "lockout" firewall rules
  is not yet catched due to the open HTTP session allowed by netfilter
  conntrack

3) Template markup and theme style modifications

  A large number of changes have been made to the markup in the various
  templates, mainly to allow for responsive styling of tables.

  The only theme currently making full use of that is the non-default
  OpenWrt theme which will break table rows into disjunct boxes on
  very narrow screens.

  The changes have been tested on IE 11, MS Edge, Firefox, Chrome, an
  iPhone 5s, iPhone 6 and iPad Air.

4) Initial LuCI support for displaying virtual dynamic network interfaces

  Some protocol handlers will spawn purely dynamic sub-interfaces which
  are not present in UCI. Such interfaces have been invisible in LuCI so
  far which caused confusion especialy wrt. missing IP addresses etc.

  LuCI will now display such dynamic interfaces on the interface overview.

5) Initial LuCI support for display interface runtime error information

  LuCI will now expose interface error information stored in the ubus
  runtime information by protocol handlers.

  This is mainly useful to get notified of low level problems like
  bad SIM codes are missing APN information.

6) Various XSS and CSRF bypass fixes

  A number of code places performing inadequate markup escaping have been
  fixed and the dispatcher CSRF token enforcement rules have been reworked
  to actually catch all POST security cases.

7) Initial support for running under nginx

  Various bugs have been fixed to allow LuCI to function under nginx using
  a FastCGI wrapper.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 17:22:53 +02:00
Jo-Philipp Wich
b38306dcee luci-base: xhr: increase poll request timeout
Some status requests can take quite some time to finish, the LuCI DSL
status information in particular.

Since the polling loop code already takes care of not relaunching
requests which are already running, increase the per iteration timeout
to up to five times the poll interval.

This should be sufficient to let most operations complete.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 16:55:47 +02:00
Jo-Philipp Wich
053682c4c3 luci-theme-bootstrap: margin fix for multiple wifs on status overview
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 16:31:14 +02:00
Jo-Philipp Wich
98f4c3cf50
Merge pull request #1933 from Ansuel/hostname_upnp
luci-app-upnp: add hostname info
2018-07-13 14:50:28 +02:00
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
4115f8cc56 luci-app-advanced-reboot: fix translation string
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 12:47:59 +02:00
Jo-Philipp Wich
4381a27ef0 luci-theme-material: table and button style fixes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 12:39:26 +02:00
Jo-Philipp Wich
58cee79869 luci-theme-openwrt: cleanup CSS
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 09:38:31 +02:00
Jo-Philipp Wich
887d0a6859 luci-theme-bootstrap: cleanup CSS
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 09:38:25 +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
5722105007 luci-app-upnp: tweak table markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 09:37:28 +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
a0e5e8a9da luci-theme-bootstrap: compress color names, fix table striping
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:57:20 +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
401898a437 luci-proto-qmi: register further network error codes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:59 +02:00
Jo-Philipp Wich
5f2aa8d475 luci-proto-ncm: register further network error codes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:59 +02:00
Jo-Philipp Wich
80ed1af639 luci-proto-ipv6: register further network error codes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:59 +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