Commit graph

202 commits

Author SHA1 Message Date
Hannu Nyman
bac5f2cebf i18n: sync translations
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-12-06 13:23:38 +02:00
Yousong Zhou
862b84feb2 luci-base: fix escaping lua string to js repr
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-12-02 20:56:08 +08:00
Jo-Philipp Wich
9b30357454 luci-base: add hostport and ipaddrport validation types
Add two new types 'hostport' and 'ipaddrport' to validate strings in the form
'sub.example.org:1234' and '0.0.0.0:80'. The 'hostport' accepts hostnames or
IP addresses followed by a colon and a port number while the 'ipaddrport' type
accepts numeric IP addresses only, followed by a colon and a port.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-12-02 11:13:39 +01:00
Daniel Dickinson
829467b627 luci-base: Add function for shell single-quote parameter escaping
When using os.execute or luci.sys.call the shell is called with the
command line which means that standard shell interpretation of strings
occurs.  To allow to use these commands more easily we add functions
for properly escaping single-quoted strings used on the command line
2015-12-02 02:19:02 -05:00
Jo-Philipp Wich
c123fa86b0 Merge pull request #534 from yousong/add-luci-proto-pppossh
Add luci proto pppossh
2015-11-26 23:23:15 +01:00
Jo-Philipp Wich
55f458326d luci-base: use board.json to infer switch netdev
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-21 00:31:06 +01:00
Jo-Philipp Wich
fbfa62627f luci-base: switch to luci-lib-jsonc
Add dependency on luci-lib-jsonc and use it to
reimplement luci.util.serialize_json().

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-21 00:29:55 +01:00
Jo-Philipp Wich
e626599c26 luci-base: eliminate use of uci state vars in luci.model.network
Also implement :ipaddrs() and :ip6addrs() helper for network instances.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-17 17:35:02 +01:00
Jo-Philipp Wich
092d2143bd luci-base: fix uci documentation issue (#538)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-16 12:37:23 +01:00
Joel Pedraza
5541065793 Redirect to root on empty path
* Prevents an empty Location header
* Useful in environments where build_url() could return an empty string (such as http server rewrites requests to /cgi-bin/luci)

Signed-off-by: Joel Pedraza <github@saik0.net>
2015-11-03 09:53:39 -05:00
Yousong Zhou
a28da6a88a luci-base: add support for DynamicList with FileBrowser
Two new arguments url, defpath were added to cbi_dynlist_init() for
initializing the brower button.

An example of usage

    identity = section:taboption("general", DynamicList, "identity",
	    translate("List of SSH key files for auth"))
    identity.datatype = "file"

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-11-03 17:07:45 +08:00
Yousong Zhou
20ccc90350 luci-base: urlencode: encode all except unreserved characters.
As per http://tools.ietf.org/html/rfc3986#section-2.3

   Characters that are allowed in a URI but do not have a reserved
   purpose are called unreserved.  These include uppercase and lowercase
   letters, decimal digits, hyphen, period, underscore, and tilde.

      unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-11-03 17:07:45 +08:00
Christian Schoenebeck
3dbc93bf91 template cbi/value.htm implement documented property maxlength
template cbi/value.htm implement already documented property maxlength

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-11-01 16:36:29 +01:00
Christian Schoenebeck
162548a879 cbi.lua: Implement "readonly" property for "Value"
cbi.lua: Implement "readonly" property for "Value"

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-10-31 23:09:40 +01:00
Christian Schoenebeck
c7d3619b0c template cbi/value.htm: add "readonly" property
template cbi/value.htm: add "readonly" property

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-10-31 22:54:25 +01:00
Christian Schoenebeck
84a57ec36f cbi.lua: Implement Flag.validate function
cbi.lua
- Implement Flag.validate function to be overwritable
- rewritten if clause for easier reading ;-)

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-10-30 18:42:38 +01:00
Hannu Nyman
ff9e34e47c Merge pull request #509 from neheb/master
resources/icons: Use gifsicle to save a few bytes.
2015-10-27 17:30:24 +02:00
Jo-Philipp Wich
927dc1aff9 luci-base: eliminiate use of uci state vars in luci.sys
Rewrite `luci.sys.wifi.getiwinfo()` to use the ubus wireless state instead of
depreacated uci state vars in order to map abstract network notation to
wireless ifnames.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-27 14:13:05 +01:00
Jo-Philipp Wich
6d368a4033 Move libubus-lua dependency to luci-base
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-27 13:09:21 +01:00
Jo-Philipp Wich
d32c685039 luci-base: dispatcher expose test_post_security()
Allows external code to perform POST and token checking manually.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-22 08:30:29 +02:00
Jo-Philipp Wich
79383f5a74 luci-base: ensure that base url is emitted with trailing slash
Now that we don't have an url token anymore, '/cgi-bin/luci' becomes a valid
url while cookies are restricted to only '/cgi-bin/luci/' and below.

