Commit graph

145 commits

Author SHA1 Message Date
Jo-Philipp Wich
7f6fc1681f luci-mod-admin-full: automatically set dns=1 for static leases with hostname
Most users likely want the hostname of a static DHCP lease to be resolveable,
even if the corresponding host is currently offline.

Adjust the form logic to automatically set 'option dns 1' whenever a name is
specified in the static lease entry.

FIxes LEDE FS#815.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-02 01:03:07 +02:00
Jo-Philipp Wich
b753cc503f luci-mod-admin-full: use "Lease time" instead of "Leasetime" as translation label
This allows sharing a common translation string between DHCP and interface pages.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-01 00:25:53 +02:00
Jo-Philipp Wich
426c1043b1 luci-mod-admin-full: auto-migrate ifnames when changing VLAN configuration
This change extends the switch VLAN configuration page to automatically
adjust interface ifname options when altering VLAN settings.

For example "eth0" is changed to "eth0.1" when a previously untagged LAN
VLAN is switched to tagged on the CPU port and vice versa.

Notifications are displayed in the page header if an auto migration was
performed.

This change should make the switch configuration more user friendly and
less prone to soft bricking.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-01 00:25:38 +02:00
Hannu Nyman
97ad2a9286 luci-mod-admin-full: add advice to restart cron
Cron init script starts the service only if a crontab file
exists. If there is no crontab file at boot and the user
later creates one, he needs to manually restart the service.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 1970c21e3b)
2017-05-08 16:06:06 +03:00
Jo-Philipp Wich
16ffea4bf5 luci-mod-admin-full: use nf_conntrack_count for counting connections (#1114)
As suggested by PR #1114, use `/proc/sys/net/netfilter/nf_conntrack_count`
instead of counting the lines in `/proc/net/nf_conntrack` but use a slightly
more efficient approach which avoids spawning an extra `cat` command.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-20 16:57:58 +02:00
Hannu Nyman
4d8b1352bf luci-mod-admin-full: new hostapd functionality for 80211w/r detection
Use the new hostapd functionality (in LEDE) to detect 802.11r and 802.11w
more properly. Leave the old logic in place for Openwrt.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(partial cherry pick from commit b0943391d8)
2017-03-01 10:20:30 +02:00
Hannu Nyman
5be88e0c3e luci-mod-admin-full: adjust 80211w option default value
Adjust 802.11w default value from "0" to "" in order to avoid unnecessary
"option ieee80211w 0" lines in /etc/config/wireless

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(partial cherry pick from commit b0943391d8)
2017-02-28 16:34:49 +02:00
Cody R. Brown
a100738163 mod-admin-full: Add IPv6 Prefix Delegation information to Status Pages
The Overview page and Network>Interfaces page currently do not give much
information about IPv6, particularly with Prefix Delegated setups. In these
setups, ISP will delegate a prefix to the router. Currently LuCI doesn't display
this Prefix Delegation from the ISP anywhere. A number of changes was added
to this commit:

1) self:_ubus("ipv6-prefix") was extracted and put into protocol.ip6prefix.
2) Network>Interfaces page, if a .ip6prefix is present, show it under Status.
   (IPv6-PD).
3) On the Overview page, "Type" and "Prefix Delegated" has been added to
  the IPv6 Network Overview Status:
  - Type will display the .proto, similar to the IPv4 case.
    If a .ip6prefix is present, it'll display a "-pd" at the end of
    the Type: i.e. dhcpv6-pd vs. dhcpv6.
  - If no .ip6prefix is present, it'll do what it does currently, and
    just show Address, or :: if no address is present.
  - If .ip6prefix is present, it'll show the "Prefix Delegated", it'll also
    hide "Address" if no address is present, else it'll show ifc6.ip6addr as well.

Signed-off-by: Cody R. Brown <dev@codybrown.ca>
(cherry picked from commit 5377d22b4a)
(commit message reformatted)
2017-02-20 16:48:19 +02:00
Eric Luehrsen
6c09d83406 luci: ignore '::1' in realtime connections
luci ignores only 127.0.0.1 in real time connections.
The dnsmasq.init script sets up resolv.conf(s) as such.
With alternate DNS servers configured 'localhost' will
resolve to '127.0.0.1' or '::1'. The connections graph
will spam itself. openwrt/luci#996

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
(cherry picked from commit 52771816a0)
2017-02-20 16:47:56 +02:00
Hannu Nyman
a76564d973 luci-mod-admin-full: change html for compatibility with openwrt theme
Openwrt theme apparently accepts slightly different html than
Bootstrap or Material. Change code to <br /> to make it compatible.

This fixes #1011

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 6a2a62fa4f)
2017-02-15 08:54:59 +02:00
Hannu Nyman
7e6b3d1eb9 luci-mod-admin-full: place 80211w options behind a check for wpad-full
The default hostapd/wpad mini version does not support ieee80211w
and the option's visibility in LuCI may lead it to be placed in user's
/etc/config/wireless preventing wifi from starting.

