Commit graph

7829 commits

Author SHA1 Message Date
Hannu Nyman
a42c0bb618 luci-mod-admin-full: restore opkg feed config capability
opkg config was recently changed by https://dev.openwrt.org/changeset/46491/

Existing /etc/opkg.conf was split to three:
   /etc/opkg.conf -> base opkg configuration
   /etc/opkg/distfeeds.conf -> default Openwrt package feeds
   /etc/opkg/customfeeds.conf -> custom package feeds

Since then, the actual feed definitions have not been visible/configurable,
as only /etc/opkg.conf has been visible in Luci.

This patch restores the capability to see and edit package feed definitions.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-15 13:01:03 +03:00
Ekaitz Zárraga
a16654b121 modules/luci-mod-failsafe: Fix nil file descriptor error
Signed-off-by: Ekaitz Zárraga <ekaitz.zarraga@fon.com>
2015-09-14 14:05:02 +02:00
Manuel Munz
428d97e3e2 Merge pull request #471 from freifunk-berlin/remove_bno
community-profiles: remove bno profile
2015-09-12 19:00:17 +02:00
Philipp Borgers
6e1a089b5c community-profiles: remove bno profile
The Berlin Nord-Ost community profile is not up-to-date and as far as I know the
community does not exist anymore.
2015-09-12 17:03:20 +02:00
Sabbir Ahmed
fff7c6c518 modules/luci-mod-rpc: fix attempt to index global 'luci' (a nil value) 2015-09-12 15:11:18 +06:00
Jan-Philipp Litza
5335f22537 luci-lib-jsonc: Add ltn12-compatible sink factory
To use the luci-lib-jsonc parser as sink for an ltn12 pump (for example
from stdin), the following code will now do:

    require 'luci.ltn12'
    require 'luci.jsonc'

    local parser = luci.jsonc.new()
    luci.ltn12.pump.all(luci.ltn12.source.file(io.input()), parser:sink())
    print(parser:get())

Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
2015-09-04 12:21:30 +02:00
Karl Palsson
03786ed853 uci:get_list: always return a table, no matter what.
Previously, get_list("fake", "non-existent", "notreal") would still
return a table, just empty.  This is nice, as you can always iterate the
returned table, without having to check it first.

However, if you happened to pass a nil for any of the parameters, you
would actually get a nil in return.  This was inconsistent.

The documentation is updated to clarify the behaviour of this function.

Signed-off-by: Karl Palsson <karlp@remake.is>
2015-09-02 15:28:02 +00:00
Karl Palsson
879d9ff2b8 uci:set_list: Delete option if the list is empty
Allows lists fetched with get_list to be modified and simply passed back
to set_list. Explicitly calling set_list() with an empty list is clearly
requesting that there be zero list items, ie, deletion of the option
altogether.

Signed-off-by: Karl Palsson <karlp@remake.is>
2015-09-02 15:27:55 +00:00
Hannu Nyman
f0083abed1 statistics: fix typo
sed -i "s/collected date/collected data/"

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-02 15:40:56 +03:00
marcel-sch
044b98150a Update profile_cottbus
back to basics
2015-09-02 11:28:54 +02:00
Jo-Philipp Wich
5735cdee86 contrib: remove obsolete luasrcdiet packaging, its built as part of luci-base now
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-02 09:46:05 +02:00
Jo-Philipp Wich
ac65bb291a contrib: remove obsolete uhttpd packaging
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-02 09:41:35 +02:00
Jo-Philipp Wich
62b203d0ea contrib: remove obsolete host uci configurations
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-02 09:41:14 +02:00
Jo-Philipp Wich
16b63cb471 Remove obsolete toplevel Makefile
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-02 09:39:24 +02:00
Jo-Philipp Wich
6c72dec7e5 build/makedocs.sh: handle relative output directories
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-02 09:39:24 +02:00
Hannu Nyman
b96d223642 Merge pull request #463 from hnyman/max-len-version
Luci opkg/packages: Limit version string display to 26 chars
2015-09-02 08:50:58 +03:00
Hannu Nyman
ca75918ff3 Luci opkg/packages: Limit version string display to 26 chars
Many packages currently include a git commit hash in version string.
That makes versions string very long and the version column takes much space
when listing available/installed packages in Luci.

Longest version string is 58 characters (micropython).
85 packages have at least 50 chars and 150 packages at least 40 chars.

