Commit graph

8392 commits

Author SHA1 Message Date
Jo-Philipp Wich
8eadde5f3b luci-app-statistics: support specifying line width in graph definitions
This allows a graph definition to explicitely request LINE1, LINE2 or
LINE3 for a data source.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-10 20:39:26 +02:00
Jo-Philipp Wich
61bc034b8d luci-app-statistics: support graph menu entries without corresponding labels
Properly render menu items for plugin instances that do not have a
corresponding label defined.

This allows for registering new graph pages solely by dropping files
into /usr/lib/lua/luci/statistics/rrdtool/definitions/

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-10 20:33:32 +02:00
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
a6054eb38a i18n: sync with master
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-01 00:47:04 +02:00
t123yh
f113f1afa7 luci-app-commands: Allow executing without downloading on public links
Signed-off-by: t123yh <t123yh@outlook.com>
2017-06-01 00:45:09 +02:00
Florian Eckert
60d43a8f03 luci-theme-openwrt: fix JavaScript nameing
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
2017-06-01 00:43:37 +02:00
fantom-x
1626305b63 luci-app-hd-idle: removed dashes in menu items and text labels
"hd-idle" replaced with "HDD Idle" in the menu and on the page. All translation files updated accordingly.

Signed-off-by: Marc Benoit marcb6218@gmail.com
2017-06-01 00:40:59 +02:00
Jo-Philipp Wich
1d93bad2c3 luci-theme-freifunk: fix a few broken translation directives
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-01 00:26:03 +02:00
Jo-Philipp Wich
4b75c8d44d luci-proto-wireguard: use "Optional" instead of "Optional." as translation
This allows sharing the translation string with other components.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-01 00:25:58 +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
433e76e425 luci-proto-ipv6: use "Automatic" instead as "automatic" as translation label
This allows sharing a common translation string with all other protocols.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-01 00:25:49 +02:00
Jo-Philipp Wich
d6e2e91824 luci-proto-openconnect: fix authgroup translation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-01 00:25:44 +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
Cody R. Brown
e5ed0e7e78 luci-base: luci.tools.status: properly parse infinite dnsmasq leases
The expiry time in a dnsmasq lease file line may be 0 (i.e.
expiry date = 01/01/1970 00:00:00 GMT) to denote an infinite
lease time, so adjust the code to properly support that.

The expiry attribute of the lease object will be set to "false"
in case of an infinite lease. This is to mimic the odhcp code below.
If the expiry date is not equal to 0, then just do exactly what was
done before (return the os.diff of current time and ts).

Signed-off-by: Cody R. Brown <dev@codybrown.ca>
2017-06-01 00:17:32 +02:00
Daniel Dickinson
dbc1a1bfc1 base: status: For odhpcd leases display MAC formatted with colons
This should result in the MAC address display being the same
using odhcpd for v4 DHCP as when using DNSMasq for v4 DHCP.

Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
2017-06-01 00:17:26 +02:00
Thorsten M
71f55447bf changed stat to lstat in nixio_lstat function
Signed-off-by: Thorsten M. <thoto@devtal.de>
2017-06-01 00:17:19 +02:00
Hannu Nyman
dc8ef82e62 i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-05-24 23:47:12 +03:00
amitabha
778292ec65 luci.mk: Update language name for Chinese
Rectification of non-standard name for language Chinese.
Signed-off-by: Angus Ding angus.ding@gmail.com

(cherry picked from commit d3861e7f8d)
2017-05-24 23:44:55 +03:00
Hannu Nyman
10d1c5dbb3 luci-base: support ip6ifaceid option for proto_static
Add support for 'ip6ifaceid' option for proto_static in LuCI.

Information about the option:
 The option is optional and defaults to '::1'.
 Allowed values: 'eui64', 'random', fixed value like '::1' or '::1:2'

 When IPv6 prefix (like 'a🅱️c:d::') is received from a delegating
 server, the ip6ifaceid suffix (like '::1') is used to form
 the IPv6 address ('a🅱️c:d::1') for the interface.

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

(cherry picked from commit 5ca3864690)
2017-05-24 23:42:17 +03:00
Hannu Nyman
ad0585cbb4 luci-app-statistics: check that uci config sections exist
A missing or faulty luci_statistics config file may prevent
LuCI access completely already at the login phase as
the statistics config is parsed already then.

The error is like:
  .../statistics/datatree.lua:16: attempt to index upvalue 'sections' (a nil value)

User may be completely locked out of LuCI until he figures out
the need to have a proper luci_statistics config file.

Prevent the error by checking for the existence of
the uci config sections before trying to use values from them.

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

(cherry picked from commit d04f667383)
2017-05-18 12:10:14 +03:00
Hannu Nyman
d7d7503a39 luci-base: add Etc/GMT timezones
Add Etc/GMT timezones like GMT+5

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit f2cf516cf7)
2017-05-18 12:09:37 +03:00
Hannu Nyman
1ccb88d136 build/zoneinfo2lua.pl: logic for Etc/GMT timezones
Add logic to add Etc/GMT timezones (like GMT+5)
although the zones are not included in zone.tab

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit f8eee09f55)
2017-05-18 12:09:28 +03:00
Hannu Nyman
6467df385f i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-05-09 11:07:51 +03:00
Hannu Nyman
92c78f3e80 luci-app-statistics: processes: fix graph visibility
Fix graph visibility on processes page based on plugin
instance. The overview instance is empty, while monitored
processes have their own instances.