Check for hostapd/wpad full before exposing the option.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 07e01d094e)
2017-02-14 23:43:05 +02:00
Hannu Nyman
d1d3b8612e Backport: support for 802.11w Management Frame Protection
Add support for IEEE802.11w Management Frame Protection options
into the wireless config.

Mention in the help text that the full version of wpad/hostapd is
needed.

Currently supported in LEDE by ath9k and ath10k, mwlwifi and mt76.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>

(cherry picked from commit 4ddb6b2816)
(cherry picked from commit 4d31f7ca30)
2017-02-10 17:21:47 +02:00
Hannu Nyman
8dec864828 Backport: support for 802.11r fast transition in wireless config
Backports from master the commits that add support for
IEEE802.11r Fast Transition to luci.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>

(cherry picked from commit f02794f28c)
(cherry picked from commit 171c06146a)
(cherry picked from commit 02bed26188)
(cherry picked from commit c491c181ea)
2017-02-10 17:14:48 +02:00
Jo-Philipp Wich
5f80115b2c luci-mod-admin-full: fixes for usbport LED triggers
The previous commit erroneously used "ports" instead of "port" as name for the
option widget, causing wrong uci values to be written.

Also work around some cbi idiosyncrasies regarding MultiValue widgets which
prevented rendering the correct initial selection state.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-02 00:40:43 +01:00
Jo-Philipp Wich
472dc4b9e2 luci-mod-admin-full: admin: change password in Map.parse()
Move the password setting into the .parse() callback to ensure that it is
updated regardless of whether "Save" or "Save & Apply" has been pressed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-26 00:39:38 +01:00
Jo-Philipp Wich
af2c7d9ebe luci-mod-admin-full: support configuring usbport LED triggers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-26 00:39:38 +01:00
Jo-Philipp Wich
6e412cc78c luci-mod-admin-full: reload wifi settings page after changing countey code
Reloading the page ensures that the allowed tx power values and channel select
lists are properly populated with the new effective values.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-26 00:39:38 +01:00
Rafał Miłecki
1cd096d291 luci-mod-admin-full: allow unset txpower value
Sometimes txpower is not set so we should have an option with empty
value to let it stay unset.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-26 00:39:38 +01:00
Daniel Dickinson
f00a1ac2d9 Merge pull request #953 from musashino205/mount-fix-disp
luci-mod-admin-full: Fix display problems of mount
2017-01-16 10:45:20 -05:00
Daniel Dickinson
2cb780c8cc Merge pull request #861 from ynezz/master
luci-mod-admin-full: Store system time into RTC also
2017-01-16 01:49:21 -05:00
Daniel Dickinson
98d1a09b57 Merge pull request #859 from feckert/realtime_wlan
luci-mod-admin-full: show realtime wlan graph only if iw command is installed
2017-01-16 01:42:00 -05:00
INAGAKI Hiroshi
9b56b0709f luci-mod-admin-full: Fix display problems of mount
Fixed some display problems where the UUID label of the drop down
list does not exist and the positions of other labels are misplaced
in mount settings page.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2017-01-16 12:52:06 +09:00
INAGAKI Hiroshi
35f68fb7ea luci-mod-admin-full: Fix display problem of wifi_add
Fixed an issue where the network name is displayed as "%q" on wlan
connection destination network settings page.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2017-01-15 02:16:33 +09:00
Hannu Nyman
44b56f71bd luci-mod-admin-full: fix help text for wifi join options
Clarify the help text in the wifi join dialog.
Reference to #793, #876, #897

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-01-11 15:31:54 +02:00
Florian Eckert
3c7d766778 luci-mod-admin-full: show realtime wlan graph only if iw command is installed
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
2016-12-12 15:08:50 +01:00
Daniel Dickinson
8c6c75f6ec Merge pull request #821 from andrewshadura/luci-route-types
Add support for route types
2016-12-10 11:00:16 -05:00
Hannu Nyman
73749fa048 luci-mod-admin-{full,mini}: make more distro agnostic
Remove some non-essential references to explicit distro names.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-12-10 14:12:37 +02:00
Daniel Dickinson
a3fc4859dd Merge pull request #656 from nlhintz/pull-request
luci: broadcom - add n-mode support
2016-12-10 06:34:22 -05:00
Jo-Philipp Wich
70bad4da4f luci-mod-admin-full: handle infinite lease times in output
When a lease objects expires property is set to "false", its expiry time is
unlimited, so adjust the templates to properly display that state.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-12-09 13:07:42 +01:00
Petr Štetiar
b064c5c209 luci-mod-admin-full: Store system time into RTC also
We're currently just setting system time, but we don't set battery
backed RTC. Time in the RTC is only set on the graceful shutdown, which
is quite hard to achieve on embedded devices.

In other words, on systems with battery backed RTC we currently don't
handle following use case properly:

1. Set system time from web UI (sets only system time, but not RTC)
2. Unplug the device from power