Adjust Luci to display max. 26 characters (= luci's own version string).

Longer version strings are cut to: "first 21c" + ".." + "last 3c"

The last 3 chars are used to preserve the possible PKG_REVISION string.
E.g. 'opkg' has only hash+PKG_REVISION, so using only start of the string
might not be optimal.

Examples:

1.3.10-20150302-f2a889564b3a215902622b040a1247af38cb8203-1
1.3.10-20150302-f2a88..3-1

0.1-20150302-654c7d288603f7dae09eb09b57fb67b38c7ac6c3-1
0.1-20150302-654c7d28..3-1

9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7
9c97d5ecd795709c8584e..d-7

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-01 22:45:17 +03:00
Jo-Philipp Wich
daeb2016d6 luci-lib-ip: fix documentation issue
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-01 16:49:19 +02:00
Jo-Philipp Wich
3d0e8deede Regenerate api documentation
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-01 16:44:59 +02:00
Jo-Philipp Wich
00e2b03927 Move doc/ to documentation/api/
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-01 16:44:03 +02:00
Jo-Philipp Wich
ed1a641696 Fix module lines in several luadoc files
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-01 16:43:19 +02:00
Karl Palsson
8084babf18 luci.utils.contains: update documentation to match reality
Signed-off-by: Karl Palsson <karlp@remake.is>
2015-09-01 16:33:41 +02:00
marcel-sch
176c0d23b9 removed option mesh_network 2015-09-01 15:37:28 +02:00
marcel-sch
60fedec15e add profile_cottbus
new community cottbus, config based on profile_berlin at kathleen
2015-09-01 15:24:03 +02:00
Jo-Philipp Wich
2e61188881 Add generated documentation to repository
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-01 12:19:44 +02:00
Jo-Philipp Wich
fdb7daa907 Merge pull request #460 from jplitza/master
luci-lib-jsonc: Fix memory leak in stringify()
2015-09-01 09:34:14 +02:00
Hannu Nyman
60f62f841f Merge pull request #416 from fabio70mi/patch-1
Update base.po
2015-09-01 10:11:21 +03:00
Jan-Philipp Litza
90c841d66e luci-lib-jsonc: Fix memory leak in stringify() 2015-08-31 19:53:51 +02:00
Hannu Nyman
c0e2255ae9 Merge pull request #393 from nmav/no-group-match
luci-app-ocserv: list users with no group
2015-08-31 11:20:29 +03:00
Jo-Philipp Wich
a36a73cbdc Merge pull request #457 from jplitza/master
luci-lib-jsonc: fix handling of strange keys, allow encoding []
2015-08-30 17:57:00 +02:00
Jan-Philipp Litza
e7645d557c luci-lib-jsonc: allow encoding empty lists
To be consistent with the behavior of luci-lib-json, an empty Lua table
should be encoded to an empty JSON list, not an empty JSON object.

To still allow encoding empty JSON objects, the usage of anything other
than a number or a string as a key (for example an empty table or a
function) can be used to force encoding as an object:

    json.stringify({})                  -- "[]"
    json.stringify({[{}] = true})       -- "{}"

Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
2015-08-30 15:52:33 +02:00
Jan-Philipp Litza
e32a877aa4 luci-lib-jsonc: Ignore non-string-or-number keys in tables
Previously, the following caused a segmentation fault:

    json.stringify({[{}] = true})

This was caused by lua_tostring() returning NULL for anything but
strings and numbers, letting json_object_object_add crash.

This patch makes jsonc ignore all keys which have no string
representation altogether.

Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
2015-08-30 15:51:17 +02:00
Hannu Nyman
0d5070c510 statistics: remove references to Lucid from scripts
Both init.d and uci-defaults scripts included in luci-app-statistics
still contained stuff related to lucid, which package was removed by
91b97bc9f6

Changes to scripts:
* init.d: lucid reference removed,
          /var/etc creation moved earlier (before first possible use)
* uci-defaults: lucid parameters & restart removed
  (but busybox httpd stuff was left intact, although it might be unnecessary)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-30 14:00:29 +03:00
hnyman
478bb37a45 Merge pull request #456 from hnyman/stat-config
statistics: cleanup default configuration
2015-08-30 08:57:12 +03:00
Hannu Nyman
e6672f094b luci-app-multiwan: mark broken as it depends on multiwan from oldpackages
Mark luci-app-multiwan @BROKEN, as it depends on the old 'multiwan'
package, located in the deprecated 'oldpackages' feed.

'packages' feed contains both 'mwan3' and 'luci-app-mwan3' apps that
have superseded the old packages.

This should fix #395.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-29 18:04:55 +03:00
Hannu Nyman
4f429c5c8d statistics: adjust default settings to match default plugins
Adjust default settings to match the plugins installed by default
(default plugins: iwinfo, interface, load)

* disable plugins not installed by default to avoid error messages at start
* remove references to Freifunk interfaces, as most users do not have those

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-29 11:15:39 +03:00
Hannu Nyman
6a4226b3d1 statistics: cleanup config file
No functional changes, but the file is reorganised:
* group settings: general settings / output plugins / input plugins
* sort settings inside a group
* remove quotes from option names to match the current uci behaviour
* whitespace corrections

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-29 10:59:01 +03:00
Hannu Nyman
5ce647746e statistics: clarify CPU/processor graph by removing "idle" from it
Clarify the CPU time consumption graph by removing the "idle" data from it.
Especially with light traffic, removing "idle" enables the graph
to scale better and to properly show the CPU load variations.

If "idle" data needs to be seen, it might be added as a second graph below.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-28 22:58:16 +03:00
Hannu Nyman
0141494935 statistics: clarify stats introduction
* Clarify the short explanation on the statistics section's front page.
* Mention the possibility of additional collectd plugins to get more stats.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-28 22:48:03 +03:00
Hannu Nyman
11a9f757b1 Remove ancient INSTALL file and update README.me
Remove the outdated INSTALL file from Kamikaze period,
as README.md contains the updated information.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-28 18:38:41 +03:00
Jo-Philipp Wich
0ecd6974a8 Merge pull request #454 from hnyman/fix-entropy
statistics: entropy plugin - fix placement of entropy.lua
2015-08-28 12:06:25 +02:00
Hannu Nyman
d820ed4882 statistics: entropy plugin - fix placement of entropy.lua
Move the file entropy.lua to the correct directory.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-28 12:51:43 +03:00
Christian Schoenebeck
c48fbfa992 Merge pull request #451 from hnyman/fw-zone-len
luci-app-firewall: validate zone name to enforce fw3 max. length
2015-08-28 11:19:45 +02:00
Christian Schoenebeck
89763f901e Merge pull request #452 from hnyman/entropy
statistics: Add support for entropy stats
2015-08-28 11:19:00 +02:00
Hannu Nyman
7df0df48c0 statistics: Add support for entropy stats
Add statistics on the available entropy.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-27 10:19:38 +03:00
Hannu Nyman
34e875b3d3 firewall: validate max length of zone name
fw3 sets the maximum length of the zone name to 14 and
ignores zone definitions with too long names.
http://nbd.name/gitweb.cgi?p=firewall3.git;a=blob;f=zones.h;hb=HEAD#l25
http://nbd.name/gitweb.cgi?p=firewall3.git;a=blob;f=zones.c;hb=HEAD#l195

Add a simple validation to ensure that the new zone name is short enough.
This should fix issue #345

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-26 13:55:26 +03:00
Christian Schoenebeck
084d435060 Merge pull request #448 from hnyman/cpulabel
statistics: cpu graph - add label definitions, add softirq and interrupt stats
2015-08-24 09:49:54 +02:00
Christian Schoenebeck
5f3dadeb8d Merge pull request #450 from hnyman/stat-memory
statistics: support better autoscaling in rrdtool, improve memory graph's y-axis
2015-08-24 09:49:11 +02:00
Hannu Nyman
9a06498dbd statistics: memory plugin - improve graph by better scaling of y-axis
Utilise alt_autoscale_max to make the memory chart y-axis to scale better
for devices with e.g. 128 MB RAM.

Also fix the axis min value to 0.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-23 21:12:56 +03:00
Hannu Nyman
86ff4bd3a4 statistics: support rrdtool's alt_autoscale and alt_autoscale_max options
Implement support for alternative scaling of the y-axis.
By default, rrdtool will autoscale to 1,2,5,10,20,50,100,200,... etc.,
which is not always suitable (e.g. memory charts for device with 128 MB).

Rrdtool 1.0.50 already supports alternative autoscaling that creates
a tighter y-axis. Implement graph-level options in Luci statistics to
support those boolean options as "alt_autoscale" and "alt_autoscale_max".

info at http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-23 21:02:14 +03:00