In order to ensure that the first request after login refers to a path
covered by the authentication cookie, change build_url() to always append
a trailing slash if we're referring to the base url.

This should fix the login problems mentioned in #516.

While we're touching the dispatcher, also remove remaining url token code.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 16:48:25 +02:00
Jo-Philipp Wich
86326e0def luci-base: remove security token from urls
Now that sensitive urls require post requests and only accept them if a valid
security token is sent along the request, we can drop the global random url
token to improve LuCI usability.

The main improvement is the ability to use multiple tabs with the same login
session, but also deep linking to specific urls without the need for another
login becomes feasible, e.g. for documentation purposes.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 00:31:27 +02:00
Jo-Philipp Wich
6b3f804956 luci-base: filter invalid opkg status lines
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20 21:04:46 +02:00
Jo-Philipp Wich
562c47e5fd luci-base: generalize post security token handling
* Add a generic helper function to check need for post / csrf token validation
* Remove custom token verification in cbi targets
* Support requiring post security depending on specific submit parameters,
  usable through post_on() action

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20 21:04:46 +02:00
Hannu Nyman
7b00a4a765 i18n: Sync translations
Sync translations to the current strings.

Changes in luci-app-ddns, luci-app-mjpg-streamer, luci-app-qos,
luci-app-shadowsocks-libev, luci-app-statistics and luci-base

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-13 12:35:57 +03:00
Hannu Nyman
c8392ba970 luci-base: update i18n base template
Update i18n base template to match the current strings.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-13 12:25:58 +03:00
Hannu Nyman
2cfd11b272 Timezone information: update to 2015g
Changes in 2015g:
http://mm.icann.org/pipermail/tz-announce/2015-October/000034.html

     Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.

     Fiji's 2016 fall-back transition is scheduled for January 17, not 24.

     Fort Nelson, British Columbia will not fall back on 2015-11-01. It has
     effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
     New zone America/Fort_Nelson.

