Jo-Philipp Wich
099e97532c
libs/web: add assert() statements for unresolvable function case
2011-11-30 12:50:32 +00:00
Jo-Philipp Wich
96f494f4ba
libs/web: dispatcher: fix access to template properties in attr() and ifattr() helpers ( #10317 )
2011-10-30 15:00:54 +00:00
Jo-Philipp Wich
334756a472
libs/web: fix possible dispatcher crash
2011-10-26 03:04:41 +00:00
Jo-Philipp Wich
e12b8dbc1f
libs/web: move ifattr() and attr() helpers into dispatcher scope to make them avilable to all templates, remove duplicate exports in cbi tempalte scope
2011-10-26 02:17:45 +00:00
Jo-Philipp Wich
5f7d2719b2
libs/web: dispatcher add node_childs() and node_visible() helper functions for templates
2011-10-26 00:24:17 +00:00
Jo-Philipp Wich
6021cf3bdf
libs/web: dispatcher: implement a "firstchild()" target which simply redirects to the first child of a node, useful for menus that are empty by default and may gain arbritary childs
2011-10-25 22:48:43 +00:00
Jo-Philipp Wich
a24d340ca4
libs/web: fix package name in error suggestion
2011-10-21 17:22:48 +00:00
Jo-Philipp Wich
a8ac3b344f
libs/web: add _() function to dispatcher, used for marking translatable menu entries
2011-08-12 13:11:29 +00:00
Jo-Philipp Wich
986c4b5bc1
libs/web: eliminate another uneeded require in dispatcher
2011-08-12 12:34:13 +00:00
Jo-Philipp Wich
c1d69d0146
libs/web: optimize access to translate() api by directly reusing the luci.i18n instance loaded in dispatcher - this saves one extra function call, one extra require and one extra table lookup for _each_ translation string
2011-08-12 11:13:39 +00:00
Jo-Philipp Wich
0cb0742818
[PATCH] Allow smarter node creation based on visibility during createtree
...
As I've brought up on the mailing list thread "High latency caused by full tree creation", there is a large amount of delay per LuCI request which is spent building the node tree in createtree(). Most nodes created aren't
needed for the view presented to the user and only serve to consume memory and CPU time during a page load.
My idea is to provide an easy mechanism for index()ers to determine which needs to be created and what isn't. Due to the constraints of the standard LuCI web interface, this optimization needs to establish a few rules:
* The page requested must have its node created
* All parents of the page being requested must be created, so the children inherit the track
* All the top-level nodes "Status", "System", "Services", "Network" (and others added by extensions) must be created in order to have their top-level tabs in the UI
* All peers of second-level nodes need to be created as well for the same reason, to display their links on the subindexes
To make this easy to implement in each controller, the attached patch adds an "inreq" field to each created node to indicate if it lies on the request path. To satisfy the "top level node" requirement, we always
add the top level node, then check its inreq property if the top-level node is not "in request", then the controller can exit index() early.
2011-08-12 11:05:59 +00:00
Jo-Philipp Wich
b3861e0ec7
[PATCH] Wasted memory use storing path copies in node tree
...
When creating the node tree, every node stores a copy of its full path table. e.g. for node("admin.network.wireless"), node.path = { "admin", "network", "wireless" }
This value is not used anywhere, and likely may be from before the addition of the treecache lookup table? In any instance, I've searched high and low and see nothing ever referencing any node's path via the path member. It
eats a good chunk of memory though and as such I believe it should be removed.
I've tested every page in the admin-full module after removing it and all seem to function properly.
2011-08-12 11:04:42 +00:00
Jo-Philipp Wich
2e618aaf29
libs/web: more verbose faults
2011-07-21 01:04:53 +00:00
Jo-Philipp Wich
d970d7bd27
libs/web: make dispatcher faults more verbose
2011-07-20 23:57:32 +00:00
Jo-Philipp Wich
253eafb577
libs/web: fix index cache rebuild triggering ( #275 )
2011-07-18 14:50:39 +00:00
Jo-Philipp Wich
39578a6b72
libs/web: change "module" variable to "modname" in dispatcher.lua, solves apidoc artefacts
2010-12-12 20:16:13 +00:00
Jo-Philipp Wich
6e97be1e92
libs/web: add the ability for maps to push error messages to the global page header
2010-11-27 18:17:15 +00:00
Jo-Philipp Wich
9c3db58ee4
libs/web: combine apply actions of all maps on a page, prevents concurrent XHR
2010-11-22 00:32:54 +00:00
Jo-Philipp Wich
25754119d4
libs/web: expose cbi map redirect property to page templates
2010-11-21 00:14:03 +00:00
Jo-Philipp Wich
fa3b7ce070
libs/web: allow percent sign in urls
2010-11-13 20:50:20 +00:00
Jo-Philipp Wich
0aa85e7131
libs/web: stricter validation in build_url(), prevents some XSS
2010-11-13 13:50:54 +00:00
Jo-Philipp Wich
f7ab1fbc56
libs/web: add export() to template namespace, allows templates to export symbols to the calling view namespace, this is useful for includes defining shared procedures or variables
2010-10-15 16:12:07 +00:00
Jo-Philipp Wich
4c4d9b869b
libs/web: don't fail if no langauge is set in luci config
2010-04-16 19:05:05 +00:00
Steven Barth
e822874a71
NIU:
...
Add WDS bridge client mode
Extending / repeating WDS network in AP wizard
Better 802.11s support
2009-11-29 13:46:04 +00:00
Steven Barth
6fd3c1f367
Publish nixio.fs in index-scope
2009-11-14 18:41:16 +00:00
Steven Barth
7aed1e4b9d
NIU: More pages
2009-11-10 16:02:48 +00:00
Jo-Philipp Wich
f5a760168b
all: remove references to old i18n files
2009-11-01 14:24:04 +00:00
Jo-Philipp Wich
8f2a3f1dcc
libs/web: prepare template parser, dispatcher and i18n class for upcoming po format change
2009-10-31 15:42:07 +00:00
Steven Barth
9b50dd9cba
Fix requestpath, export authuser
2009-09-11 10:46:06 +00:00
Jo-Philipp Wich
5676686863
libs/web: restore protected call to Template(), was accidentally removed in r4889
2009-08-07 15:16:14 +00:00
Steven Barth
0371fc26d8
Reintroduce prefisx support - was gone somewhere
2009-07-25 12:45:38 +00:00
Steven Barth
a77f1b91ae
Allow Basic-Auth pass-through
2009-07-25 10:47:26 +00:00
Steven Barth
2655871d39
Revert external tree usage
2009-07-24 15:45:29 +00:00
Jo-Philipp Wich
97743c1387
libs/web: disable memory debuggin in trunk as well
2009-07-23 11:32:22 +00:00
Jo-Philipp Wich
8b001ee843
libs/web: dispatcher.lua: add support for external tree building and indexing
2009-07-23 03:25:27 +00:00
Jo-Philipp Wich
8fcd841aa9
convert luci.fs users to nixio.fs api
2009-07-19 00:24:58 +00:00
Steven Barth
7dcb05fd1c
Session-IDs are lowercase now
2009-07-10 17:06:19 +00:00
Steven Barth
30b216f774
Drop support for luaposix and bitlib (obsoleted by nixio)
...
Mark luci.fs as deprecated
2009-06-21 13:42:26 +00:00
Steven Barth
341f757255
Merge fixes / improvements
2009-06-20 07:14:36 +00:00
Jo-Philipp Wich
859a3fee88
libs/web: fix file caches in dispatcher, broke when introducing lua-gz support
2009-04-08 00:08:38 +00:00
Jo-Philipp Wich
9835296ba2
trunk: prepare LuCI to handle .lua.gz files
2009-04-04 22:54:16 +00:00
Steven Barth
f3deef9ec5
Backport Skip-Button support
2009-04-03 18:08:25 +00:00
Steven Barth
8fdb12c4d1
Introduce noheader and nofooter CBI-Dispatcher config
2009-03-27 00:10:17 +00:00
Jo-Philipp Wich
fc62fe46d0
libs/web:
...
- improve handling of low level runtime errors
- wrap access to luci.main into assert()
2009-03-14 01:16:03 +00:00
Steven Barth
30b7bc7c62
Fixed last commit
2009-03-07 16:28:27 +00:00
Steven Barth
25da62f8ff
Don't compare cstate if there is none
2009-03-07 16:24:05 +00:00
Steven Barth
1ed9be270b
Fix debugging output
2009-03-07 13:21:27 +00:00
Steven Barth
30421d38dd
Introduce luci.dispatcher.get(...) which works like node(...) but does
...
not disable the autocreated flag and does not overwrite the target
controller so that call()-targets won't loose their binding to their
controller
2009-02-26 17:08:41 +00:00
Steven Barth
3b7bb9c82f
Enable stack tracebacks for 500 errors
2009-02-26 16:45:01 +00:00
Jo-Philipp Wich
b5026e65c0
libs/web: don't send Status: 500 in error500() if header is already sent
...
modules/admin-core: include template header only once
2009-02-09 13:17:26 +00:00