Then after the reboot, we've wrong system time again, because time set
in [1] is not saved to battery backed RTC.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2016-11-28 15:37:58 +01:00
Jo-Philipp Wich
98e12fcebb Merge pull request #793 from remakeelectric/rme-master-tweaks
wifi_add minor usability tweaks
2016-10-28 16:17:05 +02:00
Dan Lüdtke
82add13629 Typo 2016-10-21 20:24:57 +02:00
Andrew Shadura
44d43c6932
luci-mod-admin-full: routes: specify sizes for metric and MTU
Specify reasonable sizes for metric and MTU fields to
prevent the table from being too wide.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
2016-10-08 18:41:52 +02:00
Andrew Shadura
3d83c15fe1
luci-mod-admin-full: routes: add support for route types
Allow specifying route types.

Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
2016-10-08 18:41:31 +02:00
Jo-Philipp Wich
067fe5bcce luci-mod-admin-full: figure out diagnostics host in postinstall
Attempt to infer the default diagnostics host for nslookup / ping / traceroute
from the various URLs in /etc/os-release. Fall back to "openwrt.org" if no
host is found to preserve backwards compatibility.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-10-06 17:13:23 +02:00
Karl Palsson
4a5cee22ed wifi_add: allow multi SSID by default if supported.
Instead of defaulting to replace, even on hardware that supports multi
SSID, make the default to add.  This reduces the chance of locking
oneself out when adding a second network.  If you intended to replace,
ending up with two networks then deleting one is easier than recovering
when the old network configuration is gone.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-09-23 17:05:47 +00:00
Karl Palsson
ccc9970c24 wifi_add: help text should match reality
An additonal network is created if the box _is_ checked.
2016-09-23 17:05:47 +00:00
Karl Palsson
0bea4d17e6 wifi_add: show the SSID of the network being joined.
After clicking the "join" button on the scan list, the SSID is no longer
visible, though it's kept in the form to pass to the server.

Show the chosen SSID on the top of the page, to help people confirm that
they're joining the right network.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2016-09-23 17:05:40 +00:00
Hannu Nyman
107b3c7def luci-mod-admin-full: tweak checksum item presentation
Simplify the sysupgrade image checksum strings in order to
avoid translating "Checksum xxx" items both for MD5 and SHA256.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-08-24 11:46:20 +03:00
Hannu Nyman
c0af3601fb luci-mod-admin-full: show also sha256 checksum for sysupgrade images
Show also the sha256 checksum in addition to MD5 checksum to enable
image verification also for builds with only sha256 checksums.

If the 'sha256sum' command is not present in the system, the value
remains empty.

Note: The easiest way to get the 'sha256sum' command is to compile it
into busybox.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-08-19 11:08:24 +03:00
Jo-Philipp Wich
19981732fc luci-mod-admin-full: properly skip over unused switch ports
Fix incomplete port status display on vlan setup page when ports in the middle
are not used, e.g. some Lantiq boards use ports 0, 1, 2 and 4 for LAN ports so
JS code should not attempt to reference an undefined status element for port 3.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-08-18 10:02:53 +02:00
Jo-Philipp Wich
c390a09cea luci-mod-admin-full: fallback to generic switch topology
Use a generic default topology if we cannot infer switch information from
board.json and display an error message in this case. Should fix #779 and
similar issues.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-08-18 09:23:32 +02:00
Jo-Philipp Wich
3ea9c85ed6 luci-mod-admin-full: use switch toplogy information for vlan setup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-08-15 17:57:06 +02:00
Jo-Philipp Wich
bd4534496a luci-mod-admin-full: status page formatting fix
Display a question mark for undefined SSID and BSSID strings.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-08-04 11:45:30 +02:00
Jo-Philipp Wich
1367f7b624 luci-mod-admin-full: fix net diagnostics with missing config
Gracefully handle a missing diag section in /etc/config/luci when rendering
the network diagnostics tool page.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-07-31 16:00:09 +02:00
Florian Eckert
8b07a65117 luci-mod-admin-full: make diagnostics url customizable
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
2016-07-29 08:21:23 +02:00
Jo-Philipp Wich
6be690473b Merge pull request #743 from HenryGiraldo/master
Closes #741: Can't delete disabled wireless networks
2016-07-08 15:18:21 +02:00
John Crispin
ce3eb113f4 luci-mod-admin-full: add log_file and log_proto support
Signed-off-by: John Crispin <john@phrozen.org>
[Jo-Philipp Wich: remove file datatype constraint]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-06-30 11:54:53 +02:00
Enrique Giraldo
5e1f2a1b58 Closes #741: Can't delete disabled wireless networks
When a wireless network is disabled it can't be removed. From
wifi_overview.htm the delete call is generated as wlan0, wlan1 or
whatever. This wlan is not working because it is disabled, then LuCI
deletes the virtual radio which really is named as wlan0.
2016-06-16 15:08:36 +02:00
Hannu Nyman
cc801de89c luci-mod-admin-full/mini: replace Wifi with Wireless in menus
Replace the menu item "Wifi" by "Wireless",
which is already used for page and section headings

This closes #695

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-06-09 11:55:20 +03:00