Note: the Turkey-related one-time rule change is not apparently catched by
the zoneinfo2lua script, so that change is not included in this commit.
(Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-12 11:09:28 +03:00
Mangix
a2ebf87145 resources/icons: Use gifsicle to save a few bytes.
Signed-off by: Rosen Penev <rosenp@gmail.com>
2015-10-09 16:00:57 -07:00
Jo-Philipp Wich
bd504f552d luci-base: prevent UCI changes in CBI if form is not in submit state
Only process submitted data if the "cbi.submit" parameter is present as the
dispatcher will verify the integrity of the CSRF token in this case.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-08 00:30:14 +02:00
Jo-Philipp Wich
281d2f6178 Globally replace luci.dispatcher.build_url(...) with url(...) invocations
Also concat multiple string arguments into one while we're at it.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07 19:07:36 +02:00
Jo-Philipp Wich
49a2cb5ad1 luci-base: expose luci.dispatcher.build_url() as url() in templates
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07 13:03:42 +02:00
Jo-Philipp Wich
3f29078fb9 luci-base: protect simpleforms with CSRF tokens
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07 12:24:58 +02:00
Jo-Philipp Wich
ada4a0ea98 luci-base: switch to POST action for service reload
Switches the service reload calls to CSRF token protected POST action.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06 22:37:27 +02:00
Jo-Philipp Wich
8d46c20327 luci-base: protect CBI forms with CSRF tokens
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06 18:54:35 +02:00
Jo-Philipp Wich
5a6382171d luci-base: add support for POST-only actions with CSRF token check
Add the dispatcher infrastructure to restrict certain routes to POST
requests only in conjunction with verification of CSRF tokens.

This is the first step to get rid of the CSRF token in the url in favor
to tokens embedded in forms.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06 15:56:35 +02:00
Jo-Philipp Wich
5e9da8240f Globally convert headline anchors into name attributes.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06 13:30:33 +02:00
Hannu Nyman
56deb7b2cf Merge pull request #488 from hnyman/black-flash
luci-base: change index.html to be more like current themes
2015-10-04 18:57:59 +03:00
Mangix
2cbe5d2af3 resources/icons: Use ZopfliPNG to save 5.4 KB
Signed-off by: Rosen Penev <rosenp@gmail.com>
2015-09-29 10:41:43 -07:00
Hannu Nyman
b6fe9a70e6 luci-base: change index.html to be more like current themes
Change index.html that is visible for a second when entering Luci:
* Black text on white background (instead of white on black)
* Specify font as Arial/Helvetica

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-29 11:44:53 +03:00
Hannu Nyman
1209ab6ba6 luci-base: set default mediaurlbase to bootstrap (current default theme)
The mediaurlbase option in the default /etc/config/luci still points
to the old openwrt.org theme that is not installed by default.
The discrepancy was noted in the commit message for 55ab4e4ce2

After 55ab4e4ce2 the installed theme's uci-defaults script will correct
the setting at first boot, but we should not have a deprecated theme as
the default value. Set the default value to the default theme 'bootstrap'.

Related old discussion at #302

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-18 16:00:06 +03:00
Cezary Jackiewicz
b699b559e6 i18n/polish/base: changing form of the word 2015-09-17 18:23:26 +02:00
Cezary Jackiewicz
4e2f87ef03 i18n/polish/base: truncate strings to better fit in view 2015-09-17 18:20:25 +02:00
Hannu Nyman
3288fe76ab Luci opkg/packages: Show package size in list of available packages
Add package *.ipk size information to package listing in Luci,
as opkg was today extended to support listing also the size information.
Visible fields are now: name, version, size, description

That will help users considering installation of a certain package
to assess its size impact on flash.

Note: Opkg data includes the size of the .ipk file, not the expanded size.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-16 12:47:48 +03: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
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
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
Karl Palsson
2a77918b02 http.protocol: Support filehandlers for unhandled encodings
The setfilehandler() functions used for mime and url encoded message
bodies all operate with a signature of fh(meta, chunk, eof), but for
unhandled encodings, the callback was directly assigned to the sink
function, which has a signature of snk(chunk).  Insert a wrapper to
properly generate the EOF flag, and include a stub "meta" block
providing a virtual "name" and also the original client provided
Content-Type header, to possibly help with taking alternative actions in
the file handler.

The sink function created for raw content decoding also used the wrong
signature for the sink function.

Signed-off-by: Karl Palsson <karlp@remake.is>
2015-08-18 17:52:48 +02:00
Hannu Nyman
d63a7cb582 Timezone information: update to 2015f
Changes in 2015e and 2015f:
http://mm.icann.org/pipermail/tz-announce/2015-June/000032.html
http://mm.icann.org/pipermail/tz-announce/2015-August/000033.html

     Morocco will suspend DST from 2015-06-14 03:00 through 2015-07-19 02:00,
     not 06-13 and 07-18 as we had guessed.

     Assume Cayman Islands will observe DST starting next year, using US rules.
     Although it isn't guaranteed, it is the most likely.

     North Korea switches to +0830 on 2015-08-15.
     The abbreviation remains "KST".

     Uruguay no longer observes DST.

     Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-08-17 22:53:11 +03:00
Christian Schoenebeck
0be846d7ff ipkg.lua: compare_versions() Replace Lua Math Library call
function compare_versions(): replace Lua Math Library call with if clause

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-08-04 21:14:48 +02:00
Christian Schoenebeck
237740b386 cbi.lua: Fix Flag.parse() to set "self.section.changed"
Add to set "self.section.changed" on changes like other values do.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-08-02 07:06:42 +02:00
Christian Schoenebeck
305528b3cc ipkg.lua: new function compare_version
* minor fix function _list() set to local
* new function compare_version() lua version of opkg compare-version

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-07-27 18:08:54 +02:00
Georgi Valkov
ec170d6282 Fix: A disabled wireless network may be shown as enabled, when multiple networks are defined on the same radio. 2015-07-27 11:37:09 +02:00
Georgi Valkov
159b60f449 Fix: Status for disabled wireless networks may display the SSID, BSSID and Mode of an active network on the same radio. 2015-07-27 11:37:09 +02:00
Georgi Valkov
48c8cad48a Workaround: saved administration site user and pass may appear on the Wireless configuration page, replacing the WPA key. 2015-07-27 11:37:09 +02:00
fabio70mi
bae48b6f88 Update base.po
Corrected "Aggironamento Automatico" to "Aggiornamento Automatico"
2015-06-17 16:06:20 +02:00
Jo-Philipp Wich
d2638a7a0e Merge pull request #389 from hnyman/timezone2015d
Timezone information is updated to 2015d, released on 24 Apr 2015.
2015-06-10 10:19:19 +02:00
Jo-Philipp Wich
1dada8cc44 luci-base: prevent parsing the form input after cbi emergency save
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-05-26 17:32:11 +02:00
Jo-Philipp Wich
fe14cd5a66 luci-base: fallback to a simple text editor if uci config cannot be loaded
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-05-26 17:12:42 +02:00
Jo-Philipp Wich
03610cee3a luci-base: rename .gitignore to .placeholder
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-05-26 16:27:05 +02:00
Hannu Nyman
c7a6830536 Timezone information is updated to 2015d, released on 24 Apr 2015.
I used build/zoneinfo2lua.pl to pull data from my Ubuntu 15.04.

Changes in 2015d are rather small:
http://mm.icann.org/pipermail/tz-announce/2015-April/000031.html

   Changes affecting future time stamps
     Egypt will not observe DST in 2015 and will consider canceling it
     permanently.  For now, assume no DST indefinitely.

   Change affecting time zone abbreviations
     The abbreviations for Hawaii-Aleutian standard and daylight times
     have been changed from HAST/HADT to HST/HDT, as per US Government
     Printing Office style.  This affects only America/Adak since 1983,
     as America/Honolulu was already using the new style.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-05-23 17:34:13 +03:00
nightcoffee
08a38a0493 luci-base: Add cache control in index.html
Signed-off-by: Night Coffee <ydkf@qq.com>
2015-05-18 20:05:02 +08:00
郭传鈜
c39edc189f luci-base:Add some Simplified Chinese translation for luci-base 2015-04-24 13:34:28 +08:00
Christian Schoenebeck
2fdd19524d fix wrong xhtml tags in po files
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-04-21 21:26:00 +02:00
Jo-Philipp Wich
6a13d73c29 Synchronize translations
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-04-20 10:35:08 +02:00
Hannu Nyman
4d18e09e05 Timezone data: Update to 2015c
Timezone information is updated to 2015c, released on 14 Apr 2015.

I used build/zoneinfo2lua.pl to pull data from my Ubuntu 14.10.

Changes in 2015b and 2015c are rather small:
http://mm.icann.org/pipermail/tz-announce/2015-March/000029.html
http://mm.icann.org/pipermail/tz-announce/2015-April/000030.html

     Mongolia will start observing DST again this year, from the last
     Saturday in March at 02:00 to the last Saturday in September at 00:00.

     Palestine will start DST on March 28, not March 27.  Also,
     correct the fall 2014 transition from September 26 to October 24.
     Adjust future predictions accordingly.

     Egypt's spring-forward transition is at 24:00 on April's last Thursday,
     not 00:00 on April's last Friday.  2015's transition will therefore be on
     Thursday, April 30 at 24:00, not Friday, April 24 at 00:00.  Similar fixes
     apply to 2026, 2037, 2043, etc.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-04-19 10:48:03 +03:00
Jo-Philipp Wich
6160a53ab9 luci-base: fix backslash escaping in luci.util.serialize_json()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-03-18 12:43:29 +01:00
Legend Tang
d79f5da13f luci-base: fix wrong pattern of urlencode() (encode '+' properly) #182 2015-03-01 03:03:08 +08:00
Jo-Philipp Wich
ec1a86977b Avoid setting duplicate cookies
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-02-09 16:30:11 +01:00
Jo-Philipp Wich
ec90cd69ed luci-base: pass session timeout as integer
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-02-09 13:03:44 +01:00
Jo-Philipp Wich
993cf12229 luci-base: establish ubus connection before dropping privileges (#310)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-02-09 12:14:20 +01:00
Hannu Nyman
fd1042f5ee Timezone data: Update to 2015a
Timezone information is updated to 2015a, released on 30 Jan 15.

I used build/zoneinfo2lua.pl to pull data from my Ubuntu 14.10.

Changes are rather small:
http://mm.icann.org/pipermail/tz-announce/2015-January/000028.html

The Mexican state of Quintana Roo, represented by America/Cancun,
will shift from Central Time with DST to Eastern Time without DST.

Chile will not change clocks in April or thereafter; its new
standard time will be its old daylight saving time.
This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer.

Ps. I manually edited headers to have the shorter new copyright,
instead of the long one generated buy the script.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-02-04 18:50:36 +02:00
Jo-Philipp Wich
84346cd178 Move inline documentation into separate files.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-29 16:26:46 +01:00
Jo-Philipp Wich
83d520ab07 luci-base: improve login/logout handling
Redirect to the canonical url after login and redirect to an url without
security token if the session expired. Also make sure that the login page
is served with status code 403, not 200 to give ajax calls a chance to
detect expired sessions.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-26 17:31:21 +01:00
Jo-Philipp Wich
40066a6799 luci-base: optimize luci.tools.webadmin.iface_get_network()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-23 15:26:33 +01:00
Jo-Philipp Wich
6c16f97c4c luci-base: remove unused functions from luci.sys.net
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-22 23:55:11 +01:00
Jo-Philipp Wich
577b772824 luci-base: rewrite luci.tools.webadmin and remove unused functions
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-22 18:25:49 +01:00
Jo-Philipp Wich
0e90bf98df luci-base: depend on luci-lib-ip and remove ip.lua
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-22 15:08:09 +01:00
Jo-Philipp Wich
390c4bd5a7 luci-base: use serialize_json() in luci.http
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-22 15:01:50 +01:00
Jo-Philipp Wich
61a9a58efc luci-base: add luci.util.serialize_json()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-22 15:01:50 +01:00
Jo-Philipp Wich
41d2b33087 Update my email addresses in the license headers
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-16 23:49:44 +01:00
Jo-Philipp Wich
7a3493b1f7 Globally reduce copyright headers
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-16 23:38:38 +01:00
Jo-Philipp Wich
9980114624 luci-base: remove luci.init
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-16 21:40:49 +01:00
Jo-Philipp Wich
2ebc394347 luci-base: use local sys module table in luci.dispatcher
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-16 21:40:49 +01:00
Luiz Angelo Daros de Luca
b34c9ae639 luci-proto-3g: add dialnumber option
UCI network already permit dialnumber option for 3g interfaces.
This adds dialnumber to luci protocol 3g. Also it introduces a
new translation string "Dial number", added to template and updated
on each language (all empty but pt-br).

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2015-01-16 15:37:13 -02:00
Jo-Philipp Wich
7aa838988f luci-base: remove old fastindex support code, use cached module tables
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-15 16:32:03 +01:00
Jo-Philipp Wich
e2ec170445 luci-base: remove unconditional "bit" preloading
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-15 16:02:54 +01:00
Jo-Philipp Wich
e91b603acc luci-base: drop luci.fs
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-15 15:40:33 +01:00
Jo-Philipp Wich
76eb057b2c luci-mod-base: drop luci.sys.sysinfo() and luci.sys.loadavg()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-15 14:26:36 +01:00
Jo-Philipp Wich
c159d28091 luci-base: switch luci.model.network to common ubus api
Replaces the ubus calls in luci.model.network with the common api
from luci.util.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-15 11:10:02 +01:00
Jo-Philipp Wich
199c8cbc4c luci-base: switch to ubus sessions
Remove luci.sauth session storage implementation and offload the session
management to the rpcd ubus backend. Also depend on rpcd due to this.
2015-01-15 11:09:05 +01:00
Jo-Philipp Wich
eb8560061a luci-base: add luci.util.ubus()
Add luci.util.ubus() convenience wrapper which establishes a connection on
the first call.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-15 11:03:31 +01:00
Christian Schoenebeck
42757cb549 Modified dependencies
Module luci-base
- libubus-lua not needed

Module luci-mod-admin
- libubus-lua needed

Collection luci
- luci-lib-nixio not needed, already in luci-base

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-01-10 22:33:43 +01:00
Jo-Philipp Wich
9a81d8ff32 luci-base: handle missing translations in template engine
Previously the template engine did not interpolate translation macros if no
translation catalogue could be loaded due to a missing i18n directory.

Change the offending code to return the original string in any error case.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-10 21:19:54 +01:00
Jo-Philipp Wich
1380c7b07d luci-base: add depends on libubus-lua and luci-lib-nixio as well
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-10 19:58:06 +01:00
Jo-Philipp Wich
26aefe4f69 luci-base: depend on libuci-lua
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-10 19:54:05 +01:00
Jo-Philipp Wich
c97011fd97 luci-base: fix dependency on lua (#284)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-10 13:42:42 +01:00
Jo-Philipp Wich
3afecbd8ab luci-base: depend on Lua (#283)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-09 16:35:23 +01:00
Jo-Philipp Wich
4cb3aed0ca Remove obsolete .mk files
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-08 16:49:42 +01:00
Jo-Philipp Wich
fa84ca05d5 luci-base: luci.util: rewrite threadlocal code to not confuse minifier
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-08 16:26:20 +01:00
Jo-Philipp Wich
1bb4822dca Rework LuCI build system
* Rename subdirectories to their repective OpenWrt package names
 * Make each LuCI module its own standalone package
 * Deploy a shared luci.mk which is used by each module Makefile

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-08 16:26:20 +01:00