0154165c0a78c6a0179d53da4bd62a1d40893b02
[project/luci.git] / docs / jsapi / luci.js.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Source: luci.js</title>
6
7
8 <script src="scripts/prettify/prettify.js"></script>
9 <script src="scripts/prettify/lang-css.js"></script>
10 <script src="scripts/jquery.min.js"></script>
11 <!--[if lt IE 9]>
12 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13 <![endif]-->
14 <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
15 <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
16 <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
17
18
19 <script>
20 var config = {"monospaceLinks":true,"cleverLinks":true,"default":{"outputSourceFiles":true}};
21 </script>
22
23
24
25 </head>
26 <body>
27 <div id="wrap" class="clearfix">
28
29 <div class="navigation">
30 <h3 class="applicationName"><a href="index.html"></a></h3>
31
32 <div class="search">
33 <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations">
34 </div>
35 <ul class="list">
36
37 <li class="item" data-name="LuCI">
38 <span class="title">
39 <a href="LuCI.html">LuCI</a>
40
41 </span>
42 <ul class="members itemMembers">
43
44 <span class="subtitle">Members</span>
45
46 <li data-name="LuCI#Class"><a href="LuCI.html#Class">Class</a></li>
47
48 <li data-name="LuCI#dom"><a href="LuCI.html#dom">dom</a></li>
49
50 <li data-name="LuCI#env"><a href="LuCI.html#env">env</a></li>
51
52 <li data-name="LuCI#Poll"><a href="LuCI.html#Poll">Poll</a></li>
53
54 <li data-name="LuCI#Request"><a href="LuCI.html#Request">Request</a></li>
55
56 <li data-name="LuCI#view"><a href="LuCI.html#view">view</a></li>
57
58 </ul>
59 <ul class="typedefs itemMembers">
60
61 <span class="subtitle">Typedefs</span>
62
63 <li data-name="LuCI.requestCallbackFn"><a href="LuCI.html#.requestCallbackFn">requestCallbackFn</a></li>
64
65 </ul>
66 <ul class="typedefs itemMembers">
67
68 </ul>
69 <ul class="methods itemMembers">
70
71 <span class="subtitle">Methods</span>
72
73 <li data-name="LuCI#bind"><a href="LuCI.html#bind">bind</a></li>
74
75 <li data-name="LuCI#error"><a href="LuCI.html#error">error</a></li>
76
77 <li data-name="LuCI#fspath"><a href="LuCI.html#fspath">fspath</a></li>
78
79 <li data-name="LuCI#get"><a href="LuCI.html#get">get</a></li>
80
81 <li data-name="LuCI#halt"><a href="LuCI.html#halt">halt</a></li>
82
83 <li data-name="LuCI#hasSystemFeature"><a href="LuCI.html#hasSystemFeature">hasSystemFeature</a></li>
84
85 <li data-name="LuCI#hasViewPermission"><a href="LuCI.html#hasViewPermission">hasViewPermission</a></li>
86
87 <li data-name="LuCI#isObject"><a href="LuCI.html#isObject">isObject</a></li>
88
89 <li data-name="LuCI#location"><a href="LuCI.html#location">location</a></li>
90
91 <li data-name="LuCI#media"><a href="LuCI.html#media">media</a></li>
92
93 <li data-name="LuCI#path"><a href="LuCI.html#path">path</a></li>
94
95 <li data-name="LuCI#poll"><a href="LuCI.html#poll">poll</a></li>
96
97 <li data-name="LuCI#post"><a href="LuCI.html#post">post</a></li>
98
99 <li data-name="LuCI#raise"><a href="LuCI.html#raise">raise</a></li>
100
101 <li data-name="LuCI#require"><a href="LuCI.html#require">require</a></li>
102
103 <li data-name="LuCI#resolveDefault"><a href="LuCI.html#resolveDefault">resolveDefault</a></li>
104
105 <li data-name="LuCI#resource"><a href="LuCI.html#resource">resource</a></li>
106
107 <li data-name="LuCI#run"><a href="LuCI.html#run">run</a></li>
108
109 <li data-name="LuCI#sortedKeys"><a href="LuCI.html#sortedKeys">sortedKeys</a></li>
110
111 <li data-name="LuCI#stop"><a href="LuCI.html#stop">stop</a></li>
112
113 <li data-name="LuCI#toArray"><a href="LuCI.html#toArray">toArray</a></li>
114
115 <li data-name="LuCI#url"><a href="LuCI.html#url">url</a></li>
116
117 </ul>
118 <ul class="events itemMembers">
119
120 </ul>
121 </li>
122
123 <li class="item" data-name="LuCI.baseclass">
124 <span class="title">
125 <a href="LuCI.baseclass.html">LuCI.baseclass</a>
126
127 </span>
128 <ul class="members itemMembers">
129
130 </ul>
131 <ul class="typedefs itemMembers">
132
133 </ul>
134 <ul class="typedefs itemMembers">
135
136 </ul>
137 <ul class="methods itemMembers">
138
139 <span class="subtitle">Methods</span>
140
141 <li data-name="LuCI.baseclass.extend"><a href="LuCI.baseclass.html#.extend">extend</a></li>
142
143 <li data-name="LuCI.baseclass.instantiate"><a href="LuCI.baseclass.html#.instantiate">instantiate</a></li>
144
145 <li data-name="LuCI.baseclass.isSubclass"><a href="LuCI.baseclass.html#.isSubclass">isSubclass</a></li>
146
147 <li data-name="LuCI.baseclass.singleton"><a href="LuCI.baseclass.html#.singleton">singleton</a></li>
148
149 <li data-name="LuCI.baseclass#super"><a href="LuCI.baseclass.html#super">super</a></li>
150
151 <li data-name="LuCI.baseclass#varargs"><a href="LuCI.baseclass.html#varargs">varargs</a></li>
152
153 </ul>
154 <ul class="events itemMembers">
155
156 </ul>
157 </li>
158
159 <li class="item" data-name="LuCI.dom">
160 <span class="title">
161 <a href="LuCI.dom.html">LuCI.dom</a>
162
163 </span>
164 <ul class="members itemMembers">
165
166 </ul>
167 <ul class="typedefs itemMembers">
168
169 <span class="subtitle">Typedefs</span>
170
171 <li data-name="LuCI.dom~ignoreCallbackFn"><a href="LuCI.dom.html#~ignoreCallbackFn">ignoreCallbackFn</a></li>
172
173 </ul>
174 <ul class="typedefs itemMembers">
175
176 </ul>
177 <ul class="methods itemMembers">
178
179 <span class="subtitle">Methods</span>
180
181 <li data-name="LuCI.dom#append"><a href="LuCI.dom.html#append">append</a></li>
182
183 <li data-name="LuCI.dom#attr"><a href="LuCI.dom.html#attr">attr</a></li>
184
185 <li data-name="LuCI.dom#bindClassInstance"><a href="LuCI.dom.html#bindClassInstance">bindClassInstance</a></li>
186
187 <li data-name="LuCI.dom#callClassMethod"><a href="LuCI.dom.html#callClassMethod">callClassMethod</a></li>
188
189 <li data-name="LuCI.dom#content"><a href="LuCI.dom.html#content">content</a></li>
190
191 <li data-name="LuCI.dom#create"><a href="LuCI.dom.html#create">create</a></li>
192
193 <li data-name="LuCI.dom#data"><a href="LuCI.dom.html#data">data</a></li>
194
195 <li data-name="LuCI.dom#elem"><a href="LuCI.dom.html#elem">elem</a></li>
196
197 <li data-name="LuCI.dom#findClassInstance"><a href="LuCI.dom.html#findClassInstance">findClassInstance</a></li>
198
199 <li data-name="LuCI.dom#isEmpty"><a href="LuCI.dom.html#isEmpty">isEmpty</a></li>
200
201 <li data-name="LuCI.dom#matches"><a href="LuCI.dom.html#matches">matches</a></li>
202
203 <li data-name="LuCI.dom#parent"><a href="LuCI.dom.html#parent">parent</a></li>
204
205 <li data-name="LuCI.dom#parse"><a href="LuCI.dom.html#parse">parse</a></li>
206
207 </ul>
208 <ul class="events itemMembers">
209
210 </ul>
211 </li>
212
213 <li class="item" data-name="LuCI.form">
214 <span class="title">
215 <a href="LuCI.form.html">LuCI.form</a>
216
217 </span>
218 <ul class="members itemMembers">
219
220 </ul>
221 <ul class="typedefs itemMembers">
222
223 </ul>
224 <ul class="typedefs itemMembers">
225
226 </ul>
227 <ul class="methods itemMembers">
228
229 </ul>
230 <ul class="events itemMembers">
231
232 </ul>
233 </li>
234
235 <li class="item" data-name="LuCI.form.AbstractElement">
236 <span class="title">
237 <a href="LuCI.form.AbstractElement.html">LuCI.form.AbstractElement</a>
238
239 </span>
240 <ul class="members itemMembers">
241
242 </ul>
243 <ul class="typedefs itemMembers">
244
245 </ul>
246 <ul class="typedefs itemMembers">
247
248 </ul>
249 <ul class="methods itemMembers">
250
251 <span class="subtitle">Methods</span>
252
253 <li data-name="LuCI.form.AbstractElement#append"><a href="LuCI.form.AbstractElement.html#append">append</a></li>
254
255 <li data-name="LuCI.form.AbstractElement#parse"><a href="LuCI.form.AbstractElement.html#parse">parse</a></li>
256
257 <li data-name="LuCI.form.AbstractElement#render"><a href="LuCI.form.AbstractElement.html#render">render</a></li>
258
259 <li data-name="LuCI.form.AbstractElement#stripTags"><a href="LuCI.form.AbstractElement.html#stripTags">stripTags</a></li>
260
261 <li data-name="LuCI.form.AbstractElement#titleFn"><a href="LuCI.form.AbstractElement.html#titleFn">titleFn</a></li>
262
263 </ul>
264 <ul class="events itemMembers">
265
266 </ul>
267 </li>
268
269 <li class="item" data-name="LuCI.form.AbstractSection">
270 <span class="title">
271 <a href="LuCI.form.AbstractSection.html">LuCI.form.AbstractSection</a>
272
273 </span>
274 <ul class="members itemMembers">
275
276 <span class="subtitle">Members</span>
277
278 <li data-name="LuCI.form.AbstractSection##parentoption"><a href="LuCI.form.AbstractSection.html#parentoption">parentoption</a></li>
279
280 </ul>
281 <ul class="typedefs itemMembers">
282
283 </ul>
284 <ul class="typedefs itemMembers">
285
286 </ul>
287 <ul class="methods itemMembers">
288
289 <span class="subtitle">Methods</span>
290
291 <li data-name="LuCI.form.AbstractSection#append"><a href="LuCI.form.AbstractSection.html#append">append</a></li>
292
293 <li data-name="LuCI.form.AbstractSection#cfgsections"><a href="LuCI.form.AbstractSection.html#cfgsections">cfgsections</a></li>
294
295 <li data-name="LuCI.form.AbstractSection#filter"><a href="LuCI.form.AbstractSection.html#filter">filter</a></li>
296
297 <li data-name="LuCI.form.AbstractSection#load"><a href="LuCI.form.AbstractSection.html#load">load</a></li>
298
299 <li data-name="LuCI.form.AbstractSection#option"><a href="LuCI.form.AbstractSection.html#option">option</a></li>
300
301 <li data-name="LuCI.form.AbstractSection#parse"><a href="LuCI.form.AbstractSection.html#parse">parse</a></li>
302
303 <li data-name="LuCI.form.AbstractSection#render"><a href="LuCI.form.AbstractSection.html#render">render</a></li>
304
305 <li data-name="LuCI.form.AbstractSection#stripTags"><a href="LuCI.form.AbstractSection.html#stripTags">stripTags</a></li>
306
307 <li data-name="LuCI.form.AbstractSection#tab"><a href="LuCI.form.AbstractSection.html#tab">tab</a></li>
308
309 <li data-name="LuCI.form.AbstractSection#taboption"><a href="LuCI.form.AbstractSection.html#taboption">taboption</a></li>
310
311 <li data-name="LuCI.form.AbstractSection#titleFn"><a href="LuCI.form.AbstractSection.html#titleFn">titleFn</a></li>
312
313 </ul>
314 <ul class="events itemMembers">
315
316 </ul>
317 </li>
318
319 <li class="item" data-name="LuCI.form.AbstractValue">
320 <span class="title">
321 <a href="LuCI.form.AbstractValue.html">LuCI.form.AbstractValue</a>
322
323 </span>
324 <ul class="members itemMembers">
325
326 <span class="subtitle">Members</span>
327
328 <li data-name="LuCI.form.AbstractValue##datatype"><a href="LuCI.form.AbstractValue.html#datatype">datatype</a></li>
329
330 <li data-name="LuCI.form.AbstractValue##default"><a href="LuCI.form.AbstractValue.html#default">default</a></li>
331
332 <li data-name="LuCI.form.AbstractValue##editable"><a href="LuCI.form.AbstractValue.html#editable">editable</a></li>
333
334 <li data-name="LuCI.form.AbstractValue##modalonly"><a href="LuCI.form.AbstractValue.html#modalonly">modalonly</a></li>
335
336 <li data-name="LuCI.form.AbstractValue##optional"><a href="LuCI.form.AbstractValue.html#optional">optional</a></li>
337
338 <li data-name="LuCI.form.AbstractValue##readonly"><a href="LuCI.form.AbstractValue.html#readonly">readonly</a></li>
339
340 <li data-name="LuCI.form.AbstractValue##rmempty"><a href="LuCI.form.AbstractValue.html#rmempty">rmempty</a></li>
341
342 <li data-name="LuCI.form.AbstractValue##uciconfig"><a href="LuCI.form.AbstractValue.html#uciconfig">uciconfig</a></li>
343
344 <li data-name="LuCI.form.AbstractValue##ucioption"><a href="LuCI.form.AbstractValue.html#ucioption">ucioption</a></li>
345
346 <li data-name="LuCI.form.AbstractValue##ucisection"><a href="LuCI.form.AbstractValue.html#ucisection">ucisection</a></li>
347
348 <li data-name="LuCI.form.AbstractValue##validate"><a href="LuCI.form.AbstractValue.html#validate">validate</a></li>
349
350 <li data-name="LuCI.form.AbstractValue##width"><a href="LuCI.form.AbstractValue.html#width">width</a></li>
351
352 </ul>
353 <ul class="typedefs itemMembers">
354
355 </ul>
356 <ul class="typedefs itemMembers">
357
358 </ul>
359 <ul class="methods itemMembers">
360
361 <span class="subtitle">Methods</span>
362
363 <li data-name="LuCI.form.AbstractValue#append"><a href="LuCI.form.AbstractValue.html#append">append</a></li>
364
365 <li data-name="LuCI.form.AbstractValue#cbid"><a href="LuCI.form.AbstractValue.html#cbid">cbid</a></li>
366
367 <li data-name="LuCI.form.AbstractValue#cfgvalue"><a href="LuCI.form.AbstractValue.html#cfgvalue">cfgvalue</a></li>
368
369 <li data-name="LuCI.form.AbstractValue#depends"><a href="LuCI.form.AbstractValue.html#depends">depends</a></li>
370
371 <li data-name="LuCI.form.AbstractValue#formvalue"><a href="LuCI.form.AbstractValue.html#formvalue">formvalue</a></li>
372
373 <li data-name="LuCI.form.AbstractValue#getUIElement"><a href="LuCI.form.AbstractValue.html#getUIElement">getUIElement</a></li>
374
375 <li data-name="LuCI.form.AbstractValue#isActive"><a href="LuCI.form.AbstractValue.html#isActive">isActive</a></li>
376
377 <li data-name="LuCI.form.AbstractValue#isValid"><a href="LuCI.form.AbstractValue.html#isValid">isValid</a></li>
378
379 <li data-name="LuCI.form.AbstractValue#load"><a href="LuCI.form.AbstractValue.html#load">load</a></li>
380
381 <li data-name="LuCI.form.AbstractValue#parse"><a href="LuCI.form.AbstractValue.html#parse">parse</a></li>
382
383 <li data-name="LuCI.form.AbstractValue#remove"><a href="LuCI.form.AbstractValue.html#remove">remove</a></li>
384
385 <li data-name="LuCI.form.AbstractValue#render"><a href="LuCI.form.AbstractValue.html#render">render</a></li>
386
387 <li data-name="LuCI.form.AbstractValue#stripTags"><a href="LuCI.form.AbstractValue.html#stripTags">stripTags</a></li>
388
389 <li data-name="LuCI.form.AbstractValue#textvalue"><a href="LuCI.form.AbstractValue.html#textvalue">textvalue</a></li>
390
391 <li data-name="LuCI.form.AbstractValue#titleFn"><a href="LuCI.form.AbstractValue.html#titleFn">titleFn</a></li>
392
393 <li data-name="LuCI.form.AbstractValue#validate"><a href="LuCI.form.AbstractValue.html#validate">validate</a></li>
394
395 <li data-name="LuCI.form.AbstractValue#write"><a href="LuCI.form.AbstractValue.html#write">write</a></li>
396
397 </ul>
398 <ul class="events itemMembers">
399
400 </ul>
401 </li>
402
403 <li class="item" data-name="LuCI.form.ButtonValue">
404 <span class="title">
405 <a href="LuCI.form.ButtonValue.html">LuCI.form.ButtonValue</a>
406
407 </span>
408 <ul class="members itemMembers">
409
410 <span class="subtitle">Members</span>
411
412 <li data-name="LuCI.form.ButtonValue##inputstyle"><a href="LuCI.form.ButtonValue.html#inputstyle">inputstyle</a></li>
413
414 <li data-name="LuCI.form.ButtonValue##inputtitle"><a href="LuCI.form.ButtonValue.html#inputtitle">inputtitle</a></li>
415
416 <li data-name="LuCI.form.ButtonValue##onclick"><a href="LuCI.form.ButtonValue.html#onclick">onclick</a></li>
417
418 <li data-name="LuCI.form.ButtonValue#datatype"><a href="LuCI.form.ButtonValue.html#datatype">datatype</a></li>
419
420 <li data-name="LuCI.form.ButtonValue#default"><a href="LuCI.form.ButtonValue.html#default">default</a></li>
421
422 <li data-name="LuCI.form.ButtonValue#editable"><a href="LuCI.form.ButtonValue.html#editable">editable</a></li>
423
424 <li data-name="LuCI.form.ButtonValue#modalonly"><a href="LuCI.form.ButtonValue.html#modalonly">modalonly</a></li>
425
426 <li data-name="LuCI.form.ButtonValue#optional"><a href="LuCI.form.ButtonValue.html#optional">optional</a></li>
427
428 <li data-name="LuCI.form.ButtonValue#password"><a href="LuCI.form.ButtonValue.html#password">password</a></li>
429
430 <li data-name="LuCI.form.ButtonValue#placeholder"><a href="LuCI.form.ButtonValue.html#placeholder">placeholder</a></li>
431
432 <li data-name="LuCI.form.ButtonValue#readonly"><a href="LuCI.form.ButtonValue.html#readonly">readonly</a></li>
433
434 <li data-name="LuCI.form.ButtonValue#rmempty"><a href="LuCI.form.ButtonValue.html#rmempty">rmempty</a></li>
435
436 <li data-name="LuCI.form.ButtonValue#uciconfig"><a href="LuCI.form.ButtonValue.html#uciconfig">uciconfig</a></li>
437
438 <li data-name="LuCI.form.ButtonValue#ucioption"><a href="LuCI.form.ButtonValue.html#ucioption">ucioption</a></li>
439
440 <li data-name="LuCI.form.ButtonValue#ucisection"><a href="LuCI.form.ButtonValue.html#ucisection">ucisection</a></li>
441
442 <li data-name="LuCI.form.ButtonValue#validate"><a href="LuCI.form.ButtonValue.html#validate">validate</a></li>
443
444 <li data-name="LuCI.form.ButtonValue#width"><a href="LuCI.form.ButtonValue.html#width">width</a></li>
445
446 </ul>
447 <ul class="typedefs itemMembers">
448
449 </ul>
450 <ul class="typedefs itemMembers">
451
452 </ul>
453 <ul class="methods itemMembers">
454
455 <span class="subtitle">Methods</span>
456
457 <li data-name="LuCI.form.ButtonValue#append"><a href="LuCI.form.ButtonValue.html#append">append</a></li>
458
459 <li data-name="LuCI.form.ButtonValue#cbid"><a href="LuCI.form.ButtonValue.html#cbid">cbid</a></li>
460
461 <li data-name="LuCI.form.ButtonValue#cfgvalue"><a href="LuCI.form.ButtonValue.html#cfgvalue">cfgvalue</a></li>
462
463 <li data-name="LuCI.form.ButtonValue#depends"><a href="LuCI.form.ButtonValue.html#depends">depends</a></li>
464
465 <li data-name="LuCI.form.ButtonValue#formvalue"><a href="LuCI.form.ButtonValue.html#formvalue">formvalue</a></li>
466
467 <li data-name="LuCI.form.ButtonValue#getUIElement"><a href="LuCI.form.ButtonValue.html#getUIElement">getUIElement</a></li>
468
469 <li data-name="LuCI.form.ButtonValue#isActive"><a href="LuCI.form.ButtonValue.html#isActive">isActive</a></li>
470
471 <li data-name="LuCI.form.ButtonValue#isValid"><a href="LuCI.form.ButtonValue.html#isValid">isValid</a></li>
472
473 <li data-name="LuCI.form.ButtonValue#load"><a href="LuCI.form.ButtonValue.html#load">load</a></li>
474
475 <li data-name="LuCI.form.ButtonValue#parse"><a href="LuCI.form.ButtonValue.html#parse">parse</a></li>
476
477 <li data-name="LuCI.form.ButtonValue#remove"><a href="LuCI.form.ButtonValue.html#remove">remove</a></li>
478
479 <li data-name="LuCI.form.ButtonValue#stripTags"><a href="LuCI.form.ButtonValue.html#stripTags">stripTags</a></li>
480
481 <li data-name="LuCI.form.ButtonValue#textvalue"><a href="LuCI.form.ButtonValue.html#textvalue">textvalue</a></li>
482
483 <li data-name="LuCI.form.ButtonValue#titleFn"><a href="LuCI.form.ButtonValue.html#titleFn">titleFn</a></li>
484
485 <li data-name="LuCI.form.ButtonValue#value"><a href="LuCI.form.ButtonValue.html#value">value</a></li>
486
487 <li data-name="LuCI.form.ButtonValue#write"><a href="LuCI.form.ButtonValue.html#write">write</a></li>
488
489 </ul>
490 <ul class="events itemMembers">
491
492 </ul>
493 </li>
494
495 <li class="item" data-name="LuCI.form.DummyValue">
496 <span class="title">
497 <a href="LuCI.form.DummyValue.html">LuCI.form.DummyValue</a>
498
499 </span>
500 <ul class="members itemMembers">
501
502 <span class="subtitle">Members</span>
503
504 <li data-name="LuCI.form.DummyValue##href"><a href="LuCI.form.DummyValue.html#href">href</a></li>
505
506 <li data-name="LuCI.form.DummyValue##rawhtml"><a href="LuCI.form.DummyValue.html#rawhtml">rawhtml</a></li>
507
508 <li data-name="LuCI.form.DummyValue#datatype"><a href="LuCI.form.DummyValue.html#datatype">datatype</a></li>
509
510 <li data-name="LuCI.form.DummyValue#default"><a href="LuCI.form.DummyValue.html#default">default</a></li>
511
512 <li data-name="LuCI.form.DummyValue#editable"><a href="LuCI.form.DummyValue.html#editable">editable</a></li>
513
514 <li data-name="LuCI.form.DummyValue#modalonly"><a href="LuCI.form.DummyValue.html#modalonly">modalonly</a></li>
515
516 <li data-name="LuCI.form.DummyValue#optional"><a href="LuCI.form.DummyValue.html#optional">optional</a></li>
517
518 <li data-name="LuCI.form.DummyValue#password"><a href="LuCI.form.DummyValue.html#password">password</a></li>
519
520 <li data-name="LuCI.form.DummyValue#placeholder"><a href="LuCI.form.DummyValue.html#placeholder">placeholder</a></li>
521
522 <li data-name="LuCI.form.DummyValue#readonly"><a href="LuCI.form.DummyValue.html#readonly">readonly</a></li>
523
524 <li data-name="LuCI.form.DummyValue#rmempty"><a href="LuCI.form.DummyValue.html#rmempty">rmempty</a></li>
525
526 <li data-name="LuCI.form.DummyValue#uciconfig"><a href="LuCI.form.DummyValue.html#uciconfig">uciconfig</a></li>
527
528 <li data-name="LuCI.form.DummyValue#ucioption"><a href="LuCI.form.DummyValue.html#ucioption">ucioption</a></li>
529
530 <li data-name="LuCI.form.DummyValue#ucisection"><a href="LuCI.form.DummyValue.html#ucisection">ucisection</a></li>
531
532 <li data-name="LuCI.form.DummyValue#validate"><a href="LuCI.form.DummyValue.html#validate">validate</a></li>
533
534 <li data-name="LuCI.form.DummyValue#width"><a href="LuCI.form.DummyValue.html#width">width</a></li>
535
536 </ul>
537 <ul class="typedefs itemMembers">
538
539 </ul>
540 <ul class="typedefs itemMembers">
541
542 </ul>
543 <ul class="methods itemMembers">
544
545 <span class="subtitle">Methods</span>
546
547 <li data-name="LuCI.form.DummyValue#append"><a href="LuCI.form.DummyValue.html#append">append</a></li>
548
549 <li data-name="LuCI.form.DummyValue#cbid"><a href="LuCI.form.DummyValue.html#cbid">cbid</a></li>
550
551 <li data-name="LuCI.form.DummyValue#cfgvalue"><a href="LuCI.form.DummyValue.html#cfgvalue">cfgvalue</a></li>
552
553 <li data-name="LuCI.form.DummyValue#depends"><a href="LuCI.form.DummyValue.html#depends">depends</a></li>
554
555 <li data-name="LuCI.form.DummyValue#formvalue"><a href="LuCI.form.DummyValue.html#formvalue">formvalue</a></li>
556
557 <li data-name="LuCI.form.DummyValue#getUIElement"><a href="LuCI.form.DummyValue.html#getUIElement">getUIElement</a></li>
558
559 <li data-name="LuCI.form.DummyValue#isActive"><a href="LuCI.form.DummyValue.html#isActive">isActive</a></li>
560
561 <li data-name="LuCI.form.DummyValue#isValid"><a href="LuCI.form.DummyValue.html#isValid">isValid</a></li>
562
563 <li data-name="LuCI.form.DummyValue#load"><a href="LuCI.form.DummyValue.html#load">load</a></li>
564
565 <li data-name="LuCI.form.DummyValue#parse"><a href="LuCI.form.DummyValue.html#parse">parse</a></li>
566
567 <li data-name="LuCI.form.DummyValue#remove"><a href="LuCI.form.DummyValue.html#remove">remove</a></li>
568
569 <li data-name="LuCI.form.DummyValue#stripTags"><a href="LuCI.form.DummyValue.html#stripTags">stripTags</a></li>
570
571 <li data-name="LuCI.form.DummyValue#textvalue"><a href="LuCI.form.DummyValue.html#textvalue">textvalue</a></li>
572
573 <li data-name="LuCI.form.DummyValue#titleFn"><a href="LuCI.form.DummyValue.html#titleFn">titleFn</a></li>
574
575 <li data-name="LuCI.form.DummyValue#value"><a href="LuCI.form.DummyValue.html#value">value</a></li>
576
577 <li data-name="LuCI.form.DummyValue#write"><a href="LuCI.form.DummyValue.html#write">write</a></li>
578
579 </ul>
580 <ul class="events itemMembers">
581
582 </ul>
583 </li>
584
585 <li class="item" data-name="LuCI.form.DynamicList">
586 <span class="title">
587 <a href="LuCI.form.DynamicList.html">LuCI.form.DynamicList</a>
588
589 </span>
590 <ul class="members itemMembers">
591
592 <span class="subtitle">Members</span>
593
594 <li data-name="LuCI.form.DynamicList#datatype"><a href="LuCI.form.DynamicList.html#datatype">datatype</a></li>
595
596 <li data-name="LuCI.form.DynamicList#default"><a href="LuCI.form.DynamicList.html#default">default</a></li>
597
598 <li data-name="LuCI.form.DynamicList#editable"><a href="LuCI.form.DynamicList.html#editable">editable</a></li>
599
600 <li data-name="LuCI.form.DynamicList#modalonly"><a href="LuCI.form.DynamicList.html#modalonly">modalonly</a></li>
601
602 <li data-name="LuCI.form.DynamicList#optional"><a href="LuCI.form.DynamicList.html#optional">optional</a></li>
603
604 <li data-name="LuCI.form.DynamicList#password"><a href="LuCI.form.DynamicList.html#password">password</a></li>
605
606 <li data-name="LuCI.form.DynamicList#placeholder"><a href="LuCI.form.DynamicList.html#placeholder">placeholder</a></li>
607
608 <li data-name="LuCI.form.DynamicList#readonly"><a href="LuCI.form.DynamicList.html#readonly">readonly</a></li>
609
610 <li data-name="LuCI.form.DynamicList#rmempty"><a href="LuCI.form.DynamicList.html#rmempty">rmempty</a></li>
611
612 <li data-name="LuCI.form.DynamicList#uciconfig"><a href="LuCI.form.DynamicList.html#uciconfig">uciconfig</a></li>
613
614 <li data-name="LuCI.form.DynamicList#ucioption"><a href="LuCI.form.DynamicList.html#ucioption">ucioption</a></li>
615
616 <li data-name="LuCI.form.DynamicList#ucisection"><a href="LuCI.form.DynamicList.html#ucisection">ucisection</a></li>
617
618 <li data-name="LuCI.form.DynamicList#validate"><a href="LuCI.form.DynamicList.html#validate">validate</a></li>
619
620 <li data-name="LuCI.form.DynamicList#width"><a href="LuCI.form.DynamicList.html#width">width</a></li>
621
622 </ul>
623 <ul class="typedefs itemMembers">
624
625 </ul>
626 <ul class="typedefs itemMembers">
627
628 </ul>
629 <ul class="methods itemMembers">
630
631 <span class="subtitle">Methods</span>
632
633 <li data-name="LuCI.form.DynamicList#append"><a href="LuCI.form.DynamicList.html#append">append</a></li>
634
635 <li data-name="LuCI.form.DynamicList#cbid"><a href="LuCI.form.DynamicList.html#cbid">cbid</a></li>
636
637 <li data-name="LuCI.form.DynamicList#cfgvalue"><a href="LuCI.form.DynamicList.html#cfgvalue">cfgvalue</a></li>
638
639 <li data-name="LuCI.form.DynamicList#depends"><a href="LuCI.form.DynamicList.html#depends">depends</a></li>
640
641 <li data-name="LuCI.form.DynamicList#formvalue"><a href="LuCI.form.DynamicList.html#formvalue">formvalue</a></li>
642
643 <li data-name="LuCI.form.DynamicList#getUIElement"><a href="LuCI.form.DynamicList.html#getUIElement">getUIElement</a></li>
644
645 <li data-name="LuCI.form.DynamicList#isActive"><a href="LuCI.form.DynamicList.html#isActive">isActive</a></li>
646
647 <li data-name="LuCI.form.DynamicList#isValid"><a href="LuCI.form.DynamicList.html#isValid">isValid</a></li>
648
649 <li data-name="LuCI.form.DynamicList#load"><a href="LuCI.form.DynamicList.html#load">load</a></li>
650
651 <li data-name="LuCI.form.DynamicList#parse"><a href="LuCI.form.DynamicList.html#parse">parse</a></li>
652
653 <li data-name="LuCI.form.DynamicList#remove"><a href="LuCI.form.DynamicList.html#remove">remove</a></li>
654
655 <li data-name="LuCI.form.DynamicList#stripTags"><a href="LuCI.form.DynamicList.html#stripTags">stripTags</a></li>
656
657 <li data-name="LuCI.form.DynamicList#textvalue"><a href="LuCI.form.DynamicList.html#textvalue">textvalue</a></li>
658
659 <li data-name="LuCI.form.DynamicList#titleFn"><a href="LuCI.form.DynamicList.html#titleFn">titleFn</a></li>
660
661 <li data-name="LuCI.form.DynamicList#value"><a href="LuCI.form.DynamicList.html#value">value</a></li>
662
663 <li data-name="LuCI.form.DynamicList#write"><a href="LuCI.form.DynamicList.html#write">write</a></li>
664
665 </ul>
666 <ul class="events itemMembers">
667
668 </ul>
669 </li>
670
671 <li class="item" data-name="LuCI.form.FileUpload">
672 <span class="title">
673 <a href="LuCI.form.FileUpload.html">LuCI.form.FileUpload</a>
674
675 </span>
676 <ul class="members itemMembers">
677
678 <span class="subtitle">Members</span>
679
680 <li data-name="LuCI.form.FileUpload##enable_remove"><a href="LuCI.form.FileUpload.html#enable_remove">enable_remove</a></li>
681
682 <li data-name="LuCI.form.FileUpload##enable_upload"><a href="LuCI.form.FileUpload.html#enable_upload">enable_upload</a></li>
683
684 <li data-name="LuCI.form.FileUpload##root_directory"><a href="LuCI.form.FileUpload.html#root_directory">root_directory</a></li>
685
686 <li data-name="LuCI.form.FileUpload##show_hidden"><a href="LuCI.form.FileUpload.html#show_hidden">show_hidden</a></li>
687
688 <li data-name="LuCI.form.FileUpload#datatype"><a href="LuCI.form.FileUpload.html#datatype">datatype</a></li>
689
690 <li data-name="LuCI.form.FileUpload#default"><a href="LuCI.form.FileUpload.html#default">default</a></li>
691
692 <li data-name="LuCI.form.FileUpload#editable"><a href="LuCI.form.FileUpload.html#editable">editable</a></li>
693
694 <li data-name="LuCI.form.FileUpload#modalonly"><a href="LuCI.form.FileUpload.html#modalonly">modalonly</a></li>
695
696 <li data-name="LuCI.form.FileUpload#optional"><a href="LuCI.form.FileUpload.html#optional">optional</a></li>
697
698 <li data-name="LuCI.form.FileUpload#password"><a href="LuCI.form.FileUpload.html#password">password</a></li>
699
700 <li data-name="LuCI.form.FileUpload#placeholder"><a href="LuCI.form.FileUpload.html#placeholder">placeholder</a></li>
701
702 <li data-name="LuCI.form.FileUpload#readonly"><a href="LuCI.form.FileUpload.html#readonly">readonly</a></li>
703
704 <li data-name="LuCI.form.FileUpload#rmempty"><a href="LuCI.form.FileUpload.html#rmempty">rmempty</a></li>
705
706 <li data-name="LuCI.form.FileUpload#uciconfig"><a href="LuCI.form.FileUpload.html#uciconfig">uciconfig</a></li>
707
708 <li data-name="LuCI.form.FileUpload#ucioption"><a href="LuCI.form.FileUpload.html#ucioption">ucioption</a></li>
709
710 <li data-name="LuCI.form.FileUpload#ucisection"><a href="LuCI.form.FileUpload.html#ucisection">ucisection</a></li>
711
712 <li data-name="LuCI.form.FileUpload#validate"><a href="LuCI.form.FileUpload.html#validate">validate</a></li>
713
714 <li data-name="LuCI.form.FileUpload#width"><a href="LuCI.form.FileUpload.html#width">width</a></li>
715
716 </ul>
717 <ul class="typedefs itemMembers">
718
719 </ul>
720 <ul class="typedefs itemMembers">
721
722 </ul>
723 <ul class="methods itemMembers">
724
725 <span class="subtitle">Methods</span>
726
727 <li data-name="LuCI.form.FileUpload#append"><a href="LuCI.form.FileUpload.html#append">append</a></li>
728
729 <li data-name="LuCI.form.FileUpload#cbid"><a href="LuCI.form.FileUpload.html#cbid">cbid</a></li>
730
731 <li data-name="LuCI.form.FileUpload#cfgvalue"><a href="LuCI.form.FileUpload.html#cfgvalue">cfgvalue</a></li>
732
733 <li data-name="LuCI.form.FileUpload#depends"><a href="LuCI.form.FileUpload.html#depends">depends</a></li>
734
735 <li data-name="LuCI.form.FileUpload#formvalue"><a href="LuCI.form.FileUpload.html#formvalue">formvalue</a></li>
736
737 <li data-name="LuCI.form.FileUpload#getUIElement"><a href="LuCI.form.FileUpload.html#getUIElement">getUIElement</a></li>
738
739 <li data-name="LuCI.form.FileUpload#isActive"><a href="LuCI.form.FileUpload.html#isActive">isActive</a></li>
740
741 <li data-name="LuCI.form.FileUpload#isValid"><a href="LuCI.form.FileUpload.html#isValid">isValid</a></li>
742
743 <li data-name="LuCI.form.FileUpload#load"><a href="LuCI.form.FileUpload.html#load">load</a></li>
744
745 <li data-name="LuCI.form.FileUpload#parse"><a href="LuCI.form.FileUpload.html#parse">parse</a></li>
746
747 <li data-name="LuCI.form.FileUpload#remove"><a href="LuCI.form.FileUpload.html#remove">remove</a></li>
748
749 <li data-name="LuCI.form.FileUpload#stripTags"><a href="LuCI.form.FileUpload.html#stripTags">stripTags</a></li>
750
751 <li data-name="LuCI.form.FileUpload#textvalue"><a href="LuCI.form.FileUpload.html#textvalue">textvalue</a></li>
752
753 <li data-name="LuCI.form.FileUpload#titleFn"><a href="LuCI.form.FileUpload.html#titleFn">titleFn</a></li>
754
755 <li data-name="LuCI.form.FileUpload#value"><a href="LuCI.form.FileUpload.html#value">value</a></li>
756
757 <li data-name="LuCI.form.FileUpload#write"><a href="LuCI.form.FileUpload.html#write">write</a></li>
758
759 </ul>
760 <ul class="events itemMembers">
761
762 </ul>
763 </li>
764
765 <li class="item" data-name="LuCI.form.FlagValue">
766 <span class="title">
767 <a href="LuCI.form.FlagValue.html">LuCI.form.FlagValue</a>
768
769 </span>
770 <ul class="members itemMembers">
771
772 <span class="subtitle">Members</span>
773
774 <li data-name="LuCI.form.FlagValue##disabled"><a href="LuCI.form.FlagValue.html#disabled">disabled</a></li>
775
776 <li data-name="LuCI.form.FlagValue##enabled"><a href="LuCI.form.FlagValue.html#enabled">enabled</a></li>
777
778 <li data-name="LuCI.form.FlagValue#datatype"><a href="LuCI.form.FlagValue.html#datatype">datatype</a></li>
779
780 <li data-name="LuCI.form.FlagValue#default"><a href="LuCI.form.FlagValue.html#default">default</a></li>
781
782 <li data-name="LuCI.form.FlagValue#editable"><a href="LuCI.form.FlagValue.html#editable">editable</a></li>
783
784 <li data-name="LuCI.form.FlagValue#modalonly"><a href="LuCI.form.FlagValue.html#modalonly">modalonly</a></li>
785
786 <li data-name="LuCI.form.FlagValue#optional"><a href="LuCI.form.FlagValue.html#optional">optional</a></li>
787
788 <li data-name="LuCI.form.FlagValue#password"><a href="LuCI.form.FlagValue.html#password">password</a></li>
789
790 <li data-name="LuCI.form.FlagValue#placeholder"><a href="LuCI.form.FlagValue.html#placeholder">placeholder</a></li>
791
792 <li data-name="LuCI.form.FlagValue#readonly"><a href="LuCI.form.FlagValue.html#readonly">readonly</a></li>
793
794 <li data-name="LuCI.form.FlagValue#rmempty"><a href="LuCI.form.FlagValue.html#rmempty">rmempty</a></li>
795
796 <li data-name="LuCI.form.FlagValue#uciconfig"><a href="LuCI.form.FlagValue.html#uciconfig">uciconfig</a></li>
797
798 <li data-name="LuCI.form.FlagValue#ucioption"><a href="LuCI.form.FlagValue.html#ucioption">ucioption</a></li>
799
800 <li data-name="LuCI.form.FlagValue#ucisection"><a href="LuCI.form.FlagValue.html#ucisection">ucisection</a></li>
801
802 <li data-name="LuCI.form.FlagValue#validate"><a href="LuCI.form.FlagValue.html#validate">validate</a></li>
803
804 <li data-name="LuCI.form.FlagValue#width"><a href="LuCI.form.FlagValue.html#width">width</a></li>
805
806 </ul>
807 <ul class="typedefs itemMembers">
808
809 </ul>
810 <ul class="typedefs itemMembers">
811
812 </ul>
813 <ul class="methods itemMembers">
814
815 <span class="subtitle">Methods</span>
816
817 <li data-name="LuCI.form.FlagValue#append"><a href="LuCI.form.FlagValue.html#append">append</a></li>
818
819 <li data-name="LuCI.form.FlagValue#cbid"><a href="LuCI.form.FlagValue.html#cbid">cbid</a></li>
820
821 <li data-name="LuCI.form.FlagValue#cfgvalue"><a href="LuCI.form.FlagValue.html#cfgvalue">cfgvalue</a></li>
822
823 <li data-name="LuCI.form.FlagValue#depends"><a href="LuCI.form.FlagValue.html#depends">depends</a></li>
824
825 <li data-name="LuCI.form.FlagValue#formvalue"><a href="LuCI.form.FlagValue.html#formvalue">formvalue</a></li>
826
827 <li data-name="LuCI.form.FlagValue#getUIElement"><a href="LuCI.form.FlagValue.html#getUIElement">getUIElement</a></li>
828
829 <li data-name="LuCI.form.FlagValue#isActive"><a href="LuCI.form.FlagValue.html#isActive">isActive</a></li>
830
831 <li data-name="LuCI.form.FlagValue#isValid"><a href="LuCI.form.FlagValue.html#isValid">isValid</a></li>
832
833 <li data-name="LuCI.form.FlagValue#load"><a href="LuCI.form.FlagValue.html#load">load</a></li>
834
835 <li data-name="LuCI.form.FlagValue#parse"><a href="LuCI.form.FlagValue.html#parse">parse</a></li>
836
837 <li data-name="LuCI.form.FlagValue#remove"><a href="LuCI.form.FlagValue.html#remove">remove</a></li>
838
839 <li data-name="LuCI.form.FlagValue#stripTags"><a href="LuCI.form.FlagValue.html#stripTags">stripTags</a></li>
840
841 <li data-name="LuCI.form.FlagValue#textvalue"><a href="LuCI.form.FlagValue.html#textvalue">textvalue</a></li>
842
843 <li data-name="LuCI.form.FlagValue#titleFn"><a href="LuCI.form.FlagValue.html#titleFn">titleFn</a></li>
844
845 <li data-name="LuCI.form.FlagValue#value"><a href="LuCI.form.FlagValue.html#value">value</a></li>
846
847 <li data-name="LuCI.form.FlagValue#write"><a href="LuCI.form.FlagValue.html#write">write</a></li>
848
849 </ul>
850 <ul class="events itemMembers">
851
852 </ul>
853 </li>
854
855 <li class="item" data-name="LuCI.form.GridSection">
856 <span class="title">
857 <a href="LuCI.form.GridSection.html">LuCI.form.GridSection</a>
858
859 </span>
860 <ul class="members itemMembers">
861
862 <span class="subtitle">Members</span>
863
864 <li data-name="LuCI.form.GridSection#addbtntitle"><a href="LuCI.form.GridSection.html#addbtntitle">addbtntitle</a></li>
865
866 <li data-name="LuCI.form.GridSection#addremove"><a href="LuCI.form.GridSection.html#addremove">addremove</a></li>
867
868 <li data-name="LuCI.form.GridSection#anonymous"><a href="LuCI.form.GridSection.html#anonymous">anonymous</a></li>
869
870 <li data-name="LuCI.form.GridSection#extedit"><a href="LuCI.form.GridSection.html#extedit">extedit</a></li>
871
872 <li data-name="LuCI.form.GridSection#max_cols"><a href="LuCI.form.GridSection.html#max_cols">max_cols</a></li>
873
874 <li data-name="LuCI.form.GridSection#modaltitle"><a href="LuCI.form.GridSection.html#modaltitle">modaltitle</a></li>
875
876 <li data-name="LuCI.form.GridSection#parentoption"><a href="LuCI.form.GridSection.html#parentoption">parentoption</a></li>
877
878 <li data-name="LuCI.form.GridSection#rowcolors"><a href="LuCI.form.GridSection.html#rowcolors">rowcolors</a></li>
879
880 <li data-name="LuCI.form.GridSection#sectiontitle"><a href="LuCI.form.GridSection.html#sectiontitle">sectiontitle</a></li>
881
882 <li data-name="LuCI.form.GridSection#sortable"><a href="LuCI.form.GridSection.html#sortable">sortable</a></li>
883
884 <li data-name="LuCI.form.GridSection#tabbed"><a href="LuCI.form.GridSection.html#tabbed">tabbed</a></li>
885
886 <li data-name="LuCI.form.GridSection#uciconfig"><a href="LuCI.form.GridSection.html#uciconfig">uciconfig</a></li>
887
888 </ul>
889 <ul class="typedefs itemMembers">
890
891 </ul>
892 <ul class="typedefs itemMembers">
893
894 </ul>
895 <ul class="methods itemMembers">
896
897 <span class="subtitle">Methods</span>
898
899 <li data-name="LuCI.form.GridSection#addModalOptions"><a href="LuCI.form.GridSection.html#addModalOptions">addModalOptions</a></li>
900
901 <li data-name="LuCI.form.GridSection#append"><a href="LuCI.form.GridSection.html#append">append</a></li>
902
903 <li data-name="LuCI.form.GridSection#filter"><a href="LuCI.form.GridSection.html#filter">filter</a></li>
904
905 <li data-name="LuCI.form.GridSection#load"><a href="LuCI.form.GridSection.html#load">load</a></li>
906
907 <li data-name="LuCI.form.GridSection#option"><a href="LuCI.form.GridSection.html#option">option</a></li>
908
909 <li data-name="LuCI.form.GridSection#parse"><a href="LuCI.form.GridSection.html#parse">parse</a></li>
910
911 <li data-name="LuCI.form.GridSection#stripTags"><a href="LuCI.form.GridSection.html#stripTags">stripTags</a></li>
912
913 <li data-name="LuCI.form.GridSection#tab"><a href="LuCI.form.GridSection.html#tab">tab</a></li>
914
915 <li data-name="LuCI.form.GridSection#taboption"><a href="LuCI.form.GridSection.html#taboption">taboption</a></li>
916
917 <li data-name="LuCI.form.GridSection#titleFn"><a href="LuCI.form.GridSection.html#titleFn">titleFn</a></li>
918
919 </ul>
920 <ul class="events itemMembers">
921
922 </ul>
923 </li>
924
925 <li class="item" data-name="LuCI.form.HiddenValue">
926 <span class="title">
927 <a href="LuCI.form.HiddenValue.html">LuCI.form.HiddenValue</a>
928
929 </span>
930 <ul class="members itemMembers">
931
932 <span class="subtitle">Members</span>
933
934 <li data-name="LuCI.form.HiddenValue#datatype"><a href="LuCI.form.HiddenValue.html#datatype">datatype</a></li>
935
936 <li data-name="LuCI.form.HiddenValue#default"><a href="LuCI.form.HiddenValue.html#default">default</a></li>
937
938 <li data-name="LuCI.form.HiddenValue#editable"><a href="LuCI.form.HiddenValue.html#editable">editable</a></li>
939
940 <li data-name="LuCI.form.HiddenValue#modalonly"><a href="LuCI.form.HiddenValue.html#modalonly">modalonly</a></li>
941
942 <li data-name="LuCI.form.HiddenValue#optional"><a href="LuCI.form.HiddenValue.html#optional">optional</a></li>
943
944 <li data-name="LuCI.form.HiddenValue#password"><a href="LuCI.form.HiddenValue.html#password">password</a></li>
945
946 <li data-name="LuCI.form.HiddenValue#placeholder"><a href="LuCI.form.HiddenValue.html#placeholder">placeholder</a></li>
947
948 <li data-name="LuCI.form.HiddenValue#readonly"><a href="LuCI.form.HiddenValue.html#readonly">readonly</a></li>
949
950 <li data-name="LuCI.form.HiddenValue#rmempty"><a href="LuCI.form.HiddenValue.html#rmempty">rmempty</a></li>
951
952 <li data-name="LuCI.form.HiddenValue#uciconfig"><a href="LuCI.form.HiddenValue.html#uciconfig">uciconfig</a></li>
953
954 <li data-name="LuCI.form.HiddenValue#ucioption"><a href="LuCI.form.HiddenValue.html#ucioption">ucioption</a></li>
955
956 <li data-name="LuCI.form.HiddenValue#ucisection"><a href="LuCI.form.HiddenValue.html#ucisection">ucisection</a></li>
957
958 <li data-name="LuCI.form.HiddenValue#validate"><a href="LuCI.form.HiddenValue.html#validate">validate</a></li>
959
960 <li data-name="LuCI.form.HiddenValue#width"><a href="LuCI.form.HiddenValue.html#width">width</a></li>
961
962 </ul>
963 <ul class="typedefs itemMembers">
964
965 </ul>
966 <ul class="typedefs itemMembers">
967
968 </ul>
969 <ul class="methods itemMembers">
970
971 <span class="subtitle">Methods</span>
972
973 <li data-name="LuCI.form.HiddenValue#append"><a href="LuCI.form.HiddenValue.html#append">append</a></li>
974
975 <li data-name="LuCI.form.HiddenValue#cbid"><a href="LuCI.form.HiddenValue.html#cbid">cbid</a></li>
976
977 <li data-name="LuCI.form.HiddenValue#cfgvalue"><a href="LuCI.form.HiddenValue.html#cfgvalue">cfgvalue</a></li>
978
979 <li data-name="LuCI.form.HiddenValue#depends"><a href="LuCI.form.HiddenValue.html#depends">depends</a></li>
980
981 <li data-name="LuCI.form.HiddenValue#formvalue"><a href="LuCI.form.HiddenValue.html#formvalue">formvalue</a></li>
982
983 <li data-name="LuCI.form.HiddenValue#getUIElement"><a href="LuCI.form.HiddenValue.html#getUIElement">getUIElement</a></li>
984
985 <li data-name="LuCI.form.HiddenValue#isActive"><a href="LuCI.form.HiddenValue.html#isActive">isActive</a></li>
986
987 <li data-name="LuCI.form.HiddenValue#isValid"><a href="LuCI.form.HiddenValue.html#isValid">isValid</a></li>
988
989 <li data-name="LuCI.form.HiddenValue#load"><a href="LuCI.form.HiddenValue.html#load">load</a></li>
990
991 <li data-name="LuCI.form.HiddenValue#parse"><a href="LuCI.form.HiddenValue.html#parse">parse</a></li>
992
993 <li data-name="LuCI.form.HiddenValue#remove"><a href="LuCI.form.HiddenValue.html#remove">remove</a></li>
994
995 <li data-name="LuCI.form.HiddenValue#stripTags"><a href="LuCI.form.HiddenValue.html#stripTags">stripTags</a></li>
996
997 <li data-name="LuCI.form.HiddenValue#textvalue"><a href="LuCI.form.HiddenValue.html#textvalue">textvalue</a></li>
998
999 <li data-name="LuCI.form.HiddenValue#titleFn"><a href="LuCI.form.HiddenValue.html#titleFn">titleFn</a></li>
1000
1001 <li data-name="LuCI.form.HiddenValue#value"><a href="LuCI.form.HiddenValue.html#value">value</a></li>
1002
1003 <li data-name="LuCI.form.HiddenValue#write"><a href="LuCI.form.HiddenValue.html#write">write</a></li>
1004
1005 </ul>
1006 <ul class="events itemMembers">
1007
1008 </ul>
1009 </li>
1010
1011 <li class="item" data-name="LuCI.form.JSONMap">
1012 <span class="title">
1013 <a href="LuCI.form.JSONMap.html">LuCI.form.JSONMap</a>
1014
1015 </span>
1016 <ul class="members itemMembers">
1017
1018 <span class="subtitle">Members</span>
1019
1020 <li data-name="LuCI.form.JSONMap#readonly"><a href="LuCI.form.JSONMap.html#readonly">readonly</a></li>
1021
1022 </ul>
1023 <ul class="typedefs itemMembers">
1024
1025 </ul>
1026 <ul class="typedefs itemMembers">
1027
1028 </ul>
1029 <ul class="methods itemMembers">
1030
1031 <span class="subtitle">Methods</span>
1032
1033 <li data-name="LuCI.form.JSONMap#append"><a href="LuCI.form.JSONMap.html#append">append</a></li>
1034
1035 <li data-name="LuCI.form.JSONMap#chain"><a href="LuCI.form.JSONMap.html#chain">chain</a></li>
1036
1037 <li data-name="LuCI.form.JSONMap#findElement"><a href="LuCI.form.JSONMap.html#findElement">findElement</a></li>
1038
1039 <li data-name="LuCI.form.JSONMap#findElements"><a href="LuCI.form.JSONMap.html#findElements">findElements</a></li>
1040
1041 <li data-name="LuCI.form.JSONMap#load"><a href="LuCI.form.JSONMap.html#load">load</a></li>
1042
1043 <li data-name="LuCI.form.JSONMap#lookupOption"><a href="LuCI.form.JSONMap.html#lookupOption">lookupOption</a></li>
1044
1045 <li data-name="LuCI.form.JSONMap#parse"><a href="LuCI.form.JSONMap.html#parse">parse</a></li>
1046
1047 <li data-name="LuCI.form.JSONMap#render"><a href="LuCI.form.JSONMap.html#render">render</a></li>
1048
1049 <li data-name="LuCI.form.JSONMap#reset"><a href="LuCI.form.JSONMap.html#reset">reset</a></li>
1050
1051 <li data-name="LuCI.form.JSONMap#save"><a href="LuCI.form.JSONMap.html#save">save</a></li>
1052
1053 <li data-name="LuCI.form.JSONMap#section"><a href="LuCI.form.JSONMap.html#section">section</a></li>
1054
1055 <li data-name="LuCI.form.JSONMap#stripTags"><a href="LuCI.form.JSONMap.html#stripTags">stripTags</a></li>
1056
1057 <li data-name="LuCI.form.JSONMap#titleFn"><a href="LuCI.form.JSONMap.html#titleFn">titleFn</a></li>
1058
1059 </ul>
1060 <ul class="events itemMembers">
1061
1062 </ul>
1063 </li>
1064
1065 <li class="item" data-name="LuCI.form.ListValue">
1066 <span class="title">
1067 <a href="LuCI.form.ListValue.html">LuCI.form.ListValue</a>
1068
1069 </span>
1070 <ul class="members itemMembers">
1071
1072 <span class="subtitle">Members</span>
1073
1074 <li data-name="LuCI.form.ListValue##size"><a href="LuCI.form.ListValue.html#size">size</a></li>
1075
1076 <li data-name="LuCI.form.ListValue#datatype"><a href="LuCI.form.ListValue.html#datatype">datatype</a></li>
1077
1078 <li data-name="LuCI.form.ListValue#default"><a href="LuCI.form.ListValue.html#default">default</a></li>
1079
1080 <li data-name="LuCI.form.ListValue#editable"><a href="LuCI.form.ListValue.html#editable">editable</a></li>
1081
1082 <li data-name="LuCI.form.ListValue#modalonly"><a href="LuCI.form.ListValue.html#modalonly">modalonly</a></li>
1083
1084 <li data-name="LuCI.form.ListValue#optional"><a href="LuCI.form.ListValue.html#optional">optional</a></li>
1085
1086 <li data-name="LuCI.form.ListValue#password"><a href="LuCI.form.ListValue.html#password">password</a></li>
1087
1088 <li data-name="LuCI.form.ListValue#placeholder"><a href="LuCI.form.ListValue.html#placeholder">placeholder</a></li>
1089
1090 <li data-name="LuCI.form.ListValue#readonly"><a href="LuCI.form.ListValue.html#readonly">readonly</a></li>
1091
1092 <li data-name="LuCI.form.ListValue#rmempty"><a href="LuCI.form.ListValue.html#rmempty">rmempty</a></li>
1093
1094 <li data-name="LuCI.form.ListValue#uciconfig"><a href="LuCI.form.ListValue.html#uciconfig">uciconfig</a></li>
1095
1096 <li data-name="LuCI.form.ListValue#ucioption"><a href="LuCI.form.ListValue.html#ucioption">ucioption</a></li>
1097
1098 <li data-name="LuCI.form.ListValue#ucisection"><a href="LuCI.form.ListValue.html#ucisection">ucisection</a></li>
1099
1100 <li data-name="LuCI.form.ListValue#validate"><a href="LuCI.form.ListValue.html#validate">validate</a></li>
1101
1102 <li data-name="LuCI.form.ListValue#width"><a href="LuCI.form.ListValue.html#width">width</a></li>
1103
1104 </ul>
1105 <ul class="typedefs itemMembers">
1106
1107 </ul>
1108 <ul class="typedefs itemMembers">
1109
1110 </ul>
1111 <ul class="methods itemMembers">
1112
1113 <span class="subtitle">Methods</span>
1114
1115 <li data-name="LuCI.form.ListValue#append"><a href="LuCI.form.ListValue.html#append">append</a></li>
1116
1117 <li data-name="LuCI.form.ListValue#cbid"><a href="LuCI.form.ListValue.html#cbid">cbid</a></li>
1118
1119 <li data-name="LuCI.form.ListValue#cfgvalue"><a href="LuCI.form.ListValue.html#cfgvalue">cfgvalue</a></li>
1120
1121 <li data-name="LuCI.form.ListValue#depends"><a href="LuCI.form.ListValue.html#depends">depends</a></li>
1122
1123 <li data-name="LuCI.form.ListValue#formvalue"><a href="LuCI.form.ListValue.html#formvalue">formvalue</a></li>
1124
1125 <li data-name="LuCI.form.ListValue#getUIElement"><a href="LuCI.form.ListValue.html#getUIElement">getUIElement</a></li>
1126
1127 <li data-name="LuCI.form.ListValue#isActive"><a href="LuCI.form.ListValue.html#isActive">isActive</a></li>
1128
1129 <li data-name="LuCI.form.ListValue#isValid"><a href="LuCI.form.ListValue.html#isValid">isValid</a></li>
1130
1131 <li data-name="LuCI.form.ListValue#load"><a href="LuCI.form.ListValue.html#load">load</a></li>
1132
1133 <li data-name="LuCI.form.ListValue#parse"><a href="LuCI.form.ListValue.html#parse">parse</a></li>
1134
1135 <li data-name="LuCI.form.ListValue#remove"><a href="LuCI.form.ListValue.html#remove">remove</a></li>
1136
1137 <li data-name="LuCI.form.ListValue#stripTags"><a href="LuCI.form.ListValue.html#stripTags">stripTags</a></li>
1138
1139 <li data-name="LuCI.form.ListValue#textvalue"><a href="LuCI.form.ListValue.html#textvalue">textvalue</a></li>
1140
1141 <li data-name="LuCI.form.ListValue#titleFn"><a href="LuCI.form.ListValue.html#titleFn">titleFn</a></li>
1142
1143 <li data-name="LuCI.form.ListValue#value"><a href="LuCI.form.ListValue.html#value">value</a></li>
1144
1145 <li data-name="LuCI.form.ListValue#write"><a href="LuCI.form.ListValue.html#write">write</a></li>
1146
1147 </ul>
1148 <ul class="events itemMembers">
1149
1150 </ul>
1151 </li>
1152
1153 <li class="item" data-name="LuCI.form.Map">
1154 <span class="title">
1155 <a href="LuCI.form.Map.html">LuCI.form.Map</a>
1156
1157 </span>
1158 <ul class="members itemMembers">
1159
1160 <span class="subtitle">Members</span>
1161
1162 <li data-name="LuCI.form.Map##readonly"><a href="LuCI.form.Map.html#readonly">readonly</a></li>
1163
1164 </ul>
1165 <ul class="typedefs itemMembers">
1166
1167 </ul>
1168 <ul class="typedefs itemMembers">
1169
1170 </ul>
1171 <ul class="methods itemMembers">
1172
1173 <span class="subtitle">Methods</span>
1174
1175 <li data-name="LuCI.form.Map#append"><a href="LuCI.form.Map.html#append">append</a></li>
1176
1177 <li data-name="LuCI.form.Map#chain"><a href="LuCI.form.Map.html#chain">chain</a></li>
1178
1179 <li data-name="LuCI.form.Map#findElement"><a href="LuCI.form.Map.html#findElement">findElement</a></li>
1180
1181 <li data-name="LuCI.form.Map#findElements"><a href="LuCI.form.Map.html#findElements">findElements</a></li>
1182
1183 <li data-name="LuCI.form.Map#load"><a href="LuCI.form.Map.html#load">load</a></li>
1184
1185 <li data-name="LuCI.form.Map#lookupOption"><a href="LuCI.form.Map.html#lookupOption">lookupOption</a></li>
1186
1187 <li data-name="LuCI.form.Map#parse"><a href="LuCI.form.Map.html#parse">parse</a></li>
1188
1189 <li data-name="LuCI.form.Map#render"><a href="LuCI.form.Map.html#render">render</a></li>
1190
1191 <li data-name="LuCI.form.Map#reset"><a href="LuCI.form.Map.html#reset">reset</a></li>
1192
1193 <li data-name="LuCI.form.Map#save"><a href="LuCI.form.Map.html#save">save</a></li>
1194
1195 <li data-name="LuCI.form.Map#section"><a href="LuCI.form.Map.html#section">section</a></li>
1196
1197 <li data-name="LuCI.form.Map#stripTags"><a href="LuCI.form.Map.html#stripTags">stripTags</a></li>
1198
1199 <li data-name="LuCI.form.Map#titleFn"><a href="LuCI.form.Map.html#titleFn">titleFn</a></li>
1200
1201 </ul>
1202 <ul class="events itemMembers">
1203
1204 </ul>
1205 </li>
1206
1207 <li class="item" data-name="LuCI.form.MultiValue">
1208 <span class="title">
1209 <a href="LuCI.form.MultiValue.html">LuCI.form.MultiValue</a>
1210
1211 </span>
1212 <ul class="members itemMembers">
1213
1214 <span class="subtitle">Members</span>
1215
1216 <li data-name="LuCI.form.MultiValue##display_size"><a href="LuCI.form.MultiValue.html#display_size">display_size</a></li>
1217
1218 <li data-name="LuCI.form.MultiValue##dropdown_size"><a href="LuCI.form.MultiValue.html#dropdown_size">dropdown_size</a></li>
1219
1220 <li data-name="LuCI.form.MultiValue#datatype"><a href="LuCI.form.MultiValue.html#datatype">datatype</a></li>
1221
1222 <li data-name="LuCI.form.MultiValue#default"><a href="LuCI.form.MultiValue.html#default">default</a></li>
1223
1224 <li data-name="LuCI.form.MultiValue#editable"><a href="LuCI.form.MultiValue.html#editable">editable</a></li>
1225
1226 <li data-name="LuCI.form.MultiValue#modalonly"><a href="LuCI.form.MultiValue.html#modalonly">modalonly</a></li>
1227
1228 <li data-name="LuCI.form.MultiValue#optional"><a href="LuCI.form.MultiValue.html#optional">optional</a></li>
1229
1230 <li data-name="LuCI.form.MultiValue#password"><a href="LuCI.form.MultiValue.html#password">password</a></li>
1231
1232 <li data-name="LuCI.form.MultiValue#placeholder"><a href="LuCI.form.MultiValue.html#placeholder">placeholder</a></li>
1233
1234 <li data-name="LuCI.form.MultiValue#readonly"><a href="LuCI.form.MultiValue.html#readonly">readonly</a></li>
1235
1236 <li data-name="LuCI.form.MultiValue#rmempty"><a href="LuCI.form.MultiValue.html#rmempty">rmempty</a></li>
1237
1238 <li data-name="LuCI.form.MultiValue#uciconfig"><a href="LuCI.form.MultiValue.html#uciconfig">uciconfig</a></li>
1239
1240 <li data-name="LuCI.form.MultiValue#ucioption"><a href="LuCI.form.MultiValue.html#ucioption">ucioption</a></li>
1241
1242 <li data-name="LuCI.form.MultiValue#ucisection"><a href="LuCI.form.MultiValue.html#ucisection">ucisection</a></li>
1243
1244 <li data-name="LuCI.form.MultiValue#validate"><a href="LuCI.form.MultiValue.html#validate">validate</a></li>
1245
1246 <li data-name="LuCI.form.MultiValue#width"><a href="LuCI.form.MultiValue.html#width">width</a></li>
1247
1248 </ul>
1249 <ul class="typedefs itemMembers">
1250
1251 </ul>
1252 <ul class="typedefs itemMembers">
1253
1254 </ul>
1255 <ul class="methods itemMembers">
1256
1257 <span class="subtitle">Methods</span>
1258
1259 <li data-name="LuCI.form.MultiValue#append"><a href="LuCI.form.MultiValue.html#append">append</a></li>
1260
1261 <li data-name="LuCI.form.MultiValue#cbid"><a href="LuCI.form.MultiValue.html#cbid">cbid</a></li>
1262
1263 <li data-name="LuCI.form.MultiValue#cfgvalue"><a href="LuCI.form.MultiValue.html#cfgvalue">cfgvalue</a></li>
1264
1265 <li data-name="LuCI.form.MultiValue#depends"><a href="LuCI.form.MultiValue.html#depends">depends</a></li>
1266
1267 <li data-name="LuCI.form.MultiValue#formvalue"><a href="LuCI.form.MultiValue.html#formvalue">formvalue</a></li>
1268
1269 <li data-name="LuCI.form.MultiValue#getUIElement"><a href="LuCI.form.MultiValue.html#getUIElement">getUIElement</a></li>
1270
1271 <li data-name="LuCI.form.MultiValue#isActive"><a href="LuCI.form.MultiValue.html#isActive">isActive</a></li>
1272
1273 <li data-name="LuCI.form.MultiValue#isValid"><a href="LuCI.form.MultiValue.html#isValid">isValid</a></li>
1274
1275 <li data-name="LuCI.form.MultiValue#load"><a href="LuCI.form.MultiValue.html#load">load</a></li>
1276
1277 <li data-name="LuCI.form.MultiValue#parse"><a href="LuCI.form.MultiValue.html#parse">parse</a></li>
1278
1279 <li data-name="LuCI.form.MultiValue#remove"><a href="LuCI.form.MultiValue.html#remove">remove</a></li>
1280
1281 <li data-name="LuCI.form.MultiValue#stripTags"><a href="LuCI.form.MultiValue.html#stripTags">stripTags</a></li>
1282
1283 <li data-name="LuCI.form.MultiValue#textvalue"><a href="LuCI.form.MultiValue.html#textvalue">textvalue</a></li>
1284
1285 <li data-name="LuCI.form.MultiValue#titleFn"><a href="LuCI.form.MultiValue.html#titleFn">titleFn</a></li>
1286
1287 <li data-name="LuCI.form.MultiValue#value"><a href="LuCI.form.MultiValue.html#value">value</a></li>
1288
1289 <li data-name="LuCI.form.MultiValue#write"><a href="LuCI.form.MultiValue.html#write">write</a></li>
1290
1291 </ul>
1292 <ul class="events itemMembers">
1293
1294 </ul>
1295 </li>
1296
1297 <li class="item" data-name="LuCI.form.NamedSection">
1298 <span class="title">
1299 <a href="LuCI.form.NamedSection.html">LuCI.form.NamedSection</a>
1300
1301 </span>
1302 <ul class="members itemMembers">
1303
1304 <span class="subtitle">Members</span>
1305
1306 <li data-name="LuCI.form.NamedSection##addremove"><a href="LuCI.form.NamedSection.html#addremove">addremove</a></li>
1307
1308 <li data-name="LuCI.form.NamedSection##uciconfig"><a href="LuCI.form.NamedSection.html#uciconfig">uciconfig</a></li>
1309
1310 <li data-name="LuCI.form.NamedSection#parentoption"><a href="LuCI.form.NamedSection.html#parentoption">parentoption</a></li>
1311
1312 </ul>
1313 <ul class="typedefs itemMembers">
1314
1315 </ul>
1316 <ul class="typedefs itemMembers">
1317
1318 </ul>
1319 <ul class="methods itemMembers">
1320
1321 <span class="subtitle">Methods</span>
1322
1323 <li data-name="LuCI.form.NamedSection#append"><a href="LuCI.form.NamedSection.html#append">append</a></li>
1324
1325 <li data-name="LuCI.form.NamedSection#cfgsections"><a href="LuCI.form.NamedSection.html#cfgsections">cfgsections</a></li>
1326
1327 <li data-name="LuCI.form.NamedSection#filter"><a href="LuCI.form.NamedSection.html#filter">filter</a></li>
1328
1329 <li data-name="LuCI.form.NamedSection#load"><a href="LuCI.form.NamedSection.html#load">load</a></li>
1330
1331 <li data-name="LuCI.form.NamedSection#option"><a href="LuCI.form.NamedSection.html#option">option</a></li>
1332
1333 <li data-name="LuCI.form.NamedSection#parse"><a href="LuCI.form.NamedSection.html#parse">parse</a></li>
1334
1335 <li data-name="LuCI.form.NamedSection#render"><a href="LuCI.form.NamedSection.html#render">render</a></li>
1336
1337 <li data-name="LuCI.form.NamedSection#stripTags"><a href="LuCI.form.NamedSection.html#stripTags">stripTags</a></li>
1338
1339 <li data-name="LuCI.form.NamedSection#tab"><a href="LuCI.form.NamedSection.html#tab">tab</a></li>
1340
1341 <li data-name="LuCI.form.NamedSection#taboption"><a href="LuCI.form.NamedSection.html#taboption">taboption</a></li>
1342
1343 <li data-name="LuCI.form.NamedSection#titleFn"><a href="LuCI.form.NamedSection.html#titleFn">titleFn</a></li>
1344
1345 </ul>
1346 <ul class="events itemMembers">
1347
1348 </ul>
1349 </li>
1350
1351 <li class="item" data-name="LuCI.form.SectionValue">
1352 <span class="title">
1353 <a href="LuCI.form.SectionValue.html">LuCI.form.SectionValue</a>
1354
1355 </span>
1356 <ul class="members itemMembers">
1357
1358 <span class="subtitle">Members</span>
1359
1360 <li data-name="LuCI.form.SectionValue##subsection"><a href="LuCI.form.SectionValue.html#subsection">subsection</a></li>
1361
1362 <li data-name="LuCI.form.SectionValue#datatype"><a href="LuCI.form.SectionValue.html#datatype">datatype</a></li>
1363
1364 <li data-name="LuCI.form.SectionValue#default"><a href="LuCI.form.SectionValue.html#default">default</a></li>
1365
1366 <li data-name="LuCI.form.SectionValue#editable"><a href="LuCI.form.SectionValue.html#editable">editable</a></li>
1367
1368 <li data-name="LuCI.form.SectionValue#modalonly"><a href="LuCI.form.SectionValue.html#modalonly">modalonly</a></li>
1369
1370 <li data-name="LuCI.form.SectionValue#optional"><a href="LuCI.form.SectionValue.html#optional">optional</a></li>
1371
1372 <li data-name="LuCI.form.SectionValue#password"><a href="LuCI.form.SectionValue.html#password">password</a></li>
1373
1374 <li data-name="LuCI.form.SectionValue#placeholder"><a href="LuCI.form.SectionValue.html#placeholder">placeholder</a></li>
1375
1376 <li data-name="LuCI.form.SectionValue#readonly"><a href="LuCI.form.SectionValue.html#readonly">readonly</a></li>
1377
1378 <li data-name="LuCI.form.SectionValue#rmempty"><a href="LuCI.form.SectionValue.html#rmempty">rmempty</a></li>
1379
1380 <li data-name="LuCI.form.SectionValue#uciconfig"><a href="LuCI.form.SectionValue.html#uciconfig">uciconfig</a></li>
1381
1382 <li data-name="LuCI.form.SectionValue#ucioption"><a href="LuCI.form.SectionValue.html#ucioption">ucioption</a></li>
1383
1384 <li data-name="LuCI.form.SectionValue#ucisection"><a href="LuCI.form.SectionValue.html#ucisection">ucisection</a></li>
1385
1386 <li data-name="LuCI.form.SectionValue#validate"><a href="LuCI.form.SectionValue.html#validate">validate</a></li>
1387
1388 <li data-name="LuCI.form.SectionValue#width"><a href="LuCI.form.SectionValue.html#width">width</a></li>
1389
1390 </ul>
1391 <ul class="typedefs itemMembers">
1392
1393 </ul>
1394 <ul class="typedefs itemMembers">
1395
1396 </ul>
1397 <ul class="methods itemMembers">
1398
1399 <span class="subtitle">Methods</span>
1400
1401 <li data-name="LuCI.form.SectionValue#append"><a href="LuCI.form.SectionValue.html#append">append</a></li>
1402
1403 <li data-name="LuCI.form.SectionValue#cbid"><a href="LuCI.form.SectionValue.html#cbid">cbid</a></li>
1404
1405 <li data-name="LuCI.form.SectionValue#cfgvalue"><a href="LuCI.form.SectionValue.html#cfgvalue">cfgvalue</a></li>
1406
1407 <li data-name="LuCI.form.SectionValue#depends"><a href="LuCI.form.SectionValue.html#depends">depends</a></li>
1408
1409 <li data-name="LuCI.form.SectionValue#formvalue"><a href="LuCI.form.SectionValue.html#formvalue">formvalue</a></li>
1410
1411 <li data-name="LuCI.form.SectionValue#getUIElement"><a href="LuCI.form.SectionValue.html#getUIElement">getUIElement</a></li>
1412
1413 <li data-name="LuCI.form.SectionValue#isActive"><a href="LuCI.form.SectionValue.html#isActive">isActive</a></li>
1414
1415 <li data-name="LuCI.form.SectionValue#isValid"><a href="LuCI.form.SectionValue.html#isValid">isValid</a></li>
1416
1417 <li data-name="LuCI.form.SectionValue#load"><a href="LuCI.form.SectionValue.html#load">load</a></li>
1418
1419 <li data-name="LuCI.form.SectionValue#parse"><a href="LuCI.form.SectionValue.html#parse">parse</a></li>
1420
1421 <li data-name="LuCI.form.SectionValue#remove"><a href="LuCI.form.SectionValue.html#remove">remove</a></li>
1422
1423 <li data-name="LuCI.form.SectionValue#stripTags"><a href="LuCI.form.SectionValue.html#stripTags">stripTags</a></li>
1424
1425 <li data-name="LuCI.form.SectionValue#textvalue"><a href="LuCI.form.SectionValue.html#textvalue">textvalue</a></li>
1426
1427 <li data-name="LuCI.form.SectionValue#titleFn"><a href="LuCI.form.SectionValue.html#titleFn">titleFn</a></li>
1428
1429 <li data-name="LuCI.form.SectionValue#value"><a href="LuCI.form.SectionValue.html#value">value</a></li>
1430
1431 <li data-name="LuCI.form.SectionValue#write"><a href="LuCI.form.SectionValue.html#write">write</a></li>
1432
1433 </ul>
1434 <ul class="events itemMembers">
1435
1436 </ul>
1437 </li>
1438
1439 <li class="item" data-name="LuCI.form.TableSection">
1440 <span class="title">
1441 <a href="LuCI.form.TableSection.html">LuCI.form.TableSection</a>
1442
1443 </span>
1444 <ul class="members itemMembers">
1445
1446 <span class="subtitle">Members</span>
1447
1448 <li data-name="LuCI.form.TableSection##addbtntitle"><a href="LuCI.form.TableSection.html#addbtntitle">addbtntitle</a></li>
1449
1450 <li data-name="LuCI.form.TableSection##addremove"><a href="LuCI.form.TableSection.html#addremove">addremove</a></li>
1451
1452 <li data-name="LuCI.form.TableSection##anonymous"><a href="LuCI.form.TableSection.html#anonymous">anonymous</a></li>
1453
1454 <li data-name="LuCI.form.TableSection##extedit"><a href="LuCI.form.TableSection.html#extedit">extedit</a></li>
1455
1456 <li data-name="LuCI.form.TableSection##max_cols"><a href="LuCI.form.TableSection.html#max_cols">max_cols</a></li>
1457
1458 <li data-name="LuCI.form.TableSection##modaltitle"><a href="LuCI.form.TableSection.html#modaltitle">modaltitle</a></li>
1459
1460 <li data-name="LuCI.form.TableSection##rowcolors"><a href="LuCI.form.TableSection.html#rowcolors">rowcolors</a></li>
1461
1462 <li data-name="LuCI.form.TableSection##sectiontitle"><a href="LuCI.form.TableSection.html#sectiontitle">sectiontitle</a></li>
1463
1464 <li data-name="LuCI.form.TableSection##sortable"><a href="LuCI.form.TableSection.html#sortable">sortable</a></li>
1465
1466 <li data-name="LuCI.form.TableSection##uciconfig"><a href="LuCI.form.TableSection.html#uciconfig">uciconfig</a></li>
1467
1468 <li data-name="LuCI.form.TableSection#addbtntitle"><a href="LuCI.form.TableSection.html#addbtntitle">addbtntitle</a></li>
1469
1470 <li data-name="LuCI.form.TableSection#addremove"><a href="LuCI.form.TableSection.html#addremove">addremove</a></li>
1471
1472 <li data-name="LuCI.form.TableSection#anonymous"><a href="LuCI.form.TableSection.html#anonymous">anonymous</a></li>
1473
1474 <li data-name="LuCI.form.TableSection#parentoption"><a href="LuCI.form.TableSection.html#parentoption">parentoption</a></li>
1475
1476 <li data-name="LuCI.form.TableSection#tabbed"><a href="LuCI.form.TableSection.html#tabbed">tabbed</a></li>
1477
1478 <li data-name="LuCI.form.TableSection#uciconfig"><a href="LuCI.form.TableSection.html#uciconfig">uciconfig</a></li>
1479
1480 </ul>
1481 <ul class="typedefs itemMembers">
1482
1483 </ul>
1484 <ul class="typedefs itemMembers">
1485
1486 </ul>
1487 <ul class="methods itemMembers">
1488
1489 <span class="subtitle">Methods</span>
1490
1491 <li data-name="LuCI.form.TableSection#addModalOptions"><a href="LuCI.form.TableSection.html#addModalOptions">addModalOptions</a></li>
1492
1493 <li data-name="LuCI.form.TableSection#append"><a href="LuCI.form.TableSection.html#append">append</a></li>
1494
1495 <li data-name="LuCI.form.TableSection#filter"><a href="LuCI.form.TableSection.html#filter">filter</a></li>
1496
1497 <li data-name="LuCI.form.TableSection#load"><a href="LuCI.form.TableSection.html#load">load</a></li>
1498
1499 <li data-name="LuCI.form.TableSection#option"><a href="LuCI.form.TableSection.html#option">option</a></li>
1500
1501 <li data-name="LuCI.form.TableSection#parse"><a href="LuCI.form.TableSection.html#parse">parse</a></li>
1502
1503 <li data-name="LuCI.form.TableSection#stripTags"><a href="LuCI.form.TableSection.html#stripTags">stripTags</a></li>
1504
1505 <li data-name="LuCI.form.TableSection#tab"><a href="LuCI.form.TableSection.html#tab">tab</a></li>
1506
1507 <li data-name="LuCI.form.TableSection#taboption"><a href="LuCI.form.TableSection.html#taboption">taboption</a></li>
1508
1509 <li data-name="LuCI.form.TableSection#titleFn"><a href="LuCI.form.TableSection.html#titleFn">titleFn</a></li>
1510
1511 </ul>
1512 <ul class="events itemMembers">
1513
1514 </ul>
1515 </li>
1516
1517 <li class="item" data-name="LuCI.form.TextValue">
1518 <span class="title">
1519 <a href="LuCI.form.TextValue.html">LuCI.form.TextValue</a>
1520
1521 </span>
1522 <ul class="members itemMembers">
1523
1524 <span class="subtitle">Members</span>
1525
1526 <li data-name="LuCI.form.TextValue##cols"><a href="LuCI.form.TextValue.html#cols">cols</a></li>
1527
1528 <li data-name="LuCI.form.TextValue##monospace"><a href="LuCI.form.TextValue.html#monospace">monospace</a></li>
1529
1530 <li data-name="LuCI.form.TextValue##rows"><a href="LuCI.form.TextValue.html#rows">rows</a></li>
1531
1532 <li data-name="LuCI.form.TextValue##wrap"><a href="LuCI.form.TextValue.html#wrap">wrap</a></li>
1533
1534 <li data-name="LuCI.form.TextValue#datatype"><a href="LuCI.form.TextValue.html#datatype">datatype</a></li>
1535
1536 <li data-name="LuCI.form.TextValue#default"><a href="LuCI.form.TextValue.html#default">default</a></li>
1537
1538 <li data-name="LuCI.form.TextValue#editable"><a href="LuCI.form.TextValue.html#editable">editable</a></li>
1539
1540 <li data-name="LuCI.form.TextValue#modalonly"><a href="LuCI.form.TextValue.html#modalonly">modalonly</a></li>
1541
1542 <li data-name="LuCI.form.TextValue#optional"><a href="LuCI.form.TextValue.html#optional">optional</a></li>
1543
1544 <li data-name="LuCI.form.TextValue#password"><a href="LuCI.form.TextValue.html#password">password</a></li>
1545
1546 <li data-name="LuCI.form.TextValue#placeholder"><a href="LuCI.form.TextValue.html#placeholder">placeholder</a></li>
1547
1548 <li data-name="LuCI.form.TextValue#readonly"><a href="LuCI.form.TextValue.html#readonly">readonly</a></li>
1549
1550 <li data-name="LuCI.form.TextValue#rmempty"><a href="LuCI.form.TextValue.html#rmempty">rmempty</a></li>
1551
1552 <li data-name="LuCI.form.TextValue#uciconfig"><a href="LuCI.form.TextValue.html#uciconfig">uciconfig</a></li>
1553
1554 <li data-name="LuCI.form.TextValue#ucioption"><a href="LuCI.form.TextValue.html#ucioption">ucioption</a></li>
1555
1556 <li data-name="LuCI.form.TextValue#ucisection"><a href="LuCI.form.TextValue.html#ucisection">ucisection</a></li>
1557
1558 <li data-name="LuCI.form.TextValue#validate"><a href="LuCI.form.TextValue.html#validate">validate</a></li>
1559
1560 <li data-name="LuCI.form.TextValue#width"><a href="LuCI.form.TextValue.html#width">width</a></li>
1561
1562 </ul>
1563 <ul class="typedefs itemMembers">
1564
1565 </ul>
1566 <ul class="typedefs itemMembers">
1567
1568 </ul>
1569 <ul class="methods itemMembers">
1570
1571 <span class="subtitle">Methods</span>
1572
1573 <li data-name="LuCI.form.TextValue#append"><a href="LuCI.form.TextValue.html#append">append</a></li>
1574
1575 <li data-name="LuCI.form.TextValue#cbid"><a href="LuCI.form.TextValue.html#cbid">cbid</a></li>
1576
1577 <li data-name="LuCI.form.TextValue#cfgvalue"><a href="LuCI.form.TextValue.html#cfgvalue">cfgvalue</a></li>
1578
1579 <li data-name="LuCI.form.TextValue#depends"><a href="LuCI.form.TextValue.html#depends">depends</a></li>
1580
1581 <li data-name="LuCI.form.TextValue#formvalue"><a href="LuCI.form.TextValue.html#formvalue">formvalue</a></li>
1582
1583 <li data-name="LuCI.form.TextValue#getUIElement"><a href="LuCI.form.TextValue.html#getUIElement">getUIElement</a></li>
1584
1585 <li data-name="LuCI.form.TextValue#isActive"><a href="LuCI.form.TextValue.html#isActive">isActive</a></li>
1586
1587 <li data-name="LuCI.form.TextValue#isValid"><a href="LuCI.form.TextValue.html#isValid">isValid</a></li>
1588
1589 <li data-name="LuCI.form.TextValue#load"><a href="LuCI.form.TextValue.html#load">load</a></li>
1590
1591 <li data-name="LuCI.form.TextValue#parse"><a href="LuCI.form.TextValue.html#parse">parse</a></li>
1592
1593 <li data-name="LuCI.form.TextValue#remove"><a href="LuCI.form.TextValue.html#remove">remove</a></li>
1594
1595 <li data-name="LuCI.form.TextValue#stripTags"><a href="LuCI.form.TextValue.html#stripTags">stripTags</a></li>
1596
1597 <li data-name="LuCI.form.TextValue#textvalue"><a href="LuCI.form.TextValue.html#textvalue">textvalue</a></li>
1598
1599 <li data-name="LuCI.form.TextValue#titleFn"><a href="LuCI.form.TextValue.html#titleFn">titleFn</a></li>
1600
1601 <li data-name="LuCI.form.TextValue#write"><a href="LuCI.form.TextValue.html#write">write</a></li>
1602
1603 </ul>
1604 <ul class="events itemMembers">
1605
1606 </ul>
1607 </li>
1608
1609 <li class="item" data-name="LuCI.form.TypedSection">
1610 <span class="title">
1611 <a href="LuCI.form.TypedSection.html">LuCI.form.TypedSection</a>
1612
1613 </span>
1614 <ul class="members itemMembers">
1615
1616 <span class="subtitle">Members</span>
1617
1618 <li data-name="LuCI.form.TypedSection##addbtntitle"><a href="LuCI.form.TypedSection.html#addbtntitle">addbtntitle</a></li>
1619
1620 <li data-name="LuCI.form.TypedSection##addremove"><a href="LuCI.form.TypedSection.html#addremove">addremove</a></li>
1621
1622 <li data-name="LuCI.form.TypedSection##anonymous"><a href="LuCI.form.TypedSection.html#anonymous">anonymous</a></li>
1623
1624 <li data-name="LuCI.form.TypedSection##tabbed"><a href="LuCI.form.TypedSection.html#tabbed">tabbed</a></li>
1625
1626 <li data-name="LuCI.form.TypedSection##uciconfig"><a href="LuCI.form.TypedSection.html#uciconfig">uciconfig</a></li>
1627
1628 <li data-name="LuCI.form.TypedSection#parentoption"><a href="LuCI.form.TypedSection.html#parentoption">parentoption</a></li>
1629
1630 </ul>
1631 <ul class="typedefs itemMembers">
1632
1633 </ul>
1634 <ul class="typedefs itemMembers">
1635
1636 </ul>
1637 <ul class="methods itemMembers">
1638
1639 <span class="subtitle">Methods</span>
1640
1641 <li data-name="LuCI.form.TypedSection#append"><a href="LuCI.form.TypedSection.html#append">append</a></li>
1642
1643 <li data-name="LuCI.form.TypedSection#cfgsections"><a href="LuCI.form.TypedSection.html#cfgsections">cfgsections</a></li>
1644
1645 <li data-name="LuCI.form.TypedSection#filter"><a href="LuCI.form.TypedSection.html#filter">filter</a></li>
1646
1647 <li data-name="LuCI.form.TypedSection#load"><a href="LuCI.form.TypedSection.html#load">load</a></li>
1648
1649 <li data-name="LuCI.form.TypedSection#option"><a href="LuCI.form.TypedSection.html#option">option</a></li>
1650
1651 <li data-name="LuCI.form.TypedSection#parse"><a href="LuCI.form.TypedSection.html#parse">parse</a></li>
1652
1653 <li data-name="LuCI.form.TypedSection#render"><a href="LuCI.form.TypedSection.html#render">render</a></li>
1654
1655 <li data-name="LuCI.form.TypedSection#stripTags"><a href="LuCI.form.TypedSection.html#stripTags">stripTags</a></li>
1656
1657 <li data-name="LuCI.form.TypedSection#tab"><a href="LuCI.form.TypedSection.html#tab">tab</a></li>
1658
1659 <li data-name="LuCI.form.TypedSection#taboption"><a href="LuCI.form.TypedSection.html#taboption">taboption</a></li>
1660
1661 <li data-name="LuCI.form.TypedSection#titleFn"><a href="LuCI.form.TypedSection.html#titleFn">titleFn</a></li>
1662
1663 </ul>
1664 <ul class="events itemMembers">
1665
1666 </ul>
1667 </li>
1668
1669 <li class="item" data-name="LuCI.form.Value">
1670 <span class="title">
1671 <a href="LuCI.form.Value.html">LuCI.form.Value</a>
1672
1673 </span>
1674 <ul class="members itemMembers">
1675
1676 <span class="subtitle">Members</span>
1677
1678 <li data-name="LuCI.form.Value##password"><a href="LuCI.form.Value.html#password">password</a></li>
1679
1680 <li data-name="LuCI.form.Value##placeholder"><a href="LuCI.form.Value.html#placeholder">placeholder</a></li>
1681
1682 <li data-name="LuCI.form.Value#datatype"><a href="LuCI.form.Value.html#datatype">datatype</a></li>
1683
1684 <li data-name="LuCI.form.Value#default"><a href="LuCI.form.Value.html#default">default</a></li>
1685
1686 <li data-name="LuCI.form.Value#editable"><a href="LuCI.form.Value.html#editable">editable</a></li>
1687
1688 <li data-name="LuCI.form.Value#modalonly"><a href="LuCI.form.Value.html#modalonly">modalonly</a></li>
1689
1690 <li data-name="LuCI.form.Value#optional"><a href="LuCI.form.Value.html#optional">optional</a></li>
1691
1692 <li data-name="LuCI.form.Value#readonly"><a href="LuCI.form.Value.html#readonly">readonly</a></li>
1693
1694 <li data-name="LuCI.form.Value#rmempty"><a href="LuCI.form.Value.html#rmempty">rmempty</a></li>
1695
1696 <li data-name="LuCI.form.Value#uciconfig"><a href="LuCI.form.Value.html#uciconfig">uciconfig</a></li>
1697
1698 <li data-name="LuCI.form.Value#ucioption"><a href="LuCI.form.Value.html#ucioption">ucioption</a></li>
1699
1700 <li data-name="LuCI.form.Value#ucisection"><a href="LuCI.form.Value.html#ucisection">ucisection</a></li>
1701
1702 <li data-name="LuCI.form.Value#validate"><a href="LuCI.form.Value.html#validate">validate</a></li>
1703
1704 <li data-name="LuCI.form.Value#width"><a href="LuCI.form.Value.html#width">width</a></li>
1705
1706 </ul>
1707 <ul class="typedefs itemMembers">
1708
1709 </ul>
1710 <ul class="typedefs itemMembers">
1711
1712 </ul>
1713 <ul class="methods itemMembers">
1714
1715 <span class="subtitle">Methods</span>
1716
1717 <li data-name="LuCI.form.Value#append"><a href="LuCI.form.Value.html#append">append</a></li>
1718
1719 <li data-name="LuCI.form.Value#cbid"><a href="LuCI.form.Value.html#cbid">cbid</a></li>
1720
1721 <li data-name="LuCI.form.Value#cfgvalue"><a href="LuCI.form.Value.html#cfgvalue">cfgvalue</a></li>
1722
1723 <li data-name="LuCI.form.Value#depends"><a href="LuCI.form.Value.html#depends">depends</a></li>
1724
1725 <li data-name="LuCI.form.Value#formvalue"><a href="LuCI.form.Value.html#formvalue">formvalue</a></li>
1726
1727 <li data-name="LuCI.form.Value#getUIElement"><a href="LuCI.form.Value.html#getUIElement">getUIElement</a></li>
1728
1729 <li data-name="LuCI.form.Value#isActive"><a href="LuCI.form.Value.html#isActive">isActive</a></li>
1730
1731 <li data-name="LuCI.form.Value#isValid"><a href="LuCI.form.Value.html#isValid">isValid</a></li>
1732
1733 <li data-name="LuCI.form.Value#load"><a href="LuCI.form.Value.html#load">load</a></li>
1734
1735 <li data-name="LuCI.form.Value#parse"><a href="LuCI.form.Value.html#parse">parse</a></li>
1736
1737 <li data-name="LuCI.form.Value#remove"><a href="LuCI.form.Value.html#remove">remove</a></li>
1738
1739 <li data-name="LuCI.form.Value#render"><a href="LuCI.form.Value.html#render">render</a></li>
1740
1741 <li data-name="LuCI.form.Value#stripTags"><a href="LuCI.form.Value.html#stripTags">stripTags</a></li>
1742
1743 <li data-name="LuCI.form.Value#textvalue"><a href="LuCI.form.Value.html#textvalue">textvalue</a></li>
1744
1745 <li data-name="LuCI.form.Value#titleFn"><a href="LuCI.form.Value.html#titleFn">titleFn</a></li>
1746
1747 <li data-name="LuCI.form.Value#value"><a href="LuCI.form.Value.html#value">value</a></li>
1748
1749 <li data-name="LuCI.form.Value#write"><a href="LuCI.form.Value.html#write">write</a></li>
1750
1751 </ul>
1752 <ul class="events itemMembers">
1753
1754 </ul>
1755 </li>
1756
1757 <li class="item" data-name="LuCI.fs">
1758 <span class="title">
1759 <a href="LuCI.fs.html">LuCI.fs</a>
1760
1761 </span>
1762 <ul class="members itemMembers">
1763
1764 </ul>
1765 <ul class="typedefs itemMembers">
1766
1767 <span class="subtitle">Typedefs</span>
1768
1769 <li data-name="LuCI.fs.FileExecResult"><a href="LuCI.fs.html#.FileExecResult">FileExecResult</a></li>
1770
1771 <li data-name="LuCI.fs.FileStatEntry"><a href="LuCI.fs.html#.FileStatEntry">FileStatEntry</a></li>
1772
1773 </ul>
1774 <ul class="typedefs itemMembers">
1775
1776 </ul>
1777 <ul class="methods itemMembers">
1778
1779 <span class="subtitle">Methods</span>
1780
1781 <li data-name="LuCI.fs#exec"><a href="LuCI.fs.html#exec">exec</a></li>
1782
1783 <li data-name="LuCI.fs#exec_direct"><a href="LuCI.fs.html#exec_direct">exec_direct</a></li>
1784
1785 <li data-name="LuCI.fs#lines"><a href="LuCI.fs.html#lines">lines</a></li>
1786
1787 <li data-name="LuCI.fs#list"><a href="LuCI.fs.html#list">list</a></li>
1788
1789 <li data-name="LuCI.fs#read"><a href="LuCI.fs.html#read">read</a></li>
1790
1791 <li data-name="LuCI.fs#read_direct"><a href="LuCI.fs.html#read_direct">read_direct</a></li>
1792
1793 <li data-name="LuCI.fs#remove"><a href="LuCI.fs.html#remove">remove</a></li>
1794
1795 <li data-name="LuCI.fs#stat"><a href="LuCI.fs.html#stat">stat</a></li>
1796
1797 <li data-name="LuCI.fs#trimmed"><a href="LuCI.fs.html#trimmed">trimmed</a></li>
1798
1799 <li data-name="LuCI.fs#write"><a href="LuCI.fs.html#write">write</a></li>
1800
1801 </ul>
1802 <ul class="events itemMembers">
1803
1804 </ul>
1805 </li>
1806
1807 <li class="item" data-name="LuCI.headers">
1808 <span class="title">
1809 <a href="LuCI.headers.html">LuCI.headers</a>
1810
1811 </span>
1812 <ul class="members itemMembers">
1813
1814 </ul>
1815 <ul class="typedefs itemMembers">
1816
1817 </ul>
1818 <ul class="typedefs itemMembers">
1819
1820 </ul>
1821 <ul class="methods itemMembers">
1822
1823 <span class="subtitle">Methods</span>
1824
1825 <li data-name="LuCI.headers#get"><a href="LuCI.headers.html#get">get</a></li>
1826
1827 <li data-name="LuCI.headers#has"><a href="LuCI.headers.html#has">has</a></li>
1828
1829 </ul>
1830 <ul class="events itemMembers">
1831
1832 </ul>
1833 </li>
1834
1835 <li class="item" data-name="LuCI.network">
1836 <span class="title">
1837 <a href="LuCI.network.html">LuCI.network</a>
1838
1839 </span>
1840 <ul class="members itemMembers">
1841
1842 </ul>
1843 <ul class="typedefs itemMembers">
1844
1845 <span class="subtitle">Typedefs</span>
1846
1847 <li data-name="LuCI.network.SwitchTopology"><a href="LuCI.network.html#.SwitchTopology">SwitchTopology</a></li>
1848
1849 <li data-name="LuCI.network.WifiEncryption"><a href="LuCI.network.html#.WifiEncryption">WifiEncryption</a></li>
1850
1851 <li data-name="LuCI.network.WifiPeerEntry"><a href="LuCI.network.html#.WifiPeerEntry">WifiPeerEntry</a></li>
1852
1853 <li data-name="LuCI.network.WifiRateEntry"><a href="LuCI.network.html#.WifiRateEntry">WifiRateEntry</a></li>
1854
1855 <li data-name="LuCI.network.WifiScanResult"><a href="LuCI.network.html#.WifiScanResult">WifiScanResult</a></li>
1856
1857 </ul>
1858 <ul class="typedefs itemMembers">
1859
1860 </ul>
1861 <ul class="methods itemMembers">
1862
1863 <span class="subtitle">Methods</span>
1864
1865 <li data-name="LuCI.network#addNetwork"><a href="LuCI.network.html#addNetwork">addNetwork</a></li>
1866
1867 <li data-name="LuCI.network#addWifiNetwork"><a href="LuCI.network.html#addWifiNetwork">addWifiNetwork</a></li>
1868
1869 <li data-name="LuCI.network#deleteNetwork"><a href="LuCI.network.html#deleteNetwork">deleteNetwork</a></li>
1870
1871 <li data-name="LuCI.network#deleteWifiNetwork"><a href="LuCI.network.html#deleteWifiNetwork">deleteWifiNetwork</a></li>
1872
1873 <li data-name="LuCI.network#flushCache"><a href="LuCI.network.html#flushCache">flushCache</a></li>
1874
1875 <li data-name="LuCI.network#formatWifiEncryption"><a href="LuCI.network.html#formatWifiEncryption">formatWifiEncryption</a></li>
1876
1877 <li data-name="LuCI.network#getDevice"><a href="LuCI.network.html#getDevice">getDevice</a></li>
1878
1879 <li data-name="LuCI.network#getDevices"><a href="LuCI.network.html#getDevices">getDevices</a></li>
1880
1881 <li data-name="LuCI.network#getDSLModemType"><a href="LuCI.network.html#getDSLModemType">getDSLModemType</a></li>
1882
1883 <li data-name="LuCI.network#getHostHints"><a href="LuCI.network.html#getHostHints">getHostHints</a></li>
1884
1885 <li data-name="LuCI.network#getIfnameOf"><a href="LuCI.network.html#getIfnameOf">getIfnameOf</a></li>
1886
1887 <li data-name="LuCI.network#getNetwork"><a href="LuCI.network.html#getNetwork">getNetwork</a></li>
1888
1889 <li data-name="LuCI.network#getNetworks"><a href="LuCI.network.html#getNetworks">getNetworks</a></li>
1890
1891 <li data-name="LuCI.network#getProtocol"><a href="LuCI.network.html#getProtocol">getProtocol</a></li>
1892
1893 <li data-name="LuCI.network#getProtocols"><a href="LuCI.network.html#getProtocols">getProtocols</a></li>
1894
1895 <li data-name="LuCI.network#getSwitchTopologies"><a href="LuCI.network.html#getSwitchTopologies">getSwitchTopologies</a></li>
1896
1897 <li data-name="LuCI.network#getWAN6Networks"><a href="LuCI.network.html#getWAN6Networks">getWAN6Networks</a></li>
1898
1899 <li data-name="LuCI.network#getWANNetworks"><a href="LuCI.network.html#getWANNetworks">getWANNetworks</a></li>
1900
1901 <li data-name="LuCI.network#getWifiDevice"><a href="LuCI.network.html#getWifiDevice">getWifiDevice</a></li>
1902
1903 <li data-name="LuCI.network#getWifiDevices"><a href="LuCI.network.html#getWifiDevices">getWifiDevices</a></li>
1904
1905 <li data-name="LuCI.network#getWifiNetwork"><a href="LuCI.network.html#getWifiNetwork">getWifiNetwork</a></li>
1906
1907 <li data-name="LuCI.network#getWifiNetworks"><a href="LuCI.network.html#getWifiNetworks">getWifiNetworks</a></li>
1908
1909 <li data-name="LuCI.network#isIgnoredDevice"><a href="LuCI.network.html#isIgnoredDevice">isIgnoredDevice</a></li>
1910
1911 <li data-name="LuCI.network#maskToPrefix"><a href="LuCI.network.html#maskToPrefix">maskToPrefix</a></li>
1912
1913 <li data-name="LuCI.network#prefixToMask"><a href="LuCI.network.html#prefixToMask">prefixToMask</a></li>
1914
1915 <li data-name="LuCI.network#registerErrorCode"><a href="LuCI.network.html#registerErrorCode">registerErrorCode</a></li>
1916
1917 <li data-name="LuCI.network#registerPatternVirtual"><a href="LuCI.network.html#registerPatternVirtual">registerPatternVirtual</a></li>
1918
1919 <li data-name="LuCI.network#registerProtocol"><a href="LuCI.network.html#registerProtocol">registerProtocol</a></li>
1920
1921 <li data-name="LuCI.network#renameNetwork"><a href="LuCI.network.html#renameNetwork">renameNetwork</a></li>
1922
1923 </ul>
1924 <ul class="events itemMembers">
1925
1926 </ul>
1927 </li>
1928
1929 <li class="item" data-name="LuCI.network.Device">
1930 <span class="title">
1931 <a href="LuCI.network.Device.html">LuCI.network.Device</a>
1932
1933 </span>
1934 <ul class="members itemMembers">
1935
1936 </ul>
1937 <ul class="typedefs itemMembers">
1938
1939 </ul>
1940 <ul class="typedefs itemMembers">
1941
1942 </ul>
1943 <ul class="methods itemMembers">
1944
1945 <span class="subtitle">Methods</span>
1946
1947 <li data-name="LuCI.network.Device#getBridgeID"><a href="LuCI.network.Device.html#getBridgeID">getBridgeID</a></li>
1948
1949 <li data-name="LuCI.network.Device#getBridgeSTP"><a href="LuCI.network.Device.html#getBridgeSTP">getBridgeSTP</a></li>
1950
1951 <li data-name="LuCI.network.Device#getI18n"><a href="LuCI.network.Device.html#getI18n">getI18n</a></li>
1952
1953 <li data-name="LuCI.network.Device#getIP6Addrs"><a href="LuCI.network.Device.html#getIP6Addrs">getIP6Addrs</a></li>
1954
1955 <li data-name="LuCI.network.Device#getIPAddrs"><a href="LuCI.network.Device.html#getIPAddrs">getIPAddrs</a></li>
1956
1957 <li data-name="LuCI.network.Device#getMAC"><a href="LuCI.network.Device.html#getMAC">getMAC</a></li>
1958
1959 <li data-name="LuCI.network.Device#getMTU"><a href="LuCI.network.Device.html#getMTU">getMTU</a></li>
1960
1961 <li data-name="LuCI.network.Device#getName"><a href="LuCI.network.Device.html#getName">getName</a></li>
1962
1963 <li data-name="LuCI.network.Device#getNetwork"><a href="LuCI.network.Device.html#getNetwork">getNetwork</a></li>
1964
1965 <li data-name="LuCI.network.Device#getNetworks"><a href="LuCI.network.Device.html#getNetworks">getNetworks</a></li>
1966
1967 <li data-name="LuCI.network.Device#getPorts"><a href="LuCI.network.Device.html#getPorts">getPorts</a></li>
1968
1969 <li data-name="LuCI.network.Device#getRXBytes"><a href="LuCI.network.Device.html#getRXBytes">getRXBytes</a></li>
1970
1971 <li data-name="LuCI.network.Device#getRXPackets"><a href="LuCI.network.Device.html#getRXPackets">getRXPackets</a></li>
1972
1973 <li data-name="LuCI.network.Device#getShortName"><a href="LuCI.network.Device.html#getShortName">getShortName</a></li>
1974
1975 <li data-name="LuCI.network.Device#getTXBytes"><a href="LuCI.network.Device.html#getTXBytes">getTXBytes</a></li>
1976
1977 <li data-name="LuCI.network.Device#getTXPackets"><a href="LuCI.network.Device.html#getTXPackets">getTXPackets</a></li>
1978
1979 <li data-name="LuCI.network.Device#getType"><a href="LuCI.network.Device.html#getType">getType</a></li>
1980
1981 <li data-name="LuCI.network.Device#getTypeI18n"><a href="LuCI.network.Device.html#getTypeI18n">getTypeI18n</a></li>
1982
1983 <li data-name="LuCI.network.Device#getWifiNetwork"><a href="LuCI.network.Device.html#getWifiNetwork">getWifiNetwork</a></li>
1984
1985 <li data-name="LuCI.network.Device#isBridge"><a href="LuCI.network.Device.html#isBridge">isBridge</a></li>
1986
1987 <li data-name="LuCI.network.Device#isBridgePort"><a href="LuCI.network.Device.html#isBridgePort">isBridgePort</a></li>
1988
1989 <li data-name="LuCI.network.Device#isUp"><a href="LuCI.network.Device.html#isUp">isUp</a></li>
1990
1991 </ul>
1992 <ul class="events itemMembers">
1993
1994 </ul>
1995 </li>
1996
1997 <li class="item" data-name="LuCI.network.Hosts">
1998 <span class="title">
1999 <a href="LuCI.network.Hosts.html">LuCI.network.Hosts</a>
2000
2001 </span>
2002 <ul class="members itemMembers">
2003
2004 </ul>
2005 <ul class="typedefs itemMembers">
2006
2007 </ul>
2008 <ul class="typedefs itemMembers">
2009
2010 </ul>
2011 <ul class="methods itemMembers">
2012
2013 <span class="subtitle">Methods</span>
2014
2015 <li data-name="LuCI.network.Hosts#getHostnameByIP6Addr"><a href="LuCI.network.Hosts.html#getHostnameByIP6Addr">getHostnameByIP6Addr</a></li>
2016
2017 <li data-name="LuCI.network.Hosts#getHostnameByIPAddr"><a href="LuCI.network.Hosts.html#getHostnameByIPAddr">getHostnameByIPAddr</a></li>
2018
2019 <li data-name="LuCI.network.Hosts#getHostnameByMACAddr"><a href="LuCI.network.Hosts.html#getHostnameByMACAddr">getHostnameByMACAddr</a></li>
2020
2021 <li data-name="LuCI.network.Hosts#getIP6AddrByMACAddr"><a href="LuCI.network.Hosts.html#getIP6AddrByMACAddr">getIP6AddrByMACAddr</a></li>
2022
2023 <li data-name="LuCI.network.Hosts#getIPAddrByMACAddr"><a href="LuCI.network.Hosts.html#getIPAddrByMACAddr">getIPAddrByMACAddr</a></li>
2024
2025 <li data-name="LuCI.network.Hosts#getMACAddrByIP6Addr"><a href="LuCI.network.Hosts.html#getMACAddrByIP6Addr">getMACAddrByIP6Addr</a></li>
2026
2027 <li data-name="LuCI.network.Hosts#getMACAddrByIPAddr"><a href="LuCI.network.Hosts.html#getMACAddrByIPAddr">getMACAddrByIPAddr</a></li>
2028
2029 <li data-name="LuCI.network.Hosts#getMACHints"><a href="LuCI.network.Hosts.html#getMACHints">getMACHints</a></li>
2030
2031 </ul>
2032 <ul class="events itemMembers">
2033
2034 </ul>
2035 </li>
2036
2037 <li class="item" data-name="LuCI.network.Protocol">
2038 <span class="title">
2039 <a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>
2040
2041 </span>
2042 <ul class="members itemMembers">
2043
2044 </ul>
2045 <ul class="typedefs itemMembers">
2046
2047 </ul>
2048 <ul class="typedefs itemMembers">
2049
2050 </ul>
2051 <ul class="methods itemMembers">
2052
2053 <span class="subtitle">Methods</span>
2054
2055 <li data-name="LuCI.network.Protocol#addDevice"><a href="LuCI.network.Protocol.html#addDevice">addDevice</a></li>
2056
2057 <li data-name="LuCI.network.Protocol#containsDevice"><a href="LuCI.network.Protocol.html#containsDevice">containsDevice</a></li>
2058
2059 <li data-name="LuCI.network.Protocol#deleteConfiguration"><a href="LuCI.network.Protocol.html#deleteConfiguration">deleteConfiguration</a></li>
2060
2061 <li data-name="LuCI.network.Protocol#deleteDevice"><a href="LuCI.network.Protocol.html#deleteDevice">deleteDevice</a></li>
2062
2063 <li data-name="LuCI.network.Protocol#get"><a href="LuCI.network.Protocol.html#get">get</a></li>
2064
2065 <li data-name="LuCI.network.Protocol#getDevice"><a href="LuCI.network.Protocol.html#getDevice">getDevice</a></li>
2066
2067 <li data-name="LuCI.network.Protocol#getDevices"><a href="LuCI.network.Protocol.html#getDevices">getDevices</a></li>
2068
2069 <li data-name="LuCI.network.Protocol#getDNS6Addrs"><a href="LuCI.network.Protocol.html#getDNS6Addrs">getDNS6Addrs</a></li>
2070
2071 <li data-name="LuCI.network.Protocol#getDNSAddrs"><a href="LuCI.network.Protocol.html#getDNSAddrs">getDNSAddrs</a></li>
2072
2073 <li data-name="LuCI.network.Protocol#getErrors"><a href="LuCI.network.Protocol.html#getErrors">getErrors</a></li>
2074
2075 <li data-name="LuCI.network.Protocol#getExpiry"><a href="LuCI.network.Protocol.html#getExpiry">getExpiry</a></li>
2076
2077 <li data-name="LuCI.network.Protocol#getGateway6Addr"><a href="LuCI.network.Protocol.html#getGateway6Addr">getGateway6Addr</a></li>
2078
2079 <li data-name="LuCI.network.Protocol#getGatewayAddr"><a href="LuCI.network.Protocol.html#getGatewayAddr">getGatewayAddr</a></li>
2080
2081 <li data-name="LuCI.network.Protocol#getI18n"><a href="LuCI.network.Protocol.html#getI18n">getI18n</a></li>
2082
2083 <li data-name="LuCI.network.Protocol#getIfname"><a href="LuCI.network.Protocol.html#getIfname">getIfname</a></li>
2084
2085 <li data-name="LuCI.network.Protocol#getIP6Addr"><a href="LuCI.network.Protocol.html#getIP6Addr">getIP6Addr</a></li>
2086
2087 <li data-name="LuCI.network.Protocol#getIP6Addrs"><a href="LuCI.network.Protocol.html#getIP6Addrs">getIP6Addrs</a></li>
2088
2089 <li data-name="LuCI.network.Protocol#getIP6Prefix"><a href="LuCI.network.Protocol.html#getIP6Prefix">getIP6Prefix</a></li>
2090
2091 <li data-name="LuCI.network.Protocol#getIPAddr"><a href="LuCI.network.Protocol.html#getIPAddr">getIPAddr</a></li>
2092
2093 <li data-name="LuCI.network.Protocol#getIPAddrs"><a href="LuCI.network.Protocol.html#getIPAddrs">getIPAddrs</a></li>
2094
2095 <li data-name="LuCI.network.Protocol#getL2Device"><a href="LuCI.network.Protocol.html#getL2Device">getL2Device</a></li>
2096
2097 <li data-name="LuCI.network.Protocol#getL3Device"><a href="LuCI.network.Protocol.html#getL3Device">getL3Device</a></li>
2098
2099 <li data-name="LuCI.network.Protocol#getMetric"><a href="LuCI.network.Protocol.html#getMetric">getMetric</a></li>
2100
2101 <li data-name="LuCI.network.Protocol#getName"><a href="LuCI.network.Protocol.html#getName">getName</a></li>
2102
2103 <li data-name="LuCI.network.Protocol#getNetmask"><a href="LuCI.network.Protocol.html#getNetmask">getNetmask</a></li>
2104
2105 <li data-name="LuCI.network.Protocol#getOpkgPackage"><a href="LuCI.network.Protocol.html#getOpkgPackage">getOpkgPackage</a></li>
2106
2107 <li data-name="LuCI.network.Protocol#getProtocol"><a href="LuCI.network.Protocol.html#getProtocol">getProtocol</a></li>
2108
2109 <li data-name="LuCI.network.Protocol#getType"><a href="LuCI.network.Protocol.html#getType">getType</a></li>
2110
2111 <li data-name="LuCI.network.Protocol#getUptime"><a href="LuCI.network.Protocol.html#getUptime">getUptime</a></li>
2112
2113 <li data-name="LuCI.network.Protocol#getZoneName"><a href="LuCI.network.Protocol.html#getZoneName">getZoneName</a></li>
2114
2115 <li data-name="LuCI.network.Protocol#isAlias"><a href="LuCI.network.Protocol.html#isAlias">isAlias</a></li>
2116
2117 <li data-name="LuCI.network.Protocol#isBridge"><a href="LuCI.network.Protocol.html#isBridge">isBridge</a></li>
2118
2119 <li data-name="LuCI.network.Protocol#isCreateable"><a href="LuCI.network.Protocol.html#isCreateable">isCreateable</a></li>
2120
2121 <li data-name="LuCI.network.Protocol#isDynamic"><a href="LuCI.network.Protocol.html#isDynamic">isDynamic</a></li>
2122
2123 <li data-name="LuCI.network.Protocol#isEmpty"><a href="LuCI.network.Protocol.html#isEmpty">isEmpty</a></li>
2124
2125 <li data-name="LuCI.network.Protocol#isFloating"><a href="LuCI.network.Protocol.html#isFloating">isFloating</a></li>
2126
2127 <li data-name="LuCI.network.Protocol#isInstalled"><a href="LuCI.network.Protocol.html#isInstalled">isInstalled</a></li>
2128
2129 <li data-name="LuCI.network.Protocol#isUp"><a href="LuCI.network.Protocol.html#isUp">isUp</a></li>
2130
2131 <li data-name="LuCI.network.Protocol#isVirtual"><a href="LuCI.network.Protocol.html#isVirtual">isVirtual</a></li>
2132
2133 <li data-name="LuCI.network.Protocol#set"><a href="LuCI.network.Protocol.html#set">set</a></li>
2134
2135 </ul>
2136 <ul class="events itemMembers">
2137
2138 </ul>
2139 </li>
2140
2141 <li class="item" data-name="LuCI.network.WifiDevice">
2142 <span class="title">
2143 <a href="LuCI.network.WifiDevice.html">LuCI.network.WifiDevice</a>
2144
2145 </span>
2146 <ul class="members itemMembers">
2147
2148 </ul>
2149 <ul class="typedefs itemMembers">
2150
2151 </ul>
2152 <ul class="typedefs itemMembers">
2153
2154 </ul>
2155 <ul class="methods itemMembers">
2156
2157 <span class="subtitle">Methods</span>
2158
2159 <li data-name="LuCI.network.WifiDevice#addWifiNetwork"><a href="LuCI.network.WifiDevice.html#addWifiNetwork">addWifiNetwork</a></li>
2160
2161 <li data-name="LuCI.network.WifiDevice#deleteWifiNetwork"><a href="LuCI.network.WifiDevice.html#deleteWifiNetwork">deleteWifiNetwork</a></li>
2162
2163 <li data-name="LuCI.network.WifiDevice#get"><a href="LuCI.network.WifiDevice.html#get">get</a></li>
2164
2165 <li data-name="LuCI.network.WifiDevice#getHTModes"><a href="LuCI.network.WifiDevice.html#getHTModes">getHTModes</a></li>
2166
2167 <li data-name="LuCI.network.WifiDevice#getHWModes"><a href="LuCI.network.WifiDevice.html#getHWModes">getHWModes</a></li>
2168
2169 <li data-name="LuCI.network.WifiDevice#getI18n"><a href="LuCI.network.WifiDevice.html#getI18n">getI18n</a></li>
2170
2171 <li data-name="LuCI.network.WifiDevice#getName"><a href="LuCI.network.WifiDevice.html#getName">getName</a></li>
2172
2173 <li data-name="LuCI.network.WifiDevice#getScanList"><a href="LuCI.network.WifiDevice.html#getScanList">getScanList</a></li>
2174
2175 <li data-name="LuCI.network.WifiDevice#getWifiNetwork"><a href="LuCI.network.WifiDevice.html#getWifiNetwork">getWifiNetwork</a></li>
2176
2177 <li data-name="LuCI.network.WifiDevice#getWifiNetworks"><a href="LuCI.network.WifiDevice.html#getWifiNetworks">getWifiNetworks</a></li>
2178
2179 <li data-name="LuCI.network.WifiDevice#isDisabled"><a href="LuCI.network.WifiDevice.html#isDisabled">isDisabled</a></li>
2180
2181 <li data-name="LuCI.network.WifiDevice#isUp"><a href="LuCI.network.WifiDevice.html#isUp">isUp</a></li>
2182
2183 <li data-name="LuCI.network.WifiDevice#set"><a href="LuCI.network.WifiDevice.html#set">set</a></li>
2184
2185 </ul>
2186 <ul class="events itemMembers">
2187
2188 </ul>
2189 </li>
2190
2191 <li class="item" data-name="LuCI.network.WifiNetwork">
2192 <span class="title">
2193 <a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>
2194
2195 </span>
2196 <ul class="members itemMembers">
2197
2198 </ul>
2199 <ul class="typedefs itemMembers">
2200
2201 </ul>
2202 <ul class="typedefs itemMembers">
2203
2204 </ul>
2205 <ul class="methods itemMembers">
2206
2207 <span class="subtitle">Methods</span>
2208
2209 <li data-name="LuCI.network.WifiNetwork#disconnectClient"><a href="LuCI.network.WifiNetwork.html#disconnectClient">disconnectClient</a></li>
2210
2211 <li data-name="LuCI.network.WifiNetwork#get"><a href="LuCI.network.WifiNetwork.html#get">get</a></li>
2212
2213 <li data-name="LuCI.network.WifiNetwork#getActiveBSSID"><a href="LuCI.network.WifiNetwork.html#getActiveBSSID">getActiveBSSID</a></li>
2214
2215 <li data-name="LuCI.network.WifiNetwork#getActiveEncryption"><a href="LuCI.network.WifiNetwork.html#getActiveEncryption">getActiveEncryption</a></li>
2216
2217 <li data-name="LuCI.network.WifiNetwork#getActiveMode"><a href="LuCI.network.WifiNetwork.html#getActiveMode">getActiveMode</a></li>
2218
2219 <li data-name="LuCI.network.WifiNetwork#getActiveModeI18n"><a href="LuCI.network.WifiNetwork.html#getActiveModeI18n">getActiveModeI18n</a></li>
2220
2221 <li data-name="LuCI.network.WifiNetwork#getActiveSSID"><a href="LuCI.network.WifiNetwork.html#getActiveSSID">getActiveSSID</a></li>
2222
2223 <li data-name="LuCI.network.WifiNetwork#getAssocList"><a href="LuCI.network.WifiNetwork.html#getAssocList">getAssocList</a></li>
2224
2225 <li data-name="LuCI.network.WifiNetwork#getBitRate"><a href="LuCI.network.WifiNetwork.html#getBitRate">getBitRate</a></li>
2226
2227 <li data-name="LuCI.network.WifiNetwork#getBSSID"><a href="LuCI.network.WifiNetwork.html#getBSSID">getBSSID</a></li>
2228
2229 <li data-name="LuCI.network.WifiNetwork#getChannel"><a href="LuCI.network.WifiNetwork.html#getChannel">getChannel</a></li>
2230
2231 <li data-name="LuCI.network.WifiNetwork#getCountryCode"><a href="LuCI.network.WifiNetwork.html#getCountryCode">getCountryCode</a></li>
2232
2233 <li data-name="LuCI.network.WifiNetwork#getDevice"><a href="LuCI.network.WifiNetwork.html#getDevice">getDevice</a></li>
2234
2235 <li data-name="LuCI.network.WifiNetwork#getFrequency"><a href="LuCI.network.WifiNetwork.html#getFrequency">getFrequency</a></li>
2236
2237 <li data-name="LuCI.network.WifiNetwork#getI18n"><a href="LuCI.network.WifiNetwork.html#getI18n">getI18n</a></li>
2238
2239 <li data-name="LuCI.network.WifiNetwork#getID"><a href="LuCI.network.WifiNetwork.html#getID">getID</a></li>
2240
2241 <li data-name="LuCI.network.WifiNetwork#getIfname"><a href="LuCI.network.WifiNetwork.html#getIfname">getIfname</a></li>
2242
2243 <li data-name="LuCI.network.WifiNetwork#getMeshID"><a href="LuCI.network.WifiNetwork.html#getMeshID">getMeshID</a></li>
2244
2245 <li data-name="LuCI.network.WifiNetwork#getMode"><a href="LuCI.network.WifiNetwork.html#getMode">getMode</a></li>
2246
2247 <li data-name="LuCI.network.WifiNetwork#getName"><a href="LuCI.network.WifiNetwork.html#getName">getName</a></li>
2248
2249 <li data-name="LuCI.network.WifiNetwork#getNetwork"><a href="LuCI.network.WifiNetwork.html#getNetwork">getNetwork</a></li>
2250
2251 <li data-name="LuCI.network.WifiNetwork#getNetworkNames"><a href="LuCI.network.WifiNetwork.html#getNetworkNames">getNetworkNames</a></li>
2252
2253 <li data-name="LuCI.network.WifiNetwork#getNetworks"><a href="LuCI.network.WifiNetwork.html#getNetworks">getNetworks</a></li>
2254
2255 <li data-name="LuCI.network.WifiNetwork#getNoise"><a href="LuCI.network.WifiNetwork.html#getNoise">getNoise</a></li>
2256
2257 <li data-name="LuCI.network.WifiNetwork#getShortName"><a href="LuCI.network.WifiNetwork.html#getShortName">getShortName</a></li>
2258
2259 <li data-name="LuCI.network.WifiNetwork#getSignal"><a href="LuCI.network.WifiNetwork.html#getSignal">getSignal</a></li>
2260
2261 <li data-name="LuCI.network.WifiNetwork#getSignalLevel"><a href="LuCI.network.WifiNetwork.html#getSignalLevel">getSignalLevel</a></li>
2262
2263 <li data-name="LuCI.network.WifiNetwork#getSignalPercent"><a href="LuCI.network.WifiNetwork.html#getSignalPercent">getSignalPercent</a></li>
2264
2265 <li data-name="LuCI.network.WifiNetwork#getSSID"><a href="LuCI.network.WifiNetwork.html#getSSID">getSSID</a></li>
2266
2267 <li data-name="LuCI.network.WifiNetwork#getTXPower"><a href="LuCI.network.WifiNetwork.html#getTXPower">getTXPower</a></li>
2268
2269 <li data-name="LuCI.network.WifiNetwork#getTXPowerOffset"><a href="LuCI.network.WifiNetwork.html#getTXPowerOffset">getTXPowerOffset</a></li>
2270
2271 <li data-name="LuCI.network.WifiNetwork#getWifiDevice"><a href="LuCI.network.WifiNetwork.html#getWifiDevice">getWifiDevice</a></li>
2272
2273 <li data-name="LuCI.network.WifiNetwork#getWifiDeviceName"><a href="LuCI.network.WifiNetwork.html#getWifiDeviceName">getWifiDeviceName</a></li>
2274
2275 <li data-name="LuCI.network.WifiNetwork#isClientDisconnectSupported"><a href="LuCI.network.WifiNetwork.html#isClientDisconnectSupported">isClientDisconnectSupported</a></li>
2276
2277 <li data-name="LuCI.network.WifiNetwork#isDisabled"><a href="LuCI.network.WifiNetwork.html#isDisabled">isDisabled</a></li>
2278
2279 <li data-name="LuCI.network.WifiNetwork#isUp"><a href="LuCI.network.WifiNetwork.html#isUp">isUp</a></li>
2280
2281 <li data-name="LuCI.network.WifiNetwork#set"><a href="LuCI.network.WifiNetwork.html#set">set</a></li>
2282
2283 </ul>
2284 <ul class="events itemMembers">
2285
2286 </ul>
2287 </li>
2288
2289 <li class="item" data-name="LuCI.poll">
2290 <span class="title">
2291 <a href="LuCI.poll.html">LuCI.poll</a>
2292
2293 </span>
2294 <ul class="members itemMembers">
2295
2296 </ul>
2297 <ul class="typedefs itemMembers">
2298
2299 </ul>
2300 <ul class="typedefs itemMembers">
2301
2302 </ul>
2303 <ul class="methods itemMembers">
2304
2305 <span class="subtitle">Methods</span>
2306
2307 <li data-name="LuCI.poll#active"><a href="LuCI.poll.html#active">active</a></li>
2308
2309 <li data-name="LuCI.poll#add"><a href="LuCI.poll.html#add">add</a></li>
2310
2311 <li data-name="LuCI.poll#remove"><a href="LuCI.poll.html#remove">remove</a></li>
2312
2313 <li data-name="LuCI.poll#start"><a href="LuCI.poll.html#start">start</a></li>
2314
2315 <li data-name="LuCI.poll#stop"><a href="LuCI.poll.html#stop">stop</a></li>
2316
2317 </ul>
2318 <ul class="events itemMembers">
2319
2320 </ul>
2321 </li>
2322
2323 <li class="item" data-name="LuCI.request">
2324 <span class="title">
2325 <a href="LuCI.request.html">LuCI.request</a>
2326
2327 </span>
2328 <ul class="members itemMembers">
2329
2330 </ul>
2331 <ul class="typedefs itemMembers">
2332
2333 <span class="subtitle">Typedefs</span>
2334
2335 <li data-name="LuCI.request.interceptorFn"><a href="LuCI.request.html#.interceptorFn">interceptorFn</a></li>
2336
2337 <li data-name="LuCI.request.RequestOptions"><a href="LuCI.request.html#.RequestOptions">RequestOptions</a></li>
2338
2339 </ul>
2340 <ul class="typedefs itemMembers">
2341
2342 </ul>
2343 <ul class="methods itemMembers">
2344
2345 <span class="subtitle">Methods</span>
2346
2347 <li data-name="LuCI.request#addInterceptor"><a href="LuCI.request.html#addInterceptor">addInterceptor</a></li>
2348
2349 <li data-name="LuCI.request#expandURL"><a href="LuCI.request.html#expandURL">expandURL</a></li>
2350
2351 <li data-name="LuCI.request#get"><a href="LuCI.request.html#get">get</a></li>
2352
2353 <li data-name="LuCI.request#post"><a href="LuCI.request.html#post">post</a></li>
2354
2355 <li data-name="LuCI.request#removeInterceptor"><a href="LuCI.request.html#removeInterceptor">removeInterceptor</a></li>
2356
2357 <li data-name="LuCI.request#request"><a href="LuCI.request.html#request">request</a></li>
2358
2359 </ul>
2360 <ul class="events itemMembers">
2361
2362 </ul>
2363 </li>
2364
2365 <li class="item" data-name="LuCI.request.poll">
2366 <span class="title">
2367 <a href="LuCI.request.poll.html">LuCI.request.poll</a>
2368
2369 </span>
2370 <ul class="members itemMembers">
2371
2372 </ul>
2373 <ul class="typedefs itemMembers">
2374
2375 <span class="subtitle">Typedefs</span>
2376
2377 <li data-name="LuCI.request.poll~callbackFn"><a href="LuCI.request.poll.html#~callbackFn">callbackFn</a></li>
2378
2379 </ul>
2380 <ul class="typedefs itemMembers">
2381
2382 </ul>
2383 <ul class="methods itemMembers">
2384
2385 <span class="subtitle">Methods</span>
2386
2387 <li data-name="LuCI.request.poll#active"><a href="LuCI.request.poll.html#active">active</a></li>
2388
2389 <li data-name="LuCI.request.poll#add"><a href="LuCI.request.poll.html#add">add</a></li>
2390
2391 <li data-name="LuCI.request.poll#remove"><a href="LuCI.request.poll.html#remove">remove</a></li>
2392
2393 <li data-name="LuCI.request.poll#start"><a href="LuCI.request.poll.html#start">start</a></li>
2394
2395 <li data-name="LuCI.request.poll#stop"><a href="LuCI.request.poll.html#stop">stop</a></li>
2396
2397 </ul>
2398 <ul class="events itemMembers">
2399
2400 </ul>
2401 </li>
2402
2403 <li class="item" data-name="LuCI.response">
2404 <span class="title">
2405 <a href="LuCI.response.html">LuCI.response</a>
2406
2407 </span>
2408 <ul class="members itemMembers">
2409
2410 <span class="subtitle">Members</span>
2411
2412 <li data-name="LuCI.response#duration"><a href="LuCI.response.html#duration">duration</a></li>
2413
2414 <li data-name="LuCI.response#headers"><a href="LuCI.response.html#headers">headers</a></li>
2415
2416 <li data-name="LuCI.response#ok"><a href="LuCI.response.html#ok">ok</a></li>
2417
2418 <li data-name="LuCI.response#status"><a href="LuCI.response.html#status">status</a></li>
2419
2420 <li data-name="LuCI.response#statusText"><a href="LuCI.response.html#statusText">statusText</a></li>
2421
2422 <li data-name="LuCI.response#url"><a href="LuCI.response.html#url">url</a></li>
2423
2424 </ul>
2425 <ul class="typedefs itemMembers">
2426
2427 </ul>
2428 <ul class="typedefs itemMembers">
2429
2430 </ul>
2431 <ul class="methods itemMembers">
2432
2433 <span class="subtitle">Methods</span>
2434
2435 <li data-name="LuCI.response#blob"><a href="LuCI.response.html#blob">blob</a></li>
2436
2437 <li data-name="LuCI.response#clone"><a href="LuCI.response.html#clone">clone</a></li>
2438
2439 <li data-name="LuCI.response#json"><a href="LuCI.response.html#json">json</a></li>
2440
2441 <li data-name="LuCI.response#text"><a href="LuCI.response.html#text">text</a></li>
2442
2443 </ul>
2444 <ul class="events itemMembers">
2445
2446 </ul>
2447 </li>
2448
2449 <li class="item" data-name="LuCI.rpc">
2450 <span class="title">
2451 <a href="LuCI.rpc.html">LuCI.rpc</a>
2452
2453 </span>
2454 <ul class="members itemMembers">
2455
2456 </ul>
2457 <ul class="typedefs itemMembers">
2458
2459 <span class="subtitle">Typedefs</span>
2460
2461 <li data-name="LuCI.rpc.DeclareOptions"><a href="LuCI.rpc.html#.DeclareOptions">DeclareOptions</a></li>
2462
2463 <li data-name="LuCI.rpc~filterFn"><a href="LuCI.rpc.html#~filterFn">filterFn</a></li>
2464
2465 <li data-name="LuCI.rpc~interceptorFn"><a href="LuCI.rpc.html#~interceptorFn">interceptorFn</a></li>
2466
2467 <li data-name="LuCI.rpc~invokeFn"><a href="LuCI.rpc.html#~invokeFn">invokeFn</a></li>
2468
2469 </ul>
2470 <ul class="typedefs itemMembers">
2471
2472 </ul>
2473 <ul class="methods itemMembers">
2474
2475 <span class="subtitle">Methods</span>
2476
2477 <li data-name="LuCI.rpc#addInterceptor"><a href="LuCI.rpc.html#addInterceptor">addInterceptor</a></li>
2478
2479 <li data-name="LuCI.rpc#declare"><a href="LuCI.rpc.html#declare">declare</a></li>
2480
2481 <li data-name="LuCI.rpc#getBaseURL"><a href="LuCI.rpc.html#getBaseURL">getBaseURL</a></li>
2482
2483 <li data-name="LuCI.rpc#getSessionID"><a href="LuCI.rpc.html#getSessionID">getSessionID</a></li>
2484
2485 <li data-name="LuCI.rpc#getStatusText"><a href="LuCI.rpc.html#getStatusText">getStatusText</a></li>
2486
2487 <li data-name="LuCI.rpc#list"><a href="LuCI.rpc.html#list">list</a></li>
2488
2489 <li data-name="LuCI.rpc#removeInterceptor"><a href="LuCI.rpc.html#removeInterceptor">removeInterceptor</a></li>
2490
2491 <li data-name="LuCI.rpc#setBaseURL"><a href="LuCI.rpc.html#setBaseURL">setBaseURL</a></li>
2492
2493 <li data-name="LuCI.rpc#setSessionID"><a href="LuCI.rpc.html#setSessionID">setSessionID</a></li>
2494
2495 </ul>
2496 <ul class="events itemMembers">
2497
2498 </ul>
2499 </li>
2500
2501 <li class="item" data-name="LuCI.session">
2502 <span class="title">
2503 <a href="LuCI.session.html">LuCI.session</a>
2504
2505 </span>
2506 <ul class="members itemMembers">
2507
2508 </ul>
2509 <ul class="typedefs itemMembers">
2510
2511 </ul>
2512 <ul class="typedefs itemMembers">
2513
2514 </ul>
2515 <ul class="methods itemMembers">
2516
2517 <span class="subtitle">Methods</span>
2518
2519 <li data-name="LuCI.session#getID"><a href="LuCI.session.html#getID">getID</a></li>
2520
2521 <li data-name="LuCI.session#getLocalData"><a href="LuCI.session.html#getLocalData">getLocalData</a></li>
2522
2523 <li data-name="LuCI.session#setLocalData"><a href="LuCI.session.html#setLocalData">setLocalData</a></li>
2524
2525 </ul>
2526 <ul class="events itemMembers">
2527
2528 </ul>
2529 </li>
2530
2531 <li class="item" data-name="LuCI.uci">
2532 <span class="title">
2533 <a href="LuCI.uci.html">LuCI.uci</a>
2534
2535 </span>
2536 <ul class="members itemMembers">
2537
2538 </ul>
2539 <ul class="typedefs itemMembers">
2540
2541 <span class="subtitle">Typedefs</span>
2542
2543 <li data-name="LuCI.uci.ChangeRecord"><a href="LuCI.uci.html#.ChangeRecord">ChangeRecord</a></li>
2544
2545 <li data-name="LuCI.uci.SectionObject"><a href="LuCI.uci.html#.SectionObject">SectionObject</a></li>
2546
2547 <li data-name="LuCI.uci~sectionsFn"><a href="LuCI.uci.html#~sectionsFn">sectionsFn</a></li>
2548
2549 </ul>
2550 <ul class="typedefs itemMembers">
2551
2552 </ul>
2553 <ul class="methods itemMembers">
2554
2555 <span class="subtitle">Methods</span>
2556
2557 <li data-name="LuCI.uci#add"><a href="LuCI.uci.html#add">add</a></li>
2558
2559 <li data-name="LuCI.uci#apply"><a href="LuCI.uci.html#apply">apply</a></li>
2560
2561 <li data-name="LuCI.uci#changes"><a href="LuCI.uci.html#changes">changes</a></li>
2562
2563 <li data-name="LuCI.uci#createSID"><a href="LuCI.uci.html#createSID">createSID</a></li>
2564
2565 <li data-name="LuCI.uci#get"><a href="LuCI.uci.html#get">get</a></li>
2566
2567 <li data-name="LuCI.uci#get_first"><a href="LuCI.uci.html#get_first">get_first</a></li>
2568
2569 <li data-name="LuCI.uci#load"><a href="LuCI.uci.html#load">load</a></li>
2570
2571 <li data-name="LuCI.uci#move"><a href="LuCI.uci.html#move">move</a></li>
2572
2573 <li data-name="LuCI.uci#remove"><a href="LuCI.uci.html#remove">remove</a></li>
2574
2575 <li data-name="LuCI.uci#resolveSID"><a href="LuCI.uci.html#resolveSID">resolveSID</a></li>
2576
2577 <li data-name="LuCI.uci#save"><a href="LuCI.uci.html#save">save</a></li>
2578
2579 <li data-name="LuCI.uci#sections"><a href="LuCI.uci.html#sections">sections</a></li>
2580
2581 <li data-name="LuCI.uci#set"><a href="LuCI.uci.html#set">set</a></li>
2582
2583 <li data-name="LuCI.uci#set_first"><a href="LuCI.uci.html#set_first">set_first</a></li>
2584
2585 <li data-name="LuCI.uci#unload"><a href="LuCI.uci.html#unload">unload</a></li>
2586
2587 <li data-name="LuCI.uci#unset"><a href="LuCI.uci.html#unset">unset</a></li>
2588
2589 <li data-name="LuCI.uci#unset_first"><a href="LuCI.uci.html#unset_first">unset_first</a></li>
2590
2591 </ul>
2592 <ul class="events itemMembers">
2593
2594 </ul>
2595 </li>
2596
2597 <li class="item" data-name="LuCI.ui">
2598 <span class="title">
2599 <a href="LuCI.ui.html">LuCI.ui</a>
2600
2601 </span>
2602 <ul class="members itemMembers">
2603
2604 </ul>
2605 <ul class="typedefs itemMembers">
2606
2607 <span class="subtitle">Typedefs</span>
2608
2609 <li data-name="LuCI.ui.FileUploadReply"><a href="LuCI.ui.html#.FileUploadReply">FileUploadReply</a></li>
2610
2611 </ul>
2612 <ul class="typedefs itemMembers">
2613
2614 </ul>
2615 <ul class="methods itemMembers">
2616
2617 <span class="subtitle">Methods</span>
2618
2619 <li data-name="LuCI.ui#addNotification"><a href="LuCI.ui.html#addNotification">addNotification</a></li>
2620
2621 <li data-name="LuCI.ui#addValidator"><a href="LuCI.ui.html#addValidator">addValidator</a></li>
2622
2623 <li data-name="LuCI.ui#awaitReconnect"><a href="LuCI.ui.html#awaitReconnect">awaitReconnect</a></li>
2624
2625 <li data-name="LuCI.ui#createHandlerFn"><a href="LuCI.ui.html#createHandlerFn">createHandlerFn</a></li>
2626
2627 <li data-name="LuCI.ui#hideIndicator"><a href="LuCI.ui.html#hideIndicator">hideIndicator</a></li>
2628
2629 <li data-name="LuCI.ui#hideModal"><a href="LuCI.ui.html#hideModal">hideModal</a></li>
2630
2631 <li data-name="LuCI.ui#instantiateView"><a href="LuCI.ui.html#instantiateView">instantiateView</a></li>
2632
2633 <li data-name="LuCI.ui#itemlist"><a href="LuCI.ui.html#itemlist">itemlist</a></li>
2634
2635 <li data-name="LuCI.ui#pingDevice"><a href="LuCI.ui.html#pingDevice">pingDevice</a></li>
2636
2637 <li data-name="LuCI.ui#showIndicator"><a href="LuCI.ui.html#showIndicator">showIndicator</a></li>
2638
2639 <li data-name="LuCI.ui#showModal"><a href="LuCI.ui.html#showModal">showModal</a></li>
2640
2641 <li data-name="LuCI.ui#uploadFile"><a href="LuCI.ui.html#uploadFile">uploadFile</a></li>
2642
2643 </ul>
2644 <ul class="events itemMembers">
2645
2646 </ul>
2647 </li>
2648
2649 <li class="item" data-name="LuCI.ui.AbstractElement">
2650 <span class="title">
2651 <a href="LuCI.ui.AbstractElement.html">LuCI.ui.AbstractElement</a>
2652
2653 </span>
2654 <ul class="members itemMembers">
2655
2656 </ul>
2657 <ul class="typedefs itemMembers">
2658
2659 <span class="subtitle">Typedefs</span>
2660
2661 <li data-name="LuCI.ui.AbstractElement.InitOptions"><a href="LuCI.ui.AbstractElement.html#.InitOptions">InitOptions</a></li>
2662
2663 </ul>
2664 <ul class="typedefs itemMembers">
2665
2666 </ul>
2667 <ul class="methods itemMembers">
2668
2669 <span class="subtitle">Methods</span>
2670
2671 <li data-name="LuCI.ui.AbstractElement#getValue"><a href="LuCI.ui.AbstractElement.html#getValue">getValue</a></li>
2672
2673 <li data-name="LuCI.ui.AbstractElement#isValid"><a href="LuCI.ui.AbstractElement.html#isValid">isValid</a></li>
2674
2675 <li data-name="LuCI.ui.AbstractElement#registerEvents"><a href="LuCI.ui.AbstractElement.html#registerEvents">registerEvents</a></li>
2676
2677 <li data-name="LuCI.ui.AbstractElement#render"><a href="LuCI.ui.AbstractElement.html#render">render</a></li>
2678
2679 <li data-name="LuCI.ui.AbstractElement#setChangeEvents"><a href="LuCI.ui.AbstractElement.html#setChangeEvents">setChangeEvents</a></li>
2680
2681 <li data-name="LuCI.ui.AbstractElement#setUpdateEvents"><a href="LuCI.ui.AbstractElement.html#setUpdateEvents">setUpdateEvents</a></li>
2682
2683 <li data-name="LuCI.ui.AbstractElement#setValue"><a href="LuCI.ui.AbstractElement.html#setValue">setValue</a></li>
2684
2685 <li data-name="LuCI.ui.AbstractElement#triggerValidation"><a href="LuCI.ui.AbstractElement.html#triggerValidation">triggerValidation</a></li>
2686
2687 </ul>
2688 <ul class="events itemMembers">
2689
2690 </ul>
2691 </li>
2692
2693 <li class="item" data-name="LuCI.ui.changes">
2694 <span class="title">
2695 <a href="LuCI.ui.changes.html">LuCI.ui.changes</a>
2696
2697 </span>
2698 <ul class="members itemMembers">
2699
2700 </ul>
2701 <ul class="typedefs itemMembers">
2702
2703 </ul>
2704 <ul class="typedefs itemMembers">
2705
2706 </ul>
2707 <ul class="methods itemMembers">
2708
2709 <span class="subtitle">Methods</span>
2710
2711 <li data-name="LuCI.ui.changes#apply"><a href="LuCI.ui.changes.html#apply">apply</a></li>
2712
2713 <li data-name="LuCI.ui.changes#displayChanges"><a href="LuCI.ui.changes.html#displayChanges">displayChanges</a></li>
2714
2715 <li data-name="LuCI.ui.changes#renderChangeIndicator"><a href="LuCI.ui.changes.html#renderChangeIndicator">renderChangeIndicator</a></li>
2716
2717 <li data-name="LuCI.ui.changes#revert"><a href="LuCI.ui.changes.html#revert">revert</a></li>
2718
2719 <li data-name="LuCI.ui.changes#setIndicator"><a href="LuCI.ui.changes.html#setIndicator">setIndicator</a></li>
2720
2721 </ul>
2722 <ul class="events itemMembers">
2723
2724 </ul>
2725 </li>
2726
2727 <li class="item" data-name="LuCI.ui.Checkbox">
2728 <span class="title">
2729 <a href="LuCI.ui.Checkbox.html">LuCI.ui.Checkbox</a>
2730
2731 </span>
2732 <ul class="members itemMembers">
2733
2734 </ul>
2735 <ul class="typedefs itemMembers">
2736
2737 <span class="subtitle">Typedefs</span>
2738
2739 <li data-name="LuCI.ui.Checkbox.InitOptions"><a href="LuCI.ui.Checkbox.html#.InitOptions">InitOptions</a></li>
2740
2741 </ul>
2742 <ul class="typedefs itemMembers">
2743
2744 </ul>
2745 <ul class="methods itemMembers">
2746
2747 <span class="subtitle">Methods</span>
2748
2749 <li data-name="LuCI.ui.Checkbox#getValue"><a href="LuCI.ui.Checkbox.html#getValue">getValue</a></li>
2750
2751 <li data-name="LuCI.ui.Checkbox#isChecked"><a href="LuCI.ui.Checkbox.html#isChecked">isChecked</a></li>
2752
2753 <li data-name="LuCI.ui.Checkbox#isValid"><a href="LuCI.ui.Checkbox.html#isValid">isValid</a></li>
2754
2755 <li data-name="LuCI.ui.Checkbox#registerEvents"><a href="LuCI.ui.Checkbox.html#registerEvents">registerEvents</a></li>
2756
2757 <li data-name="LuCI.ui.Checkbox#render"><a href="LuCI.ui.Checkbox.html#render">render</a></li>
2758
2759 <li data-name="LuCI.ui.Checkbox#setChangeEvents"><a href="LuCI.ui.Checkbox.html#setChangeEvents">setChangeEvents</a></li>
2760
2761 <li data-name="LuCI.ui.Checkbox#setUpdateEvents"><a href="LuCI.ui.Checkbox.html#setUpdateEvents">setUpdateEvents</a></li>
2762
2763 <li data-name="LuCI.ui.Checkbox#setValue"><a href="LuCI.ui.Checkbox.html#setValue">setValue</a></li>
2764
2765 <li data-name="LuCI.ui.Checkbox#triggerValidation"><a href="LuCI.ui.Checkbox.html#triggerValidation">triggerValidation</a></li>
2766
2767 </ul>
2768 <ul class="events itemMembers">
2769
2770 </ul>
2771 </li>
2772
2773 <li class="item" data-name="LuCI.ui.Combobox">
2774 <span class="title">
2775 <a href="LuCI.ui.Combobox.html">LuCI.ui.Combobox</a>
2776
2777 </span>
2778 <ul class="members itemMembers">
2779
2780 </ul>
2781 <ul class="typedefs itemMembers">
2782
2783 <span class="subtitle">Typedefs</span>
2784
2785 <li data-name="LuCI.ui.Combobox.InitOptions"><a href="LuCI.ui.Combobox.html#.InitOptions">InitOptions</a></li>
2786
2787 </ul>
2788 <ul class="typedefs itemMembers">
2789
2790 </ul>
2791 <ul class="methods itemMembers">
2792
2793 <span class="subtitle">Methods</span>
2794
2795 <li data-name="LuCI.ui.Combobox#addChoices"><a href="LuCI.ui.Combobox.html#addChoices">addChoices</a></li>
2796
2797 <li data-name="LuCI.ui.Combobox#clearChoices"><a href="LuCI.ui.Combobox.html#clearChoices">clearChoices</a></li>
2798
2799 <li data-name="LuCI.ui.Combobox#closeAllDropdowns"><a href="LuCI.ui.Combobox.html#closeAllDropdowns">closeAllDropdowns</a></li>
2800
2801 <li data-name="LuCI.ui.Combobox#isValid"><a href="LuCI.ui.Combobox.html#isValid">isValid</a></li>
2802
2803 <li data-name="LuCI.ui.Combobox#registerEvents"><a href="LuCI.ui.Combobox.html#registerEvents">registerEvents</a></li>
2804
2805 <li data-name="LuCI.ui.Combobox#setChangeEvents"><a href="LuCI.ui.Combobox.html#setChangeEvents">setChangeEvents</a></li>
2806
2807 <li data-name="LuCI.ui.Combobox#setUpdateEvents"><a href="LuCI.ui.Combobox.html#setUpdateEvents">setUpdateEvents</a></li>
2808
2809 <li data-name="LuCI.ui.Combobox#triggerValidation"><a href="LuCI.ui.Combobox.html#triggerValidation">triggerValidation</a></li>
2810
2811 </ul>
2812 <ul class="events itemMembers">
2813
2814 </ul>
2815 </li>
2816
2817 <li class="item" data-name="LuCI.ui.ComboButton">
2818 <span class="title">
2819 <a href="LuCI.ui.ComboButton.html">LuCI.ui.ComboButton</a>
2820
2821 </span>
2822 <ul class="members itemMembers">
2823
2824 </ul>
2825 <ul class="typedefs itemMembers">
2826
2827 <span class="subtitle">Typedefs</span>
2828
2829 <li data-name="LuCI.ui.ComboButton.InitOptions"><a href="LuCI.ui.ComboButton.html#.InitOptions">InitOptions</a></li>
2830
2831 </ul>
2832 <ul class="typedefs itemMembers">
2833
2834 </ul>
2835 <ul class="methods itemMembers">
2836
2837 <span class="subtitle">Methods</span>
2838
2839 <li data-name="LuCI.ui.ComboButton#addChoices"><a href="LuCI.ui.ComboButton.html#addChoices">addChoices</a></li>
2840
2841 <li data-name="LuCI.ui.ComboButton#clearChoices"><a href="LuCI.ui.ComboButton.html#clearChoices">clearChoices</a></li>
2842
2843 <li data-name="LuCI.ui.ComboButton#closeAllDropdowns"><a href="LuCI.ui.ComboButton.html#closeAllDropdowns">closeAllDropdowns</a></li>
2844
2845 <li data-name="LuCI.ui.ComboButton#isValid"><a href="LuCI.ui.ComboButton.html#isValid">isValid</a></li>
2846
2847 <li data-name="LuCI.ui.ComboButton#registerEvents"><a href="LuCI.ui.ComboButton.html#registerEvents">registerEvents</a></li>
2848
2849 <li data-name="LuCI.ui.ComboButton#setChangeEvents"><a href="LuCI.ui.ComboButton.html#setChangeEvents">setChangeEvents</a></li>
2850
2851 <li data-name="LuCI.ui.ComboButton#setUpdateEvents"><a href="LuCI.ui.ComboButton.html#setUpdateEvents">setUpdateEvents</a></li>
2852
2853 <li data-name="LuCI.ui.ComboButton#triggerValidation"><a href="LuCI.ui.ComboButton.html#triggerValidation">triggerValidation</a></li>
2854
2855 </ul>
2856 <ul class="events itemMembers">
2857
2858 </ul>
2859 </li>
2860
2861 <li class="item" data-name="LuCI.ui.Dropdown">
2862 <span class="title">
2863 <a href="LuCI.ui.Dropdown.html">LuCI.ui.Dropdown</a>
2864
2865 </span>
2866 <ul class="members itemMembers">
2867
2868 </ul>
2869 <ul class="typedefs itemMembers">
2870
2871 <span class="subtitle">Typedefs</span>
2872
2873 <li data-name="LuCI.ui.Dropdown.InitOptions"><a href="LuCI.ui.Dropdown.html#.InitOptions">InitOptions</a></li>
2874
2875 </ul>
2876 <ul class="typedefs itemMembers">
2877
2878 </ul>
2879 <ul class="methods itemMembers">
2880
2881 <span class="subtitle">Methods</span>
2882
2883 <li data-name="LuCI.ui.Dropdown#addChoices"><a href="LuCI.ui.Dropdown.html#addChoices">addChoices</a></li>
2884
2885 <li data-name="LuCI.ui.Dropdown#clearChoices"><a href="LuCI.ui.Dropdown.html#clearChoices">clearChoices</a></li>
2886
2887 <li data-name="LuCI.ui.Dropdown#closeAllDropdowns"><a href="LuCI.ui.Dropdown.html#closeAllDropdowns">closeAllDropdowns</a></li>
2888
2889 <li data-name="LuCI.ui.Dropdown#getValue"><a href="LuCI.ui.Dropdown.html#getValue">getValue</a></li>
2890
2891 <li data-name="LuCI.ui.Dropdown#isValid"><a href="LuCI.ui.Dropdown.html#isValid">isValid</a></li>
2892
2893 <li data-name="LuCI.ui.Dropdown#registerEvents"><a href="LuCI.ui.Dropdown.html#registerEvents">registerEvents</a></li>
2894
2895 <li data-name="LuCI.ui.Dropdown#render"><a href="LuCI.ui.Dropdown.html#render">render</a></li>
2896
2897 <li data-name="LuCI.ui.Dropdown#setChangeEvents"><a href="LuCI.ui.Dropdown.html#setChangeEvents">setChangeEvents</a></li>
2898
2899 <li data-name="LuCI.ui.Dropdown#setUpdateEvents"><a href="LuCI.ui.Dropdown.html#setUpdateEvents">setUpdateEvents</a></li>
2900
2901 <li data-name="LuCI.ui.Dropdown#setValue"><a href="LuCI.ui.Dropdown.html#setValue">setValue</a></li>
2902
2903 <li data-name="LuCI.ui.Dropdown#triggerValidation"><a href="LuCI.ui.Dropdown.html#triggerValidation">triggerValidation</a></li>
2904
2905 </ul>
2906 <ul class="events itemMembers">
2907
2908 </ul>
2909 </li>
2910
2911 <li class="item" data-name="LuCI.ui.DynamicList">
2912 <span class="title">
2913 <a href="LuCI.ui.DynamicList.html">LuCI.ui.DynamicList</a>
2914
2915 </span>
2916 <ul class="members itemMembers">
2917
2918 </ul>
2919 <ul class="typedefs itemMembers">
2920
2921 <span class="subtitle">Typedefs</span>
2922
2923 <li data-name="LuCI.ui.DynamicList.InitOptions"><a href="LuCI.ui.DynamicList.html#.InitOptions">InitOptions</a></li>
2924
2925 </ul>
2926 <ul class="typedefs itemMembers">
2927
2928 </ul>
2929 <ul class="methods itemMembers">
2930
2931 <span class="subtitle">Methods</span>
2932
2933 <li data-name="LuCI.ui.DynamicList#addChoices"><a href="LuCI.ui.DynamicList.html#addChoices">addChoices</a></li>
2934
2935 <li data-name="LuCI.ui.DynamicList#clearChoices"><a href="LuCI.ui.DynamicList.html#clearChoices">clearChoices</a></li>
2936
2937 <li data-name="LuCI.ui.DynamicList#getValue"><a href="LuCI.ui.DynamicList.html#getValue">getValue</a></li>
2938
2939 <li data-name="LuCI.ui.DynamicList#isValid"><a href="LuCI.ui.DynamicList.html#isValid">isValid</a></li>
2940
2941 <li data-name="LuCI.ui.DynamicList#registerEvents"><a href="LuCI.ui.DynamicList.html#registerEvents">registerEvents</a></li>
2942
2943 <li data-name="LuCI.ui.DynamicList#render"><a href="LuCI.ui.DynamicList.html#render">render</a></li>
2944
2945 <li data-name="LuCI.ui.DynamicList#setChangeEvents"><a href="LuCI.ui.DynamicList.html#setChangeEvents">setChangeEvents</a></li>
2946
2947 <li data-name="LuCI.ui.DynamicList#setUpdateEvents"><a href="LuCI.ui.DynamicList.html#setUpdateEvents">setUpdateEvents</a></li>
2948
2949 <li data-name="LuCI.ui.DynamicList#setValue"><a href="LuCI.ui.DynamicList.html#setValue">setValue</a></li>
2950
2951 <li data-name="LuCI.ui.DynamicList#triggerValidation"><a href="LuCI.ui.DynamicList.html#triggerValidation">triggerValidation</a></li>
2952
2953 </ul>
2954 <ul class="events itemMembers">
2955
2956 </ul>
2957 </li>
2958
2959 <li class="item" data-name="LuCI.ui.FileUpload">
2960 <span class="title">
2961 <a href="LuCI.ui.FileUpload.html">LuCI.ui.FileUpload</a>
2962
2963 </span>
2964 <ul class="members itemMembers">
2965
2966 </ul>
2967 <ul class="typedefs itemMembers">
2968
2969 <span class="subtitle">Typedefs</span>
2970
2971 <li data-name="LuCI.ui.FileUpload.InitOptions"><a href="LuCI.ui.FileUpload.html#.InitOptions">InitOptions</a></li>
2972
2973 </ul>
2974 <ul class="typedefs itemMembers">
2975
2976 </ul>
2977 <ul class="methods itemMembers">
2978
2979 <span class="subtitle">Methods</span>
2980
2981 <li data-name="LuCI.ui.FileUpload#getValue"><a href="LuCI.ui.FileUpload.html#getValue">getValue</a></li>
2982
2983 <li data-name="LuCI.ui.FileUpload#isValid"><a href="LuCI.ui.FileUpload.html#isValid">isValid</a></li>
2984
2985 <li data-name="LuCI.ui.FileUpload#registerEvents"><a href="LuCI.ui.FileUpload.html#registerEvents">registerEvents</a></li>
2986
2987 <li data-name="LuCI.ui.FileUpload#render"><a href="LuCI.ui.FileUpload.html#render">render</a></li>
2988
2989 <li data-name="LuCI.ui.FileUpload#setChangeEvents"><a href="LuCI.ui.FileUpload.html#setChangeEvents">setChangeEvents</a></li>
2990
2991 <li data-name="LuCI.ui.FileUpload#setUpdateEvents"><a href="LuCI.ui.FileUpload.html#setUpdateEvents">setUpdateEvents</a></li>
2992
2993 <li data-name="LuCI.ui.FileUpload#setValue"><a href="LuCI.ui.FileUpload.html#setValue">setValue</a></li>
2994
2995 <li data-name="LuCI.ui.FileUpload#triggerValidation"><a href="LuCI.ui.FileUpload.html#triggerValidation">triggerValidation</a></li>
2996
2997 </ul>
2998 <ul class="events itemMembers">
2999
3000 </ul>
3001 </li>
3002
3003 <li class="item" data-name="LuCI.ui.Hiddenfield">
3004 <span class="title">
3005 <a href="LuCI.ui.Hiddenfield.html">LuCI.ui.Hiddenfield</a>
3006
3007 </span>
3008 <ul class="members itemMembers">
3009
3010 </ul>
3011 <ul class="typedefs itemMembers">
3012
3013 </ul>
3014 <ul class="typedefs itemMembers">
3015
3016 </ul>
3017 <ul class="methods itemMembers">
3018
3019 <span class="subtitle">Methods</span>
3020
3021 <li data-name="LuCI.ui.Hiddenfield#getValue"><a href="LuCI.ui.Hiddenfield.html#getValue">getValue</a></li>
3022
3023 <li data-name="LuCI.ui.Hiddenfield#isValid"><a href="LuCI.ui.Hiddenfield.html#isValid">isValid</a></li>
3024
3025 <li data-name="LuCI.ui.Hiddenfield#registerEvents"><a href="LuCI.ui.Hiddenfield.html#registerEvents">registerEvents</a></li>
3026
3027 <li data-name="LuCI.ui.Hiddenfield#render"><a href="LuCI.ui.Hiddenfield.html#render">render</a></li>
3028
3029 <li data-name="LuCI.ui.Hiddenfield#setChangeEvents"><a href="LuCI.ui.Hiddenfield.html#setChangeEvents">setChangeEvents</a></li>
3030
3031 <li data-name="LuCI.ui.Hiddenfield#setUpdateEvents"><a href="LuCI.ui.Hiddenfield.html#setUpdateEvents">setUpdateEvents</a></li>
3032
3033 <li data-name="LuCI.ui.Hiddenfield#setValue"><a href="LuCI.ui.Hiddenfield.html#setValue">setValue</a></li>
3034
3035 <li data-name="LuCI.ui.Hiddenfield#triggerValidation"><a href="LuCI.ui.Hiddenfield.html#triggerValidation">triggerValidation</a></li>
3036
3037 </ul>
3038 <ul class="events itemMembers">
3039
3040 </ul>
3041 </li>
3042
3043 <li class="item" data-name="LuCI.ui.menu">
3044 <span class="title">
3045 <a href="LuCI.ui.menu.html">LuCI.ui.menu</a>
3046
3047 </span>
3048 <ul class="members itemMembers">
3049
3050 </ul>
3051 <ul class="typedefs itemMembers">
3052
3053 <span class="subtitle">Typedefs</span>
3054
3055 <li data-name="LuCI.ui.menu.MenuNode"><a href="LuCI.ui.menu.html#.MenuNode">MenuNode</a></li>
3056
3057 </ul>
3058 <ul class="typedefs itemMembers">
3059
3060 </ul>
3061 <ul class="methods itemMembers">
3062
3063 <span class="subtitle">Methods</span>
3064
3065 <li data-name="LuCI.ui.menu#flushCache"><a href="LuCI.ui.menu.html#flushCache">flushCache</a></li>
3066
3067 <li data-name="LuCI.ui.menu#getChildren"><a href="LuCI.ui.menu.html#getChildren">getChildren</a></li>
3068
3069 <li data-name="LuCI.ui.menu#load"><a href="LuCI.ui.menu.html#load">load</a></li>
3070
3071 </ul>
3072 <ul class="events itemMembers">
3073
3074 </ul>
3075 </li>
3076
3077 <li class="item" data-name="LuCI.ui.Select">
3078 <span class="title">
3079 <a href="LuCI.ui.Select.html">LuCI.ui.Select</a>
3080
3081 </span>
3082 <ul class="members itemMembers">
3083
3084 </ul>
3085 <ul class="typedefs itemMembers">
3086
3087 <span class="subtitle">Typedefs</span>
3088
3089 <li data-name="LuCI.ui.Select.InitOptions"><a href="LuCI.ui.Select.html#.InitOptions">InitOptions</a></li>
3090
3091 </ul>
3092 <ul class="typedefs itemMembers">
3093
3094 </ul>
3095 <ul class="methods itemMembers">
3096
3097 <span class="subtitle">Methods</span>
3098
3099 <li data-name="LuCI.ui.Select#getValue"><a href="LuCI.ui.Select.html#getValue">getValue</a></li>
3100
3101 <li data-name="LuCI.ui.Select#isValid"><a href="LuCI.ui.Select.html#isValid">isValid</a></li>
3102
3103 <li data-name="LuCI.ui.Select#registerEvents"><a href="LuCI.ui.Select.html#registerEvents">registerEvents</a></li>
3104
3105 <li data-name="LuCI.ui.Select#render"><a href="LuCI.ui.Select.html#render">render</a></li>
3106
3107 <li data-name="LuCI.ui.Select#setChangeEvents"><a href="LuCI.ui.Select.html#setChangeEvents">setChangeEvents</a></li>
3108
3109 <li data-name="LuCI.ui.Select#setUpdateEvents"><a href="LuCI.ui.Select.html#setUpdateEvents">setUpdateEvents</a></li>
3110
3111 <li data-name="LuCI.ui.Select#setValue"><a href="LuCI.ui.Select.html#setValue">setValue</a></li>
3112
3113 <li data-name="LuCI.ui.Select#triggerValidation"><a href="LuCI.ui.Select.html#triggerValidation">triggerValidation</a></li>
3114
3115 </ul>
3116 <ul class="events itemMembers">
3117
3118 </ul>
3119 </li>
3120
3121 <li class="item" data-name="LuCI.ui.tabs">
3122 <span class="title">
3123 <a href="LuCI.ui.tabs.html">LuCI.ui.tabs</a>
3124
3125 </span>
3126 <ul class="members itemMembers">
3127
3128 </ul>
3129 <ul class="typedefs itemMembers">
3130
3131 </ul>
3132 <ul class="typedefs itemMembers">
3133
3134 </ul>
3135 <ul class="methods itemMembers">
3136
3137 <span class="subtitle">Methods</span>
3138
3139 <li data-name="LuCI.ui.tabs#initTabGroup"><a href="LuCI.ui.tabs.html#initTabGroup">initTabGroup</a></li>
3140
3141 <li data-name="LuCI.ui.tabs#isEmptyPane"><a href="LuCI.ui.tabs.html#isEmptyPane">isEmptyPane</a></li>
3142
3143 </ul>
3144 <ul class="events itemMembers">
3145
3146 </ul>
3147 </li>
3148
3149 <li class="item" data-name="LuCI.ui.Textarea">
3150 <span class="title">
3151 <a href="LuCI.ui.Textarea.html">LuCI.ui.Textarea</a>
3152
3153 </span>
3154 <ul class="members itemMembers">
3155
3156 </ul>
3157 <ul class="typedefs itemMembers">
3158
3159 <span class="subtitle">Typedefs</span>
3160
3161 <li data-name="LuCI.ui.Textarea.InitOptions"><a href="LuCI.ui.Textarea.html#.InitOptions">InitOptions</a></li>
3162
3163 </ul>
3164 <ul class="typedefs itemMembers">
3165
3166 </ul>
3167 <ul class="methods itemMembers">
3168
3169 <span class="subtitle">Methods</span>
3170
3171 <li data-name="LuCI.ui.Textarea#getValue"><a href="LuCI.ui.Textarea.html#getValue">getValue</a></li>
3172
3173 <li data-name="LuCI.ui.Textarea#isValid"><a href="LuCI.ui.Textarea.html#isValid">isValid</a></li>
3174
3175 <li data-name="LuCI.ui.Textarea#registerEvents"><a href="LuCI.ui.Textarea.html#registerEvents">registerEvents</a></li>
3176
3177 <li data-name="LuCI.ui.Textarea#render"><a href="LuCI.ui.Textarea.html#render">render</a></li>
3178
3179 <li data-name="LuCI.ui.Textarea#setChangeEvents"><a href="LuCI.ui.Textarea.html#setChangeEvents">setChangeEvents</a></li>
3180
3181 <li data-name="LuCI.ui.Textarea#setUpdateEvents"><a href="LuCI.ui.Textarea.html#setUpdateEvents">setUpdateEvents</a></li>
3182
3183 <li data-name="LuCI.ui.Textarea#setValue"><a href="LuCI.ui.Textarea.html#setValue">setValue</a></li>
3184
3185 <li data-name="LuCI.ui.Textarea#triggerValidation"><a href="LuCI.ui.Textarea.html#triggerValidation">triggerValidation</a></li>
3186
3187 </ul>
3188 <ul class="events itemMembers">
3189
3190 </ul>
3191 </li>
3192
3193 <li class="item" data-name="LuCI.ui.Textfield">
3194 <span class="title">
3195 <a href="LuCI.ui.Textfield.html">LuCI.ui.Textfield</a>
3196
3197 </span>
3198 <ul class="members itemMembers">
3199
3200 </ul>
3201 <ul class="typedefs itemMembers">
3202
3203 <span class="subtitle">Typedefs</span>
3204
3205 <li data-name="LuCI.ui.Textfield.InitOptions"><a href="LuCI.ui.Textfield.html#.InitOptions">InitOptions</a></li>
3206
3207 </ul>
3208 <ul class="typedefs itemMembers">
3209
3210 </ul>
3211 <ul class="methods itemMembers">
3212
3213 <span class="subtitle">Methods</span>
3214
3215 <li data-name="LuCI.ui.Textfield#getValue"><a href="LuCI.ui.Textfield.html#getValue">getValue</a></li>
3216
3217 <li data-name="LuCI.ui.Textfield#isValid"><a href="LuCI.ui.Textfield.html#isValid">isValid</a></li>
3218
3219 <li data-name="LuCI.ui.Textfield#registerEvents"><a href="LuCI.ui.Textfield.html#registerEvents">registerEvents</a></li>
3220
3221 <li data-name="LuCI.ui.Textfield#render"><a href="LuCI.ui.Textfield.html#render">render</a></li>
3222
3223 <li data-name="LuCI.ui.Textfield#setChangeEvents"><a href="LuCI.ui.Textfield.html#setChangeEvents">setChangeEvents</a></li>
3224
3225 <li data-name="LuCI.ui.Textfield#setUpdateEvents"><a href="LuCI.ui.Textfield.html#setUpdateEvents">setUpdateEvents</a></li>
3226
3227 <li data-name="LuCI.ui.Textfield#setValue"><a href="LuCI.ui.Textfield.html#setValue">setValue</a></li>
3228
3229 <li data-name="LuCI.ui.Textfield#triggerValidation"><a href="LuCI.ui.Textfield.html#triggerValidation">triggerValidation</a></li>
3230
3231 </ul>
3232 <ul class="events itemMembers">
3233
3234 </ul>
3235 </li>
3236
3237 <li class="item" data-name="LuCI.view">
3238 <span class="title">
3239 <a href="LuCI.view.html">LuCI.view</a>
3240
3241 </span>
3242 <ul class="members itemMembers">
3243
3244 </ul>
3245 <ul class="typedefs itemMembers">
3246
3247 </ul>
3248 <ul class="typedefs itemMembers">
3249
3250 </ul>
3251 <ul class="methods itemMembers">
3252
3253 <span class="subtitle">Methods</span>
3254
3255 <li data-name="LuCI.view#addFooter"><a href="LuCI.view.html#addFooter">addFooter</a></li>
3256
3257 <li data-name="LuCI.view#handleReset"><a href="LuCI.view.html#handleReset">handleReset</a></li>
3258
3259 <li data-name="LuCI.view#handleSave"><a href="LuCI.view.html#handleSave">handleSave</a></li>
3260
3261 <li data-name="LuCI.view#handleSaveApply"><a href="LuCI.view.html#handleSaveApply">handleSaveApply</a></li>
3262
3263 <li data-name="LuCI.view#load"><a href="LuCI.view.html#load">load</a></li>
3264
3265 <li data-name="LuCI.view#render"><a href="LuCI.view.html#render">render</a></li>
3266
3267 </ul>
3268 <ul class="events itemMembers">
3269
3270 </ul>
3271 </li>
3272
3273 <li class="item" data-name="LuCI.xhr">
3274 <span class="title">
3275 <a href="LuCI.xhr.html">LuCI.xhr</a>
3276
3277 </span>
3278 <ul class="members itemMembers">
3279
3280 </ul>
3281 <ul class="typedefs itemMembers">
3282
3283 </ul>
3284 <ul class="typedefs itemMembers">
3285
3286 </ul>
3287 <ul class="methods itemMembers">
3288
3289 <span class="subtitle">Methods</span>
3290
3291 <li data-name="LuCI.xhr#abort"><a href="LuCI.xhr.html#abort">abort</a></li>
3292
3293 <li data-name="LuCI.xhr#busy"><a href="LuCI.xhr.html#busy">busy</a></li>
3294
3295 <li data-name="LuCI.xhr#cancel"><a href="LuCI.xhr.html#cancel">cancel</a></li>
3296
3297 <li data-name="LuCI.xhr#get"><a href="LuCI.xhr.html#get">get</a></li>
3298
3299 <li data-name="LuCI.xhr#post"><a href="LuCI.xhr.html#post">post</a></li>
3300
3301 <li data-name="LuCI.xhr#send_form"><a href="LuCI.xhr.html#send_form">send_form</a></li>
3302
3303 </ul>
3304 <ul class="events itemMembers">
3305
3306 </ul>
3307 </li>
3308
3309 </ul>
3310 </div>
3311 <div class="main">
3312 <h1 class="page-title" data-filename="luci.js.html">Source: luci.js</h1>
3313
3314
3315
3316
3317 <section>
3318 <article>
3319 <pre id="source-code" class="prettyprint source "><code>/**
3320 * @class LuCI
3321 * @classdesc
3322 *
3323 * This is the LuCI base class. It is automatically instantiated and
3324 * accessible using the global `L` variable.
3325 *
3326 * @param {Object} env
3327 * The environment settings to use for the LuCI runtime.
3328 */
3329
3330 (function(window, document, undefined) {
3331 'use strict';
3332
3333 var env = {};
3334
3335 /* Object.assign polyfill for IE */
3336 if (typeof Object.assign !== 'function') {
3337 Object.defineProperty(Object, 'assign', {
3338 value: function assign(target, varArgs) {
3339 if (target == null)
3340 throw new TypeError('Cannot convert undefined or null to object');
3341
3342 var to = Object(target);
3343
3344 for (var index = 1; index &lt; arguments.length; index++)
3345 if (arguments[index] != null)
3346 for (var nextKey in arguments[index])
3347 if (Object.prototype.hasOwnProperty.call(arguments[index], nextKey))
3348 to[nextKey] = arguments[index][nextKey];
3349
3350 return to;
3351 },
3352 writable: true,
3353 configurable: true
3354 });
3355 }
3356
3357 /* Promise.finally polyfill */
3358 if (typeof Promise.prototype.finally !== 'function') {
3359 Promise.prototype.finally = function(fn) {
3360 var onFinally = function(cb) {
3361 return Promise.resolve(fn.call(this)).then(cb);
3362 };
3363
3364 return this.then(
3365 function(result) { return onFinally.call(this, function() { return result }) },
3366 function(reason) { return onFinally.call(this, function() { return Promise.reject(reason) }) }
3367 );
3368 };
3369 }
3370
3371 /*
3372 * Class declaration and inheritance helper
3373 */
3374
3375 var toCamelCase = function(s) {
3376 return s.replace(/(?:^|[\. -])(.)/g, function(m0, m1) { return m1.toUpperCase() });
3377 };
3378
3379 /**
3380 * @class baseclass
3381 * @hideconstructor
3382 * @memberof LuCI
3383 * @classdesc
3384 *
3385 * `LuCI.baseclass` is the abstract base class all LuCI classes inherit from.
3386 *
3387 * It provides simple means to create subclasses of given classes and
3388 * implements prototypal inheritance.
3389 */
3390 var superContext = {}, classIndex = 0, Class = Object.assign(function() {}, {
3391 /**
3392 * Extends this base class with the properties described in
3393 * `properties` and returns a new subclassed Class instance
3394 *
3395 * @memberof LuCI.baseclass
3396 *
3397 * @param {Object&lt;string, *>} properties
3398 * An object describing the properties to add to the new
3399 * subclass.
3400 *
3401 * @returns {LuCI.baseclass}
3402 * Returns a new LuCI.baseclass sublassed from this class, extended
3403 * by the given properties and with its prototype set to this base
3404 * class to enable inheritance. The resulting value represents a
3405 * class constructor and can be instantiated with `new`.
3406 */
3407 extend: function(properties) {
3408 var props = {
3409 __id__: { value: classIndex },
3410 __base__: { value: this.prototype },
3411 __name__: { value: properties.__name__ || 'anonymous' + classIndex++ }
3412 };
3413
3414 var ClassConstructor = function() {
3415 if (!(this instanceof ClassConstructor))
3416 throw new TypeError('Constructor must not be called without "new"');
3417
3418 if (Object.getPrototypeOf(this).hasOwnProperty('__init__')) {
3419 if (typeof(this.__init__) != 'function')
3420 throw new TypeError('Class __init__ member is not a function');
3421
3422 this.__init__.apply(this, arguments)
3423 }
3424 else {
3425 this.super('__init__', arguments);
3426 }
3427 };
3428
3429 for (var key in properties)
3430 if (!props[key] &amp;&amp; properties.hasOwnProperty(key))
3431 props[key] = { value: properties[key], writable: true };
3432
3433 ClassConstructor.prototype = Object.create(this.prototype, props);
3434 ClassConstructor.prototype.constructor = ClassConstructor;
3435 Object.assign(ClassConstructor, this);
3436 ClassConstructor.displayName = toCamelCase(props.__name__.value + 'Class');
3437
3438 return ClassConstructor;
3439 },
3440
3441 /**
3442 * Extends this base class with the properties described in
3443 * `properties`, instantiates the resulting subclass using
3444 * the additional optional arguments passed to this function
3445 * and returns the resulting subclassed Class instance.
3446 *
3447 * This function serves as a convenience shortcut for
3448 * {@link LuCI.baseclass.extend Class.extend()} and subsequent
3449 * `new`.
3450 *
3451 * @memberof LuCI.baseclass
3452 *
3453 * @param {Object&lt;string, *>} properties
3454 * An object describing the properties to add to the new
3455 * subclass.
3456 *
3457 * @param {...*} [new_args]
3458 * Specifies arguments to be passed to the subclass constructor
3459 * as-is in order to instantiate the new subclass.
3460 *
3461 * @returns {LuCI.baseclass}
3462 * Returns a new LuCI.baseclass instance extended by the given
3463 * properties with its prototype set to this base class to
3464 * enable inheritance.
3465 */
3466 singleton: function(properties /*, ... */) {
3467 return Class.extend(properties)
3468 .instantiate(Class.prototype.varargs(arguments, 1));
3469 },
3470
3471 /**
3472 * Calls the class constructor using `new` with the given argument
3473 * array being passed as variadic parameters to the constructor.
3474 *
3475 * @memberof LuCI.baseclass
3476 *
3477 * @param {Array&lt;*>} params
3478 * An array of arbitrary values which will be passed as arguments
3479 * to the constructor function.
3480 *
3481 * @param {...*} [new_args]
3482 * Specifies arguments to be passed to the subclass constructor
3483 * as-is in order to instantiate the new subclass.
3484 *
3485 * @returns {LuCI.baseclass}
3486 * Returns a new LuCI.baseclass instance extended by the given
3487 * properties with its prototype set to this base class to
3488 * enable inheritance.
3489 */
3490 instantiate: function(args) {
3491 return new (Function.prototype.bind.apply(this,
3492 Class.prototype.varargs(args, 0, null)))();
3493 },
3494
3495 /* unused */
3496 call: function(self, method) {
3497 if (typeof(this.prototype[method]) != 'function')
3498 throw new ReferenceError(method + ' is not defined in class');
3499
3500 return this.prototype[method].apply(self, self.varargs(arguments, 1));
3501 },
3502
3503 /**
3504 * Checks whether the given class value is a subclass of this class.
3505 *
3506 * @memberof LuCI.baseclass
3507 *
3508 * @param {LuCI.baseclass} classValue
3509 * The class object to test.
3510 *
3511 * @returns {boolean}
3512 * Returns `true` when the given `classValue` is a subclass of this
3513 * class or `false` if the given value is not a valid class or not
3514 * a subclass of this class'.
3515 */
3516 isSubclass: function(classValue) {
3517 return (classValue != null &amp;&amp;
3518 typeof(classValue) == 'function' &amp;&amp;
3519 classValue.prototype instanceof this);
3520 },
3521
3522 prototype: {
3523 /**
3524 * Extract all values from the given argument array beginning from
3525 * `offset` and prepend any further given optional parameters to
3526 * the beginning of the resulting array copy.
3527 *
3528 * @memberof LuCI.baseclass
3529 * @instance
3530 *
3531 * @param {Array&lt;*>} args
3532 * The array to extract the values from.
3533 *
3534 * @param {number} offset
3535 * The offset from which to extract the values. An offset of `0`
3536 * would copy all values till the end.
3537 *
3538 * @param {...*} [extra_args]
3539 * Extra arguments to add to prepend to the resultung array.
3540 *
3541 * @returns {Array&lt;*>}
3542 * Returns a new array consisting of the optional extra arguments
3543 * and the values extracted from the `args` array beginning with
3544 * `offset`.
3545 */
3546 varargs: function(args, offset /*, ... */) {
3547 return Array.prototype.slice.call(arguments, 2)
3548 .concat(Array.prototype.slice.call(args, offset));
3549 },
3550
3551 /**
3552 * Walks up the parent class chain and looks for a class member
3553 * called `key` in any of the parent classes this class inherits
3554 * from. Returns the member value of the superclass or calls the
3555 * member as function and returns its return value when the
3556 * optional `callArgs` array is given.
3557 *
3558 * This function has two signatures and is sensitive to the
3559 * amount of arguments passed to it:
3560 * - `super('key')` -
3561 * Returns the value of `key` when found within one of the
3562 * parent classes.
3563 * - `super('key', ['arg1', 'arg2'])` -
3564 * Calls the `key()` method with parameters `arg1` and `arg2`
3565 * when found within one of the parent classes.
3566 *
3567 * @memberof LuCI.baseclass
3568 * @instance
3569 *
3570 * @param {string} key
3571 * The name of the superclass member to retrieve.
3572 *
3573 * @param {Array&lt;*>} [callArgs]
3574 * An optional array of function call parameters to use. When
3575 * this parameter is specified, the found member value is called
3576 * as function using the values of this array as arguments.
3577 *
3578 * @throws {ReferenceError}
3579 * Throws a `ReferenceError` when `callArgs` are specified and
3580 * the found member named by `key` is not a function value.
3581 *
3582 * @returns {*|null}
3583 * Returns the value of the found member or the return value of
3584 * the call to the found method. Returns `null` when no member
3585 * was found in the parent class chain or when the call to the
3586 * superclass method returned `null`.
3587 */
3588 super: function(key, callArgs) {
3589 if (key == null)
3590 return null;
3591
3592 var slotIdx = this.__id__ + '.' + key,
3593 symStack = superContext[slotIdx],
3594 protoCtx = null;
3595
3596 for (protoCtx = Object.getPrototypeOf(symStack ? symStack[0] : Object.getPrototypeOf(this));
3597 protoCtx != null &amp;&amp; !protoCtx.hasOwnProperty(key);
3598 protoCtx = Object.getPrototypeOf(protoCtx)) {}
3599
3600 if (protoCtx == null)
3601 return null;
3602
3603 var res = protoCtx[key];
3604
3605 if (arguments.length > 1) {
3606 if (typeof(res) != 'function')
3607 throw new ReferenceError(key + ' is not a function in base class');
3608
3609 if (typeof(callArgs) != 'object')
3610 callArgs = this.varargs(arguments, 1);
3611
3612 if (symStack)
3613 symStack.unshift(protoCtx);
3614 else
3615 superContext[slotIdx] = [ protoCtx ];
3616
3617 res = res.apply(this, callArgs);
3618
3619 if (symStack &amp;&amp; symStack.length > 1)
3620 symStack.shift(protoCtx);
3621 else
3622 delete superContext[slotIdx];
3623 }
3624
3625 return res;
3626 },
3627
3628 /**
3629 * Returns a string representation of this class.
3630 *
3631 * @returns {string}
3632 * Returns a string representation of this class containing the
3633 * constructor functions `displayName` and describing the class
3634 * members and their respective types.
3635 */
3636 toString: function() {
3637 var s = '[' + this.constructor.displayName + ']', f = true;
3638 for (var k in this) {
3639 if (this.hasOwnProperty(k)) {
3640 s += (f ? ' {\n' : '') + ' ' + k + ': ' + typeof(this[k]) + '\n';
3641 f = false;
3642 }
3643 }
3644 return s + (f ? '' : '}');
3645 }
3646 }
3647 });
3648
3649
3650 /**
3651 * @class headers
3652 * @memberof LuCI
3653 * @hideconstructor
3654 * @classdesc
3655 *
3656 * The `Headers` class is an internal utility class exposed in HTTP
3657 * response objects using the `response.headers` property.
3658 */
3659 var Headers = Class.extend(/** @lends LuCI.headers.prototype */ {
3660 __name__: 'LuCI.headers',
3661 __init__: function(xhr) {
3662 var hdrs = this.headers = {};
3663 xhr.getAllResponseHeaders().split(/\r\n/).forEach(function(line) {
3664 var m = /^([^:]+):(.*)$/.exec(line);
3665 if (m != null)
3666 hdrs[m[1].trim().toLowerCase()] = m[2].trim();
3667 });
3668 },
3669
3670 /**
3671 * Checks whether the given header name is present.
3672 * Note: Header-Names are case-insensitive.
3673 *
3674 * @instance
3675 * @memberof LuCI.headers
3676 * @param {string} name
3677 * The header name to check
3678 *
3679 * @returns {boolean}
3680 * Returns `true` if the header name is present, `false` otherwise
3681 */
3682 has: function(name) {
3683 return this.headers.hasOwnProperty(String(name).toLowerCase());
3684 },
3685
3686 /**
3687 * Returns the value of the given header name.
3688 * Note: Header-Names are case-insensitive.
3689 *
3690 * @instance
3691 * @memberof LuCI.headers
3692 * @param {string} name
3693 * The header name to read
3694 *
3695 * @returns {string|null}
3696 * The value of the given header name or `null` if the header isn't present.
3697 */
3698 get: function(name) {
3699 var key = String(name).toLowerCase();
3700 return this.headers.hasOwnProperty(key) ? this.headers[key] : null;
3701 }
3702 });
3703
3704 /**
3705 * @class response
3706 * @memberof LuCI
3707 * @hideconstructor
3708 * @classdesc
3709 *
3710 * The `Response` class is an internal utility class representing HTTP responses.
3711 */
3712 var Response = Class.extend({
3713 __name__: 'LuCI.response',
3714 __init__: function(xhr, url, duration, headers, content) {
3715 /**
3716 * Describes whether the response is successful (status codes `200..299`) or not
3717 * @instance
3718 * @memberof LuCI.response
3719 * @name ok
3720 * @type {boolean}
3721 */
3722 this.ok = (xhr.status >= 200 &amp;&amp; xhr.status &lt;= 299);
3723
3724 /**
3725 * The numeric HTTP status code of the response
3726 * @instance
3727 * @memberof LuCI.response
3728 * @name status
3729 * @type {number}
3730 */
3731 this.status = xhr.status;
3732
3733 /**
3734 * The HTTP status description message of the response
3735 * @instance
3736 * @memberof LuCI.response
3737 * @name statusText
3738 * @type {string}
3739 */
3740 this.statusText = xhr.statusText;
3741
3742 /**
3743 * The HTTP headers of the response
3744 * @instance
3745 * @memberof LuCI.response
3746 * @name headers
3747 * @type {LuCI.headers}
3748 */
3749 this.headers = (headers != null) ? headers : new Headers(xhr);
3750
3751 /**
3752 * The total duration of the HTTP request in milliseconds
3753 * @instance
3754 * @memberof LuCI.response
3755 * @name duration
3756 * @type {number}
3757 */
3758 this.duration = duration;
3759
3760 /**
3761 * The final URL of the request, i.e. after following redirects.
3762 * @instance
3763 * @memberof LuCI.response
3764 * @name url
3765 * @type {string}
3766 */
3767 this.url = url;
3768
3769 /* privates */
3770 this.xhr = xhr;
3771
3772 if (content instanceof Blob) {
3773 this.responseBlob = content;
3774 this.responseJSON = null;
3775 this.responseText = null;
3776 }
3777 else if (content != null &amp;&amp; typeof(content) == 'object') {
3778 this.responseBlob = null;
3779 this.responseJSON = content;
3780 this.responseText = null;
3781 }
3782 else if (content != null) {
3783 this.responseBlob = null;
3784 this.responseJSON = null;
3785 this.responseText = String(content);
3786 }
3787 else {
3788 this.responseJSON = null;
3789
3790 if (xhr.responseType == 'blob') {
3791 this.responseBlob = xhr.response;
3792 this.responseText = null;
3793 }
3794 else {
3795 this.responseBlob = null;
3796 this.responseText = xhr.responseText;
3797 }
3798 }
3799 },
3800
3801 /**
3802 * Clones the given response object, optionally overriding the content
3803 * of the cloned instance.
3804 *
3805 * @instance
3806 * @memberof LuCI.response
3807 * @param {*} [content]
3808 * Override the content of the cloned response. Object values will be
3809 * treated as JSON response data, all other types will be converted
3810 * using `String()` and treated as response text.
3811 *
3812 * @returns {LuCI.response}
3813 * The cloned `Response` instance.
3814 */
3815 clone: function(content) {
3816 var copy = new Response(this.xhr, this.url, this.duration, this.headers, content);
3817
3818 copy.ok = this.ok;
3819 copy.status = this.status;
3820 copy.statusText = this.statusText;
3821
3822 return copy;
3823 },
3824
3825 /**
3826 * Access the response content as JSON data.
3827 *
3828 * @instance
3829 * @memberof LuCI.response
3830 * @throws {SyntaxError}
3831 * Throws `SyntaxError` if the content isn't valid JSON.
3832 *
3833 * @returns {*}
3834 * The parsed JSON data.
3835 */
3836 json: function() {
3837 if (this.responseJSON == null)
3838 this.responseJSON = JSON.parse(this.responseText);
3839
3840 return this.responseJSON;
3841 },
3842
3843 /**
3844 * Access the response content as string.
3845 *
3846 * @instance
3847 * @memberof LuCI.response
3848 * @returns {string}
3849 * The response content.
3850 */
3851 text: function() {
3852 if (this.responseText == null &amp;&amp; this.responseJSON != null)
3853 this.responseText = JSON.stringify(this.responseJSON);
3854
3855 return this.responseText;
3856 },
3857
3858 /**
3859 * Access the response content as blob.
3860 *
3861 * @instance
3862 * @memberof LuCI.response
3863 * @returns {Blob}
3864 * The response content as blob.
3865 */
3866 blob: function() {
3867 return this.responseBlob;
3868 }
3869 });
3870
3871
3872 var requestQueue = [];
3873
3874 function isQueueableRequest(opt) {
3875 if (!classes.rpc)
3876 return false;
3877
3878 if (opt.method != 'POST' || typeof(opt.content) != 'object')
3879 return false;
3880
3881 if (opt.nobatch === true)
3882 return false;
3883
3884 var rpcBaseURL = Request.expandURL(classes.rpc.getBaseURL());
3885
3886 return (rpcBaseURL != null &amp;&amp; opt.url.indexOf(rpcBaseURL) == 0);
3887 }
3888
3889 function flushRequestQueue() {
3890 if (!requestQueue.length)
3891 return;
3892
3893 var reqopt = Object.assign({}, requestQueue[0][0], { content: [], nobatch: true }),
3894 batch = [];
3895
3896 for (var i = 0; i &lt; requestQueue.length; i++) {
3897 batch[i] = requestQueue[i];
3898 reqopt.content[i] = batch[i][0].content;
3899 }
3900
3901 requestQueue.length = 0;
3902
3903 Request.request(rpcBaseURL, reqopt).then(function(reply) {
3904 var json = null, req = null;
3905
3906 try { json = reply.json() }
3907 catch(e) { }
3908
3909 while ((req = batch.shift()) != null)
3910 if (Array.isArray(json) &amp;&amp; json.length)
3911 req[2].call(reqopt, reply.clone(json.shift()));
3912 else
3913 req[1].call(reqopt, new Error('No related RPC reply'));
3914 }).catch(function(error) {
3915 var req = null;
3916
3917 while ((req = batch.shift()) != null)
3918 req[1].call(reqopt, error);
3919 });
3920 }
3921
3922 /**
3923 * @class request
3924 * @memberof LuCI
3925 * @hideconstructor
3926 * @classdesc
3927 *
3928 * The `Request` class allows initiating HTTP requests and provides utilities
3929 * for dealing with responses.
3930 */
3931 var Request = Class.singleton(/** @lends LuCI.request.prototype */ {
3932 __name__: 'LuCI.request',
3933
3934 interceptors: [],
3935
3936 /**
3937 * Turn the given relative URL into an absolute URL if necessary.
3938 *
3939 * @instance
3940 * @memberof LuCI.request
3941 * @param {string} url
3942 * The URL to convert.
3943 *
3944 * @returns {string}
3945 * The absolute URL derived from the given one, or the original URL
3946 * if it already was absolute.
3947 */
3948 expandURL: function(url) {
3949 if (!/^(?:[^/]+:)?\/\//.test(url))
3950 url = location.protocol + '//' + location.host + url;
3951
3952 return url;
3953 },
3954
3955 /**
3956 * @typedef {Object} RequestOptions
3957 * @memberof LuCI.request
3958 *
3959 * @property {string} [method=GET]
3960 * The HTTP method to use, e.g. `GET` or `POST`.
3961 *
3962 * @property {Object&lt;string, Object|string>} [query]
3963 * Query string data to append to the URL. Non-string values of the
3964 * given object will be converted to JSON.
3965 *
3966 * @property {boolean} [cache=false]
3967 * Specifies whether the HTTP response may be retrieved from cache.
3968 *
3969 * @property {string} [username]
3970 * Provides a username for HTTP basic authentication.
3971 *
3972 * @property {string} [password]
3973 * Provides a password for HTTP basic authentication.
3974 *
3975 * @property {number} [timeout]
3976 * Specifies the request timeout in seconds.
3977 *
3978 * @property {boolean} [credentials=false]
3979 * Whether to include credentials such as cookies in the request.
3980 *
3981 * @property {string} [responseType=text]
3982 * Overrides the request response type. Valid values or `text` to
3983 * interpret the response as UTF-8 string or `blob` to handle the
3984 * response as binary `Blob` data.
3985 *
3986 * @property {*} [content]
3987 * Specifies the HTTP message body to send along with the request.
3988 * If the value is a function, it is invoked and the return value
3989 * used as content, if it is a FormData instance, it is used as-is,
3990 * if it is an object, it will be converted to JSON, in all other
3991 * cases it is converted to a string.
3992 *
3993 * @property {Object&lt;string, string>} [header]
3994 * Specifies HTTP headers to set for the request.
3995 *
3996 * @property {function} [progress]
3997 * An optional request callback function which receives ProgressEvent
3998 * instances as sole argument during the HTTP request transfer.
3999 */
4000
4001 /**
4002 * Initiate an HTTP request to the given target.
4003 *
4004 * @instance
4005 * @memberof LuCI.request
4006 * @param {string} target
4007 * The URL to request.
4008 *
4009 * @param {LuCI.request.RequestOptions} [options]
4010 * Additional options to configure the request.
4011 *
4012 * @returns {Promise&lt;LuCI.response>}
4013 * The resulting HTTP response.
4014 */
4015 request: function(target, options) {
4016 var state = { xhr: new XMLHttpRequest(), url: this.expandURL(target), start: Date.now() },
4017 opt = Object.assign({}, options, state),
4018 content = null,
4019 contenttype = null,
4020 callback = this.handleReadyStateChange;
4021
4022 return new Promise(function(resolveFn, rejectFn) {
4023 opt.xhr.onreadystatechange = callback.bind(opt, resolveFn, rejectFn);
4024 opt.method = String(opt.method || 'GET').toUpperCase();
4025
4026 if ('query' in opt) {
4027 var q = (opt.query != null) ? Object.keys(opt.query).map(function(k) {
4028 if (opt.query[k] != null) {
4029 var v = (typeof(opt.query[k]) == 'object')
4030 ? JSON.stringify(opt.query[k])
4031 : String(opt.query[k]);
4032
4033 return '%s=%s'.format(encodeURIComponent(k), encodeURIComponent(v));
4034 }
4035 else {
4036 return encodeURIComponent(k);
4037 }
4038 }).join('&amp;') : '';
4039
4040 if (q !== '') {
4041 switch (opt.method) {
4042 case 'GET':
4043 case 'HEAD':
4044 case 'OPTIONS':
4045 opt.url += ((/\?/).test(opt.url) ? '&amp;' : '?') + q;
4046 break;
4047
4048 default:
4049 if (content == null) {
4050 content = q;
4051 contenttype = 'application/x-www-form-urlencoded';
4052 }
4053 }
4054 }
4055 }
4056
4057 if (!opt.cache)
4058 opt.url += ((/\?/).test(opt.url) ? '&amp;' : '?') + (new Date()).getTime();
4059
4060 if (isQueueableRequest(opt)) {
4061 requestQueue.push([opt, rejectFn, resolveFn]);
4062 requestAnimationFrame(flushRequestQueue);
4063 return;
4064 }
4065
4066 if ('username' in opt &amp;&amp; 'password' in opt)
4067 opt.xhr.open(opt.method, opt.url, true, opt.username, opt.password);
4068 else
4069 opt.xhr.open(opt.method, opt.url, true);
4070
4071 opt.xhr.responseType = opt.responseType || 'text';
4072
4073 if ('overrideMimeType' in opt.xhr)
4074 opt.xhr.overrideMimeType('application/octet-stream');
4075
4076 if ('timeout' in opt)
4077 opt.xhr.timeout = +opt.timeout;
4078
4079 if ('credentials' in opt)
4080 opt.xhr.withCredentials = !!opt.credentials;
4081
4082 if (opt.content != null) {
4083 switch (typeof(opt.content)) {
4084 case 'function':
4085 content = opt.content(xhr);
4086 break;
4087
4088 case 'object':
4089 if (!(opt.content instanceof FormData)) {
4090 content = JSON.stringify(opt.content);
4091 contenttype = 'application/json';
4092 }
4093 else {
4094 content = opt.content;
4095 }
4096 break;
4097
4098 default:
4099 content = String(opt.content);
4100 }
4101 }
4102
4103 if ('headers' in opt)
4104 for (var header in opt.headers)
4105 if (opt.headers.hasOwnProperty(header)) {
4106 if (header.toLowerCase() != 'content-type')
4107 opt.xhr.setRequestHeader(header, opt.headers[header]);
4108 else
4109 contenttype = opt.headers[header];
4110 }
4111
4112 if ('progress' in opt &amp;&amp; 'upload' in opt.xhr)
4113 opt.xhr.upload.addEventListener('progress', opt.progress);
4114
4115 if (contenttype != null)
4116 opt.xhr.setRequestHeader('Content-Type', contenttype);
4117
4118 try {
4119 opt.xhr.send(content);
4120 }
4121 catch (e) {
4122 rejectFn.call(opt, e);
4123 }
4124 });
4125 },
4126
4127 handleReadyStateChange: function(resolveFn, rejectFn, ev) {
4128 var xhr = this.xhr,
4129 duration = Date.now() - this.start;
4130
4131 if (xhr.readyState !== 4)
4132 return;
4133
4134 if (xhr.status === 0 &amp;&amp; xhr.statusText === '') {
4135 if (duration >= this.timeout)
4136 rejectFn.call(this, new Error('XHR request timed out'));
4137 else
4138 rejectFn.call(this, new Error('XHR request aborted by browser'));
4139 }
4140 else {
4141 var response = new Response(
4142 xhr, xhr.responseURL || this.url, duration);
4143
4144 Promise.all(Request.interceptors.map(function(fn) { return fn(response) }))
4145 .then(resolveFn.bind(this, response))
4146 .catch(rejectFn.bind(this));
4147 }
4148 },
4149
4150 /**
4151 * Initiate an HTTP GET request to the given target.
4152 *
4153 * @instance
4154 * @memberof LuCI.request
4155 * @param {string} target
4156 * The URL to request.
4157 *
4158 * @param {LuCI.request.RequestOptions} [options]
4159 * Additional options to configure the request.
4160 *
4161 * @returns {Promise&lt;LuCI.response>}
4162 * The resulting HTTP response.
4163 */
4164 get: function(url, options) {
4165 return this.request(url, Object.assign({ method: 'GET' }, options));
4166 },
4167
4168 /**
4169 * Initiate an HTTP POST request to the given target.
4170 *
4171 * @instance
4172 * @memberof LuCI.request
4173 * @param {string} target
4174 * The URL to request.
4175 *
4176 * @param {*} [data]
4177 * The request data to send, see {@link LuCI.request.RequestOptions} for details.
4178 *
4179 * @param {LuCI.request.RequestOptions} [options]
4180 * Additional options to configure the request.
4181 *
4182 * @returns {Promise&lt;LuCI.response>}
4183 * The resulting HTTP response.
4184 */
4185 post: function(url, data, options) {
4186 return this.request(url, Object.assign({ method: 'POST', content: data }, options));
4187 },
4188
4189 /**
4190 * Interceptor functions are invoked whenever an HTTP reply is received, in the order
4191 * these functions have been registered.
4192 * @callback LuCI.request.interceptorFn
4193 * @param {LuCI.response} res
4194 * The HTTP response object
4195 */
4196
4197 /**
4198 * Register an HTTP response interceptor function. Interceptor
4199 * functions are useful to perform default actions on incoming HTTP
4200 * responses, such as checking for expired authentication or for
4201 * implementing request retries before returning a failure.
4202 *
4203 * @instance
4204 * @memberof LuCI.request
4205 * @param {LuCI.request.interceptorFn} interceptorFn
4206 * The interceptor function to register.
4207 *
4208 * @returns {LuCI.request.interceptorFn}
4209 * The registered function.
4210 */
4211 addInterceptor: function(interceptorFn) {
4212 if (typeof(interceptorFn) == 'function')
4213 this.interceptors.push(interceptorFn);
4214 return interceptorFn;
4215 },
4216
4217 /**
4218 * Remove an HTTP response interceptor function. The passed function
4219 * value must be the very same value that was used to register the
4220 * function.
4221 *
4222 * @instance
4223 * @memberof LuCI.request
4224 * @param {LuCI.request.interceptorFn} interceptorFn
4225 * The interceptor function to remove.
4226 *
4227 * @returns {boolean}
4228 * Returns `true` if any function has been removed, else `false`.
4229 */
4230 removeInterceptor: function(interceptorFn) {
4231 var oldlen = this.interceptors.length, i = oldlen;
4232 while (i--)
4233 if (this.interceptors[i] === interceptorFn)
4234 this.interceptors.splice(i, 1);
4235 return (this.interceptors.length &lt; oldlen);
4236 },
4237
4238 /**
4239 * @class
4240 * @memberof LuCI.request
4241 * @hideconstructor
4242 * @classdesc
4243 *
4244 * The `Request.poll` class provides some convience wrappers around
4245 * {@link LuCI.poll} mainly to simplify registering repeating HTTP
4246 * request calls as polling functions.
4247 */
4248 poll: {
4249 /**
4250 * The callback function is invoked whenever an HTTP reply to a
4251 * polled request is received or when the polled request timed
4252 * out.
4253 *
4254 * @callback LuCI.request.poll~callbackFn
4255 * @param {LuCI.response} res
4256 * The HTTP response object.
4257 *
4258 * @param {*} data
4259 * The response JSON if the response could be parsed as such,
4260 * else `null`.
4261 *
4262 * @param {number} duration
4263 * The total duration of the request in milliseconds.
4264 */
4265
4266 /**
4267 * Register a repeating HTTP request with an optional callback
4268 * to invoke whenever a response for the request is received.
4269 *
4270 * @instance
4271 * @memberof LuCI.request.poll
4272 * @param {number} interval
4273 * The poll interval in seconds.
4274 *
4275 * @param {string} url
4276 * The URL to request on each poll.
4277 *
4278 * @param {LuCI.request.RequestOptions} [options]
4279 * Additional options to configure the request.
4280 *
4281 * @param {LuCI.request.poll~callbackFn} [callback]
4282 * {@link LuCI.request.poll~callbackFn Callback} function to
4283 * invoke for each HTTP reply.
4284 *
4285 * @throws {TypeError}
4286 * Throws `TypeError` when an invalid interval was passed.
4287 *
4288 * @returns {function}
4289 * Returns the internally created poll function.
4290 */
4291 add: function(interval, url, options, callback) {
4292 if (isNaN(interval) || interval &lt;= 0)
4293 throw new TypeError('Invalid poll interval');
4294
4295 var ival = interval >>> 0,
4296 opts = Object.assign({}, options, { timeout: ival * 1000 - 5 });
4297
4298 var fn = function() {
4299 return Request.request(url, options).then(function(res) {
4300 if (!Poll.active())
4301 return;
4302
4303 try {
4304 callback(res, res.json(), res.duration);
4305 }
4306 catch (err) {
4307 callback(res, null, res.duration);
4308 }
4309 });
4310 };
4311
4312 return (Poll.add(fn, ival) ? fn : null);
4313 },
4314
4315 /**
4316 * Remove a polling request that has been previously added using `add()`.
4317 * This function is essentially a wrapper around
4318 * {@link LuCI.poll.remove LuCI.poll.remove()}.
4319 *
4320 * @instance
4321 * @memberof LuCI.request.poll
4322 * @param {function} entry
4323 * The poll function returned by {@link LuCI.request.poll#add add()}.
4324 *
4325 * @returns {boolean}
4326 * Returns `true` if any function has been removed, else `false`.
4327 */
4328 remove: function(entry) { return Poll.remove(entry) },
4329
4330 /**
4331 * Alias for {@link LuCI.poll.start LuCI.poll.start()}.
4332 *
4333 * @instance
4334 * @memberof LuCI.request.poll
4335 */
4336 start: function() { return Poll.start() },
4337
4338 /**
4339 * Alias for {@link LuCI.poll.stop LuCI.poll.stop()}.
4340 *
4341 * @instance
4342 * @memberof LuCI.request.poll
4343 */
4344 stop: function() { return Poll.stop() },
4345
4346 /**
4347 * Alias for {@link LuCI.poll.active LuCI.poll.active()}.
4348 *
4349 * @instance
4350 * @memberof LuCI.request.poll
4351 */
4352 active: function() { return Poll.active() }
4353 }
4354 });
4355
4356 /**
4357 * @class poll
4358 * @memberof LuCI
4359 * @hideconstructor
4360 * @classdesc
4361 *
4362 * The `Poll` class allows registering and unregistering poll actions,
4363 * as well as starting, stopping and querying the state of the polling
4364 * loop.
4365 */
4366 var Poll = Class.singleton(/** @lends LuCI.poll.prototype */ {
4367 __name__: 'LuCI.poll',
4368
4369 queue: [],
4370
4371 /**
4372 * Add a new operation to the polling loop. If the polling loop is not
4373 * already started at this point, it will be implicitely started.
4374 *
4375 * @instance
4376 * @memberof LuCI.poll
4377 * @param {function} fn
4378 * The function to invoke on each poll interval.
4379 *
4380 * @param {number} interval
4381 * The poll interval in seconds.
4382 *
4383 * @throws {TypeError}
4384 * Throws `TypeError` when an invalid interval was passed.
4385 *
4386 * @returns {boolean}
4387 * Returns `true` if the function has been added or `false` if it
4388 * already is registered.
4389 */
4390 add: function(fn, interval) {
4391 if (interval == null || interval &lt;= 0)
4392 interval = env.pollinterval || null;
4393
4394 if (isNaN(interval) || typeof(fn) != 'function')
4395 throw new TypeError('Invalid argument to LuCI.poll.add()');
4396
4397 for (var i = 0; i &lt; this.queue.length; i++)
4398 if (this.queue[i].fn === fn)
4399 return false;
4400
4401 var e = {
4402 r: true,
4403 i: interval >>> 0,
4404 fn: fn
4405 };
4406
4407 this.queue.push(e);
4408
4409 if (this.tick != null &amp;&amp; !this.active())
4410 this.start();
4411
4412 return true;
4413 },
4414
4415 /**
4416 * Remove an operation from the polling loop. If no further operatons
4417 * are registered, the polling loop is implicitely stopped.
4418 *
4419 * @instance
4420 * @memberof LuCI.poll
4421 * @param {function} fn
4422 * The function to remove.
4423 *
4424 * @throws {TypeError}
4425 * Throws `TypeError` when the given argument isn't a function.
4426 *
4427 * @returns {boolean}
4428 * Returns `true` if the function has been removed or `false` if it
4429 * wasn't found.
4430 */
4431 remove: function(fn) {
4432 if (typeof(fn) != 'function')
4433 throw new TypeError('Invalid argument to LuCI.poll.remove()');
4434
4435 var len = this.queue.length;
4436
4437 for (var i = len; i > 0; i--)
4438 if (this.queue[i-1].fn === fn)
4439 this.queue.splice(i-1, 1);
4440
4441 if (!this.queue.length &amp;&amp; this.stop())
4442 this.tick = 0;
4443
4444 return (this.queue.length != len);
4445 },
4446
4447 /**
4448 * (Re)start the polling loop. Dispatches a custom `poll-start` event
4449 * to the `document` object upon successful start.
4450 *
4451 * @instance
4452 * @memberof LuCI.poll
4453 * @returns {boolean}
4454 * Returns `true` if polling has been started (or if no functions
4455 * where registered) or `false` when the polling loop already runs.
4456 */
4457 start: function() {
4458 if (this.active())
4459 return false;
4460
4461 this.tick = 0;
4462
4463 if (this.queue.length) {
4464 this.timer = window.setInterval(this.step, 1000);
4465 this.step();
4466 document.dispatchEvent(new CustomEvent('poll-start'));
4467 }
4468
4469 return true;
4470 },
4471
4472 /**
4473 * Stop the polling loop. Dispatches a custom `poll-stop` event
4474 * to the `document` object upon successful stop.
4475 *
4476 * @instance
4477 * @memberof LuCI.poll
4478 * @returns {boolean}
4479 * Returns `true` if polling has been stopped or `false` if it din't
4480 * run to begin with.
4481 */
4482 stop: function() {
4483 if (!this.active())
4484 return false;
4485
4486 document.dispatchEvent(new CustomEvent('poll-stop'));
4487 window.clearInterval(this.timer);
4488 delete this.timer;
4489 delete this.tick;
4490 return true;
4491 },
4492
4493 /* private */
4494 step: function() {
4495 for (var i = 0, e = null; (e = Poll.queue[i]) != null; i++) {
4496 if ((Poll.tick % e.i) != 0)
4497 continue;
4498
4499 if (!e.r)
4500 continue;
4501
4502 e.r = false;
4503
4504 Promise.resolve(e.fn()).finally((function() { this.r = true }).bind(e));
4505 }
4506
4507 Poll.tick = (Poll.tick + 1) % Math.pow(2, 32);
4508 },
4509
4510 /**
4511 * Test whether the polling loop is running.
4512 *
4513 * @instance
4514 * @memberof LuCI.poll
4515 * @returns {boolean} - Returns `true` if polling is active, else `false`.
4516 */
4517 active: function() {
4518 return (this.timer != null);
4519 }
4520 });
4521
4522 /**
4523 * @class dom
4524 * @memberof LuCI
4525 * @hideconstructor
4526 * @classdesc
4527 *
4528 * The `dom` class provides convenience method for creating and
4529 * manipulating DOM elements.
4530 *
4531 * To import the class in views, use `'require dom'`, to import it in
4532 * external JavaScript, use `L.require("dom").then(...)`.
4533 */
4534 var DOM = Class.singleton(/** @lends LuCI.dom.prototype */ {
4535 __name__: 'LuCI.dom',
4536
4537 /**
4538 * Tests whether the given argument is a valid DOM `Node`.
4539 *
4540 * @instance
4541 * @memberof LuCI.dom
4542 * @param {*} e
4543 * The value to test.
4544 *
4545 * @returns {boolean}
4546 * Returns `true` if the value is a DOM `Node`, else `false`.
4547 */
4548 elem: function(e) {
4549 return (e != null &amp;&amp; typeof(e) == 'object' &amp;&amp; 'nodeType' in e);
4550 },
4551
4552 /**
4553 * Parses a given string as HTML and returns the first child node.
4554 *
4555 * @instance
4556 * @memberof LuCI.dom
4557 * @param {string} s
4558 * A string containing an HTML fragment to parse. Note that only
4559 * the first result of the resulting structure is returned, so an
4560 * input value of `&lt;div>foo&lt;/div> &lt;div>bar&lt;/div>` will only return
4561 * the first `div` element node.
4562 *
4563 * @returns {Node}
4564 * Returns the first DOM `Node` extracted from the HTML fragment or
4565 * `null` on parsing failures or if no element could be found.
4566 */
4567 parse: function(s) {
4568 var elem;
4569
4570 try {
4571 domParser = domParser || new DOMParser();
4572 elem = domParser.parseFromString(s, 'text/html').body.firstChild;
4573 }
4574 catch(e) {}
4575
4576 if (!elem) {
4577 try {
4578 dummyElem = dummyElem || document.createElement('div');
4579 dummyElem.innerHTML = s;
4580 elem = dummyElem.firstChild;
4581 }
4582 catch (e) {}
4583 }
4584
4585 return elem || null;
4586 },
4587
4588 /**
4589 * Tests whether a given `Node` matches the given query selector.
4590 *
4591 * This function is a convenience wrapper around the standard
4592 * `Node.matches("selector")` function with the added benefit that
4593 * the `node` argument may be a non-`Node` value, in which case
4594 * this function simply returns `false`.
4595 *
4596 * @instance
4597 * @memberof LuCI.dom
4598 * @param {*} node
4599 * The `Node` argument to test the selector against.
4600 *
4601 * @param {string} [selector]
4602 * The query selector expression to test against the given node.
4603 *
4604 * @returns {boolean}
4605 * Returns `true` if the given node matches the specified selector
4606 * or `false` when the node argument is no valid DOM `Node` or the
4607 * selector didn't match.
4608 */
4609 matches: function(node, selector) {
4610 var m = this.elem(node) ? node.matches || node.msMatchesSelector : null;
4611 return m ? m.call(node, selector) : false;
4612 },
4613
4614 /**
4615 * Returns the closest parent node that matches the given query
4616 * selector expression.
4617 *
4618 * This function is a convenience wrapper around the standard
4619 * `Node.closest("selector")` function with the added benefit that
4620 * the `node` argument may be a non-`Node` value, in which case
4621 * this function simply returns `null`.
4622 *
4623 * @instance
4624 * @memberof LuCI.dom
4625 * @param {*} node
4626 * The `Node` argument to find the closest parent for.
4627 *
4628 * @param {string} [selector]
4629 * The query selector expression to test against each parent.
4630 *
4631 * @returns {Node|null}
4632 * Returns the closest parent node matching the selector or
4633 * `null` when the node argument is no valid DOM `Node` or the
4634 * selector didn't match any parent.
4635 */
4636 parent: function(node, selector) {
4637 if (this.elem(node) &amp;&amp; node.closest)
4638 return node.closest(selector);
4639
4640 while (this.elem(node))
4641 if (this.matches(node, selector))
4642 return node;
4643 else
4644 node = node.parentNode;
4645
4646 return null;
4647 },
4648
4649 /**
4650 * Appends the given children data to the given node.
4651 *
4652 * @instance
4653 * @memberof LuCI.dom
4654 * @param {*} node
4655 * The `Node` argument to append the children to.
4656 *
4657 * @param {*} [children]
4658 * The childrens to append to the given node.
4659 *
4660 * When `children` is an array, then each item of the array
4661 * will be either appended as child element or text node,
4662 * depending on whether the item is a DOM `Node` instance or
4663 * some other non-`null` value. Non-`Node`, non-`null` values
4664 * will be converted to strings first before being passed as
4665 * argument to `createTextNode()`.
4666 *
4667 * When `children` is a function, it will be invoked with
4668 * the passed `node` argument as sole parameter and the `append`
4669 * function will be invoked again, with the given `node` argument
4670 * as first and the return value of the `children` function as
4671 * second parameter.
4672 *
4673 * When `children` is is a DOM `Node` instance, it will be
4674 * appended to the given `node`.
4675 *
4676 * When `children` is any other non-`null` value, it will be
4677 * converted to a string and appened to the `innerHTML` property
4678 * of the given `node`.
4679 *
4680 * @returns {Node|null}
4681 * Returns the last children `Node` appended to the node or `null`
4682 * if either the `node` argument was no valid DOM `node` or if the
4683 * `children` was `null` or didn't result in further DOM nodes.
4684 */
4685 append: function(node, children) {
4686 if (!this.elem(node))
4687 return null;
4688
4689 if (Array.isArray(children)) {
4690 for (var i = 0; i &lt; children.length; i++)
4691 if (this.elem(children[i]))
4692 node.appendChild(children[i]);
4693 else if (children !== null &amp;&amp; children !== undefined)
4694 node.appendChild(document.createTextNode('' + children[i]));
4695
4696 return node.lastChild;
4697 }
4698 else if (typeof(children) === 'function') {
4699 return this.append(node, children(node));
4700 }
4701 else if (this.elem(children)) {
4702 return node.appendChild(children);
4703 }
4704 else if (children !== null &amp;&amp; children !== undefined) {
4705 node.innerHTML = '' + children;
4706 return node.lastChild;
4707 }
4708
4709 return null;
4710 },
4711
4712 /**
4713 * Replaces the content of the given node with the given children.
4714 *
4715 * This function first removes any children of the given DOM
4716 * `Node` and then adds the given given children following the
4717 * rules outlined below.
4718 *
4719 * @instance
4720 * @memberof LuCI.dom
4721 * @param {*} node
4722 * The `Node` argument to replace the children of.
4723 *
4724 * @param {*} [children]
4725 * The childrens to replace into the given node.
4726 *
4727 * When `children` is an array, then each item of the array
4728 * will be either appended as child element or text node,
4729 * depending on whether the item is a DOM `Node` instance or
4730 * some other non-`null` value. Non-`Node`, non-`null` values
4731 * will be converted to strings first before being passed as
4732 * argument to `createTextNode()`.
4733 *
4734 * When `children` is a function, it will be invoked with
4735 * the passed `node` argument as sole parameter and the `append`
4736 * function will be invoked again, with the given `node` argument
4737 * as first and the return value of the `children` function as
4738 * second parameter.
4739 *
4740 * When `children` is is a DOM `Node` instance, it will be
4741 * appended to the given `node`.
4742 *
4743 * When `children` is any other non-`null` value, it will be
4744 * converted to a string and appened to the `innerHTML` property
4745 * of the given `node`.
4746 *
4747 * @returns {Node|null}
4748 * Returns the last children `Node` appended to the node or `null`
4749 * if either the `node` argument was no valid DOM `node` or if the
4750 * `children` was `null` or didn't result in further DOM nodes.
4751 */
4752 content: function(node, children) {
4753 if (!this.elem(node))
4754 return null;
4755
4756 var dataNodes = node.querySelectorAll('[data-idref]');
4757
4758 for (var i = 0; i &lt; dataNodes.length; i++)
4759 delete this.registry[dataNodes[i].getAttribute('data-idref')];
4760
4761 while (node.firstChild)
4762 node.removeChild(node.firstChild);
4763
4764 return this.append(node, children);
4765 },
4766
4767 /**
4768 * Sets attributes or registers event listeners on element nodes.
4769 *
4770 * @instance
4771 * @memberof LuCI.dom
4772 * @param {*} node
4773 * The `Node` argument to set the attributes or add the event
4774 * listeners for. When the given `node` value is not a valid
4775 * DOM `Node`, the function returns and does nothing.
4776 *
4777 * @param {string|Object&lt;string, *>} key
4778 * Specifies either the attribute or event handler name to use,
4779 * or an object containing multiple key, value pairs which are
4780 * each added to the node as either attribute or event handler,
4781 * depending on the respective value.
4782 *
4783 * @param {*} [val]
4784 * Specifies the attribute value or event handler function to add.
4785 * If the `key` parameter is an `Object`, this parameter will be
4786 * ignored.
4787 *
4788 * When `val` is of type function, it will be registered as event
4789 * handler on the given `node` with the `key` parameter being the
4790 * event name.
4791 *
4792 * When `val` is of type object, it will be serialized as JSON and
4793 * added as attribute to the given `node`, using the given `key`
4794 * as attribute name.
4795 *
4796 * When `val` is of any other type, it will be added as attribute
4797 * to the given `node` as-is, with the underlying `setAttribute()`
4798 * call implicitely turning it into a string.
4799 */
4800 attr: function(node, key, val) {
4801 if (!this.elem(node))
4802 return null;
4803
4804 var attr = null;
4805
4806 if (typeof(key) === 'object' &amp;&amp; key !== null)
4807 attr = key;
4808 else if (typeof(key) === 'string')
4809 attr = {}, attr[key] = val;
4810
4811 for (key in attr) {
4812 if (!attr.hasOwnProperty(key) || attr[key] == null)
4813 continue;
4814
4815 switch (typeof(attr[key])) {
4816 case 'function':
4817 node.addEventListener(key, attr[key]);
4818 break;
4819
4820 case 'object':
4821 node.setAttribute(key, JSON.stringify(attr[key]));
4822 break;
4823
4824 default:
4825 node.setAttribute(key, attr[key]);
4826 }
4827 }
4828 },
4829
4830 /**
4831 * Creates a new DOM `Node` from the given `html`, `attr` and
4832 * `data` parameters.
4833 *
4834 * This function has multiple signatures, it can be either invoked
4835 * in the form `create(html[, attr[, data]])` or in the form
4836 * `create(html[, data])`. The used variant is determined from the
4837 * type of the second argument.
4838 *
4839 * @instance
4840 * @memberof LuCI.dom
4841 * @param {*} html
4842 * Describes the node to create.
4843 *
4844 * When the value of `html` is of type array, a `DocumentFragment`
4845 * node is created and each item of the array is first converted
4846 * to a DOM `Node` by passing it through `create()` and then added
4847 * as child to the fragment.
4848 *
4849 * When the value of `html` is a DOM `Node` instance, no new
4850 * element will be created but the node will be used as-is.
4851 *
4852 * When the value of `html` is a string starting with `&lt;`, it will
4853 * be passed to `dom.parse()` and the resulting value is used.
4854 *
4855 * When the value of `html` is any other string, it will be passed
4856 * to `document.createElement()` for creating a new DOM `Node` of
4857 * the given name.
4858 *
4859 * @param {Object&lt;string, *>} [attr]
4860 * Specifies an Object of key, value pairs to set as attributes
4861 * or event handlers on the created node. Refer to
4862 * {@link LuCI.dom#attr dom.attr()} for details.
4863 *
4864 * @param {*} [data]
4865 * Specifies children to append to the newly created element.
4866 * Refer to {@link LuCI.dom#append dom.append()} for details.
4867 *
4868 * @throws {InvalidCharacterError}
4869 * Throws an `InvalidCharacterError` when the given `html`
4870 * argument contained malformed markup (such as not escaped
4871 * `&amp;` characters in XHTML mode) or when the given node name
4872 * in `html` contains characters which are not legal in DOM
4873 * element names, such as spaces.
4874 *
4875 * @returns {Node}
4876 * Returns the newly created `Node`.
4877 */
4878 create: function() {
4879 var html = arguments[0],
4880 attr = arguments[1],
4881 data = arguments[2],
4882 elem;
4883
4884 if (!(attr instanceof Object) || Array.isArray(attr))
4885 data = attr, attr = null;
4886
4887 if (Array.isArray(html)) {
4888 elem = document.createDocumentFragment();
4889 for (var i = 0; i &lt; html.length; i++)
4890 elem.appendChild(this.create(html[i]));
4891 }
4892 else if (this.elem(html)) {
4893 elem = html;
4894 }
4895 else if (html.charCodeAt(0) === 60) {
4896 elem = this.parse(html);
4897 }
4898 else {
4899 elem = document.createElement(html);
4900 }
4901
4902 if (!elem)
4903 return null;
4904
4905 this.attr(elem, attr);
4906 this.append(elem, data);
4907
4908 return elem;
4909 },
4910
4911 registry: {},
4912
4913 /**
4914 * Attaches or detaches arbitrary data to and from a DOM `Node`.
4915 *
4916 * This function is useful to attach non-string values or runtime
4917 * data that is not serializable to DOM nodes. To decouple data
4918 * from the DOM, values are not added directly to nodes, but
4919 * inserted into a registry instead which is then referenced by a
4920 * string key stored as `data-idref` attribute in the node.
4921 *
4922 * This function has multiple signatures and is sensitive to the
4923 * number of arguments passed to it.
4924 *
4925 * - `dom.data(node)` -
4926 * Fetches all data associated with the given node.
4927 * - `dom.data(node, key)` -
4928 * Fetches a specific key associated with the given node.
4929 * - `dom.data(node, key, val)` -
4930 * Sets a specific key to the given value associated with the
4931 * given node.
4932 * - `dom.data(node, null)` -
4933 * Clears any data associated with the node.
4934 * - `dom.data(node, key, null)` -
4935 * Clears the given key associated with the node.
4936 *
4937 * @instance
4938 * @memberof LuCI.dom
4939 * @param {Node} node
4940 * The DOM `Node` instance to set or retrieve the data for.
4941 *
4942 * @param {string|null} [key]
4943 * This is either a string specifying the key to retrieve, or
4944 * `null` to unset the entire node data.
4945 *
4946 * @param {*|null} [val]
4947 * This is either a non-`null` value to set for a given key or
4948 * `null` to remove the given `key` from the specified node.
4949 *
4950 * @returns {*}
4951 * Returns the get or set value, or `null` when no value could
4952 * be found.
4953 */
4954 data: function(node, key, val) {
4955 if (!node || !node.getAttribute)
4956 return null;
4957
4958 var id = node.getAttribute('data-idref');
4959
4960 /* clear all data */
4961 if (arguments.length > 1 &amp;&amp; key == null) {
4962 if (id != null) {
4963 node.removeAttribute('data-idref');
4964 val = this.registry[id]
4965 delete this.registry[id];
4966 return val;
4967 }
4968
4969 return null;
4970 }
4971
4972 /* clear a key */
4973 else if (arguments.length > 2 &amp;&amp; key != null &amp;&amp; val == null) {
4974 if (id != null) {
4975 val = this.registry[id][key];
4976 delete this.registry[id][key];
4977 return val;
4978 }
4979
4980 return null;
4981 }
4982
4983 /* set a key */
4984 else if (arguments.length > 2 &amp;&amp; key != null &amp;&amp; val != null) {
4985 if (id == null) {
4986 do { id = Math.floor(Math.random() * 0xffffffff).toString(16) }
4987 while (this.registry.hasOwnProperty(id));
4988
4989 node.setAttribute('data-idref', id);
4990 this.registry[id] = {};
4991 }
4992
4993 return (this.registry[id][key] = val);
4994 }
4995
4996 /* get all data */
4997 else if (arguments.length == 1) {
4998 if (id != null)
4999 return this.registry[id];
5000
5001 return null;
5002 }
5003
5004 /* get a key */
5005 else if (arguments.length == 2) {
5006 if (id != null)
5007 return this.registry[id][key];
5008 }
5009
5010 return null;
5011 },
5012
5013 /**
5014 * Binds the given class instance ot the specified DOM `Node`.
5015 *
5016 * This function uses the `dom.data()` facility to attach the
5017 * passed instance of a Class to a node. This is needed for
5018 * complex widget elements or similar where the corresponding
5019 * class instance responsible for the element must be retrieved
5020 * from DOM nodes obtained by `querySelector()` or similar means.
5021 *
5022 * @instance
5023 * @memberof LuCI.dom
5024 * @param {Node} node
5025 * The DOM `Node` instance to bind the class to.
5026 *
5027 * @param {Class} inst
5028 * The Class instance to bind to the node.
5029 *
5030 * @throws {TypeError}
5031 * Throws a `TypeError` when the given instance argument isn't
5032 * a valid Class instance.
5033 *
5034 * @returns {Class}
5035 * Returns the bound class instance.
5036 */
5037 bindClassInstance: function(node, inst) {
5038 if (!(inst instanceof Class))
5039 LuCI.prototype.error('TypeError', 'Argument must be a class instance');
5040
5041 return this.data(node, '_class', inst);
5042 },
5043
5044 /**
5045 * Finds a bound class instance on the given node itself or the
5046 * first bound instance on its closest parent node.
5047 *
5048 * @instance
5049 * @memberof LuCI.dom
5050 * @param {Node} node
5051 * The DOM `Node` instance to start from.
5052 *
5053 * @returns {Class|null}
5054 * Returns the founds class instance if any or `null` if no bound
5055 * class could be found on the node itself or any of its parents.
5056 */
5057 findClassInstance: function(node) {
5058 var inst = null;
5059
5060 do {
5061 inst = this.data(node, '_class');
5062 node = node.parentNode;
5063 }
5064 while (!(inst instanceof Class) &amp;&amp; node != null);
5065
5066 return inst;
5067 },
5068
5069 /**
5070 * Finds a bound class instance on the given node itself or the
5071 * first bound instance on its closest parent node and invokes
5072 * the specified method name on the found class instance.
5073 *
5074 * @instance
5075 * @memberof LuCI.dom
5076 * @param {Node} node
5077 * The DOM `Node` instance to start from.
5078 *
5079 * @param {string} method
5080 * The name of the method to invoke on the found class instance.
5081 *
5082 * @param {...*} params
5083 * Additional arguments to pass to the invoked method as-is.
5084 *
5085 * @returns {*|null}
5086 * Returns the return value of the invoked method if a class
5087 * instance and method has been found. Returns `null` if either
5088 * no bound class instance could be found, or if the found
5089 * instance didn't have the requested `method`.
5090 */
5091 callClassMethod: function(node, method /*, ... */) {
5092 var inst = this.findClassInstance(node);
5093
5094 if (inst == null || typeof(inst[method]) != 'function')
5095 return null;
5096
5097 return inst[method].apply(inst, inst.varargs(arguments, 2));
5098 },
5099
5100 /**
5101 * The ignore callback function is invoked by `isEmpty()` for each
5102 * child node to decide whether to ignore a child node or not.
5103 *
5104 * When this function returns `false`, the node passed to it is
5105 * ignored, else not.
5106 *
5107 * @callback LuCI.dom~ignoreCallbackFn
5108 * @param {Node} node
5109 * The child node to test.
5110 *
5111 * @returns {boolean}
5112 * Boolean indicating whether to ignore the node or not.
5113 */
5114
5115 /**
5116 * Tests whether a given DOM `Node` instance is empty or appears
5117 * empty.
5118 *
5119 * Any element child nodes which have the CSS class `hidden` set
5120 * or for which the optionally passed `ignoreFn` callback function
5121 * returns `false` are ignored.
5122 *
5123 * @instance
5124 * @memberof LuCI.dom
5125 * @param {Node} node
5126 * The DOM `Node` instance to test.
5127 *
5128 * @param {LuCI.dom~ignoreCallbackFn} [ignoreFn]
5129 * Specifies an optional function which is invoked for each child
5130 * node to decide whether the child node should be ignored or not.
5131 *
5132 * @returns {boolean}
5133 * Returns `true` if the node does not have any children or if
5134 * any children node either has a `hidden` CSS class or a `false`
5135 * result when testing it using the given `ignoreFn`.
5136 */
5137 isEmpty: function(node, ignoreFn) {
5138 for (var child = node.firstElementChild; child != null; child = child.nextElementSibling)
5139 if (!child.classList.contains('hidden') &amp;&amp; (!ignoreFn || !ignoreFn(child)))
5140 return false;
5141
5142 return true;
5143 }
5144 });
5145
5146 /**
5147 * @class session
5148 * @memberof LuCI
5149 * @hideconstructor
5150 * @classdesc
5151 *
5152 * The `session` class provides various session related functionality.
5153 */
5154 var Session = Class.singleton(/** @lends LuCI.session.prototype */ {
5155 __name__: 'LuCI.session',
5156
5157 /**
5158 * Retrieve the current session ID.
5159 *
5160 * @returns {string}
5161 * Returns the current session ID.
5162 */
5163 getID: function() {
5164 return env.sessionid || '00000000000000000000000000000000';
5165 },
5166
5167 /**
5168 * Retrieve data from the local session storage.
5169 *
5170 * @param {string} [key]
5171 * The key to retrieve from the session data store. If omitted, all
5172 * session data will be returned.
5173 *
5174 * @returns {*}
5175 * Returns the stored session data or `null` if the given key wasn't
5176 * found.
5177 */
5178 getLocalData: function(key) {
5179 try {
5180 var sid = this.getID(),
5181 item = 'luci-session-store',
5182 data = JSON.parse(window.sessionStorage.getItem(item));
5183
5184 if (!LuCI.prototype.isObject(data) || !data.hasOwnProperty(sid)) {
5185 data = {};
5186 data[sid] = {};
5187 }
5188
5189 if (key != null)
5190 return data[sid].hasOwnProperty(key) ? data[sid][key] : null;
5191
5192 return data[sid];
5193 }
5194 catch (e) {
5195 return (key != null) ? null : {};
5196 }
5197 },
5198
5199 /**
5200 * Set data in the local session storage.
5201 *
5202 * @param {string} key
5203 * The key to set in the session data store.
5204 *
5205 * @param {*} value
5206 * The value to store. It will be internally converted to JSON before
5207 * being put in the session store.
5208 *
5209 * @returns {boolean}
5210 * Returns `true` if the data could be stored or `false` on error.
5211 */
5212 setLocalData: function(key, value) {
5213 if (key == null)
5214 return false;
5215
5216 try {
5217 var sid = this.getID(),
5218 item = 'luci-session-store',
5219 data = JSON.parse(window.sessionStorage.getItem(item));
5220
5221 if (!LuCI.prototype.isObject(data) || !data.hasOwnProperty(sid)) {
5222 data = {};
5223 data[sid] = {};
5224 }
5225
5226 if (value != null)
5227 data[sid][key] = value;
5228 else
5229 delete data[sid][key];
5230
5231 window.sessionStorage.setItem(item, JSON.stringify(data));
5232
5233 return true;
5234 }
5235 catch (e) {
5236 return false;
5237 }
5238 }
5239 });
5240
5241 /**
5242 * @class view
5243 * @memberof LuCI
5244 * @hideconstructor
5245 * @classdesc
5246 *
5247 * The `view` class forms the basis of views and provides a standard
5248 * set of methods to inherit from.
5249 */
5250 var View = Class.extend(/** @lends LuCI.view.prototype */ {
5251 __name__: 'LuCI.view',
5252
5253 __init__: function() {
5254 var vp = document.getElementById('view');
5255
5256 DOM.content(vp, E('div', { 'class': 'spinning' }, _('Loading view…')));
5257
5258 return Promise.resolve(this.load())
5259 .then(LuCI.prototype.bind(this.render, this))
5260 .then(LuCI.prototype.bind(function(nodes) {
5261 var vp = document.getElementById('view');
5262
5263 DOM.content(vp, nodes);
5264 DOM.append(vp, this.addFooter());
5265 }, this)).catch(LuCI.prototype.error);
5266 },
5267
5268 /**
5269 * The load function is invoked before the view is rendered.
5270 *
5271 * The invocation of this function is wrapped by
5272 * `Promise.resolve()` so it may return Promises if needed.
5273 *
5274 * The return value of the function (or the resolved values
5275 * of the promise returned by it) will be passed as first
5276 * argument to `render()`.
5277 *
5278 * This function is supposed to be overwritten by subclasses,
5279 * the default implementation does nothing.
5280 *
5281 * @instance
5282 * @abstract
5283 * @memberof LuCI.view
5284 *
5285 * @returns {*|Promise&lt;*>}
5286 * May return any value or a Promise resolving to any value.
5287 */
5288 load: function() {},
5289
5290 /**
5291 * The render function is invoked after the
5292 * {@link LuCI.view#load load()} function and responsible
5293 * for setting up the view contents. It must return a DOM
5294 * `Node` or `DocumentFragment` holding the contents to
5295 * insert into the view area.
5296 *
5297 * The invocation of this function is wrapped by
5298 * `Promise.resolve()` so it may return Promises if needed.
5299 *
5300 * The return value of the function (or the resolved values
5301 * of the promise returned by it) will be inserted into the
5302 * main content area using
5303 * {@link LuCI.dom#append dom.append()}.
5304 *
5305 * This function is supposed to be overwritten by subclasses,
5306 * the default implementation does nothing.
5307 *
5308 * @instance
5309 * @abstract
5310 * @memberof LuCI.view
5311 * @param {*|null} load_results
5312 * This function will receive the return value of the
5313 * {@link LuCI.view#load view.load()} function as first
5314 * argument.
5315 *
5316 * @returns {Node|Promise&lt;Node>}
5317 * Should return a DOM `Node` value or a `Promise` resolving
5318 * to a `Node` value.
5319 */
5320 render: function() {},
5321
5322 /**
5323 * The handleSave function is invoked when the user clicks
5324 * the `Save` button in the page action footer.
5325 *
5326 * The default implementation should be sufficient for most
5327 * views using {@link form#Map form.Map()} based forms - it
5328 * will iterate all forms present in the view and invoke
5329 * the {@link form#Map#save Map.save()} method on each form.
5330 *
5331 * Views not using `Map` instances or requiring other special
5332 * logic should overwrite `handleSave()` with a custom
5333 * implementation.
5334 *
5335 * To disable the `Save` page footer button, views extending
5336 * this base class should overwrite the `handleSave` function
5337 * with `null`.
5338 *
5339 * The invocation of this function is wrapped by
5340 * `Promise.resolve()` so it may return Promises if needed.
5341 *
5342 * @instance
5343 * @memberof LuCI.view
5344 * @param {Event} ev
5345 * The DOM event that triggered the function.
5346 *
5347 * @returns {*|Promise&lt;*>}
5348 * Any return values of this function are discarded, but
5349 * passed through `Promise.resolve()` to ensure that any
5350 * returned promise runs to completion before the button
5351 * is reenabled.
5352 */
5353 handleSave: function(ev) {
5354 var tasks = [];
5355
5356 document.getElementById('maincontent')
5357 .querySelectorAll('.cbi-map').forEach(function(map) {
5358 tasks.push(DOM.callClassMethod(map, 'save'));
5359 });
5360
5361 return Promise.all(tasks);
5362 },
5363
5364 /**
5365 * The handleSaveApply function is invoked when the user clicks
5366 * the `Save &amp; Apply` button in the page action footer.
5367 *
5368 * The default implementation should be sufficient for most
5369 * views using {@link form#Map form.Map()} based forms - it
5370 * will first invoke
5371 * {@link LuCI.view.handleSave view.handleSave()} and then
5372 * call {@link ui#changes#apply ui.changes.apply()} to start the
5373 * modal config apply and page reload flow.
5374 *
5375 * Views not using `Map` instances or requiring other special
5376 * logic should overwrite `handleSaveApply()` with a custom
5377 * implementation.
5378 *
5379 * To disable the `Save &amp; Apply` page footer button, views
5380 * extending this base class should overwrite the
5381 * `handleSaveApply` function with `null`.
5382 *
5383 * The invocation of this function is wrapped by
5384 * `Promise.resolve()` so it may return Promises if needed.
5385 *
5386 * @instance
5387 * @memberof LuCI.view
5388 * @param {Event} ev
5389 * The DOM event that triggered the function.
5390 *
5391 * @returns {*|Promise&lt;*>}
5392 * Any return values of this function are discarded, but
5393 * passed through `Promise.resolve()` to ensure that any
5394 * returned promise runs to completion before the button
5395 * is reenabled.
5396 */
5397 handleSaveApply: function(ev, mode) {
5398 return this.handleSave(ev).then(function() {
5399 classes.ui.changes.apply(mode == '0');
5400 });
5401 },
5402
5403 /**
5404 * The handleReset function is invoked when the user clicks
5405 * the `Reset` button in the page action footer.
5406 *
5407 * The default implementation should be sufficient for most
5408 * views using {@link form#Map form.Map()} based forms - it
5409 * will iterate all forms present in the view and invoke
5410 * the {@link form#Map#save Map.reset()} method on each form.
5411 *
5412 * Views not using `Map` instances or requiring other special
5413 * logic should overwrite `handleReset()` with a custom
5414 * implementation.
5415 *
5416 * To disable the `Reset` page footer button, views extending
5417 * this base class should overwrite the `handleReset` function
5418 * with `null`.
5419 *
5420 * The invocation of this function is wrapped by
5421 * `Promise.resolve()` so it may return Promises if needed.
5422 *
5423 * @instance
5424 * @memberof LuCI.view
5425 * @param {Event} ev
5426 * The DOM event that triggered the function.
5427 *
5428 * @returns {*|Promise&lt;*>}
5429 * Any return values of this function are discarded, but
5430 * passed through `Promise.resolve()` to ensure that any
5431 * returned promise runs to completion before the button
5432 * is reenabled.
5433 */
5434 handleReset: function(ev) {
5435 var tasks = [];
5436
5437 document.getElementById('maincontent')
5438 .querySelectorAll('.cbi-map').forEach(function(map) {
5439 tasks.push(DOM.callClassMethod(map, 'reset'));
5440 });
5441
5442 return Promise.all(tasks);
5443 },
5444
5445 /**
5446 * Renders a standard page action footer if any of the
5447 * `handleSave()`, `handleSaveApply()` or `handleReset()`
5448 * functions are defined.
5449 *
5450 * The default implementation should be sufficient for most
5451 * views - it will render a standard page footer with action
5452 * buttons labeled `Save`, `Save &amp; Apply` and `Reset`
5453 * triggering the `handleSave()`, `handleSaveApply()` and
5454 * `handleReset()` functions respectively.
5455 *
5456 * When any of these `handle*()` functions is overwritten
5457 * with `null` by a view extending this class, the
5458 * corresponding button will not be rendered.
5459 *
5460 * @instance
5461 * @memberof LuCI.view
5462 * @returns {DocumentFragment}
5463 * Returns a `DocumentFragment` containing the footer bar
5464 * with buttons for each corresponding `handle*()` action
5465 * or an empty `DocumentFragment` if all three `handle*()`
5466 * methods are overwritten with `null`.
5467 */
5468 addFooter: function() {
5469 var footer = E([]),
5470 vp = document.getElementById('view'),
5471 hasmap = false,
5472 readonly = true;
5473
5474 vp.querySelectorAll('.cbi-map').forEach(function(map) {
5475 var m = DOM.findClassInstance(map);
5476 if (m) {
5477 hasmap = true;
5478
5479 if (!m.readonly)
5480 readonly = false;
5481 }
5482 });
5483
5484 if (!hasmap)
5485 readonly = !LuCI.prototype.hasViewPermission();
5486
5487 var saveApplyBtn = this.handleSaveApply ? new classes.ui.ComboButton('0', {
5488 0: [ _('Save &amp; Apply') ],
5489 1: [ _('Apply unchecked') ]
5490 }, {
5491 classes: {
5492 0: 'btn cbi-button cbi-button-apply important',
5493 1: 'btn cbi-button cbi-button-negative important'
5494 },
5495 click: classes.ui.createHandlerFn(this, 'handleSaveApply'),
5496 disabled: readonly || null
5497 }).render() : E([]);
5498
5499 if (this.handleSaveApply || this.handleSave || this.handleReset) {
5500 footer.appendChild(E('div', { 'class': 'cbi-page-actions control-group' }, [
5501 saveApplyBtn, ' ',
5502 this.handleSave ? E('button', {
5503 'class': 'cbi-button cbi-button-save',
5504 'click': classes.ui.createHandlerFn(this, 'handleSave'),
5505 'disabled': readonly || null
5506 }, [ _('Save') ]) : '', ' ',
5507 this.handleReset ? E('button', {
5508 'class': 'cbi-button cbi-button-reset',
5509 'click': classes.ui.createHandlerFn(this, 'handleReset'),
5510 'disabled': readonly || null
5511 }, [ _('Reset') ]) : ''
5512 ]));
5513 }
5514
5515 return footer;
5516 }
5517 });
5518
5519
5520 var dummyElem = null,
5521 domParser = null,
5522 originalCBIInit = null,
5523 rpcBaseURL = null,
5524 sysFeatures = null,
5525 preloadClasses = null;
5526
5527 /* "preload" builtin classes to make the available via require */
5528 var classes = {
5529 baseclass: Class,
5530 dom: DOM,
5531 poll: Poll,
5532 request: Request,
5533 session: Session,
5534 view: View
5535 };
5536
5537 var LuCI = Class.extend(/** @lends LuCI.prototype */ {
5538 __name__: 'LuCI',
5539 __init__: function(setenv) {
5540
5541 document.querySelectorAll('script[src*="/luci.js"]').forEach(function(s) {
5542 if (setenv.base_url == null || setenv.base_url == '') {
5543 var m = (s.getAttribute('src') || '').match(/^(.*)\/luci\.js(?:\?v=([^?]+))?$/);
5544 if (m) {
5545 setenv.base_url = m[1];
5546 setenv.resource_version = m[2];
5547 }
5548 }
5549 });
5550
5551 if (setenv.base_url == null)
5552 this.error('InternalError', 'Cannot find url of luci.js');
5553
5554 setenv.cgi_base = setenv.scriptname.replace(/\/[^\/]+$/, '');
5555
5556 Object.assign(env, setenv);
5557
5558 var domReady = new Promise(function(resolveFn, rejectFn) {
5559 document.addEventListener('DOMContentLoaded', resolveFn);
5560 });
5561
5562 Promise.all([
5563 domReady,
5564 this.require('ui'),
5565 this.require('rpc'),
5566 this.require('form'),
5567 this.probeRPCBaseURL()
5568 ]).then(this.setupDOM.bind(this)).catch(this.error);
5569
5570 originalCBIInit = window.cbi_init;
5571 window.cbi_init = function() {};
5572 },
5573
5574 /**
5575 * Captures the current stack trace and throws an error of the
5576 * specified type as a new exception. Also logs the exception as
5577 * error to the debug console if it is available.
5578 *
5579 * @instance
5580 * @memberof LuCI
5581 *
5582 * @param {Error|string} [type=Error]
5583 * Either a string specifying the type of the error to throw or an
5584 * existing `Error` instance to copy.
5585 *
5586 * @param {string} [fmt=Unspecified error]
5587 * A format string which is used to form the error message, together
5588 * with all subsequent optional arguments.
5589 *
5590 * @param {...*} [args]
5591 * Zero or more variable arguments to the supplied format string.
5592 *
5593 * @throws {Error}
5594 * Throws the created error object with the captured stack trace
5595 * appended to the message and the type set to the given type
5596 * argument or copied from the given error instance.
5597 */
5598 raise: function(type, fmt /*, ...*/) {
5599 var e = null,
5600 msg = fmt ? String.prototype.format.apply(fmt, this.varargs(arguments, 2)) : null,
5601 stack = null;
5602
5603 if (type instanceof Error) {
5604 e = type;
5605
5606 if (msg)
5607 e.message = msg + ': ' + e.message;
5608 }
5609 else {
5610 try { throw new Error('stacktrace') }
5611 catch (e2) { stack = (e2.stack || '').split(/\n/) }
5612
5613 e = new (window[type || 'Error'] || Error)(msg || 'Unspecified error');
5614 e.name = type || 'Error';
5615 }
5616
5617 stack = (stack || []).map(function(frame) {
5618 frame = frame.replace(/(.*?)@(.+):(\d+):(\d+)/g, 'at $1 ($2:$3:$4)').trim();
5619 return frame ? ' ' + frame : '';
5620 });
5621
5622 if (!/^ at /.test(stack[0]))
5623 stack.shift();
5624
5625 if (/\braise /.test(stack[0]))
5626 stack.shift();
5627
5628 if (/\berror /.test(stack[0]))
5629 stack.shift();
5630
5631 if (stack.length)
5632 e.message += '\n' + stack.join('\n');
5633
5634 if (window.console &amp;&amp; console.debug)
5635 console.debug(e);
5636
5637 throw e;
5638 },
5639
5640 /**
5641 * A wrapper around {@link LuCI#raise raise()} which also renders
5642 * the error either as modal overlay when `ui.js` is already loaed
5643 * or directly into the view body.
5644 *
5645 * @instance
5646 * @memberof LuCI
5647 *
5648 * @param {Error|string} [type=Error]
5649 * Either a string specifying the type of the error to throw or an
5650 * existing `Error` instance to copy.
5651 *
5652 * @param {string} [fmt=Unspecified error]
5653 * A format string which is used to form the error message, together
5654 * with all subsequent optional arguments.
5655 *
5656 * @param {...*} [args]
5657 * Zero or more variable arguments to the supplied format string.
5658 *
5659 * @throws {Error}
5660 * Throws the created error object with the captured stack trace
5661 * appended to the message and the type set to the given type
5662 * argument or copied from the given error instance.
5663 */
5664 error: function(type, fmt /*, ...*/) {
5665 try {
5666 LuCI.prototype.raise.apply(LuCI.prototype,
5667 Array.prototype.slice.call(arguments));
5668 }
5669 catch (e) {
5670 if (!e.reported) {
5671 if (classes.ui)
5672 classes.ui.addNotification(e.name || _('Runtime error'),
5673 E('pre', {}, e.message), 'danger');
5674 else
5675 DOM.content(document.querySelector('#maincontent'),
5676 E('pre', { 'class': 'alert-message error' }, e.message));
5677
5678 e.reported = true;
5679 }
5680
5681 throw e;
5682 }
5683 },
5684
5685 /**
5686 * Return a bound function using the given `self` as `this` context
5687 * and any further arguments as parameters to the bound function.
5688 *
5689 * @instance
5690 * @memberof LuCI
5691 *
5692 * @param {function} fn
5693 * The function to bind.
5694 *
5695 * @param {*} self
5696 * The value to bind as `this` context to the specified function.
5697 *
5698 * @param {...*} [args]
5699 * Zero or more variable arguments which are bound to the function
5700 * as parameters.
5701 *
5702 * @returns {function}
5703 * Returns the bound function.
5704 */
5705 bind: function(fn, self /*, ... */) {
5706 return Function.prototype.bind.apply(fn, this.varargs(arguments, 2, self));
5707 },
5708
5709 /**
5710 * Load an additional LuCI JavaScript class and its dependencies,
5711 * instantiate it and return the resulting class instance. Each
5712 * class is only loaded once. Subsequent attempts to load the same
5713 * class will return the already instantiated class.
5714 *
5715 * @instance
5716 * @memberof LuCI
5717 *
5718 * @param {string} name
5719 * The name of the class to load in dotted notation. Dots will
5720 * be replaced by spaces and joined with the runtime-determined
5721 * base URL of LuCI.js to form an absolute URL to load the class
5722 * file from.
5723 *
5724 * @throws {DependencyError}
5725 * Throws a `DependencyError` when the class to load includes
5726 * circular dependencies.
5727 *
5728 * @throws {NetworkError}
5729 * Throws `NetworkError` when the underlying {@link LuCI.request}
5730 * call failed.
5731 *
5732 * @throws {SyntaxError}
5733 * Throws `SyntaxError` when the loaded class file code cannot
5734 * be interpreted by `eval`.
5735 *
5736 * @throws {TypeError}
5737 * Throws `TypeError` when the class file could be loaded and
5738 * interpreted, but when invoking its code did not yield a valid
5739 * class instance.
5740 *
5741 * @returns {Promise&lt;LuCI.baseclass>}
5742 * Returns the instantiated class.
5743 */
5744 require: function(name, from) {
5745 var L = this, url = null, from = from || [];
5746
5747 /* Class already loaded */
5748 if (classes[name] != null) {
5749 /* Circular dependency */
5750 if (from.indexOf(name) != -1)
5751 LuCI.prototype.raise('DependencyError',
5752 'Circular dependency: class "%s" depends on "%s"',
5753 name, from.join('" which depends on "'));
5754
5755 return Promise.resolve(classes[name]);
5756 }
5757
5758 url = '%s/%s.js%s'.format(env.base_url, name.replace(/\./g, '/'), (env.resource_version ? '?v=' + env.resource_version : ''));
5759 from = [ name ].concat(from);
5760
5761 var compileClass = function(res) {
5762 if (!res.ok)
5763 LuCI.prototype.raise('NetworkError',
5764 'HTTP error %d while loading class file "%s"', res.status, url);
5765
5766 var source = res.text(),
5767 requirematch = /^require[ \t]+(\S+)(?:[ \t]+as[ \t]+([a-zA-Z_]\S*))?$/,
5768 strictmatch = /^use[ \t]+strict$/,
5769 depends = [],
5770 args = '';
5771
5772 /* find require statements in source */
5773 for (var i = 0, off = -1, quote = -1, esc = false; i &lt; source.length; i++) {
5774 var chr = source.charCodeAt(i);
5775
5776 if (esc) {
5777 esc = false;
5778 }
5779 else if (chr == 92) {
5780 esc = true;
5781 }
5782 else if (chr == quote) {
5783 var s = source.substring(off, i),
5784 m = requirematch.exec(s);
5785
5786 if (m) {
5787 var dep = m[1], as = m[2] || dep.replace(/[^a-zA-Z0-9_]/g, '_');
5788 depends.push(LuCI.prototype.require(dep, from));
5789 args += ', ' + as;
5790 }
5791 else if (!strictmatch.exec(s)) {
5792 break;
5793 }
5794
5795 off = -1;
5796 quote = -1;
5797 }
5798 else if (quote == -1 &amp;&amp; (chr == 34 || chr == 39)) {
5799 off = i + 1;
5800 quote = chr;
5801 }
5802 }
5803
5804 /* load dependencies and instantiate class */
5805 return Promise.all(depends).then(function(instances) {
5806 var _factory, _class;
5807
5808 try {
5809 _factory = eval(
5810 '(function(window, document, L%s) { %s })\n\n//# sourceURL=%s\n'
5811 .format(args, source, res.url));
5812 }
5813 catch (error) {
5814 LuCI.prototype.raise('SyntaxError', '%s\n in %s:%s',
5815 error.message, res.url, error.lineNumber || '?');
5816 }
5817
5818 _factory.displayName = toCamelCase(name + 'ClassFactory');
5819 _class = _factory.apply(_factory, [window, document, L].concat(instances));
5820
5821 if (!Class.isSubclass(_class))
5822 LuCI.prototype.error('TypeError', '"%s" factory yields invalid constructor', name);
5823
5824 if (_class.displayName == 'AnonymousClass')
5825 _class.displayName = toCamelCase(name + 'Class');
5826
5827 var ptr = Object.getPrototypeOf(L),
5828 parts = name.split(/\./),
5829 instance = new _class();
5830
5831 for (var i = 0; ptr &amp;&amp; i &lt; parts.length - 1; i++)
5832 ptr = ptr[parts[i]];
5833
5834 if (ptr)
5835 ptr[parts[i]] = instance;
5836
5837 classes[name] = instance;
5838
5839 return instance;
5840 });
5841 };
5842
5843 /* Request class file */
5844 classes[name] = Request.get(url, { cache: true }).then(compileClass);
5845
5846 return classes[name];
5847 },
5848
5849 /* DOM setup */
5850 probeRPCBaseURL: function() {
5851 if (rpcBaseURL == null)
5852 rpcBaseURL = Session.getLocalData('rpcBaseURL');
5853
5854 if (rpcBaseURL == null) {
5855 var rpcFallbackURL = this.url('admin/ubus');
5856
5857 rpcBaseURL = Request.get(env.ubuspath).then(function(res) {
5858 return (rpcBaseURL = (res.status == 400) ? env.ubuspath : rpcFallbackURL);
5859 }, function() {
5860 return (rpcBaseURL = rpcFallbackURL);
5861 }).then(function(url) {
5862 Session.setLocalData('rpcBaseURL', url);
5863 return url;
5864 });
5865 }
5866
5867 return Promise.resolve(rpcBaseURL);
5868 },
5869
5870 probeSystemFeatures: function() {
5871 if (sysFeatures == null)
5872 sysFeatures = Session.getLocalData('features');
5873
5874 if (!this.isObject(sysFeatures)) {
5875 sysFeatures = classes.rpc.declare({
5876 object: 'luci',
5877 method: 'getFeatures',
5878 expect: { '': {} }
5879 })().then(function(features) {
5880 Session.setLocalData('features', features);
5881 sysFeatures = features;
5882
5883 return features;
5884 });
5885 }
5886
5887 return Promise.resolve(sysFeatures);
5888 },
5889
5890 probePreloadClasses: function() {
5891 if (preloadClasses == null)
5892 preloadClasses = Session.getLocalData('preload');
5893
5894 if (!Array.isArray(preloadClasses)) {
5895 preloadClasses = this.resolveDefault(classes.rpc.declare({
5896 object: 'file',
5897 method: 'list',
5898 params: [ 'path' ],
5899 expect: { 'entries': [] }
5900 })(this.fspath(this.resource('preload'))), []).then(function(entries) {
5901 var classes = [];
5902
5903 for (var i = 0; i &lt; entries.length; i++) {
5904 if (entries[i].type != 'file')
5905 continue;
5906
5907 var m = entries[i].name.match(/(.+)\.js$/);
5908
5909 if (m)
5910 classes.push('preload.%s'.format(m[1]));
5911 }
5912
5913 Session.setLocalData('preload', classes);
5914 preloadClasses = classes;
5915
5916 return classes;
5917 });
5918 }
5919
5920 return Promise.resolve(preloadClasses);
5921 },
5922
5923 /**
5924 * Test whether a particular system feature is available, such as
5925 * hostapd SAE support or an installed firewall. The features are
5926 * queried once at the beginning of the LuCI session and cached in
5927 * `SessionStorage` throughout the lifetime of the associated tab or
5928 * browser window.
5929 *
5930 * @instance
5931 * @memberof LuCI
5932 *
5933 * @param {string} feature
5934 * The feature to test. For detailed list of known feature flags,
5935 * see `/modules/luci-base/root/usr/libexec/rpcd/luci`.
5936 *
5937 * @param {string} [subfeature]
5938 * Some feature classes like `hostapd` provide sub-feature flags,
5939 * such as `sae` or `11w` support. The `subfeature` argument can
5940 * be used to query these.
5941 *
5942 * @return {boolean|null}
5943 * Return `true` if the queried feature (and sub-feature) is available
5944 * or `false` if the requested feature isn't present or known.
5945 * Return `null` when a sub-feature was queried for a feature which
5946 * has no sub-features.
5947 */
5948 hasSystemFeature: function() {
5949 var ft = sysFeatures[arguments[0]];
5950
5951 if (arguments.length == 2)
5952 return this.isObject(ft) ? ft[arguments[1]] : null;
5953
5954 return (ft != null &amp;&amp; ft != false);
5955 },
5956
5957 /* private */
5958 notifySessionExpiry: function() {
5959 Poll.stop();
5960
5961 classes.ui.showModal(_('Session expired'), [
5962 E('div', { class: 'alert-message warning' },
5963 _('A new login is required since the authentication session expired.')),
5964 E('div', { class: 'right' },
5965 E('div', {
5966 class: 'btn primary',
5967 click: function() {
5968 var loc = window.location;
5969 window.location = loc.protocol + '//' + loc.host + loc.pathname + loc.search;
5970 }
5971 }, _('To login…')))
5972 ]);
5973
5974 LuCI.prototype.raise('SessionError', 'Login session is expired');
5975 },
5976
5977 /* private */
5978 setupDOM: function(res) {
5979 var domEv = res[0],
5980 uiClass = res[1],
5981 rpcClass = res[2],
5982 formClass = res[3],
5983 rpcBaseURL = res[4];
5984
5985 rpcClass.setBaseURL(rpcBaseURL);
5986
5987 rpcClass.addInterceptor(function(msg, req) {
5988 if (!LuCI.prototype.isObject(msg) ||
5989 !LuCI.prototype.isObject(msg.error) ||
5990 msg.error.code != -32002)
5991 return;
5992
5993 if (!LuCI.prototype.isObject(req) ||
5994 (req.object == 'session' &amp;&amp; req.method == 'access'))
5995 return;
5996
5997 return rpcClass.declare({
5998 'object': 'session',
5999 'method': 'access',
6000 'params': [ 'scope', 'object', 'function' ],
6001 'expect': { access: true }
6002 })('uci', 'luci', 'read').catch(LuCI.prototype.notifySessionExpiry);
6003 });
6004
6005 Request.addInterceptor(function(res) {
6006 var isDenied = false;
6007
6008 if (res.status == 403 &amp;&amp; res.headers.get('X-LuCI-Login-Required') == 'yes')
6009 isDenied = true;
6010
6011 if (!isDenied)
6012 return;
6013
6014 LuCI.prototype.notifySessionExpiry();
6015 });
6016
6017 document.addEventListener('poll-start', function(ev) {
6018 uiClass.showIndicator('poll-status', _('Refreshing'), function(ev) {
6019 Request.poll.active() ? Request.poll.stop() : Request.poll.start();
6020 });
6021 });
6022
6023 document.addEventListener('poll-stop', function(ev) {
6024 uiClass.showIndicator('poll-status', _('Paused'), null, 'inactive');
6025 });
6026
6027 return Promise.all([
6028 this.probeSystemFeatures(),
6029 this.probePreloadClasses()
6030 ]).finally(LuCI.prototype.bind(function() {
6031 var tasks = [];
6032
6033 if (Array.isArray(preloadClasses))
6034 for (var i = 0; i &lt; preloadClasses.length; i++)
6035 tasks.push(this.require(preloadClasses[i]));
6036
6037 return Promise.all(tasks);
6038 }, this)).finally(this.initDOM);
6039 },
6040
6041 /* private */
6042 initDOM: function() {
6043 originalCBIInit();
6044 Poll.start();
6045 document.dispatchEvent(new CustomEvent('luci-loaded'));
6046 },
6047
6048 /**
6049 * The `env` object holds environment settings used by LuCI, such
6050 * as request timeouts, base URLs etc.
6051 *
6052 * @instance
6053 * @memberof LuCI
6054 */
6055 env: env,
6056
6057 /**
6058 * Construct an absolute filesystem path relative to the server
6059 * document root.
6060 *
6061 * @instance
6062 * @memberof LuCI
6063 *
6064 * @param {...string} [parts]
6065 * An array of parts to join into a path.
6066 *
6067 * @return {string}
6068 * Return the joined path.
6069 */
6070 fspath: function(/* ... */) {
6071 var path = env.documentroot;
6072
6073 for (var i = 0; i &lt; arguments.length; i++)
6074 path += '/' + arguments[i];
6075
6076 var p = path.replace(/\/+$/, '').replace(/\/+/g, '/').split(/\//),
6077 res = [];
6078
6079 for (var i = 0; i &lt; p.length; i++)
6080 if (p[i] == '..')
6081 res.pop();
6082 else if (p[i] != '.')
6083 res.push(p[i]);
6084
6085 return res.join('/');
6086 },
6087
6088 /**
6089 * Construct a relative URL path from the given prefix and parts.
6090 * The resulting URL is guaranteed to only contain the characters
6091 * `a-z`, `A-Z`, `0-9`, `_`, `.`, `%`, `,`, `;`, and `-` as well
6092 * as `/` for the path separator.
6093 *
6094 * @instance
6095 * @memberof LuCI
6096 *
6097 * @param {string} [prefix]
6098 * The prefix to join the given parts with. If the `prefix` is
6099 * omitted, it defaults to an empty string.
6100 *
6101 * @param {string[]} [parts]
6102 * An array of parts to join into an URL path. Parts may contain
6103 * slashes and any of the other characters mentioned above.
6104 *
6105 * @return {string}
6106 * Return the joined URL path.
6107 */
6108 path: function(prefix, parts) {
6109 var url = [ prefix || '' ];
6110
6111 for (var i = 0; i &lt; parts.length; i++)
6112 if (/^(?:[a-zA-Z0-9_.%,;-]+\/)*[a-zA-Z0-9_.%,;-]+$/.test(parts[i]))
6113 url.push('/', parts[i]);
6114
6115 if (url.length === 1)
6116 url.push('/');
6117
6118 return url.join('');
6119 },
6120
6121 /**
6122 * Construct an URL pathrelative to the script path of the server
6123 * side LuCI application (usually `/cgi-bin/luci`).
6124 *
6125 * The resulting URL is guaranteed to only contain the characters
6126 * `a-z`, `A-Z`, `0-9`, `_`, `.`, `%`, `,`, `;`, and `-` as well
6127 * as `/` for the path separator.
6128 *
6129 * @instance
6130 * @memberof LuCI
6131 *
6132 * @param {string[]} [parts]
6133 * An array of parts to join into an URL path. Parts may contain
6134 * slashes and any of the other characters mentioned above.
6135 *
6136 * @return {string}
6137 * Returns the resulting URL path.
6138 */
6139 url: function() {
6140 return this.path(env.scriptname, arguments);
6141 },
6142
6143 /**
6144 * Construct an URL path relative to the global static resource path
6145 * of the LuCI ui (usually `/luci-static/resources`).
6146 *
6147 * The resulting URL is guaranteed to only contain the characters
6148 * `a-z`, `A-Z`, `0-9`, `_`, `.`, `%`, `,`, `;`, and `-` as well
6149 * as `/` for the path separator.
6150 *
6151 * @instance
6152 * @memberof LuCI
6153 *
6154 * @param {string[]} [parts]
6155 * An array of parts to join into an URL path. Parts may contain
6156 * slashes and any of the other characters mentioned above.
6157 *
6158 * @return {string}
6159 * Returns the resulting URL path.
6160 */
6161 resource: function() {
6162 return this.path(env.resource, arguments);
6163 },
6164
6165 /**
6166 * Construct an URL path relative to the media resource path of the
6167 * LuCI ui (usually `/luci-static/$theme_name`).
6168 *
6169 * The resulting URL is guaranteed to only contain the characters
6170 * `a-z`, `A-Z`, `0-9`, `_`, `.`, `%`, `,`, `;`, and `-` as well
6171 * as `/` for the path separator.
6172 *
6173 * @instance
6174 * @memberof LuCI
6175 *
6176 * @param {string[]} [parts]
6177 * An array of parts to join into an URL path. Parts may contain
6178 * slashes and any of the other characters mentioned above.
6179 *
6180 * @return {string}
6181 * Returns the resulting URL path.
6182 */
6183 media: function() {
6184 return this.path(env.media, arguments);
6185 },
6186
6187 /**
6188 * Return the complete URL path to the current view.
6189 *
6190 * @instance
6191 * @memberof LuCI
6192 *
6193 * @return {string}
6194 * Returns the URL path to the current view.
6195 */
6196 location: function() {
6197 return this.path(env.scriptname, env.requestpath);
6198 },
6199
6200
6201 /**
6202 * Tests whether the passed argument is a JavaScript object.
6203 * This function is meant to be an object counterpart to the
6204 * standard `Array.isArray()` function.
6205 *
6206 * @instance
6207 * @memberof LuCI
6208 *
6209 * @param {*} [val]
6210 * The value to test
6211 *
6212 * @return {boolean}
6213 * Returns `true` if the given value is of type object and
6214 * not `null`, else returns `false`.
6215 */
6216 isObject: function(val) {
6217 return (val != null &amp;&amp; typeof(val) == 'object');
6218 },
6219
6220 /**
6221 * Return an array of sorted object keys, optionally sorted by
6222 * a different key or a different sorting mode.
6223 *
6224 * @instance
6225 * @memberof LuCI
6226 *
6227 * @param {object} obj
6228 * The object to extract the keys from. If the given value is
6229 * not an object, the function will return an empty array.
6230 *
6231 * @param {string} [key]
6232 * Specifies the key to order by. This is mainly useful for
6233 * nested objects of objects or objects of arrays when sorting
6234 * shall not be performed by the primary object keys but by
6235 * some other key pointing to a value within the nested values.
6236 *
6237 * @param {string} [sortmode]
6238 * May be either `addr` or `num` to override the natural
6239 * lexicographic sorting with a sorting suitable for IP/MAC style
6240 * addresses or numeric values respectively.
6241 *
6242 * @return {string[]}
6243 * Returns an array containing the sorted keys of the given object.
6244 */
6245 sortedKeys: function(obj, key, sortmode) {
6246 if (obj == null || typeof(obj) != 'object')
6247 return [];
6248
6249 return Object.keys(obj).map(function(e) {
6250 var v = (key != null) ? obj[e][key] : e;
6251
6252 switch (sortmode) {
6253 case 'addr':
6254 v = (v != null) ? v.replace(/(?:^|[.:])([0-9a-fA-F]{1,4})/g,
6255 function(m0, m1) { return ('000' + m1.toLowerCase()).substr(-4) }) : null;
6256 break;
6257
6258 case 'num':
6259 v = (v != null) ? +v : null;
6260 break;
6261 }
6262
6263 return [ e, v ];
6264 }).filter(function(e) {
6265 return (e[1] != null);
6266 }).sort(function(a, b) {
6267 return (a[1] > b[1]);
6268 }).map(function(e) {
6269 return e[0];
6270 });
6271 },
6272
6273 /**
6274 * Converts the given value to an array. If the given value is of
6275 * type array, it is returned as-is, values of type object are
6276 * returned as one-element array containing the object, empty
6277 * strings and `null` values are returned as empty array, all other
6278 * values are converted using `String()`, trimmed, split on white
6279 * space and returned as array.
6280 *
6281 * @instance
6282 * @memberof LuCI
6283 *
6284 * @param {*} val
6285 * The value to convert into an array.
6286 *
6287 * @return {Array&lt;*>}
6288 * Returns the resulting array.
6289 */
6290 toArray: function(val) {
6291 if (val == null)
6292 return [];
6293 else if (Array.isArray(val))
6294 return val;
6295 else if (typeof(val) == 'object')
6296 return [ val ];
6297
6298 var s = String(val).trim();
6299
6300 if (s == '')
6301 return [];
6302
6303 return s.split(/\s+/);
6304 },
6305
6306 /**
6307 * Returns a promise resolving with either the given value or or with
6308 * the given default in case the input value is a rejecting promise.
6309 *
6310 * @instance
6311 * @memberof LuCI
6312 *
6313 * @param {*} value
6314 * The value to resolve the promise with.
6315 *
6316 * @param {*} defvalue
6317 * The default value to resolve the promise with in case the given
6318 * input value is a rejecting promise.
6319 *
6320 * @returns {Promise&lt;*>}
6321 * Returns a new promise resolving either to the given input value or
6322 * to the given default value on error.
6323 */
6324 resolveDefault: function(value, defvalue) {
6325 return Promise.resolve(value).catch(function() { return defvalue });
6326 },
6327
6328 /**
6329 * The request callback function is invoked whenever an HTTP
6330 * reply to a request made using the `L.get()`, `L.post()` or
6331 * `L.poll()` function is timed out or received successfully.
6332 *
6333 * @instance
6334 * @memberof LuCI
6335 *
6336 * @callback LuCI.requestCallbackFn
6337 * @param {XMLHTTPRequest} xhr
6338 * The XMLHTTPRequest instance used to make the request.
6339 *
6340 * @param {*} data
6341 * The response JSON if the response could be parsed as such,
6342 * else `null`.
6343 *
6344 * @param {number} duration
6345 * The total duration of the request in milliseconds.
6346 */
6347
6348 /**
6349 * Issues a GET request to the given url and invokes the specified
6350 * callback function. The function is a wrapper around
6351 * {@link LuCI.request#request Request.request()}.
6352 *
6353 * @deprecated
6354 * @instance
6355 * @memberof LuCI
6356 *
6357 * @param {string} url
6358 * The URL to request.
6359 *
6360 * @param {Object&lt;string, string>} [args]
6361 * Additional query string arguments to append to the URL.
6362 *
6363 * @param {LuCI.requestCallbackFn} cb
6364 * The callback function to invoke when the request finishes.
6365 *
6366 * @return {Promise&lt;null>}
6367 * Returns a promise resolving to `null` when concluded.
6368 */
6369 get: function(url, args, cb) {
6370 return this.poll(null, url, args, cb, false);
6371 },
6372
6373 /**
6374 * Issues a POST request to the given url and invokes the specified
6375 * callback function. The function is a wrapper around
6376 * {@link LuCI.request#request Request.request()}. The request is
6377 * sent using `application/x-www-form-urlencoded` encoding and will
6378 * contain a field `token` with the current value of `LuCI.env.token`
6379 * by default.
6380 *
6381 * @deprecated
6382 * @instance
6383 * @memberof LuCI
6384 *
6385 * @param {string} url
6386 * The URL to request.
6387 *
6388 * @param {Object&lt;string, string>} [args]
6389 * Additional post arguments to append to the request body.
6390 *
6391 * @param {LuCI.requestCallbackFn} cb
6392 * The callback function to invoke when the request finishes.
6393 *
6394 * @return {Promise&lt;null>}
6395 * Returns a promise resolving to `null` when concluded.
6396 */
6397 post: function(url, args, cb) {
6398 return this.poll(null, url, args, cb, true);
6399 },
6400
6401 /**
6402 * Register a polling HTTP request that invokes the specified
6403 * callback function. The function is a wrapper around
6404 * {@link LuCI.request.poll#add Request.poll.add()}.
6405 *
6406 * @deprecated
6407 * @instance
6408 * @memberof LuCI
6409 *
6410 * @param {number} interval
6411 * The poll interval to use. If set to a value less than or equal
6412 * to `0`, it will default to the global poll interval configured
6413 * in `LuCI.env.pollinterval`.
6414 *
6415 * @param {string} url
6416 * The URL to request.
6417 *
6418 * @param {Object&lt;string, string>} [args]
6419 * Specifies additional arguments for the request. For GET requests,
6420 * the arguments are appended to the URL as query string, for POST
6421 * requests, they'll be added to the request body.
6422 *
6423 * @param {LuCI.requestCallbackFn} cb
6424 * The callback function to invoke whenever a request finishes.
6425 *
6426 * @param {boolean} [post=false]
6427 * When set to `false` or not specified, poll requests will be made
6428 * using the GET method. When set to `true`, POST requests will be
6429 * issued. In case of POST requests, the request body will contain
6430 * an argument `token` with the current value of `LuCI.env.token` by
6431 * default, regardless of the parameters specified with `args`.
6432 *
6433 * @return {function}
6434 * Returns the internally created function that has been passed to
6435 * {@link LuCI.request.poll#add Request.poll.add()}. This value can
6436 * be passed to {@link LuCI.poll.remove Poll.remove()} to remove the
6437 * polling request.
6438 */
6439 poll: function(interval, url, args, cb, post) {
6440 if (interval !== null &amp;&amp; interval &lt;= 0)
6441 interval = env.pollinterval;
6442
6443 var data = post ? { token: env.token } : null,
6444 method = post ? 'POST' : 'GET';
6445
6446 if (!/^(?:\/|\S+:\/\/)/.test(url))
6447 url = this.url(url);
6448
6449 if (args != null)
6450 data = Object.assign(data || {}, args);
6451
6452 if (interval !== null)
6453 return Request.poll.add(interval, url, { method: method, query: data }, cb);
6454 else
6455 return Request.request(url, { method: method, query: data })
6456 .then(function(res) {
6457 var json = null;
6458 if (/^application\/json\b/.test(res.headers.get('Content-Type')))
6459 try { json = res.json() } catch(e) {}
6460 cb(res.xhr, json, res.duration);
6461 });
6462 },
6463
6464 /**
6465 * Check whether a view has sufficient permissions.
6466 *
6467 * @return {boolean|null}
6468 * Returns `null` if the current session has no permission at all to
6469 * load resources required by the view. Returns `false` if readonly
6470 * permissions are granted or `true` if at least one required ACL
6471 * group is granted with write permissions.
6472 */
6473 hasViewPermission: function() {
6474 if (!this.isObject(env.nodespec) || !env.nodespec.satisfied)
6475 return null;
6476
6477 return !env.nodespec.readonly;
6478 },
6479
6480 /**
6481 * Deprecated wrapper around {@link LuCI.poll.remove Poll.remove()}.
6482 *
6483 * @deprecated
6484 * @instance
6485 * @memberof LuCI
6486 *
6487 * @param {function} entry
6488 * The polling function to remove.
6489 *
6490 * @return {boolean}
6491 * Returns `true` when the function has been removed or `false` if
6492 * it could not be found.
6493 */
6494 stop: function(entry) { return Poll.remove(entry) },
6495
6496 /**
6497 * Deprecated wrapper around {@link LuCI.poll.stop Poll.stop()}.
6498 *
6499 * @deprecated
6500 * @instance
6501 * @memberof LuCI
6502 *
6503 * @return {boolean}
6504 * Returns `true` when the polling loop has been stopped or `false`
6505 * when it didn't run to begin with.
6506 */
6507 halt: function() { return Poll.stop() },
6508
6509 /**
6510 * Deprecated wrapper around {@link LuCI.poll.start Poll.start()}.
6511 *
6512 * @deprecated
6513 * @instance
6514 * @memberof LuCI
6515 *
6516 * @return {boolean}
6517 * Returns `true` when the polling loop has been started or `false`
6518 * when it was already running.
6519 */
6520 run: function() { return Poll.start() },
6521
6522 /**
6523 * Legacy `L.dom` class alias. New view code should use `'require dom';`
6524 * to request the `LuCI.dom` class.
6525 *
6526 * @instance
6527 * @memberof LuCI
6528 * @deprecated
6529 */
6530 dom: DOM,
6531
6532 /**
6533 * Legacy `L.view` class alias. New view code should use `'require view';`
6534 * to request the `LuCI.view` class.
6535 *
6536 * @instance
6537 * @memberof LuCI
6538 * @deprecated
6539 */
6540 view: View,
6541
6542 /**
6543 * Legacy `L.Poll` class alias. New view code should use `'require poll';`
6544 * to request the `LuCI.poll` class.
6545 *
6546 * @instance
6547 * @memberof LuCI
6548 * @deprecated
6549 */
6550 Poll: Poll,
6551
6552 /**
6553 * Legacy `L.Request` class alias. New view code should use `'require request';`
6554 * to request the `LuCI.request` class.
6555 *
6556 * @instance
6557 * @memberof LuCI
6558 * @deprecated
6559 */
6560 Request: Request,
6561
6562 /**
6563 * Legacy `L.Class` class alias. New view code should use `'require baseclass';`
6564 * to request the `LuCI.baseclass` class.
6565 *
6566 * @instance
6567 * @memberof LuCI
6568 * @deprecated
6569 */
6570 Class: Class
6571 });
6572
6573 /**
6574 * @class xhr
6575 * @memberof LuCI
6576 * @deprecated
6577 * @classdesc
6578 *
6579 * The `LuCI.xhr` class is a legacy compatibility shim for the
6580 * functionality formerly provided by `xhr.js`. It is registered as global
6581 * `window.XHR` symbol for compatibility with legacy code.
6582 *
6583 * New code should use {@link LuCI.request} instead to implement HTTP
6584 * request handling.
6585 */
6586 var XHR = Class.extend(/** @lends LuCI.xhr.prototype */ {
6587 __name__: 'LuCI.xhr',
6588 __init__: function() {
6589 if (window.console &amp;&amp; console.debug)
6590 console.debug('Direct use XHR() is deprecated, please use L.Request instead');
6591 },
6592
6593 _response: function(cb, res, json, duration) {
6594 if (this.active)
6595 cb(res, json, duration);
6596 delete this.active;
6597 },
6598
6599 /**
6600 * This function is a legacy wrapper around
6601 * {@link LuCI#get LuCI.get()}.
6602 *
6603 * @instance
6604 * @deprecated
6605 * @memberof LuCI.xhr
6606 *
6607 * @param {string} url
6608 * The URL to request
6609 *
6610 * @param {Object} [data]
6611 * Additional query string data
6612 *
6613 * @param {LuCI.requestCallbackFn} [callback]
6614 * Callback function to invoke on completion
6615 *
6616 * @param {number} [timeout]
6617 * Request timeout to use
6618 *
6619 * @return {Promise&lt;null>}
6620 */
6621 get: function(url, data, callback, timeout) {
6622 this.active = true;
6623 LuCI.prototype.get(url, data, this._response.bind(this, callback), timeout);
6624 },
6625
6626 /**
6627 * This function is a legacy wrapper around
6628 * {@link LuCI#post LuCI.post()}.
6629 *
6630 * @instance
6631 * @deprecated
6632 * @memberof LuCI.xhr
6633 *
6634 * @param {string} url
6635 * The URL to request
6636 *
6637 * @param {Object} [data]
6638 * Additional data to append to the request body.
6639 *
6640 * @param {LuCI.requestCallbackFn} [callback]
6641 * Callback function to invoke on completion
6642 *
6643 * @param {number} [timeout]
6644 * Request timeout to use
6645 *
6646 * @return {Promise&lt;null>}
6647 */
6648 post: function(url, data, callback, timeout) {
6649 this.active = true;
6650 LuCI.prototype.post(url, data, this._response.bind(this, callback), timeout);
6651 },
6652
6653 /**
6654 * Cancels a running request.
6655 *
6656 * This function does not actually cancel the underlying
6657 * `XMLHTTPRequest` request but it sets a flag which prevents the
6658 * invocation of the callback function when the request eventually
6659 * finishes or timed out.
6660 *
6661 * @instance
6662 * @deprecated
6663 * @memberof LuCI.xhr
6664 */
6665 cancel: function() { delete this.active },
6666
6667 /**
6668 * Checks the running state of the request.
6669 *
6670 * @instance
6671 * @deprecated
6672 * @memberof LuCI.xhr
6673 *
6674 * @returns {boolean}
6675 * Returns `true` if the request is still running or `false` if it
6676 * already completed.
6677 */
6678 busy: function() { return (this.active === true) },
6679
6680 /**
6681 * Ignored for backwards compatibility.
6682 *
6683 * This function does nothing.
6684 *
6685 * @instance
6686 * @deprecated
6687 * @memberof LuCI.xhr
6688 */
6689 abort: function() {},
6690
6691 /**
6692 * Existing for backwards compatibility.
6693 *
6694 * This function simply throws an `InternalError` when invoked.
6695 *
6696 * @instance
6697 * @deprecated
6698 * @memberof LuCI.xhr
6699 *
6700 * @throws {InternalError}
6701 * Throws an `InternalError` with the message `Not implemented`
6702 * when invoked.
6703 */
6704 send_form: function() { LuCI.prototype.error('InternalError', 'Not implemented') },
6705 });
6706
6707 XHR.get = function() { return LuCI.prototype.get.apply(LuCI.prototype, arguments) };
6708 XHR.post = function() { return LuCI.prototype.post.apply(LuCI.prototype, arguments) };
6709 XHR.poll = function() { return LuCI.prototype.poll.apply(LuCI.prototype, arguments) };
6710 XHR.stop = Request.poll.remove.bind(Request.poll);
6711 XHR.halt = Request.poll.stop.bind(Request.poll);
6712 XHR.run = Request.poll.start.bind(Request.poll);
6713 XHR.running = Request.poll.active.bind(Request.poll);
6714
6715 window.XHR = XHR;
6716 window.LuCI = LuCI;
6717 })(window, document);
6718 </code></pre>
6719 </article>
6720 </section>
6721
6722
6723
6724
6725
6726
6727
6728
6729 <footer>
6730 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Apr 16 2020 15:41:08 GMT+0200 (Central European Summer Time)
6731 </footer>
6732 </div>
6733 </div>
6734 <script>prettyPrint();</script>
6735 <script src="scripts/jaguar.js"></script>
6736 </body>
6737 </html>