Original version of the patch created by @koblack and
discussed in #1021

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 0a6ce20423)
2017-05-09 09:54:14 +03: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
596f47649c luci-base: luci.dispatcher: allow overriding sysauth template
In some cases it is useful to be able to override the template used for the
sysauth login dialog.

Add a new property "sysauth_template" which allows overriding the template
name from controller files.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-06 15:07:57 +02:00
Hannu Nyman
63d61d726c luci-app-statistics: fix whitespace
* fix whitespace in config file
* place the contextswitch item corerrctly
  in the sorted options list

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 2bc2f935a0)
2017-05-02 10:12:40 +03:00
Hannu Nyman
9686fd1cc4 luci-app-statistics: processes plugin: add labels, correct data
Enhance processes statistics page:
* add proper labels to graphs
* correct RSS memory stats title, add VSZ stats

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit b737831e56)
2017-04-30 19:07:38 +03:00
Hannu Nyman
e3bd7b5ee0 luci.mk: fix length of abbreviated hash in version
Fix the length of the abbreviated commit hash used in
the LuCI version string used in the package names.
Use the old standard of seven characters in hash.

New git versions vary the length of the abbreviated
commit hash based on the number of objects in repo. That
may lead into different hash lengths with e.g. having
full/shallow git history, having all/single branch or
having different git versions in different build hosts.

Different hash lengths in package name may lead to
sneaky opkg install errors, as opkg apparently preserves
info for removed packages and may prefer that.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit b9159c5347)
2017-04-30 11:48:05 +03:00
Hannu Nyman
71f669b3bd luci-app-statistics: remove non-functional links from graphs
The statistics graphs on the pages with multiple data sources
have contained links to the data sources, but those links
have not worked. Remove the links as they are unnecessary.

This commit fixes #1006

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

(cherry picked from commit 298f838d39)
2017-04-30 11:11:18 +03:00
Hannu Nyman
ae565bc393 luci-app-adblock: backport updates to match 2.6.2
Backport updates to luci-app-adblock that correspond to
the adblock 2.6.2 version.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-04-30 00:09:39 +03:00
fantom-x
7fee975bb4 Support for collectd-mod-contextswitch
Signed-off-by: Marc Benoit marcb6218@gmail.com
(cherry picked from commit 5bf636732e)
2017-04-29 23:42:22 +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
29fabe2639 timezone data: update to 2017b
Update timezone data to 2017b.

http://mm.icann.org/pipermail/tz-announce/2017-February/000045.html
http://mm.icann.org/pipermail/tz-announce/2017-March/000046.html

Key changes in 2017a-2017b:

* Mongolia no longer observes DST.
* Chile's Region of Magallanes moves from -04/-03 to -03 year-round.
* Switch to numeric time zone abbreviations for South America, as
  part of the ongoing project of removing invented abbreviations.
* Haiti resumed observance of DST in 2017.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 54c97738bc)
2017-04-10 22:36:11 +03:00
Jo-Philipp Wich
b47a21fbbb luci-app-firewall: adjust drop_invalid default (#1068)
Since firewall3 commit b33f78371e7c7b6a131c2b6c01673cbd4b3c13d1 the
drop_invalid option is off by default.

Adjust LuCI view to properly handle the changed semantics.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-03-14 12:53:45 +01:00
Hannu Nyman
a5191efc7c i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-03-04 18:24:26 +02:00
Hannu Nyman
0d555e5cdf Merge pull request #1050 from luizluca/17.01/pt-br-translation
i18n: complete pt-br translation
2017-03-03 22:05:23 +02:00
Luiz Angelo Daros de Luca
de29b38cce i18n: complete pt-br translation
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
(partial cherry pick from commit fe9d39c06c)
2017-03-03 15:14:54 -03:00
Hannu Nyman
2fe510bceb Merge pull request #1041 from EricLuehrsen/unbound_17_01
[lede-17.01] luci-app-unbound: service updates coordinated with application package
2017-03-02 14:37:31 +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
Hannu Nyman
12f98db8ba luci-base: backport cbi datatype changes
Backport the new cbi datatypes and whitespace fixes from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-02-28 16:22:52 +02:00
Eric Luehrsen
e882e0d730 unbound: add uci-default script
Also if unbound-control is installed, then configure so
luci-app-commands can quickly show the "local zones" and
"local data" (aka hosts). This helps diagnose DHCP-DNS
zone data and adblock zone data.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-02-25 15:44:36 -05:00
Eric Luehrsen
d29e395262 unbound: update UCI for odhcpd and hostname
Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
2017-02-25 15:44:36 -05: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
Jo-Philipp Wich
a57a17ad8a luci.mk: only use remote branch detection
LEDE's scripts/feeds script creates local branches named after the checked
out commit hash, confusing local branch detection.

Solely use remote branch detection to avoid misidentifying such cases.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-20 14:35:54 +01:00
Jo-Philipp Wich
79992f1a67 luci.mk: fix branch detection in detached HEAD state
When LuCI is checked out via pinned feeds configuration, its source tree will
end up in detached head state, requiring some more magic to figure out the
proper branch.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-20 14:16:26 +01:00
Hannu Nyman
f535090ffc i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-02-16 14:49:25 +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