'use strict';
+'require view';
'require fs';
'require ui';
-return L.view.extend({
+return view.extend({
load: function() {
return L.resolveDefault(fs.read_direct('/etc/adblock/adblock.blacklist'), '');
},
'use strict';
+'require view';
'require fs';
'require ui';
}
}
-return L.view.extend({
+return view.extend({
load: function() {
return L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['report', '+', '50', 'false', 'json']),'');
},
'use strict';
+'require view';
+'require poll';
'require fs';
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.stat('/sbin/logread'), null),
},
render: function(stat) {
var logger = stat[0] ? stat[0].path : stat[1] ? stat[1].path : null;
- L.Poll.add(function() {
+ poll.add(function() {
return L.resolveDefault(fs.exec_direct(logger, ['-e', 'adblock-'])).then(function(res) {
var log = document.getElementById("logfile");
if (res) {
'use strict';
+'require view';
+'require poll';
'require fs';
'require ui';
'require uci';
}
}
- L.Poll.start();
+ poll.start();
fs.exec_direct('/etc/init.d/adblock', [ev])
var running = 1;
while (running === 1) {
}
})
}
- L.Poll.stop();
+ poll.stop();
}
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['list']), {}),
/*
poll runtime information
*/
- pollData: L.Poll.add(function() {
+ pollData: poll.add(function() {
return L.resolveDefault(fs.read_direct('/tmp/adb_runtime.json'), 'null').then(function(res) {
var info = JSON.parse(res);
var status = document.getElementById('status');
} else {
if (status.classList.contains("spinning")) {
status.classList.remove("spinning");
- L.Poll.stop();
+ poll.stop();
}
}
if (status.textContent.substr(0,6) === 'paused' && document.getElementById('btn_suspend')) {
'use strict';
+'require view';
'require fs';
'require ui';
-return L.view.extend({
+return view.extend({
load: function() {
return L.resolveDefault(fs.read_direct('/etc/adblock/adblock.whitelist'), '');
},
'use strict';
+'require view';
+'require dom';
+'require poll';
'require uci';
'require rpc';
'require fs';
expect: { }
});
-return L.view.extend({
+return view.extend({
callDDnsGetEnv: rpc.declare({
object: 'luci.ddns',
ddns_toggle.innerHTML = status['_enabled'] ? _('Stop DDNS') : _('Start DDNS')
- L.dom.content(ddns_enabled, function() {
+ dom.content(ddns_enabled, function() {
return E([], [
E('div', {}, status['_enabled'] ? _('DDNS Autostart enabled') : [
_('DDNS Autostart disabled'),
(resolved[section_id].pid && cfg_enabled == '1'))
stop_opt['disabled'] = 'disabled';
- L.dom.content(tdEl.lastChild, [
+ dom.content(tdEl.lastChild, [
E('button', stop_opt, _('Stop')),
E('button', reload_opt, _('Reload')),
tdEl.lastChild.childNodes[0],
}
return m.render().then(L.bind(function(m, nodes) {
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
return Promise.all([
this.callDDnsGetServicesStatus(),
callDDnsGetStatus()
'use strict';
+'require baseclass';
'require rpc';
'require uci';
-return L.Class.extend({
+return baseclass.extend({
title: _('Dynamic DNS'),
callDDnsGetServicesStatus: rpc.declare({
'use strict';
+'require baseclass';
+'require dom';
'require ui';
'require uci';
'require form';
return [ -1, x, x ];
}
-return L.Class.extend({
+return baseclass.extend({
fmt: function(fmtstr, args, values) {
var repl = [],
wrap = false,
};
var isset = function(val) {
- if (L.isObject(val) && !L.dom.elem(val)) {
+ if (L.isObject(val) && !dom.elem(val)) {
for (var k in val)
if (val.hasOwnProperty(k))
return true;
};
var parse = function(tokens, text) {
- if (L.dom.elem(text)) {
+ if (dom.elem(text)) {
tokens.push('<span data-fmt-placeholder="%d"></span>'.format(values.length));
values.push(text);
}
'use strict';
+'require view';
'require fs';
'require ui';
-return L.view.extend({
+return view.extend({
load: function() {
return L.resolveDefault(fs.read('/etc/firewall.user'), '');
},
'use strict';
+'require view';
'require ui';
'require rpc';
'require uci';
});
}
-return L.view.extend({
+return view.extend({
callHostHints: rpc.declare({
object: 'luci-rpc',
method: 'getHostHints',
'use strict';
+'require view';
'require ui';
'require rpc';
'require uci';
}
}
-return L.view.extend({
+return view.extend({
callHostHints: rpc.declare({
object: 'luci-rpc',
method: 'getHostHints',
'use strict';
+'require view';
'require ui';
'require rpc';
'require uci';
}
}
-return L.view.extend({
+return view.extend({
callHostHints: rpc.declare({
object: 'luci-rpc',
method: 'getHostHints',
'use strict';
+'require view';
'require rpc';
'require uci';
'require form';
'require tools.firewall as fwtool';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
callConntrackHelpers: rpc.declare({
object: 'luci',
method: 'getConntrackHelpers',
'use strict';
+'require view';
'require ui';
'require form';
'require tools.widgets as widgets';
}
}
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require form';
'require tools.widgets as widgets';
}
}
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require fs';
'require form';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.stat('/sbin/block'), null),
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
trigger: _('rssi (service)'),
kernel: false,
addFormOptions(s){
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
trigger: _('switch0 (kernel)'),
kernel: true,
addFormOptions(s){
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
trigger: _('switch1 (kernel)'),
kernel: true,
addFormOptions(s){
'use strict';
+'require baseclass';
'require rpc';
'require uci';
'require form';
expect: { 'ports': [] }
});
-return L.Class.extend({
+return baseclass.extend({
trigger: _('usbport (kernel)'),
kernel: true,
addFormOptions(s){
'use strict';
+'require view';
'require fs';
'require uci';
'require form';
}
});
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require baseclass';
'require fs';
'require uci';
-return L.Class.extend({
+return baseclass.extend({
title: _('miniDLNA Status'),
load: function() {
'use strict';
+'require view';
+'require poll';
'require fs';
-return L.view.extend({
+return view.extend({
render: function() {
- L.Poll.add(function() {
+ poll.add(function() {
return L.resolveDefault(fs.exec('/sbin/logread', ['-e', 'nextdns']), { code: 1 })
.then(function(res) {
var content;
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
function kpi(id, val1, val2, val3)
{
- var e = L.dom.elem(id) ? id : document.getElementById(id);
+ var e = dom.elem(id) ? id : document.getElementById(id);
if (val1 && val2 && val3)
e.innerHTML = _('%s, %s and %s').format(val1, val2, val3);
}
}
- var node = L.dom.elem(id) ? id : document.getElementById(id),
- key = L.dom.elem(id) ? id.id : id,
+ var node = dom.elem(id) ? id : document.getElementById(id),
+ key = dom.elem(id) ? id.id : id,
ctx = node.getContext('2d');
if (chartRegistry.hasOwnProperty(key))
var rxData = [], txData = [];
- L.dom.content(tooltip, [
+ dom.content(tooltip, [
E('div', { 'class': 'head' }, [
E('div', { 'class': 'pie' }, [
E('label', _('Download')),
// This is free software, licensed under the Apache License, Version 2.0
'use strict';
+'require view';
'require form';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
render: function () {
var m, s, o;
'use strict';
+'require view';
'require fs';
'require ui';
'require rpc';
}, 250);
}
-return L.view.extend({
+return view.extend({
load: function() {
return downloadLists();
},
'use strict';
+'require view';
'require form';
var desc = _(""
+ "some very very basic uses of pagekite.</em>"
);
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require fs';
'require form';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.stat('/sbin/block'), null),
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require baseclass';
'require uci';
'require form';
'require network';
return val === 'true' || val === '1' || val === 'yes' || val === 'on';
}
-return L.Class.extend({
+return baseclass.extend({
values_actions: function(o) {
o.value('bypass');
o.value('forward');
'use strict';
+'require view';
+'require poll';
'require form';
'require uci';
'require fs';
expect: { '': {} }
});
-return L.view.extend({
+return view.extend({
render: function(stats) {
var m, s, o;
}
return m.render().finally(function() {
- L.Poll.add(function() {
+ poll.add(function() {
return L.resolveDefault(callServiceList(conf), {})
.then(function(res) {
var instances = null;
'use strict';
+'require view';
'require uci';
'require fs';
'require form';
o.datatype = 'or(ipaddr,cidr)';
}
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.stat('/usr/lib/iptables/libxt_recent.so'), {}),
'use strict';
+'require view';
'require form';
'require uci';
'require ui';
var conf = 'shadowsocks-libev';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require baseclass';
'require fs';
'require uci';
'require tools.prng as random';
var rrdtree = {},
graphdefs = {};
-return L.Class.extend({
+return baseclass.extend({
__init__: function() {
this.opts = {};
},
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('APC UPS'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Conntrack'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Context Switches'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
'require uci';
-return L.Class.extend({
+return baseclass.extend({
title: _('Processor'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
'require uci';
-return L.Class.extend({
+return baseclass.extend({
title: _('CPU Frequency'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
*/
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('cUrl'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Disk Space Usage'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
*/
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Disk Usage'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
*/
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('DNS'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
*/
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Entropy'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Interfaces'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Firewall (IPv6)'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Firewall'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Interrupts'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Wireless'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('System Load'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
*/
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Memory'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Netlink'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('UPS'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
*/
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('OLSRd'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('OpenVPN'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Ping'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Processes'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Sensors'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
*/
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Splash Leases'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('TCP Connections'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
/* Licensed to the public under the Apache License 2.0. */
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Thermal'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
*/
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
title: _('Uptime'),
rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
'use strict';
+'require view';
+'require dom';
'require fs';
'require ui';
'require uci';
'require form';
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
fs.list('/usr/lib/collectd'),
var trEl = this.super('renderRowActions', [ section_id, _('Configure…') ]);
if (!plugin || !plugin.form.addFormOptions)
- L.dom.content(trEl, null);
+ dom.content(trEl, null);
return trEl;
};
'use strict';
+'require view';
+'require dom';
+'require poll';
'require ui';
'require uci';
'require statistics.rrdtool as rrdtool';
activePlugin = null,
activeInstance = null;
-return L.view.extend({
+return view.extend({
load: function() {
return rrdtool.load();
},
activePlugin = plugin;
- L.dom.content(container, [
+ dom.content(container, [
E('p', {}, [
E('em', { 'class': 'spinning' }, [ _('Loading data…') ])
])
})).then(function(blobs) {
var multiple = blobs.length > 1;
- L.dom.content(container, E('div', {}, blobs.map(function(blobs, i) {
+ dom.content(container, E('div', {}, blobs.map(function(blobs, i) {
var plugin_instance = i ? plugin_instances[i-1] : plugin_instances.join('|'),
title = '%s: %s'.format(rrdtool.pluginTitle(plugin), i ? plugin_instance : _('Overview'));
URL.revokeObjectURL(img.src);
});
- L.dom.content(container, null);
+ dom.content(container, null);
if (container.hasAttribute('data-initialized')) {
container.removeAttribute('data-initialized');
var btn = ev.currentTarget;
if (pollFn) {
- L.Poll.remove(pollFn);
+ poll.remove(pollFn);
pollFn = null;
}
if (time.value != '0') {
pollFn = L.bind(this.refreshGraphs, this, host, span, time, container);
- L.Poll.add(pollFn, +time.value);
+ poll.add(pollFn, +time.value);
}
},
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('APCUPS Plugin Configuration'),
description: _('The APCUPS plugin collects statistics about the APC UPS.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Conntrack Plugin Configuration'),
description: _('The conntrack plugin collects statistics about the number of tracked connections.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('CPU Context Switches Plugin Configuration'),
description: _('This plugin collects statistics about the processor context switches.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('CPU Plugin Configuration'),
description: _('The cpu plugin collects basic statistics about the processor usage.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('CPU Frequency Plugin Configuration'),
description: _('This plugin collects statistics about the processor frequency scaling.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('CSV Plugin Configuration'),
description: _('The csv plugin stores collected data in csv file format for further processing by external programs.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('cUrl Plugin Configuration'),
addFormOptions: function(s) {
'use strict';
+'require baseclass';
'require fs';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('DF Plugin Configuration'),
description: _('The df plugin collects statistics about the disk space usage on different devices, mount points or filesystem types.'),
'use strict';
+'require baseclass';
'require fs';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Disk Plugin Configuration'),
description: _('The disk plugin collects detailed usage statistics for selected partitions or whole disks.'),
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
title: _('DNS Plugin Configuration'),
description: _('The dns plugin collects detailed statistics about dns related traffic on selected interfaces.'),
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
title: _('E-Mail Plugin Configuration'),
description: _('The email plugin creates a unix socket which can be used to transmit email-statistics to a running collectd daemon. This plugin is primarily intended to be used in conjunction with Mail::SpamAssasin::Plugin::Collectd but can be used in other ways as well.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Entropy Plugin Configuration'),
description: _('The entropy plugin collects statistics about the available entropy.'),
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
title: _('Exec Plugin Configuration'),
description: _('The exec plugin starts external commands to read values from or to notify external processes when certain threshold values have been reached.'),
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
title: _('Interface Plugin Configuration'),
description: _('The interface plugin collects traffic statistics on selected interfaces.'),
'use strict';
+'require baseclass';
'require fs';
'require uci';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Iptables Plugin Configuration'),
description: _('The iptables plugin will monitor selected firewall rules and collect information about processed bytes and packets per rule.'),
'use strict';
+'require baseclass';
'require fs';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('IRQ Plugin Configuration'),
description: _('The irq plugin will monitor the rate of issues per second for each selected interrupt. If no interrupt is selected then all interrupts are monitored.'),
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
title: _('Wireless iwinfo Plugin Configuration'),
description: _('The iwinfo plugin collects statistics about wireless signal strength, noise and quality.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Load Plugin Configuration'),
description: _('The load plugin collects statistics about the general system load.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Memory Plugin Configuration'),
description: _('The memory plugin collects statistics about the memory usage.'),
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
title: _('Netlink Plugin Configuration'),
description: _('The netlink plugin collects extended information like qdisc-, class- and filter-statistics for selected interfaces.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Network Plugin Configuration'),
description: _('The network plugin provides network based communication between different collectd instances. Collectd can operate both in client and server mode. In client mode locally collected data is transferred to a collectd server instance, in server mode the local instance receives data from other hosts.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('UPS Plugin Configuration'),
description: _('The NUT plugin reads information about Uninterruptible Power Supplies.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('OLSRd Plugin Configuration'),
description: _('The OLSRd plugin reads information about meshed networks from the txtinfo plugin of OLSRd.'),
'use strict';
+'require baseclass';
'require fs';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('OpenVPN Plugin Configuration'),
description: _('The OpenVPN plugin gathers information about the current vpn connection status.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Ping Plugin Configuration'),
description: _('The ping plugin will send icmp echo replies to selected hosts and measure the roundtrip time for each host.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Processes Plugin Configuration'),
description: _('The processes plugin collects information like cpu time, page faults and memory usage of selected processes.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('RRDTool Plugin Configuration'),
description: _('The rrdtool plugin stores the collected data in rrd database files, the foundation of the diagrams.<br /><br /><strong>Warning: Setting the wrong values will result in a very high memory consumption in the temporary directory. This can render the device unusable!</strong>'),
'use strict';
+'require baseclass';
'require fs';
'require form';
/^(?:power)[0-9]*$/, 'power'
];
-return L.Class.extend({
+return baseclass.extend({
title: _('Sensors Plugin Configuration'),
description: _('The sensors plugin uses the Linux Sensors framework to gather environmental statistics.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Splash Leases Plugin Configuration'),
description: _('The splash leases plugin uses libuci to collect statistics about splash leases.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('TCPConns Plugin Configuration'),
description: _('The tcpconns plugin collects information about open tcp connections on selected ports.'),
'use strict';
+'require baseclass';
'require fs';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Thermal Plugin Configuration'),
description: _('The thermal plugin will monitor temperature of the system. Data is typically read from /sys/class/thermal/*/temp ( \'*\' denotes the thermal device to be read, e.g. thermal_zone1 )'),
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
title: _('Unixsock Plugin Configuration'),
description: _('The unixsock plugin creates a unix socket which can be used to read collected data from a running collectd instance.'),
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
title: _('Uptime Plugin Configuration'),
description: _('The uptime plugin collects statistics about the uptime of the system.'),
'use strict';
+'require view';
'require fs';
'require uci';
'require rpc';
o.disabled = 'false';
}
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(callServiceList('transmission')),
'use strict';
+'require view';
'require form';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require uci';
-return L.view.extend({
+return view.extend({
load: function() {
return uci.load('ttyd');
},
'use strict';
+'require baseclass';
+'require dom';
'require rpc';
'require uci';
});
handleDelRule = function(num, ev) {
- L.dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5;
+ dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5;
ev.currentTarget.classList.add('spinning');
ev.currentTarget.disabled = true;
ev.currentTarget.blur();
callUpnpDeleteRule(num);
};
-return L.Class.extend({
+return baseclass.extend({
title: _('Active UPnP Redirects'),
load: function() {
'use strict';
+'require view';
+'require dom';
+'require poll';
'require uci';
'require rpc';
'require form';
});
handleDelRule = function(num, ev) {
- L.dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5;
+ dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5;
ev.currentTarget.classList.add('spinning');
ev.currentTarget.disabled = true;
ev.currentTarget.blur();
callUpnpDeleteRule(num);
};
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
callUpnpGetStatus(),
o.value('deny')
return m.render().then(L.bind(function(m, nodes) {
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
return Promise.all([
callUpnpGetStatus()
]).then(L.bind(this.poll_status, this, nodes));
// This is free software, licensed under the Apache License, Version 2.0
'use strict';
+'require view';
'require fs';
'require ui';
'require uci';
'require form';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
handleDeleteModal: function(m, iface, ev) {
L.showModal(_('Delete interface <em>%h</em>').format(iface), [
E('p', _('The interface will be removed from the database permanently. This cannot be undone.')),
// This is free software, licensed under the Apache License, Version 2.0
'use strict';
+'require view';
'require fs';
'require ui';
-return L.view.extend({
+return view.extend({
renderTab: function(ifaces, style, title) {
var tab = E('div', {
'class': 'cbi-section',
'use strict';
+'require view';
+'require dom';
'require uci';
'require fs';
'require ui';
'require form';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
formdata: { wol: {} },
callHostHints: rpc.declare({
var map = document.querySelector('#maincontent .cbi-map'),
data = this.formdata;
- return L.dom.callClassMethod(map, 'save').then(function() {
+ return dom.callClassMethod(map, 'save').then(function() {
if (!data.wol.mac)
return alert(_('No target host specified!'));
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
'require fs';
'require form';
});
}
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.stat("/usr/sbin/yggdrasilctl"), null),
'use strict';
+'require view';
'require form';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
+'require dom';
+'require poll';
'require rpc';
'require uci';
'require form';
return true;
}
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
callHostHints(),
var node = ipopt.map.findElement('id', ipopt.cbid(section_id));
if (node)
- L.dom.callClassMethod(node, 'setValue', hosts[mac].ipv4);
+ dom.callClassMethod(node, 'setValue', hosts[mac].ipv4);
}, this, ipopt, section_id));
return node;
o = s.taboption('leases', CBILease6Status, '__status6__');
return m.render().then(function(mapEl) {
- L.Poll.add(function() {
+ poll.add(function() {
return callDHCPLeases().then(function(leaseinfo) {
var leases = Array.isArray(leaseinfo.dhcp_leases) ? leaseinfo.dhcp_leases : [],
leases6 = Array.isArray(leaseinfo.dhcp6_leases) ? leaseinfo.dhcp6_leases : [];
'use strict';
+'require view';
+'require dom';
'require fs';
'require ui';
'require uci';
-return L.view.extend({
+return view.extend({
handleCommand: function(exec, args) {
var buttons = document.querySelectorAll('.diag-action > .cbi-button');
var out = document.querySelector('.command-output');
out.style.display = '';
- L.dom.content(out, [ res.stdout || '', res.stderr || '' ]);
+ dom.content(out, [ res.stdout || '', res.stderr || '' ]);
}).catch(function(err) {
ui.addNotification(null, E('p', [ err ]))
}).finally(function() {
'use strict';
+'require view';
'require rpc';
'require form';
-return L.view.extend({
+return view.extend({
callHostHints: rpc.declare({
object: 'luci-rpc',
method: 'getHostHints',
'use strict';
+'require view';
+'require dom';
+'require poll';
'require fs';
'require ui';
'require uci';
function render_modal_status(node, ifc) {
var dev = ifc ? (ifc.getDevice() || ifc.getL3Device() || ifc.getL3Device()) : null;
- L.dom.content(node, [
+ dom.content(node, [
E('img', {
'src': L.resource('icons/%s%s.png').format(dev ? dev.getType() : 'ethernet', (dev && dev.isUp()) ? '' : '_disabled'),
'title': dev ? dev.getTypeI18n() : _('Not present')
c.push(E('small', {}, ifc.isAlias() ? _('Alias of "%s"').format(ifc.isAlias())
: (dev ? dev.getName() : E('em', _('Not present')))));
- L.dom.content(node, c);
+ dom.content(node, c);
return firewall.getZoneByNetwork(ifc.getName()).then(L.bind(function(zone) {
this.style.backgroundColor = zone ? zone.getColor() : '#EEEEEE';
'class': 'cbi-button cbi-button-negative important',
'click': function(ev) {
dsc.setAttribute('disconnect', '');
- L.dom.content(dsc, E('em', _('Interface is shutting down...')));
+ dom.content(dsc, E('em', _('Interface is shutting down...')));
ui.hideModal();
}
}
else {
dsc.setAttribute('disconnect', '');
- L.dom.content(dsc, E('em', _('Interface is shutting down...')));
+ dom.content(dsc, E('em', _('Interface is shutting down...')));
}
});
}
else {
dsc.setAttribute(up ? 'reconnect' : 'disconnect', force ? 'force' : '');
- L.dom.content(dsc, E('em', up ? _('Interface is reconnecting...') : _('Interface is shutting down...')));
+ dom.content(dsc, E('em', up ? _('Interface is reconnecting...') : _('Interface is shutting down...')));
}
}
return mask;
}
-return L.view.extend({
+return view.extend({
poll_status: function(map, networks) {
var resolveZone = null;
dynamic = ifc ? ifc.isDynamic() : false;
if (dsc.hasAttribute('reconnect')) {
- L.dom.content(dsc, E('em', _('Interface is starting...')));
+ dom.content(dsc, E('em', _('Interface is starting...')));
}
else if (dsc.hasAttribute('disconnect')) {
- L.dom.content(dsc, E('em', _('Interface is stopping...')));
+ dom.content(dsc, E('em', _('Interface is stopping...')));
}
else if (ifc.getProtocol() || uci.get('network', ifc.getName()) == null) {
render_status(dsc, ifc, false);
if (e) e.disabled = true;
var link = L.url('admin/system/opkg') + '?query=luci-proto';
- L.dom.content(dsc, [
+ dom.content(dsc, [
E('em', _('Unsupported protocol type.')), E('br'),
E('a', { href: link }, _('Install protocol extensions...'))
]);
}
else {
- L.dom.content(dsc, E('em', _('Interface not present or not connected yet.')));
+ dom.content(dsc, E('em', _('Interface not present or not connected yet.')));
}
if (stat) {
var dev = ifc.getDevice();
- L.dom.content(stat, [
+ dom.content(stat, [
E('img', {
'src': L.resource('icons/%s%s.png').format(dev ? dev.getType() : 'ethernet', (dev && dev.isUp()) ? '' : '_disabled'),
'title': dev ? dev.getTypeI18n() : _('Not present')
disabled = net ? !net.isUp() : true,
dynamic = net ? net.isDynamic() : false;
- L.dom.content(tdEl.lastChild, [
+ dom.content(tdEl.lastChild, [
E('button', {
'class': 'cbi-button cbi-button-neutral reconnect',
'click': iface_updown.bind(this, true, section_id),
return m.render().then(L.bind(function(m, nodes) {
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
var section_ids = m.children[0].cfgsections(),
tasks = [];
'use strict';
+'require view';
'require form';
'require network';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
load: function() {
return network.getDevices();
},
'use strict';
+'require view';
+'require dom';
+'require poll';
'require ui';
'require rpc';
'require uci';
return null;
if (!portstate || !portstate.link)
- L.dom.content(node, [
+ dom.content(node, [
E('img', { src: L.resource('icons/port_down.png') }),
E('br'),
_('no link')
]);
else
- L.dom.content(node, [
+ dom.content(node, [
E('img', { src: L.resource('icons/port_up.png') }),
E('br'),
'%d'.format(portstate.speed) + _('baseT'),
expect: { result: [] }
});
-return L.view.extend({
+return view.extend({
load: function() {
return network.getSwitchTopologies().then(function(topologies) {
var tasks = [];
});
}
- L.Poll.add(L.bind(update_port_status, m, topologies));
+ poll.add(L.bind(update_port_status, m, topologies));
return m.render();
}
'use strict';
+'require view';
+'require dom';
+'require poll';
'require fs';
'require ui';
'require rpc';
if (node == null)
node = E('span', { 'class': 'ifacebadge large', 'data-network': radioNet.getName() }, [ E('small'), E('span') ]);
- L.dom.content(node.firstElementChild, render_signal_badge(
+ dom.content(node.firstElementChild, render_signal_badge(
disabled ? -1 : radioNet.getSignalPercent(),
radioNet.getSignal(), noise, true, radioNet.getMode()));
], [ ' | ', E('br'), E('br'), E('br'), E('br'), E('br'), ' | ', E('br'), ' | ' ]);
if (!is_assoc)
- L.dom.append(node.lastElementChild, E('em', disabled ? _('Wireless is disabled') : _('Wireless is not associated')));
+ dom.append(node.lastElementChild, E('em', disabled ? _('Wireless is disabled') : _('Wireless is not associated')));
return node;
}
btn.disabled = true;
dsc.setAttribute('restart', '');
- L.dom.content(dsc, E('em', _('Device is restarting…')));
+ dom.content(dsc, E('em', _('Device is restarting…')));
}
function network_updown(id, map, ev) {
renderWidget: function(section_id, option_index, cfgvalue) {
var elem = E('div');
- L.dom.content(elem, [
+ dom.content(elem, [
E('label', { 'style': 'float:left; margin-right:3px' }, [
_('Mode'), E('br'),
E('select', {
var widget = form.ListValue.prototype.renderWidget.apply(this, [section_id, option_index, cfgvalue]);
widget.firstElementChild.style.width = 'auto';
- L.dom.append(widget, E('span', [
+ dom.append(widget, E('span', [
' - ', _('Current power'), ': ',
E('span', [ this.powerval != null ? '%d dBm'.format(this.powerval) : E('em', _('unknown')) ]),
this.poweroff ? ' + %d dB offset = %s dBm'.format(this.poweroff, this.powerval != null ? this.powerval + this.poweroff : '?') : ''
}
});
-return L.view.extend({
+return view.extend({
poll_status: function(map, data) {
var rows = map.querySelectorAll('.cbi-section-table-row[data-sid]');
busy = btns[0].classList.contains('spinning') || btns[1].classList.contains('spinning') || btns[2].classList.contains('spinning');
if (radioDev) {
- L.dom.content(badge, render_radio_badge(radioDev));
- L.dom.content(stat, render_radio_status(radioDev, data[2].filter(function(n) { return n.getWifiDeviceName() == radioDev.getName() })));
+ dom.content(badge, render_radio_badge(radioDev));
+ dom.content(stat, render_radio_status(radioDev, data[2].filter(function(n) { return n.getWifiDeviceName() == radioDev.getName() })));
}
else {
- L.dom.content(badge, render_network_badge(radioNet));
- L.dom.content(stat, render_network_status(radioNet));
+ dom.content(badge, render_network_badge(radioNet));
+ dom.content(stat, render_network_status(radioNet));
}
if (stat.hasAttribute('restart'))
- L.dom.content(stat, E('em', _('Device is restarting…')));
+ dom.content(stat, E('em', _('Device is restarting…')));
btns[0].disabled = busy;
btns[1].disabled = busy;
row.push(E('button', {
'class': 'cbi-button cbi-button-remove',
'click': L.bind(function(net, mac, ev) {
- L.dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5;
+ dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5;
ev.currentTarget.classList.add('spinning');
ev.currentTarget.disabled = true;
ev.currentTarget.blur();
this.pollFn = L.bind(this.handleScanRefresh, this, radioDev, {}, table, stop);
- L.Poll.add(this.pollFn);
- L.Poll.start();
+ poll.add(this.pollFn);
+ poll.start();
};
s.handleScanRefresh = function(radioDev, scanCache, table, stop) {
var btn = ev.currentTarget;
if (btn.getAttribute('data-state') == 'stop') {
- L.Poll.remove(this.pollFn);
+ poll.remove(this.pollFn);
btn.firstChild.data = _('Start refresh');
btn.setAttribute('data-state', 'start');
}
else {
- L.Poll.add(this.pollFn);
+ poll.add(this.pollFn);
btn.firstChild.data = _('Stop refresh');
btn.setAttribute('data-state', 'stop');
btn.classList.add('spinning');
};
s.handleScanAbort = function(ev) {
- var md = L.dom.parent(ev.target, 'div[aria-modal="true"]');
+ var md = dom.parent(ev.target, 'div[aria-modal="true"]');
if (md) {
md.style.maxWidth = '';
md.style.maxHeight = '';
}
ui.hideModal();
- L.Poll.remove(this.pollFn);
+ poll.remove(this.pollFn);
this.pollFn = null;
};
};
return m.render().then(L.bind(function(m, nodes) {
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
var section_ids = m.children[0].cfgsections(),
tasks = [ network.getHostHints(), network.getWifiDevices() ];
'use strict';
+'require view';
+'require dom';
+'require poll';
+'require request';
'require ui';
'require rpc';
'require network';
return [ '%1024.2mbit/s'.format(n * 8), br ? E('br') : ' ', '(%1024.2mB/s)'.format(n) ]
}
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
this.loadSVG(L.resource('bandwidth.svg')),
},
pollData: function() {
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
var tasks = [];
for (var i = 0; i < graphPolls.length; i++) {
},
loadSVG: function(src) {
- return L.Request.get(src).then(function(response) {
+ return request.get(src).then(function(response) {
if (!response.ok)
throw new Error(response.statusText);
tab.querySelector('#scale').firstChild.data = _('(%d minute window, %d second interval)').format(info.timeframe, info.interval);
- L.dom.content(tab.querySelector('#rx_bw_cur'), rate(info.line_current[0], true));
- L.dom.content(tab.querySelector('#rx_bw_avg'), rate(info.line_average[0], true));
- L.dom.content(tab.querySelector('#rx_bw_peak'), rate(info.line_peak[0], true));
+ dom.content(tab.querySelector('#rx_bw_cur'), rate(info.line_current[0], true));
+ dom.content(tab.querySelector('#rx_bw_avg'), rate(info.line_average[0], true));
+ dom.content(tab.querySelector('#rx_bw_peak'), rate(info.line_peak[0], true));
- L.dom.content(tab.querySelector('#tx_bw_cur'), rate(info.line_current[1], true));
- L.dom.content(tab.querySelector('#tx_bw_avg'), rate(info.line_average[1], true));
- L.dom.content(tab.querySelector('#tx_bw_peak'), rate(info.line_peak[1], true));
+ dom.content(tab.querySelector('#tx_bw_cur'), rate(info.line_current[1], true));
+ dom.content(tab.querySelector('#tx_bw_avg'), rate(info.line_average[1], true));
+ dom.content(tab.querySelector('#tx_bw_peak'), rate(info.line_peak[1], true));
});
}
'use strict';
+'require view';
+'require poll';
+'require request';
'require rpc';
var callLuciRealtimeStats = rpc.declare({
Math.log2 = Math.log2 || function(x) { return Math.log(x) * Math.LOG2E; };
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
this.loadSVG(L.resource('connections.svg'))
},
pollData: function() {
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
var tasks = [
L.resolveDefault(callLuciConntrackList(), [])
];
},
loadSVG: function(src) {
- return L.Request.get(src).then(function(response) {
+ return request.get(src).then(function(response) {
if (!response.ok)
throw new Error(response.statusText);
'use strict';
+'require view';
'require fs';
'require ui';
-return L.view.extend({
+return view.extend({
load: function() {
return fs.exec_direct('/bin/dmesg', [ '-r' ]).catch(function(err) {
ui.addNotification(null, E('p', {}, _('Unable to load log data: ' + err.message)));
'use strict';
+'require baseclass';
'require fs';
'require rpc';
method: 'info'
});
-return L.Class.extend({
+return baseclass.extend({
title: _('System'),
load: function() {
'use strict';
+'require baseclass';
'require rpc';
var callSystemInfo = rpc.declare({
}, E('div', { 'style': 'width:%.2f%%'.format(pc) }));
}
-return L.Class.extend({
+return baseclass.extend({
title: _('Memory'),
load: function() {
'use strict';
+'require baseclass';
'require fs';
'require network';
]);
}
-return L.Class.extend({
+return baseclass.extend({
title: _('Network'),
load: function() {
'use strict';
+'require baseclass';
'require rpc';
'require network';
expect: { '': {} }
});
-return L.Class.extend({
+return baseclass.extend({
title: '',
load: function() {
'use strict';
+'require baseclass';
'require rpc';
var callLuciDSLStatus = rpc.declare({
]);
}
-return L.Class.extend({
+return baseclass.extend({
title: _('DSL'),
load: function() {
'use strict';
+'require baseclass';
+'require dom';
'require network';
function renderbox(radio, networks) {
return s;
}
-return L.Class.extend({
+return baseclass.extend({
title: _('Wireless'),
handleDelClient: function(wifinet, mac, ev) {
- L.dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5;
+ dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5;
ev.currentTarget.classList.add('spinning');
ev.currentTarget.disabled = true;
ev.currentTarget.blur();
'use strict';
+'require view';
+'require dom';
+'require poll';
'require fs';
'require network';
containers[i].parentNode.style.display = '';
containers[i].parentNode.classList.add('fade-in');
- L.dom.content(containers[i], content);
+ dom.content(containers[i], content);
}
}
};
return step().then(function() {
- L.Poll.add(step);
+ poll.add(step);
});
}
-return L.view.extend({
+return view.extend({
load: function() {
return L.resolveDefault(fs.list('/www' + L.resource('view/status/include')), []).then(function(entries) {
return Promise.all(entries.filter(function(e) {
'use strict';
+'require view';
+'require poll';
'require fs';
'require ui';
var table_names = [ 'Filter', 'NAT', 'Mangle', 'Raw' ];
-return L.view.extend({
+return view.extend({
load: function() {
return L.resolveDefault(fs.stat('/usr/sbin/ip6tables'));
},
if (has_ip6tables)
cmds.push('/usr/sbin/ip6tables');
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
var tasks = [];
for (var i = 0; i < cmds.length; i++) {
'use strict';
+'require view';
+'require poll';
+'require request';
'require rpc';
var callLuciRealtimeStats = rpc.declare({
Math.log2 = Math.log2 || function(x) { return Math.log(x) * Math.LOG2E; };
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
this.loadSVG(L.resource('load.svg'))
},
pollData: function() {
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
var tasks = [];
for (var i = 0; i < graphPolls.length; i++) {
},
loadSVG: function(src) {
- return L.Request.get(src).then(function(response) {
+ return request.get(src).then(function(response) {
if (!response.ok)
throw new Error(response.statusText);
'use strict';
+'require view';
'require fs';
'require ui';
'require rpc';
expect: { result: [] }
});
-return L.view.extend({
+return view.extend({
load: function() {
return callLuciProcessList();
},
'use strict';
+'require view';
'require fs';
'require rpc';
'require validation';
v6 ? '%x:%x:%x:%x:%x:%x:%x:%x' : '%d.%d.%d.%d', words);
}
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
callNetworkInterfaceDump(),
'use strict';
+'require view';
'require fs';
'require ui';
-return L.view.extend({
+return view.extend({
load: function() {
return fs.exec_direct('/sbin/logread', [ '-e', '^' ]).catch(function(err) {
ui.addNotification(null, E('p', {}, _('Unable to load log data: ' + err.message)));
'use strict';
+'require view';
+'require poll';
+'require request';
'require ui';
'require rpc';
'require network';
Math.log2 = Math.log2 || function(x) { return Math.log(x) * Math.LOG2E; };
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
this.loadSVG(L.resource('wireless.svg')),
},
pollData: function() {
- L.Poll.add(L.bind(function() {
+ poll.add(L.bind(function() {
var tasks = [];
for (var i = 0; i < graphPolls.length; i++) {
},
loadSVG: function(src) {
- return L.Request.get(src).then(function(response) {
+ return request.get(src).then(function(response) {
if (!response.ok)
throw new Error(response.statusText);
</div>
<script type="text/javascript">L.require('view.status.index').catch(function(err) {
- L.dom.content(document.querySelector('#view'), null);
+ dom.content(document.querySelector('#view'), null);
L.error(err);
});</script>
'use strict';
+'require view';
'require fs';
'require ui';
-return L.view.extend({
+return view.extend({
load: function() {
return L.resolveDefault(fs.read('/etc/crontabs/root'), '');
},
'use strict';
+'require view';
'require form';
'require tools.widgets as widgets';
-return L.view.extend({
+return view.extend({
render: function() {
var m, s, o;
'use strict';
+'require view';
+'require dom';
'require form';
'require rpc';
'require fs';
var mapdata = { actions: {}, config: {} };
-return L.view.extend({
+return view.extend({
load: function() {
var tasks = [
L.resolveDefault(fs.stat('/lib/upgrade/platform.sh'), {}),
},
handleBlock: function(hostname, ev) {
- var mtdblock = L.dom.parent(ev.target, '.cbi-section').querySelector('[data-name="mtdselect"] select').value;
+ var mtdblock = dom.parent(ev.target, '.cbi-section').querySelector('[data-name="mtdselect"] select').value;
var form = E('form', {
'method': 'post',
'action': L.env.cgi_base + '/cgi-download',
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
trigger: _('default-on (kernel)'),
kernel: true,
addFormOptions(s){
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
trigger: _('heartbeat (kernel)'),
kernel: true,
addFormOptions(s){
'use strict';
+'require baseclass';
'require form';
'require tools.widgets as widgets';
-return L.Class.extend({
+return baseclass.extend({
trigger: _("netdev (kernel)"),
kernel: true,
addFormOptions(s){
'use strict';
+'require baseclass';
-return L.Class.extend({
+return baseclass.extend({
trigger: _('none (kernel)'),
kernel: true,
addFormOptions(s){
'use strict';
+'require baseclass';
'require form';
-return L.Class.extend({
+return baseclass.extend({
trigger: _('timer (kernel)'),
kernel: true,
addFormOptions(s){
'use strict';
+'require view';
'require uci';
'require rpc';
'require form';
expect: { '': {} }
});
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
callLeds(),
'use strict';
+'require view';
'require fs';
'require ui';
'require uci';
}
}
-return L.view.extend({
+return view.extend({
handleDetect: function(m, ev) {
return callBlockDetect()
.then(L.bind(uci.unload, uci, 'fstab'))
'use strict';
+'require view';
+'require dom';
'require ui';
'require form';
'require rpc';
expect: { result: false }
});
-return L.view.extend({
+return view.extend({
checkPassword: function(section_id, value) {
var strength = document.querySelector('.cbi-value-description'),
strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g"),
handleSave: function() {
var map = document.querySelector('.cbi-map');
- return L.dom.callClassMethod(map, 'save').then(function() {
+ return dom.callClassMethod(map, 'save').then(function() {
if (formData.password.pw1 == null || formData.password.pw1.length == 0)
return;
formData.password.pw1 = null;
formData.password.pw2 = null;
- L.dom.callClassMethod(map, 'render');
+ dom.callClassMethod(map, 'render');
});
});
},
'use strict';
+'require view';
'require fs';
'require ui';
'require uci';
-return L.view.extend({
+return view.extend({
load: function() {
return uci.changes();
},
'use strict';
+'require view';
'require fs';
'require ui';
ev.preventDefault()
}
-return L.view.extend({
+return view.extend({
load: function() {
return fs.lines('/etc/dropbear/authorized_keys').then(function(lines) {
return lines.filter(function(line) {
'use strict';
+'require view';
'require rpc';
'require fs';
'require ui';
-return L.view.extend({
+return view.extend({
callInitList: rpc.declare({
object: 'luci',
method: 'getInitList',
'use strict';
+'require view';
+'require poll';
'require ui';
'require uci';
'require rpc';
},
});
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
callInitList('sysntpd'),
}
return m.render().then(function(mapEl) {
- L.Poll.add(function() {
+ poll.add(function() {
return callGetLocaltime().then(function(t) {
mapEl.querySelector('#localtime').value = new Date(t * 1000).toLocaleString();
});