Commit graph

377 commits

Author SHA1 Message Date
Jo-Philipp Wich
43df504278 libs/web: assign extra css class to typed or named sections with tabs 2011-09-30 14:14:04 +00:00
Jo-Philipp Wich
ea6f5379dc libs/web: network widget fixes 2011-09-25 11:59:21 +00:00
Jo-Philipp Wich
bf49f78599 libs/web: align interface related widgets to changed network model api 2011-09-24 03:49:17 +00:00
Jo-Philipp Wich
7925014561 libs/web: add missing class attributes 2011-09-22 18:21:38 +00:00
Jo-Philipp Wich
737daee3e1 libs/web: cbi: dynamically update css class of last field after dependency update 2011-09-22 17:05:14 +00:00
Jo-Philipp Wich
688eb421cc libs/web: cbi: assign dedicated css class to last child 2011-09-22 16:34:52 +00:00
Jo-Philipp Wich
96dd29753c libs/web: cbi: provide a "last_child" property to allow for more layout control in form rendering 2011-09-22 16:33:28 +00:00
Jo-Philipp Wich
362c84480a libs/web: add another missing class attribute 2011-09-22 13:43:39 +00:00
Jo-Philipp Wich
b360dbc6dc modules/admin-full, modules/freifunk, modules/niu, libs/web, applications/luci-upnp: tune input class attributes 2011-09-22 13:25:48 +00:00
Jo-Philipp Wich
59e95ddcad modules/admin-full, libs/web: various interface handling fixes in network settings 2011-09-22 01:40:26 +00:00
Jo-Philipp Wich
537c929d63 libs/web: track submit state in network_ifacelist widget, fixes deselecting all member ifaces in checkbox mode 2011-09-14 09:28:16 +00:00
Jo-Philipp Wich
794094caa2 libs/web: add "neg()" cbi datatype to negate arbritary types, e.g. "neg(hostname)" would allow "!example.com" 2011-09-04 12:07:43 +00:00
Jo-Philipp Wich
37df666e0a libs/web: fix some missing escapes in iface and netlist widgets 2011-09-01 16:07:02 +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
354aeb44f6 libs/web: add new datatypes min(...), max(...) and neg_network_ip4addr 2011-06-17 10:52:49 +00:00
Jo-Philipp Wich
6e6bac2a4a libs/web: remove license comments from cbi templates, saves around 50% of their size 2011-05-04 12:56:06 +00:00
Jo-Philipp Wich
b95ec6c93a libs/web: fix another invalid entity 2011-05-03 03:31:30 +00:00
Jo-Philipp Wich
6697e282af trunk: s/ / /g 2011-05-03 03:20:15 +00:00
Manuel Munz
bb2d7517eb luci-firewall: Add support for negations for ip addresses/nets (#218) 2011-04-13 00:33:42 +00:00
Jo-Philipp Wich
8ea7eb8615 libs/web: fix "port" datatype to allow port 0 2011-03-17 17:40:40 +00:00
Jo-Philipp Wich
8cab9e2b8f libs/web: explicitely cast input value of %m pattern to float in order to avoid throwing an exception in toFixed() with very low values 2011-03-13 21:56:31 +00:00
Jo-Philipp Wich
a8688343d6 libs/web: add %m pattern to String.format() 2011-03-13 11:12:11 +00:00
Jo-Philipp Wich
1db9f295fa libs/web: repair and modernize FileBrowser widget, patches by Kevin Locke <klocke@digitalenginesoftware.com> (#207) 2011-03-05 06:35:26 +00:00
Manuel Munz
489279bb9a web: Relax hostname validation for length 2011-02-12 19:39:54 +00:00
Manuel Munz
408a58f6f6 web: Improve hostname validation 2011-02-12 11:09:13 +00:00
Jo-Philipp Wich
be5b1015b2 libs/web: improve cbi handling of Flag values, support usage of .default attribute to signalize default-on checkboxes, this helps to deal with the reversed logic of various uci bools within OpenWrt configs 2011-01-29 17:54:00 +00:00
Jo-Philipp Wich
8055a5e183 libs/web: remove a stray non breaking space in DummyValue template 2011-01-26 16:21:15 +00:00
Jo-Philipp Wich
2ae8c99606 libs/web: readd add/remove icons to dynamic list widgets 2011-01-23 18:28:35 +00:00
Jo-Philipp Wich
8193a249f1 libs/web: fix row sorting in IE 2011-01-20 12:35:42 +00:00
Jo-Philipp Wich
df5329a5cb libs/web: fix row ordering for named sections 2011-01-20 00:47:03 +00:00
Jo-Philipp Wich
a30ea6c2a3 libs/web: add missing cells to tblsection template 2011-01-20 00:19:05 +00:00
Jo-Philipp Wich
80e1900b03 libs/web: implement sortable rows for uci reordering 2011-01-20 00:01:55 +00:00
Jo-Philipp Wich
c176c70d5b libs/web: add up & down arrow icons 2011-01-19 23:57:00 +00:00
Jo-Philipp Wich
86a13c6ab9 libs/web: fix an untranslated string 2011-01-14 22:50:50 +00:00
Jo-Philipp Wich
5355d11e2c libs/web: some fixes for network_ifacelist widget 2011-01-14 19:57:30 +00:00
Jo-Philipp Wich
4bbd85fe42 libs/web: properly handle .default property for ListValue fields with integer keys 2011-01-13 20:54:57 +00:00
Jo-Philipp Wich
bd8ac05d56 libs/web: introduce width property for fields in tblsections 2011-01-13 20:02:16 +00:00
Jo-Philipp Wich
f68906c20f libs/web: fix error in wep key validation 2010-12-16 15:59:25 +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
99bf12fb63 libs/web: add field validation for add section name inputs 2010-12-05 17:37:59 +00:00
Jo-Philipp Wich
6c84824d79 libs/web: handle empty tables in Map.set() 2010-12-05 00:54:18 +00:00
Jo-Philipp Wich
090ce4f17e libs/web: add float and ufloat datatypes for field validation 2010-12-05 00:19:09 +00:00
Jo-Philipp Wich
2a0903bc50 libs/web: fix dynamic list handling 2010-12-03 12:41:12 +00:00
Jo-Philipp Wich
de3ea4e956 libs/web: remove debug code from cbi.js 2010-12-01 20:59:36 +00:00
Jo-Philipp Wich
9abe328f9a libs/web: add %t format to String.format(), fix float formatting 2010-12-01 20:53:29 +00:00
Jo-Philipp Wich
a3207ded53 libs/web: fix filtering of overlong utf8 sequences 2010-11-28 20:25:03 +00:00
Jo-Philipp Wich
34ee162976 libs/web: render aggregated messages 2010-11-27 18:18:06 +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
6d02d50d46 libs/web: fix IPv6 live validation 2010-11-23 23:19:40 +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
f72aa0c4c8 libs/web: implement "unspecified" option for netlist widget 2010-11-21 02:27:13 +00:00
Jo-Philipp Wich
7892bcec29 libs/web: add network_netinfo widget 2010-11-21 00:46:14 +00:00
Jo-Philipp Wich
6b3e6fb854 libs/web: add "back to overview" button to page actions if .redirect is set on the corresponding map 2010-11-21 00:21:49 +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
be385bfcc6 libs/web: better server side handling of DynList values 2010-11-20 18:35:44 +00:00
Jo-Philipp Wich
d79895c0c3 libs/web: fix DynList template for empty values 2010-11-20 18:24:17 +00:00
Jo-Philipp Wich
ff58e81d18 libs/web: skip empty values in DynList widget 2010-11-20 18:08:18 +00:00
Jo-Philipp Wich
7a7874d14e libs/web: give cbi tabcontainers a CSS class 2010-11-19 17:35:06 +00:00
Jo-Philipp Wich
8dde0803af libs/web: fix apply xhr for IE... 2010-11-18 03:07:21 +00:00
Jo-Philipp Wich
4121f34ac0 libs/web: make apply_xhr less aggressive, only rerequest status if previous response returned 2010-11-17 15:09:18 +00:00
Jo-Philipp Wich
c20dcb3612 libs/web: add range(min,max) datatype validator 2010-11-16 18:48:02 +00:00
Jo-Philipp Wich
b17848e82e libs/web: treat .rmempty like .optional for live field validation 2010-11-16 18:05:17 +00:00
Jo-Philipp Wich
59e3062caf libs/web: add support for exclude property to ifacelist and netlist widgets 2010-11-15 12:28:25 +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
8ac568acb0 libs/web: fix sanitize_utf8(), passes all testcases now 2010-11-12 22:48:17 +00:00
Jo-Philipp Wich
09e71acf6b libs/web: add UTF-8 validation and pcdata escaping C routines to template parser 2010-11-12 22:37:50 +00:00
Jo-Philipp Wich
16262c2be0 libs/web: implement rawhtml property for DummyValue switches, allowes passing arbritary markup 2010-11-08 18:13:40 +00:00
Jo-Philipp Wich
d26ceda459 libs/web: support local destination in zonelist widget 2010-11-07 20:01:12 +00:00
Jo-Philipp Wich
561673c0a1 libs/web: add luci.http.write_json() 2010-11-07 19:27:15 +00:00
Jo-Philipp Wich
4ede70c0ce libs/web: introduce firewall_zoneforwards widget 2010-11-01 19:39:57 +00:00
Jo-Philipp Wich
ea81c6ad53 libs/web: use the value of the .enabled property in flag widget html 2010-10-31 21:41:57 +00:00
Jo-Philipp Wich
0a7bfa4f78 libs/web: support entering custom ifnames in iface list widget 2010-10-31 21:41:27 +00:00
Jo-Philipp Wich
b3b708a585 libs/web: add support for post commit redirects in cbi maps 2010-10-31 19:34:45 +00:00
Jo-Philipp Wich
29f0b48ddc libs/web: fix type in datatypes.lua 2010-10-30 18:18:18 +00:00
Jo-Philipp Wich
4622241535 libs/web: introduce "uciname" datatype for cbi validation 2010-10-30 18:12:39 +00:00
Jo-Philipp Wich
fc5b9e27f0 libs/web: use imatch() in model related widgets, support multivalues in netlist widget 2010-10-30 17:57:49 +00:00
Jo-Philipp Wich
4f2248fadb libs/web: add placeholder support to DynamicList widgets 2010-10-30 17:21:27 +00:00
Jo-Philipp Wich
82b7e4e72b libs/web: add html5 placeholder attribute support to cbi options 2010-10-30 02:51:15 +00:00
Jo-Philipp Wich
bc78f7e08d libs/web: implement forcewrite attribute for cbi options 2010-10-30 02:30:09 +00:00
Jo-Philipp Wich
85a5d628ec libs/web: live validation fixes 2010-10-30 01:03:20 +00:00
Jo-Philipp Wich
595020f919 libs/web: convert cbi widgets to new network model 2010-10-30 00:42:58 +00:00
Jo-Philipp Wich
70706cf388 libs/web: rework DynamicList widget 2010-10-25 17:04:03 +00:00
Jo-Philipp Wich
63089ef8be libs/web: annotate form object with cbi state when using section add/remove buttons 2010-10-21 20:51:32 +00:00
Jo-Philipp Wich
98b4da49b0 libs/web: fix ip6addr js validation, fixes for live validation 2010-10-21 20:50:18 +00:00
Jo-Philipp Wich
5e45e4107b libs/web: fix tab highlighting with multiple tabs 2010-10-20 22:43:29 +00:00
Jo-Philipp Wich
1a3533cb86 libs/web: add String.serialize() and String.format() to cbi.js 2010-10-19 04:06:46 +00:00
Jo-Philipp Wich
db46443478 libs/web: support different caption for button widgets 2010-10-19 04:03:36 +00:00
Jo-Philipp Wich
dd2abf2ea4 libs/web: move XHR apply callback into subtemplate 2010-10-15 21:56:44 +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
fbaabd7d93 libs/web: cbi: add new on_before_save and on_after_save hook, implement :reset_values() for options supporting :value() 2010-10-14 23:21:25 +00:00
Jo-Philipp Wich
8038cbf004 libs/web: fix various issues in cbi option error handling, call validator for missing options to obtain error message 2010-10-14 00:18:28 +00:00
Jo-Philipp Wich
17575b4d75 libs/web: rework cbi field validation, let validators return custom error messages, properly handle errors in multiple sections 2010-10-12 23:08:54 +00:00