summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-acme/Makefile2
-rw-r--r--applications/luci-app-adblock-fast/Makefile1
-rw-r--r--applications/luci-app-adblock/Makefile3
-rw-r--r--applications/luci-app-advanced-reboot/Makefile3
-rw-r--r--applications/luci-app-ahcp/Makefile2
-rw-r--r--applications/luci-app-apinger/Makefile3
-rw-r--r--applications/luci-app-aria2/Makefile3
-rw-r--r--applications/luci-app-babeld/Makefile3
-rw-r--r--applications/luci-app-babeld/htdocs/luci-static/resources/babeld.js171
-rw-r--r--applications/luci-app-babeld/htdocs/luci-static/resources/view/babeld/babeld-view.js95
-rw-r--r--applications/luci-app-babeld/luasrc/view/babeld.htm22
-rw-r--r--applications/luci-app-babeld/root/usr/share/luci/menu.d/luci-app-babeld.json10
-rw-r--r--applications/luci-app-babeld/root/usr/share/rpcd/acl.d/luci-app-babeld.json22
-rw-r--r--applications/luci-app-babeld/root/www/luci-static/resources/babeld.js189
-rw-r--r--applications/luci-app-banip/Makefile3
-rw-r--r--applications/luci-app-bmx7/Makefile2
-rw-r--r--applications/luci-app-clamav/Makefile2
-rw-r--r--applications/luci-app-commands/Makefile1
-rw-r--r--applications/luci-app-coovachilli/Makefile2
-rw-r--r--applications/luci-app-cshark/Makefile3
-rw-r--r--applications/luci-app-dawn/Makefile3
-rw-r--r--applications/luci-app-dcwapd/Makefile2
-rw-r--r--applications/luci-app-ddns/Makefile3
-rw-r--r--applications/luci-app-diag-core/Makefile2
-rw-r--r--applications/luci-app-dnscrypt-proxy/Makefile3
-rw-r--r--applications/luci-app-dockerman/Makefile2
-rw-r--r--applications/luci-app-dump1090/Makefile2
-rw-r--r--applications/luci-app-dynapoint/Makefile2
-rw-r--r--applications/luci-app-eoip/Makefile1
-rw-r--r--applications/luci-app-firewall/Makefile2
-rw-r--r--applications/luci-app-frpc/Makefile2
-rw-r--r--applications/luci-app-frps/Makefile2
-rw-r--r--applications/luci-app-fwknopd/Makefile2
-rw-r--r--applications/luci-app-hd-idle/Makefile2
-rw-r--r--applications/luci-app-https-dns-proxy/Makefile1
-rw-r--r--applications/luci-app-keepalived/Makefile1
-rw-r--r--applications/luci-app-ksmbd/Makefile2
-rw-r--r--applications/luci-app-ledtrig-rssi/Makefile3
-rw-r--r--applications/luci-app-ledtrig-switch/Makefile2
-rw-r--r--applications/luci-app-ledtrig-usbport/Makefile3
-rw-r--r--applications/luci-app-lorawan-basicstation/Makefile3
-rw-r--r--applications/luci-app-ltqtapi/Makefile2
-rw-r--r--applications/luci-app-lxc/Makefile3
-rw-r--r--applications/luci-app-minidlna/Makefile2
-rw-r--r--applications/luci-app-mjpg-streamer/Makefile2
-rw-r--r--applications/luci-app-mosquitto/Makefile3
-rw-r--r--applications/luci-app-mwan3/Makefile3
-rw-r--r--applications/luci-app-natmap/Makefile2
-rw-r--r--applications/luci-app-nextdns/Makefile3
-rw-r--r--applications/luci-app-nft-qos/Makefile2
-rw-r--r--applications/luci-app-nlbwmon/Makefile2
-rw-r--r--applications/luci-app-ntpc/Makefile2
-rw-r--r--applications/luci-app-nut/Makefile3
-rw-r--r--applications/luci-app-ocserv/Makefile2
-rw-r--r--applications/luci-app-olsr-services/Makefile2
-rw-r--r--applications/luci-app-olsr-viz/Makefile2
-rwxr-xr-xapplications/luci-app-olsr-viz/htdocs/cgi-bin/olsr-viz.sh40
-rwxr-xr-xapplications/luci-app-olsr-viz/htdocs/cgi-bin/vizdata.sh48
-rw-r--r--applications/luci-app-olsr-viz/htdocs/luci-static/resources/olsr-viz.js438
-rw-r--r--applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js166
-rw-r--r--applications/luci-app-olsr-viz/luasrc/view/olsr-viz/olsr-viz.htm10
-rw-r--r--applications/luci-app-olsr-viz/root/usr/libexec/rpcd/olsrvizinfo59
-rw-r--r--applications/luci-app-olsr-viz/root/usr/share/luci/menu.d/luci-app-olsr-viz.json12
-rw-r--r--applications/luci-app-olsr-viz/root/usr/share/rpcd/acl.d/luci-app-olsr-viz-unauthenticated.json12
-rw-r--r--applications/luci-app-olsr/Makefile2
-rw-r--r--applications/luci-app-omcproxy/Makefile3
-rw-r--r--applications/luci-app-openvpn/Makefile2
-rw-r--r--applications/luci-app-openwisp/Makefile2
-rw-r--r--applications/luci-app-opkg/Makefile2
-rw-r--r--applications/luci-app-p910nd/Makefile2
-rw-r--r--applications/luci-app-pagekitec/Makefile2
-rw-r--r--applications/luci-app-pbr/Makefile1
-rw-r--r--applications/luci-app-polipo/Makefile2
-rw-r--r--applications/luci-app-privoxy/Makefile3
-rw-r--r--applications/luci-app-qos/Makefile2
-rw-r--r--applications/luci-app-radicale/Makefile3
-rw-r--r--applications/luci-app-radicale2/Makefile3
-rw-r--r--applications/luci-app-rp-pppoe-server/Makefile2
-rw-r--r--applications/luci-app-samba4/Makefile2
-rw-r--r--applications/luci-app-ser2net/Makefile2
-rw-r--r--applications/luci-app-shairplay/Makefile2
-rw-r--r--applications/luci-app-siitwizard/Makefile2
-rw-r--r--applications/luci-app-smartdns/Makefile3
-rw-r--r--applications/luci-app-snmpd/Makefile1
-rw-r--r--applications/luci-app-softether/Makefile2
-rw-r--r--applications/luci-app-splash/Makefile2
-rw-r--r--applications/luci-app-sqm/Makefile3
-rw-r--r--applications/luci-app-squid/Makefile2
-rw-r--r--applications/luci-app-tinyproxy/Makefile2
-rw-r--r--applications/luci-app-transmission/Makefile2
-rw-r--r--applications/luci-app-travelmate/Makefile3
-rw-r--r--applications/luci-app-ttyd/Makefile2
-rw-r--r--applications/luci-app-udpxy/Makefile2
-rw-r--r--applications/luci-app-uhttpd/Makefile2
-rw-r--r--applications/luci-app-unbound/Makefile2
-rw-r--r--applications/luci-app-upnp/Makefile2
-rw-r--r--applications/luci-app-vnstat/Makefile2
-rw-r--r--applications/luci-app-vnstat2/Makefile2
-rw-r--r--applications/luci-app-watchcat/Makefile2
-rw-r--r--applications/luci-app-wifischedule/Makefile2
-rw-r--r--applications/luci-app-wol/Makefile2
-rw-r--r--applications/luci-app-xfrpc/Makefile2
-rw-r--r--applications/luci-app-xinetd/Makefile3
-rw-r--r--applications/luci-app-yggdrasil/Makefile2
104 files changed, 809 insertions, 684 deletions
diff --git a/applications/luci-app-acme/Makefile b/applications/luci-app-acme/Makefile
index 8f9bf8ec79..3853b4d7ac 100644
--- a/applications/luci-app-acme/Makefile
+++ b/applications/luci-app-acme/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=ACME package - LuCI interface
-LUCI_DEPENDS:=+luci-mod-admin-full +acme
+LUCI_DEPENDS:=+luci-base +acme
PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
PKG_LICENSE:=GPL-3.0-or-later
diff --git a/applications/luci-app-adblock-fast/Makefile b/applications/luci-app-adblock-fast/Makefile
index 7dcb82ba73..b55ac6a1eb 100644
--- a/applications/luci-app-adblock-fast/Makefile
+++ b/applications/luci-app-adblock-fast/Makefile
@@ -10,7 +10,6 @@ PKG_VERSION:=1.0.0-1
LUCI_TITLE:=AdBlock-Fast Web UI
LUCI_DESCRIPTION:=Provides Web UI for adblock-fast service.
LUCI_DEPENDS:=+luci-base +adblock-fast +jsonfilter
-LUCI_PKGARCH:=all
include ../../luci.mk
diff --git a/applications/luci-app-adblock/Makefile b/applications/luci-app-adblock/Makefile
index 0d4bc93949..25f90af4f9 100644
--- a/applications/luci-app-adblock/Makefile
+++ b/applications/luci-app-adblock/Makefile
@@ -4,8 +4,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Adblock
-LUCI_DEPENDS:=+adblock
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +adblock
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-advanced-reboot/Makefile b/applications/luci-app-advanced-reboot/Makefile
index adee08a63a..6c1dead622 100644
--- a/applications/luci-app-advanced-reboot/Makefile
+++ b/applications/luci-app-advanced-reboot/Makefile
@@ -12,8 +12,7 @@ LUCI_URL:=https://docs.openwrt.melmac.net/luci-app-advanced-reboot/
LUCI_DESCRIPTION:=Provides Web UI (found under System/Advanced Reboot) to reboot supported Linksys and ZyXEL routers to\
an alternative partition. Also provides Web UI to shut down (power off) your device. Supported dual-partition\
routers are listed at https://docs.openwrt.melmac.net/luci-app-advanced-reboot/
-LUCI_DEPENDS:=+luci-mod-admin-full +jshn
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +jshn
include ../../luci.mk
diff --git a/applications/luci-app-ahcp/Makefile b/applications/luci-app-ahcp/Makefile
index 10859345e6..f66be24766 100644
--- a/applications/luci-app-ahcp/Makefile
+++ b/applications/luci-app-ahcp/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for AHCPd
-LUCI_DEPENDS:=+luci-compat +ahcpd
+LUCI_DEPENDS:=+luci-base +luci-compat +ahcpd
include ../../luci.mk
diff --git a/applications/luci-app-apinger/Makefile b/applications/luci-app-apinger/Makefile
index 78de53a7e8..81e1d55da3 100644
--- a/applications/luci-app-apinger/Makefile
+++ b/applications/luci-app-apinger/Makefile
@@ -7,8 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for the Apinger
-LUCI_DEPENDS:=+apinger +apinger-rrd
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +apinger +apinger-rrd
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Jaymin Patel <jem.patel@gmail.com>
diff --git a/applications/luci-app-aria2/Makefile b/applications/luci-app-aria2/Makefile
index ad6bd1d184..3ddc4dd580 100644
--- a/applications/luci-app-aria2/Makefile
+++ b/applications/luci-app-aria2/Makefile
@@ -7,8 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for Aria2
-LUCI_DEPENDS:=+aria2
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +aria2
PKG_MAINTAINER:=Xingwang Liao <kuoruan@gmail.com>
PKG_LICENSE:=MIT
diff --git a/applications/luci-app-babeld/Makefile b/applications/luci-app-babeld/Makefile
index 6af9280261..2c3675c3ee 100644
--- a/applications/luci-app-babeld/Makefile
+++ b/applications/luci-app-babeld/Makefile
@@ -1,8 +1,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for babeld
-LUCI_DEPENDS:=+babeld +luci-compat
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +babeld
include ../../luci.mk
diff --git a/applications/luci-app-babeld/htdocs/luci-static/resources/babeld.js b/applications/luci-app-babeld/htdocs/luci-static/resources/babeld.js
new file mode 100644
index 0000000000..6bcbdf0e29
--- /dev/null
+++ b/applications/luci-app-babeld/htdocs/luci-static/resources/babeld.js
@@ -0,0 +1,171 @@
+function renderTableXRoutes(ubus_data, target_div) {
+ var data = ubus_data;
+ for (var protocol in data) {
+ var target = target_div;
+
+ var title = document.createElement('h3');
+ title.appendChild(document.createTextNode('X-Routes ' + protocol));
+ target.appendChild(title);
+
+ var table = document.createElement('table');
+ table.setAttribute('class', 'table');
+ table.setAttribute('id', 'babel_overview_xroutes_' + protocol);
+
+ var headerRow = document.createElement('tr');
+ headerRow.setAttribute('class', 'tr table-titles');
+ var headerContent = '<th class="th" style="font-weight: 700;">' + '%h'.format(protocol) + ' Prefix</th>\
+ <th class="th" style="font-weight: 700;">Metric</th>\
+ <th class="th" style="font-weight: 700;">Source-Prefix</th>';
+
+ headerRow.innerHTML = headerContent;
+ table.appendChild(headerRow);
+
+
+ for (var prefix in data[protocol]) {
+ var prefixRow = document.createElement('tr');
+ prefixRow.setAttribute('class', 'tr');
+ var prefixContent = '<td class="td" data-title="xroutes_' + '%h'.format(protocol) + '_prefix">' + '%h'.format(prefix) + '</td>\
+ <td class="td" data-title="xroutes_' + '%h'.format(protocol) + '_metric">' + '%h'.format(data[protocol][prefix]["metric"]) + '</td>\
+ <td class="td" data-title="xroutes_' + '%h'.format(protocol) + '_src-prefix">' + '%h'.format(data[protocol][prefix]["src-prefix"]) + '</td>';
+
+ prefixRow.innerHTML = prefixContent;
+ table.appendChild(prefixRow);
+ }
+ target.appendChild(table);
+ }
+}
+
+function renderTableRoutes(ubus_data, target_div) {
+ var data = ubus_data;
+ for (var protocol in data) {
+ var target = target_div;
+
+ var title = document.createElement('h3');
+ title.appendChild(document.createTextNode('Routes ' + protocol));
+ target.appendChild(title);
+
+ var table = document.createElement('table');
+ table.setAttribute('class', 'table');
+ table.setAttribute('id', 'babel_overview_routes_' + protocol);
+
+ var headerRow = document.createElement('tr');
+ headerRow.setAttribute('class', 'tr table-titles');
+ var headerContent = '<th class="th" style="font-weight: 700;">' + '%h'.format(protocol) + ' Prefix</th>\
+ <th class="th" style="font-weight: 700;">Source-Prefix</th>\
+ <th class="th" style="font-weight: 700;">Route-Metric</th>\
+ <th class="th" style="font-weight: 700;">Route Smoothed Metric</th>\
+ <th class="th" style="font-weight: 700;">Refmetric</th>\
+ <th class="th" style="font-weight: 700;">ID</th>\
+ <th class="th" style="font-weight: 700;">Seq. No.</th>\
+ <th class="th" style="font-weight: 700;">Channes</th>\
+ <th class="th" style="font-weight: 700;">Age</th>\
+ <th class="th" style="font-weight: 700;">Via</th>\
+ <th class="th" style="font-weight: 700;">Nexthop</th>\
+ <th class="th" style="font-weight: 700;">Installed</th>\
+ <th class="th" style="font-weight: 700;">Feasible</th>';
+
+ headerRow.innerHTML = headerContent;
+ table.appendChild(headerRow);
+
+ for (var prefix in data[protocol]) {
+ var prefixRow = document.createElement('tr');
+ prefixRow.setAttribute('class', 'tr');
+ var prefixContent = '<td class="td" data-title="routes_' + '%h'.format(protocol) + '_prefix">' + '%h'.format(prefix) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_src-prefix">' + '%h'.format(data[protocol][prefix]["src-prefix"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_metric">' + '%h'.format(data[protocol][prefix]["route_metric"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_rout-smoothed-metric">' + '%h'.format(data[protocol][prefix]["route_smoothed_metric"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_refmetric">' + '%h'.format(data[protocol][prefix]["refmetric"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_id">' + '%h'.format(data[protocol][prefix]["id"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_seqno">' + '%h'.format(data[protocol][prefix]["seqno"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_channels">' + '%h'.format(data[protocol][prefix]["channels"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_age">' + '%h'.format(data[protocol][prefix]["age"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_via">' + '%h'.format(data[protocol][prefix]["via"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_nexthop">' + '%h'.format(data[protocol][prefix]["nexthop"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_installed">' + '%h'.format(data[protocol][prefix]["installed"]) + '</td>\
+ <td class="td" data-title="routes_' + '%h'.format(protocol) + '_feasible">' + '%h'.format(data[protocol][prefix]["feasible"]) + '</td>';
+
+ prefixRow.innerHTML = prefixContent;
+ table.appendChild(prefixRow);
+ }
+ target.appendChild(table);
+ }
+}
+
+function renderTableNeighbours(ubus_data, target_div) {
+ var data = ubus_data;
+ for (var protocol in data) {
+ var target = target_div;
+
+ var title = document.createElement('h3');
+ title.appendChild(document.createTextNode('Neighbours ' + protocol));
+ target.appendChild(title);
+
+ var table = document.createElement('table');
+ table.setAttribute('class', 'table');
+ table.setAttribute('id', 'babel_overview_neighbours_' + protocol);
+
+ var headerRow = document.createElement('tr');
+ headerRow.setAttribute('class', 'tr table-titles');
+ var headerContent = '<th class="th" style="font-weight: 700;">' + '%h'.format(protocol) + ' Neighbour</th>\
+ <th class="th" style="font-weight: 700;">Device</th>\
+ <th class="th" style="font-weight: 700;">Hello-Reach</th>\
+ <th class="th" style="font-weight: 700;">RX cost</th>\
+ <th class="th" style="font-weight: 700;">TX cost</th>\
+ <th class="th" style="font-weight: 700;">RTT</th>\
+ <th class="th" style="font-weight: 700;">Channel</th>\
+ <th class="th" style="font-weight: 700;">Interface up</th>';
+
+ headerRow.innerHTML = headerContent;
+ table.appendChild(headerRow);
+
+ for (var neighbour in data[protocol]) {
+ var neighbourRow = document.createElement('tr');
+ neighbourRow.setAttribute('class', 'tr');
+ var neighbourContent = '<td class="td" data-title="' + '%h'.format(protocol) + '_neighbour">' + '%h'.format(neighbour) + '</td>\
+ <td class="td" data-title="neighbours_' + '%h'.format(protocol) + '_dev">' + '%h'.format(data[protocol][neighbour]["dev"]) + '</td>\
+ <td class="td" data-title="neighbours_' + '%h'.format(protocol) + '_hello-reach">' + '%h'.format(data[protocol][neighbour]["hello-reach"]) + '</td>\
+ <td class="td" data-title="neighbours_' + '%h'.format(protocol) + '_rxcost">' + '%h'.format(data[protocol][neighbour]["rxcost"]) + '</td>\
+ <td class="td" data-title="neighbours_' + '%h'.format(protocol) + '_txcost">' + '%h'.format(data[protocol][neighbour]["txcost"]) + '</td>\
+ <td class="td" data-title="neighbours_' + '%h'.format(protocol) + '_rtt">' + '%h'.format(data[protocol][neighbour]["rtt"]) + '</td>\
+ <td class="td" data-title="neighbours_' + '%h'.format(protocol) + '_channel">' + '%h'.format(data[protocol][neighbour]["channel"]) + '</td>\
+ <td class="td" data-title="neighbours_' + '%h'.format(protocol) + '_if_up">' + '%h'.format(data[protocol][neighbour]["if_up"]) + '</td>';
+
+ neighbourRow.innerHTML = neighbourContent;
+ table.appendChild(neighbourRow);
+ }
+ target.appendChild(table);
+ }
+}
+
+function renderTableInfo(ubus_data, target_div) {
+ var data = ubus_data;
+ var target = target_div;
+
+ var title = document.createElement('h3');
+ title.appendChild(document.createTextNode('Info'));
+ target.appendChild(title);
+
+ var table = document.createElement('table');
+ table.setAttribute('class', 'table');
+ table.setAttribute('id', 'babel_overview_info');
+
+
+ var headerRow = document.createElement('tr');
+ headerRow.setAttribute('class', 'tr table-titles');
+ var headerContent = '<th class="th" style="font-weight: 700;">Babeld Version</th>\
+ <th class="th" style="font-weight: 700;">My-ID</th>\
+ <th class="th" style="font-weight: 700;">Host</th>';
+
+ headerRow.innerHTML = headerContent;
+ table.appendChild(headerRow);
+
+ var neighbourRow = document.createElement('tr');
+ neighbourRow.setAttribute('class', 'tr');
+ var neighbourContent = '<td class="td" data-title="info_babeld-version">' + '%h'.format(data["babeld-version"]) + '</td>\
+ <td class="td" data-title="info_dev">' + '%h'.format(data["my-id"]) + '</td>\
+ <td class="td" data-title="info_hello-reach">' + '%h'.format(data["host"]) + '</td>';
+
+ neighbourRow.innerHTML = neighbourContent;
+ table.appendChild(neighbourRow);
+ target.appendChild(table);
+}
diff --git a/applications/luci-app-babeld/htdocs/luci-static/resources/view/babeld/babeld-view.js b/applications/luci-app-babeld/htdocs/luci-static/resources/view/babeld/babeld-view.js
new file mode 100644
index 0000000000..1714866d0f
--- /dev/null
+++ b/applications/luci-app-babeld/htdocs/luci-static/resources/view/babeld/babeld-view.js
@@ -0,0 +1,95 @@
+'use strict';
+'require uci';
+'require view';
+'require poll';
+'require ui';
+'require rpc';
+
+return view.extend({
+ callGetInfo: rpc.declare({
+ object: 'babeld',
+ method: 'get_info'
+ }),
+ callGetXroutes: rpc.declare({
+ object: 'babeld',
+ method: 'get_xroutes'
+ }),
+ callGetRoutes: rpc.declare({
+ object: 'babeld',
+ method: 'get_routes'
+ }),
+ callGetNeighbours: rpc.declare({
+ object: 'babeld',
+ method: 'get_neighbours'
+ }),
+
+ fetch_babeld: function () {
+ var data;
+ var self = this;
+ return new Promise(function (resolve, reject) {
+ Promise.all([self.callGetInfo(), self.callGetXroutes(), self.callGetRoutes(), self.callGetNeighbours()])
+ .then(function (res) {
+ data = res;
+ resolve([data]);
+ })
+ .catch(function (err) {
+ console.error(err);
+ reject([null]);
+ });
+ });
+ },
+
+ action_babeld: function () {
+ var self = this;
+ return new Promise(function (resolve, reject) {
+ self
+ .fetch_babeld()
+ .then(function ([data]) {
+ var info = data[0];
+ var xroutes = data[1];
+ var routes = data[2];
+ var neighbours = data[3];
+ var result = { info, xroutes, routes, neighbours };
+ resolve(result);
+ })
+ .catch(function (err) {
+ reject(err);
+ });
+ });
+ },
+
+ load: function () {
+ var self = this;
+ return new Promise(function (resolve, reject) {
+ var script = E('script', { 'type': 'text/javascript' });
+ script.onload = resolve;
+ script.onerror = reject;
+ script.src = L.resource('babeld.js');
+ document.querySelector('head').appendChild(script);
+ });
+ },
+ render: function () {
+ var self = this;
+ return this.action_babeld()
+ .then(function (result) {
+
+ var mainDiv = E('div', {
+ 'id': 'babeld'
+ }, []);
+
+ renderTableInfo(result.info, mainDiv);
+ renderTableXRoutes(result.xroutes, mainDiv);
+ renderTableRoutes(result.routes, mainDiv);
+ renderTableNeighbours(result.neighbours, mainDiv);
+
+ var result = E([], {}, mainDiv);
+ return result;
+ })
+ .catch(function (error) {
+ console.error(error);
+ });
+ },
+ handleSaveApply: null,
+ handleSave: null,
+ handleReset: null,
+});
diff --git a/applications/luci-app-babeld/luasrc/view/babeld.htm b/applications/luci-app-babeld/luasrc/view/babeld.htm
deleted file mode 100644
index d3436f0e69..0000000000
--- a/applications/luci-app-babeld/luasrc/view/babeld.htm
+++ /dev/null
@@ -1,22 +0,0 @@
-<%+header%>
-<script type="text/javascript" src="<%=resource%>/babeld.js"></script>
-
-<div id="babeld"></div>
-
-<script type="text/javascript">
- data = {};
- data["ubus_rpc_session"] = "<%=luci.dispatcher.context.authsession%>"
- origin = document.location.href.replace(location.pathname, "")
- ubus_url = origin + "/ubus/"
-
- var info = ubus_call("babeld", "get_info", {});
- var xroutes = ubus_call("babeld", "get_xroutes", {});
- var routes = ubus_call("babeld", "get_routes", {});
- var neighbours = ubus_call("babeld", "get_neighbours", {});
-
- renderTableInfo(info, 'babeld');
- renderTableXRoutes(xroutes, 'babeld');
- renderTableRoutes(routes, 'babeld');
- renderTableNeighbours(neighbours, 'babeld');
-</script>
-<%+footer%>
diff --git a/applications/luci-app-babeld/root/usr/share/luci/menu.d/luci-app-babeld.json b/applications/luci-app-babeld/root/usr/share/luci/menu.d/luci-app-babeld.json
index a5f7e9259e..4dd7df61ca 100644
--- a/applications/luci-app-babeld/root/usr/share/luci/menu.d/luci-app-babeld.json
+++ b/applications/luci-app-babeld/root/usr/share/luci/menu.d/luci-app-babeld.json
@@ -1,12 +1,12 @@
{
+
"admin/status/babeld": {
"title": "Babeld",
+ "order": 5,
"action": {
- "type": "template",
- "path": "babeld"
- },
- "depends": {
- "acl": [ "luci-app-babeld" ]
+ "type": "view",
+ "path": "babeld/babeld-view"
}
}
+
}
diff --git a/applications/luci-app-babeld/root/usr/share/rpcd/acl.d/luci-app-babeld.json b/applications/luci-app-babeld/root/usr/share/rpcd/acl.d/luci-app-babeld.json
index 71755b30d4..f2ed6fa64a 100644
--- a/applications/luci-app-babeld/root/usr/share/rpcd/acl.d/luci-app-babeld.json
+++ b/applications/luci-app-babeld/root/usr/share/rpcd/acl.d/luci-app-babeld.json
@@ -1,17 +1,25 @@
{
"luci-app-babeld": {
- "description": "Grant UCI access for babeld",
+ "description": "Grant UCI access for luci-app-babeld",
"read": {
- "uci": [ "babeld" ],
+ "uci": [
+ "babeld"
+ ],
"ubus": {
- "babeld": [ "*" ]
- }
+ "babeld": [
+ "*"
+ ]
+ }
},
"write": {
- "uci": [ "babeld" ],
+ "uci": [
+ "babeld"
+ ],
"ubus": {
- "babeld": [ "*" ]
+ "babeld": [
+ "*"
+ ]
}
}
}
-}
+} \ No newline at end of file
diff --git a/applications/luci-app-babeld/root/www/luci-static/resources/babeld.js b/applications/luci-app-babeld/root/www/luci-static/resources/babeld.js
deleted file mode 100644
index b2468dfbea..0000000000
--- a/applications/luci-app-babeld/root/www/luci-static/resources/babeld.js
+++ /dev/null
@@ -1,189 +0,0 @@
-function ubus_call(command, argument, params) {
- var request_data = {};
- request_data.jsonrpc = "2.0";
- request_data.method = "call";
- request_data.params = [data.ubus_rpc_session, command, argument, params]
- var request_json = JSON.stringify(request_data);
- var request = new XMLHttpRequest();
- request.open("POST", ubus_url, false);
- request.setRequestHeader("Content-type", "application/json");
- request.send(request_json);
- if (request.status === 200) {
- var response = JSON.parse(request.responseText)
- if (!("error" in response) && "result" in response) {
- if (response.result.length === 2) {
- return response.result[1];
- }
- } else {
- console.err("Failed query ubus!");
- }
- }
-}
-
-function renderTableXRoutes(data, target_id) {
- for (var protocol in data) {
- var target = document.getElementById(target_id);
-
- var title = document.createElement('h3');
- title.appendChild(document.createTextNode('X-Routes ' + protocol));
- target.appendChild(title);
-
- var table = document.createElement('table');
- table.setAttribute('class', 'table');
- table.setAttribute('id', 'babel_overview_xroutes_' + protocol);
-
- var headerRow = document.createElement('tr');
- headerRow.setAttribute('class', 'tr table-titles');
- var headerContent = '<th class="th" style="font-weight: 700;">' + protocol + ' Prefix</th>\
- <th class="th" style="font-weight: 700;">Metric</th>\
- <th class="th" style="font-weight: 700;">Source-Prefix</th>';
-
- headerRow.innerHTML = headerContent;
- table.appendChild(headerRow);
-
-
- for (var prefix in data[protocol]) {
- var prefixRow = document.createElement('tr');
- prefixRow.setAttribute('class', 'tr');
- var prefixContent = '<td class="td" data-title="xroutes_' + protocol + '_prefix">' + prefix + '</td>\
- <td class="td" data-title="xroutes_' + protocol + '_metric">' + data[protocol][prefix]["metric"] + '</td>\
- <td class="td" data-title="xroutes_' + protocol + '_src-prefix">' + data[protocol][prefix]["src-prefix"] + '</td>';
-
- prefixRow.innerHTML = prefixContent;
- table.appendChild(prefixRow);
- }
- target.appendChild(table);
- }
-}
-
-function renderTableRoutes(data, target_id) {
- for (var protocol in data) {
- var target = document.getElementById(target_id);
-
- var title = document.createElement('h3');
- title.appendChild(document.createTextNode('Routes ' + protocol));
- target.appendChild(title);
-
- var table = document.createElement('table');
- table.setAttribute('class', 'table');
- table.setAttribute('id', 'babel_overview_routes_' + protocol);
-
- var headerRow = document.createElement('tr');
- headerRow.setAttribute('class', 'tr table-titles');
- var headerContent = '<th class="th" style="font-weight: 700;">' + protocol + ' Prefix</th>\
- <th class="th" style="font-weight: 700;">Source-Prefix</th>\
- <th class="th" style="font-weight: 700;">Route-Metric</th>\
- <th class="th" style="font-weight: 700;">Route Smoothed Metric</th>\
- <th class="th" style="font-weight: 700;">Refmetric</th>\
- <th class="th" style="font-weight: 700;">ID</th>\
- <th class="th" style="font-weight: 700;">Seq. No.</th>\
- <th class="th" style="font-weight: 700;">Channes</th>\
- <th class="th" style="font-weight: 700;">Age</th>\
- <th class="th" style="font-weight: 700;">Via</th>\
- <th class="th" style="font-weight: 700;">Nexthop</th>\
- <th class="th" style="font-weight: 700;">Installed</th>\
- <th class="th" style="font-weight: 700;">Feasible</th>';
-
- headerRow.innerHTML = headerContent;
- table.appendChild(headerRow);
-
- for (var prefix in data[protocol]) {
- var prefixRow = document.createElement('tr');
- prefixRow.setAttribute('class', 'tr');
- var prefixContent = '<td class="td" data-title="routes_' + protocol + '_prefix">' + prefix + '</td>\
- <td class="td" data-title="routes_' + protocol + '_src-prefix">' + data[protocol][prefix]["src-prefix"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_metric">' + data[protocol][prefix]["route_metric"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_rout-smoothed-metric">' + data[protocol][prefix]["route_smoothed_metric"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_refmetric">' + data[protocol][prefix]["refmetric"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_id">' + data[protocol][prefix]["id"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_seqno">' + data[protocol][prefix]["seqno"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_channels">' + data[protocol][prefix]["channels"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_age">' + data[protocol][prefix]["age"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_via">' + data[protocol][prefix]["via"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_nexthop">' + data[protocol][prefix]["nexthop"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_installed">' + data[protocol][prefix]["installed"] + '</td>\
- <td class="td" data-title="routes_' + protocol + '_feasible">' + data[protocol][prefix]["feasible"] + '</td>';
-
- prefixRow.innerHTML = prefixContent;
- table.appendChild(prefixRow);
- }
- target.appendChild(table);
- }
-}
-
-function renderTableNeighbours(data, target_id) {
- for (var protocol in data) {
- var target = document.getElementById(target_id);
-
- var title = document.createElement('h3');
- title.appendChild(document.createTextNode('Neighbours ' + protocol));
- target.appendChild(title);
-
- var table = document.createElement('table');
- table.setAttribute('class', 'table');
- table.setAttribute('id', 'babel_overview_neighbours_' + protocol);
-
- var headerRow = document.createElement('tr');
- headerRow.setAttribute('class', 'tr table-titles');
- var headerContent = '<th class="th" style="font-weight: 700;">' + protocol + ' Neighbour</th>\
- <th class="th" style="font-weight: 700;">Device</th>\
- <th class="th" style="font-weight: 700;">Hello-Reach</th>\
- <th class="th" style="font-weight: 700;">RX cost</th>\
- <th class="th" style="font-weight: 700;">TX cost</th>\
- <th class="th" style="font-weight: 700;">RTT</th>\
- <th class="th" style="font-weight: 700;">Channel</th>\
- <th class="th" style="font-weight: 700;">Interface up</th>';
-
- headerRow.innerHTML = headerContent;
- table.appendChild(headerRow);
-
- for (var neighbour in data[protocol]) {
- var neighbourRow = document.createElement('tr');
- neighbourRow.setAttribute('class', 'tr');
- var neighbourContent = '<td class="td" data-title="' + protocol + '_neighbour">' + neighbour + '</td>\
- <td class="td" data-title="neighbours_' + protocol + '_dev">' + data[protocol][neighbour]["dev"] + '</td>\
- <td class="td" data-title="neighbours_' + protocol + '_hello-reach">' + data[protocol][neighbour]["hello-reach"] + '</td>\
- <td class="td" data-title="neighbours_' + protocol + '_rxcost">' + data[protocol][neighbour]["rxcost"] + '</td>\
- <td class="td" data-title="neighbours_' + protocol + '_txcost">' + data[protocol][neighbour]["txcost"] + '</td>\
- <td class="td" data-title="neighbours_' + protocol + '_rtt">' + data[protocol][neighbour]["rtt"] + '</td>\
- <td class="td" data-title="neighbours_' + protocol + '_channel">' + data[protocol][neighbour]["channel"] + '</td>\
- <td class="td" data-title="neighbours_' + protocol + '_if_up">' + data[protocol][neighbour]["if_up"] + '</td>';
-
- neighbourRow.innerHTML = neighbourContent;
- table.appendChild(neighbourRow);
- }
- target.appendChild(table);
- }
-}
-
-function renderTableInfo(data, target_id) {
- var target = document.getElementById(target_id);
-
- var title = document.createElement('h3');
- title.appendChild(document.createTextNode('Info'));
- target.appendChild(title);
-
- var table = document.createElement('table');
- table.setAttribute('class', 'table');
- table.setAttribute('id', 'babel_overview_info');
-
-
- var headerRow = document.createElement('tr');
- headerRow.setAttribute('class', 'tr table-titles');
- var headerContent = '<th class="th" style="font-weight: 700;">Babeld Version</th>\
- <th class="th" style="font-weight: 700;">My-ID</th>\
- <th class="th" style="font-weight: 700;">Host</th>';
-
- headerRow.innerHTML = headerContent;
- table.appendChild(headerRow);
-
- var neighbourRow = document.createElement('tr');
- neighbourRow.setAttribute('class', 'tr');
- var neighbourContent = '<td class="td" data-title="info_babeld-version">' + data["babeld-version"] + '</td>\
- <td class="td" data-title="info_dev">' + data["my-id"] + '</td>\
- <td class="td" data-title="info_hello-reach">' + data["host"] + '</td>';
-
- neighbourRow.innerHTML = neighbourContent;
- table.appendChild(neighbourRow);
- target.appendChild(table);
-}
diff --git a/applications/luci-app-banip/Makefile b/applications/luci-app-banip/Makefile
index 60e4ecb529..c3c7ebea48 100644
--- a/applications/luci-app-banip/Makefile
+++ b/applications/luci-app-banip/Makefile
@@ -4,8 +4,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for banIP
-LUCI_DEPENDS:=+banip
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +banip
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-bmx7/Makefile b/applications/luci-app-bmx7/Makefile
index 546aeb9159..48e6fc023a 100644
--- a/applications/luci-app-bmx7/Makefile
+++ b/applications/luci-app-bmx7/Makefile
@@ -4,7 +4,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for BMX7
-LUCI_DEPENDS:=+luci-compat +luci-lib-json +luci-mod-admin-full +bmx7 +bmx7-json
+LUCI_DEPENDS:=+luci-compat +luci-lib-json +luci-base +bmx7 +bmx7-json
PKG_MAINTAINER:= Roger Pueyo <roger.pueyo@guifi.net> \
Pau Escrich <p4u@dabax.net>
PKG_LICENSE:=GPL-2.0-or-later
diff --git a/applications/luci-app-clamav/Makefile b/applications/luci-app-clamav/Makefile
index 93df9edc90..e8c72ce8fa 100644
--- a/applications/luci-app-clamav/Makefile
+++ b/applications/luci-app-clamav/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=ClamAV LuCI interface
-LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full +clamav
+LUCI_DEPENDS:=+luci-compat +luci-base +clamav
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-commands/Makefile b/applications/luci-app-commands/Makefile
index e581a003b8..6378f572ff 100644
--- a/applications/luci-app-commands/Makefile
+++ b/applications/luci-app-commands/Makefile
@@ -7,6 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Shell Command Module
+LUCI_DEPENDS:=+luci-base
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-coovachilli/Makefile b/applications/luci-app-coovachilli/Makefile
index 4bcafdc8f8..1f3a0fc0ea 100644
--- a/applications/luci-app-coovachilli/Makefile
+++ b/applications/luci-app-coovachilli/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for Coova Chilli
-LUCI_DEPENDS:=+luci-compat @BROKEN
+LUCI_DEPENDS:=+luci-base +luci-compat @BROKEN
include ../../luci.mk
diff --git a/applications/luci-app-cshark/Makefile b/applications/luci-app-cshark/Makefile
index c8a283bea4..2e89eaafde 100644
--- a/applications/luci-app-cshark/Makefile
+++ b/applications/luci-app-cshark/Makefile
@@ -7,8 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Cloudshark capture tool Web UI
-LUCI_DEPENDS:=+luci-compat +cshark
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +luci-compat +cshark
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
diff --git a/applications/luci-app-dawn/Makefile b/applications/luci-app-dawn/Makefile
index 1b2b598cc8..a216f28187 100644
--- a/applications/luci-app-dawn/Makefile
+++ b/applications/luci-app-dawn/Makefile
@@ -1,8 +1,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for DAWN
-LUCI_DEPENDS:=+dawn +luci-compat +luci-lib-json
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +dawn +luci-compat +luci-lib-json
include ../../luci.mk
diff --git a/applications/luci-app-dcwapd/Makefile b/applications/luci-app-dcwapd/Makefile
index 3def090a76..6b85d0c864 100644
--- a/applications/luci-app-dcwapd/Makefile
+++ b/applications/luci-app-dcwapd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Dual Channel Wi-Fi AP Daemon configuration module
-LUCI_DEPENDS:=+luci-compat +dcwapd
+LUCI_DEPENDS:=+luci-base +luci-compat +dcwapd
include ../../luci.mk
diff --git a/applications/luci-app-ddns/Makefile b/applications/luci-app-ddns/Makefile
index 2ebb0c8b82..a2d5935b16 100644
--- a/applications/luci-app-ddns/Makefile
+++ b/applications/luci-app-ddns/Makefile
@@ -12,8 +12,7 @@ PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
LUCI_TITLE:=LuCI Support for Dynamic DNS Client (ddns-scripts)
-LUCI_DEPENDS:=+luci-mod-admin-full +luci-lua-runtime +ddns-scripts
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +luci-lua-runtime +ddns-scripts
include ../../luci.mk
diff --git a/applications/luci-app-diag-core/Makefile b/applications/luci-app-diag-core/Makefile
index ac9f499b12..1fcd9c6fc4 100644
--- a/applications/luci-app-diag-core/Makefile
+++ b/applications/luci-app-diag-core/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Diagnostics Tools (Core)
-LUCI_DEPENDS:=
+LUCI_DEPENDS:=+luci-base
include ../../luci.mk
diff --git a/applications/luci-app-dnscrypt-proxy/Makefile b/applications/luci-app-dnscrypt-proxy/Makefile
index c67b83000f..20b838068e 100644
--- a/applications/luci-app-dnscrypt-proxy/Makefile
+++ b/applications/luci-app-dnscrypt-proxy/Makefile
@@ -5,8 +5,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for DNSCrypt-Proxy
-LUCI_DEPENDS:=+luci-compat +uclient-fetch +dnscrypt-proxy +luci-lib-httpprotoutils
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +luci-compat +uclient-fetch +dnscrypt-proxy +luci-lib-httpprotoutils
include ../../luci.mk
diff --git a/applications/luci-app-dockerman/Makefile b/applications/luci-app-dockerman/Makefile
index f4d1030860..72ec1d97b3 100644
--- a/applications/luci-app-dockerman/Makefile
+++ b/applications/luci-app-dockerman/Makefile
@@ -2,11 +2,11 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for docker
LUCI_DEPENDS:=@(aarch64||arm||x86_64) \
+ +luci-base \
+luci-compat \
+luci-lib-docker \
+docker \
+ttyd
-LUCI_PKGARCH:=all
PKG_LICENSE:=AGPL-3.0
PKG_MAINTAINER:=lisaac <lisaac.cn@gmail.com> \
diff --git a/applications/luci-app-dump1090/Makefile b/applications/luci-app-dump1090/Makefile
index 81cf9f0ed4..8cc7ef306d 100644
--- a/applications/luci-app-dump1090/Makefile
+++ b/applications/luci-app-dump1090/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for dump1090
-LUCI_DEPENDS:=+luci-compat +dump1090
+LUCI_DEPENDS:=+luci-base +luci-compat +dump1090
include ../../luci.mk
diff --git a/applications/luci-app-dynapoint/Makefile b/applications/luci-app-dynapoint/Makefile
index a763dc6146..1f4486ef4b 100644
--- a/applications/luci-app-dynapoint/Makefile
+++ b/applications/luci-app-dynapoint/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for DynaPoint
-LUCI_DEPENDS:=+luci-compat +luci-lib-ipkg +dynapoint
+LUCI_DEPENDS:=+luci-base +luci-compat +luci-lib-ipkg +dynapoint
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Tobias Ilte <tobias.ilte@campus.tu-berlin.de>
diff --git a/applications/luci-app-eoip/Makefile b/applications/luci-app-eoip/Makefile
index f28b00e151..1b31cc592a 100644
--- a/applications/luci-app-eoip/Makefile
+++ b/applications/luci-app-eoip/Makefile
@@ -9,7 +9,6 @@ PKG_LICENSE:=Apache-2.0
LUCI_TITLE:=LuCI Support for EoIP
LUCI_DEPENDS:=+eoip +luci-base
-LUCI_PKGARCH:=all
include ../../luci.mk
diff --git a/applications/luci-app-firewall/Makefile b/applications/luci-app-firewall/Makefile
index 2e219d0096..fc33128886 100644
--- a/applications/luci-app-firewall/Makefile
+++ b/applications/luci-app-firewall/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Firewall and Portforwarding application
-LUCI_DEPENDS:=+uci-firewall
+LUCI_DEPENDS:=+luci-base +uci-firewall
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-frpc/Makefile b/applications/luci-app-frpc/Makefile
index 90a20c4bfc..16e10e54a6 100644
--- a/applications/luci-app-frpc/Makefile
+++ b/applications/luci-app-frpc/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for frp client
-LUCI_DEPENDS:=+frpc
+LUCI_DEPENDS:=+luci-base +frpc
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
diff --git a/applications/luci-app-frps/Makefile b/applications/luci-app-frps/Makefile
index 4d77b03c07..f835b9aa39 100644
--- a/applications/luci-app-frps/Makefile
+++ b/applications/luci-app-frps/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for frp server
-LUCI_DEPENDS:=+frps
+LUCI_DEPENDS:=+luci-base +frps
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
diff --git a/applications/luci-app-fwknopd/Makefile b/applications/luci-app-fwknopd/Makefile
index ba7a8568e7..7aabd3c2af 100644
--- a/applications/luci-app-fwknopd/Makefile
+++ b/applications/luci-app-fwknopd/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Fwknopd config - web config for the firewall knock daemon
-LUCI_DEPENDS:=+fwknopd +qrencode
+LUCI_DEPENDS:=+luci-base +fwknopd +qrencode
PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
include ../../luci.mk
diff --git a/applications/luci-app-hd-idle/Makefile b/applications/luci-app-hd-idle/Makefile
index 28e1cef14b..e5c16c9fc2 100644
--- a/applications/luci-app-hd-idle/Makefile
+++ b/applications/luci-app-hd-idle/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Hard Disk Idle Spin-Down module
-LUCI_DEPENDS:=+hd-idle +lsblk
+LUCI_DEPENDS:=+luci-base +hd-idle +lsblk
include ../../luci.mk
diff --git a/applications/luci-app-https-dns-proxy/Makefile b/applications/luci-app-https-dns-proxy/Makefile
index 4ed8b88163..54f1e6e59b 100644
--- a/applications/luci-app-https-dns-proxy/Makefile
+++ b/applications/luci-app-https-dns-proxy/Makefile
@@ -10,7 +10,6 @@ PKG_VERSION:=2023-05-25-4
LUCI_TITLE:=DNS Over HTTPS Proxy Web UI
LUCI_DESCRIPTION:=Provides Web UI for DNS Over HTTPS Proxy
LUCI_DEPENDS:=+luci-base +https-dns-proxy
-LUCI_PKGARCH:=all
include ../../luci.mk
diff --git a/applications/luci-app-keepalived/Makefile b/applications/luci-app-keepalived/Makefile
index 81b0cc2635..68dd7118bf 100644
--- a/applications/luci-app-keepalived/Makefile
+++ b/applications/luci-app-keepalived/Makefile
@@ -10,7 +10,6 @@ PKG_MAINTAINER:=Jaymin Patel <jem.patel@gmail.com>
LUCI_TITLE:=LuCI support for the Keepalived
LUCI_DEPENDS:=+luci-base +keepalived +keepalived-sync
-LUCI_PKGARCH:=all
include ../../luci.mk
diff --git a/applications/luci-app-ksmbd/Makefile b/applications/luci-app-ksmbd/Makefile
index 08f476a277..c360614e2d 100644
--- a/applications/luci-app-ksmbd/Makefile
+++ b/applications/luci-app-ksmbd/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Network Shares - Ksmbd the SMB kernel fileserver
-LUCI_DEPENDS:=+ksmbd-server
+LUCI_DEPENDS:=+luci-base +ksmbd-server
include ../../luci.mk
diff --git a/applications/luci-app-ledtrig-rssi/Makefile b/applications/luci-app-ledtrig-rssi/Makefile
index b3be2065c8..184739acef 100644
--- a/applications/luci-app-ledtrig-rssi/Makefile
+++ b/applications/luci-app-ledtrig-rssi/Makefile
@@ -8,8 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:= LuCI Support for ledtrigger rssi
-LUCI_DEPENDS:=+rssileds
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +rssileds
include ../../luci.mk
diff --git a/applications/luci-app-ledtrig-switch/Makefile b/applications/luci-app-ledtrig-switch/Makefile
index 7cefc50294..debea20e4f 100644
--- a/applications/luci-app-ledtrig-switch/Makefile
+++ b/applications/luci-app-ledtrig-switch/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:= LuCI Support for ledtrigger switch
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base
include ../../luci.mk
diff --git a/applications/luci-app-ledtrig-usbport/Makefile b/applications/luci-app-ledtrig-usbport/Makefile
index 1a176676fa..577ea9175f 100644
--- a/applications/luci-app-ledtrig-usbport/Makefile
+++ b/applications/luci-app-ledtrig-usbport/Makefile
@@ -8,8 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:= LuCI Support for ledtrigger usbport
-LUCI_DEPENDS:=+kmod-usb-ledtrig-usbport
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +kmod-usb-ledtrig-usbport
include ../../luci.mk
diff --git a/applications/luci-app-lorawan-basicstation/Makefile b/applications/luci-app-lorawan-basicstation/Makefile
index 392587767b..5875eb17f8 100644
--- a/applications/luci-app-lorawan-basicstation/Makefile
+++ b/applications/luci-app-lorawan-basicstation/Makefile
@@ -8,8 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for LoRaWAN basicstation
-LUCI_DEPENDS:=+basicstation
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +basicstation
PKG_MAINTAINER:=Marcus Schref <mschref@tdt.de>
PKG_LICENSE:=APACHE-2.0
diff --git a/applications/luci-app-ltqtapi/Makefile b/applications/luci-app-ltqtapi/Makefile
index c969248126..0b377ba4b8 100644
--- a/applications/luci-app-ltqtapi/Makefile
+++ b/applications/luci-app-ltqtapi/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for Lantiq Devices
-LUCI_DEPENDS:=+luci-compat @BROKEN
+LUCI_DEPENDS:=+luci-base +luci-compat @BROKEN
include ../../luci.mk
diff --git a/applications/luci-app-lxc/Makefile b/applications/luci-app-lxc/Makefile
index 52f3f42df5..1a81d35391 100644
--- a/applications/luci-app-lxc/Makefile
+++ b/applications/luci-app-lxc/Makefile
@@ -7,8 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LXC management Web UI
-LUCI_DEPENDS:=@!arc +luci-compat +luci-mod-admin-full +lxc +lxc-attach +lxc-console +lxc-create +liblxc +rpcd-mod-lxc +getopt +!LXC_BUSYBOX_OPTIONS:tar
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=@!arc +luci-compat +luci-base +lxc +lxc-attach +lxc-console +lxc-create +liblxc +rpcd-mod-lxc +getopt +!LXC_BUSYBOX_OPTIONS:tar
define Package/luci-app-lxc/conffiles
/etc/config/lxc
diff --git a/applications/luci-app-minidlna/Makefile b/applications/luci-app-minidlna/Makefile
index 4790aa32ce..29d1870f11 100644
--- a/applications/luci-app-minidlna/Makefile
+++ b/applications/luci-app-minidlna/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for miniDLNA
-LUCI_DEPENDS:=+minidlna
+LUCI_DEPENDS:=+luci-base +minidlna
include ../../luci.mk
diff --git a/applications/luci-app-mjpg-streamer/Makefile b/applications/luci-app-mjpg-streamer/Makefile
index b4f1f14127..11048862f0 100644
--- a/applications/luci-app-mjpg-streamer/Makefile
+++ b/applications/luci-app-mjpg-streamer/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=MJPG-Streamer service configuration module
-LUCI_DEPENDS:= +mjpg-streamer
+LUCI_DEPENDS:=+luci-base +mjpg-streamer
include ../../luci.mk
diff --git a/applications/luci-app-mosquitto/Makefile b/applications/luci-app-mosquitto/Makefile
index 7713bcf8ec..751a88ed8b 100644
--- a/applications/luci-app-mosquitto/Makefile
+++ b/applications/luci-app-mosquitto/Makefile
@@ -1,8 +1,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Mosquitto LuCI interface
-LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full mosquitto
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-compat +luci-base mosquitto
LUCI_DESCRIPTION:=Provides a webadmin for most basic mosquitto parameters.
PKG_MAINTAINER:= Karl Palsson <karlp@etactica.com>
diff --git a/applications/luci-app-mwan3/Makefile b/applications/luci-app-mwan3/Makefile
index 8edba3ccd5..98c0293e05 100644
--- a/applications/luci-app-mwan3/Makefile
+++ b/applications/luci-app-mwan3/Makefile
@@ -7,8 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for the MWAN3 MultiWAN Manager
-LUCI_DEPENDS:=+mwan3
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +mwan3
PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
diff --git a/applications/luci-app-natmap/Makefile b/applications/luci-app-natmap/Makefile
index 0d02dcac51..7238f0da38 100644
--- a/applications/luci-app-natmap/Makefile
+++ b/applications/luci-app-natmap/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for natmap
-LUCI_DEPENDS:=+natmap
+LUCI_DEPENDS:=+luci-base +natmap
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
diff --git a/applications/luci-app-nextdns/Makefile b/applications/luci-app-nextdns/Makefile
index 51d60561b1..9d2734c186 100644
--- a/applications/luci-app-nextdns/Makefile
+++ b/applications/luci-app-nextdns/Makefile
@@ -4,8 +4,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for NextDNS
-LUCI_DEPENDS:=+nextdns
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +nextdns
include ../../luci.mk
diff --git a/applications/luci-app-nft-qos/Makefile b/applications/luci-app-nft-qos/Makefile
index a8227de9fd..1690854fc4 100644
--- a/applications/luci-app-nft-qos/Makefile
+++ b/applications/luci-app-nft-qos/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=QoS over Nftables
-LUCI_DEPENDS:=+luci-compat +nft-qos
+LUCI_DEPENDS:=+luci-base +luci-compat +nft-qos
include ../../luci.mk
diff --git a/applications/luci-app-nlbwmon/Makefile b/applications/luci-app-nlbwmon/Makefile
index a00177f2ca..d53452c3f0 100644
--- a/applications/luci-app-nlbwmon/Makefile
+++ b/applications/luci-app-nlbwmon/Makefile
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Netlink based bandwidth accounting
-LUCI_DEPENDS:=+nlbwmon
+LUCI_DEPENDS:=+luci-base +nlbwmon
include ../../luci.mk
diff --git a/applications/luci-app-ntpc/Makefile b/applications/luci-app-ntpc/Makefile
index b144b7ba93..108ed9027e 100644
--- a/applications/luci-app-ntpc/Makefile
+++ b/applications/luci-app-ntpc/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=NTP time synchronisation configuration module
-LUCI_DEPENDS:=+luci-compat +ntpclient
+LUCI_DEPENDS:=+luci-base +luci-compat +ntpclient
include ../../luci.mk
diff --git a/applications/luci-app-nut/Makefile b/applications/luci-app-nut/Makefile
index cce56e0c9f..e399a50217 100644
--- a/applications/luci-app-nut/Makefile
+++ b/applications/luci-app-nut/Makefile
@@ -8,8 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Network UPS Tools Configuration
-LUCI_DEPENDS:=+luci-compat
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +luci-compat
PKG_RELEASE:=1
include ../../luci.mk
diff --git a/applications/luci-app-ocserv/Makefile b/applications/luci-app-ocserv/Makefile
index 2f2ea788eb..918e85815b 100644
--- a/applications/luci-app-ocserv/Makefile
+++ b/applications/luci-app-ocserv/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for OpenConnect VPN
-LUCI_DEPENDS:=+luci-compat +ocserv +certtool
+LUCI_DEPENDS:=+luci-base +luci-compat +ocserv +certtool
include ../../luci.mk
diff --git a/applications/luci-app-olsr-services/Makefile b/applications/luci-app-olsr-services/Makefile
index b1daf6daad..245ea602d5 100644
--- a/applications/luci-app-olsr-services/Makefile
+++ b/applications/luci-app-olsr-services/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Show services announced with the nameservice plugin
-LUCI_DEPENDS:=+luci-app-olsr +olsrd +olsrd-mod-nameservice
+LUCI_DEPENDS:=+luci-base +luci-app-olsr +olsrd +olsrd-mod-nameservice
include ../../luci.mk
diff --git a/applications/luci-app-olsr-viz/Makefile b/applications/luci-app-olsr-viz/Makefile
index e1a1185092..34ac041f4d 100644
--- a/applications/luci-app-olsr-viz/Makefile
+++ b/applications/luci-app-olsr-viz/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=OLSR Visualisation
-LUCI_DEPENDS:=+luci-app-olsr +olsrd +olsrd-mod-txtinfo
+LUCI_DEPENDS:=+luci-base +luci-app-olsr +olsrd +olsrd-mod-txtinfo
include ../../luci.mk
diff --git a/applications/luci-app-olsr-viz/htdocs/cgi-bin/olsr-viz.sh b/applications/luci-app-olsr-viz/htdocs/cgi-bin/olsr-viz.sh
deleted file mode 100755
index e33c632465..0000000000
--- a/applications/luci-app-olsr-viz/htdocs/cgi-bin/olsr-viz.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-echo Content-type: text/html
-echo
-
-cat << EOF
-<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
-var css=document.styleSheets[0];
-if (null!=css.insertRule) {
-css.insertRule(".label {color:black;background-color:white}", css.cssRules.length);
-}
-else {
-css.addRule(".label", "color:black");
-css.addRule(".label", "background-color:white");
-}
-</SCRIPT>
-<SCRIPT SRC="/luci-static/resources/olsr-viz.js" LANGUAGE="JavaScript1.2" TYPE="text/javascript"></SCRIPT>
-<DIV ID="main"
-STYLE="width: 100%; height: 93%; border: 1px solid #ccc; margin-left:auto; margin-right:auto; text-align:center; overflow: scroll">
-<DIV ID="edges" STYLE="width: 1px; height: 1px; position: relative; z-index:2"></DIV>
-<DIV ID="nodes" STYLE="width: 1px; height: 1px; position: relative; z-index:4"></DIV>
-</DIV>
-<DIV STYLE="z-index:99">
-<FORM ACTION="">
-<P><B TITLE="Bestimmt die Vergrößerungsstufe.">Zoom</B>&#160;<A HREF="javascript:set_scale(scale+0.1)">+</A>&#160;<A HREF="javascript:set_scale(scale-0.1)">&ndash;</A>&#160;<INPUT ID="zoom" NAME="zoom" TYPE="text" VALUE="2.0" SIZE="5" ONCHANGE="set_scale()">&#160;
-| &#160;<B TITLE="Beschränkt die Anzeige auf eine maximale Hop-Entfernung.">Metrik</B>&#160;<A HREF="javascript:set_maxmetric(maxmetric+1)">+</A>&#160;<A HREF="javascript:if(0<maxmetric)set_maxmetric(maxmetric-1)">&ndash;</A>&#160;<INPUT ID="maxmetric" NAME="maxmetric" TYPE="text" VALUE="3" SIZE="4" ONCHANGE="set_maxmetric(this.value)">&#160;
-| &#160;<B TITLE="Schaltet die automatischen Layout-Optimierung ein.">Optimierung</B><INPUT ID="auto_declump" NAME="auto_declump" TYPE="checkbox" ONCHANGE="set_autodeclump(this.checked)" CHECKED="CHECKED">&#160;
-| &#160;<B TITLE="Zeige Hostnamen an.">Hostnamen</B><INPUT ID="show_hostnames" NAME="show_hostnames" TYPE="checkbox" ONCHANGE="set_showdesc(this.checked)" CHECKED="CHECKED">&#160;
-| &#160;<A HREF="javascript:viz_save()" TITLE="Speichert die aktuellen Einstellungen in einem Cookie.">Speichern</A>&#160;
-| &#160;<A HREF="javascript:viz_reset()" TITLE="Startet das Viz-Skriptprogramm neu.">Zur&uuml;cksetzen</A></P>
-</FORM></DIV>
-<SPAN ID="debug" STYLE="visibility:hidden;"></SPAN>
-<IFRAME ID="RSIFrame" NAME="RSIFrame" STYLE="border:0px; width:0px; height:0px; visibility:hidden;">
-</IFRAME>
-<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
-
-viz_setup("RSIFrame","main","nodes","edges");
-viz_update();
-
-</SCRIPT>
-EOF
diff --git a/applications/luci-app-olsr-viz/htdocs/cgi-bin/vizdata.sh b/applications/luci-app-olsr-viz/htdocs/cgi-bin/vizdata.sh
deleted file mode 100755
index 7d3214242a..0000000000
--- a/applications/luci-app-olsr-viz/htdocs/cgi-bin/vizdata.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-echo Content-type: text/html
-echo
-
-cat<<EOF
-<HTML>
-<HEAD>
- <TITLE>OLSR-VIZ Data</TITLE>
- <META CONTENT="text/html; charset=iso-8859-1" HTTP-EQUIV="Content-Type">
- <META CONTENT="no-cache" HTTP-EQUIV="cache-control">
-</HEAD>
-<BODY>
-
-<script language='JavaScript1.2' type='text/javascript'>
-EOF
-
-# sed + txtinfo plugin
-re_ip='[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}'
-re_sep='[[:space:]]\{1,\}'
-re_nosep='[^[:space:]]\{1,\}'
-wget http://127.0.0.1:2006/all -qO - | sed -n "
-/^Table: Links$/,/^$/ {
-s# # - #g
-s#\($re_ip\)$re_sep\($re_ip\)\($re_sep$re_nosep\)\{3\}$re_sep\($re_nosep\)#parent.touch_edge(parent.touch_node('\1').set_metric(1).update(),parent.touch_node('\2').set_metric(1).update(),'\4');#p
-}
-/^Table: Topology$/,/^$/ {
-s#\($re_ip\)$re_sep\($re_ip\)\($re_sep$re_nosep\)\{2\}$re_sep\($re_nosep\)#parent.touch_edge(parent.touch_node('\1').update(),parent.touch_node('\2').update(),'\4');#p
-}
-/^Table: HNA$/,/^$/ {
-s#\($re_ip\)/\([0-9]\{1,\}\)$re_sep\($re_ip\)#parent.touch_hna(parent.touch_node('\3'),'\1','\2');#p
-}
-/^Table: Routes$/,/^$/ {
-s#\($re_ip\)/32$re_sep$re_nosep$re_sep\($re_nosep\).*#parent.touch_node('\1').set_metric('\2').update();#p
-}
-"
-
-hosts=$(uci show olsrd|grep hosts_file|cut -d "=" -f 2)
-if [ -n $hosts ]; then
-sed -n "
-s#\($re_ip\)$re_sep\($re_nosep\)$re_sep.*#parent.touch_node('\1').set_desc('\2');#p
-" < $hosts
-fi
-
-cat<<EOF
- parent.viz_callback();
-</script>
-</BODY></HTML>
-EOF
diff --git a/applications/luci-app-olsr-viz/htdocs/luci-static/resources/olsr-viz.js b/applications/luci-app-olsr-viz/htdocs/luci-static/resources/olsr-viz.js
index 08ff1777cd..1a35596e69 100644
--- a/applications/luci-app-olsr-viz/htdocs/luci-static/resources/olsr-viz.js
+++ b/applications/luci-app-olsr-viz/htdocs/luci-static/resources/olsr-viz.js
@@ -34,8 +34,6 @@ Changes:
2010-12-11: Changed some paths to make it work with Kamikaze and Luci -- soma
*/
-var cgi_url = "/cgi-bin/vizdata.sh";
-
var maxmetric = 3;
var iconvariant = "-mini";
var nodes = new Array();
@@ -63,62 +61,39 @@ var now_secs = 5;
// dom elements
var IFrameObj;
-var maindiv;
-var nodediv;
-var edgediv;
-
-/******* CALL TO SERVER ********/
-function callToServer(URL) {
- var IFrameDoc;
-
- if (IFrameObj.document) {
- // For IE5 + opera
- IFrameDoc = IFrameObj.document;
- }
- else if (IFrameObj.contentDocument) {
- // For NS6
- IFrameDoc = IFrameObj.contentDocument;
- }
- else if (IFrameObj.contentWindow) {
- // For IE5.5 and IE6
- IFrameDoc = IFrameObj.contentWindow.document;
- }
- else {
- // opera? hmmmm
- return true;
- }
-
- IFrameDoc.location.replace(URL);
- return false;
-}
+var mainDiv;
+var nodeDiv;
+var edgeDiv;
+var zoomInput;
+var maxmetricInput;
+var debugSpan;
/******** EDGE CLASS ********/
-function edge(n1,n2){
- this.getHTML = function()
- {
+function edge(n1, n2) {
+ this.getHTML = function () {
var nh = "";
- if(this.n1.metric > maxmetric || this.n2.metric > maxmetric) {
+ if (this.n1.metric > maxmetric || this.n2.metric > maxmetric) {
return "";
}
- var x = this.n1.x*scale;
- var y = this.n1.y*scale;
- var dx = this.n2.x*scale - x;
- var dy = this.n2.y*scale - y;
+ var x = this.n1.x * scale;
+ var y = this.n1.y * scale;
+ var dx = this.n2.x * scale - x;
+ var dy = this.n2.y * scale - y;
- x += xoff*scale + 75;
- y += yoff*scale + 15;
+ x += xoff * scale + 75;
+ y += yoff * scale + 15;
var imgtag = "<img src='/luci-static/resources/olsr-viz/dot_"
if (this.etx > 0 && this.etx < 2) {
imgtag += "good.gif'";
}
- else if(this.etx > 2 && this.etx < 5) {
+ else if (this.etx > 2 && this.etx < 5) {
imgtag += "ok.gif'";
}
- else if(this.etx > 5 && this.etx < 10) {
+ else if (this.etx > 5 && this.etx < 10) {
imgtag += "weak.gif'";
}
else {
@@ -126,43 +101,40 @@ function edge(n1,n2){
}
imgtag += " alt='ETX: " + this.etx + "' title='ETX: " + this.etx + "' ";
- var d = Math.sqrt(dx*dx+dy*dy);
+ var d = Math.sqrt(dx * dx + dy * dy);
for (var j = 0; j < d; j += 15) {
nh += imgtag + "style='top:"
- + parseInt(y+dy * j / d) + "px; left:"
- + parseInt(x+dx * j / d) + "px; "
- + "width: 4px; height: 4px; position: absolute; z-index: 2' >";
+ + parseInt(y + dy * j / d) + "px; left:"
+ + parseInt(x + dx * j / d) + "px; "
+ + "width: 4px; height: 4px; position: absolute; z-index: 2' >";
}
nh += "<div style='top:"
- + parseInt(y+dy * 0.5 - 5) + "px; left:"
- + parseInt(x+dx * 0.5 - 24) + "px; "
- + "position: absolute; z-index: 3; width: 48px; text-align: center;' >"
- + "<span class='label etx' >" + this.etx + "</span></div>";
+ + parseInt(y + dy * 0.5 - 5) + "px; left:"
+ + parseInt(x + dx * 0.5 - 24) + "px; "
+ + "position: absolute; z-index: 3; width: 48px; text-align: center;' >"
+ + "<span class='label etx' >" + this.etx + "</span></div>";
return nh;
}
- this.isIdle = function()
- {
+ this.isIdle = function () {
return (now_secs - this.lastseen > idle_timeout);
}
- this.isDead = function()
- {
+ this.isDead = function () {
return (now_secs - this.lastseen > erase_timeout);
}
- this.cleanup = function()
- {
- if(this.n1 && this.n1.weight) {
+ this.cleanup = function () {
+ if (this.n1 && this.n1.weight) {
this.n1.weight--;
}
- if(this.n2 && this.n2.weight) {
+ if (this.n2 && this.n2.weight) {
this.n2.weight--;
}
- if(this.n1 && this.n2) {
+ if (this.n1 && this.n2) {
delete this.n1.edges[n2.ip];
delete this.n2.edges[n1.ip];
}
@@ -180,10 +152,9 @@ function edge(n1,n2){
return this;
}
-function getEdgeKey(ip1,ip2)
-{
+function getEdgeKey(ip1, ip2) {
var key = "";
- if(ip1 > ip2) {
+ if (ip1 > ip2) {
key = ip2 + "-" + ip1;
}
else {
@@ -192,12 +163,11 @@ function getEdgeKey(ip1,ip2)
return key;
}
-function touch_edge(n1,n2,etx)
-{
- var key = getEdgeKey(n1.ip,n2.ip);
+function touch_edge(n1, n2, etx) {
+ var key = getEdgeKey(n1.ip, n2.ip);
var e = edges[key];
- if(!e) {
- e = new edge(n1,n2);
+ if (!e) {
+ e = new edge(n1, n2);
edges[key] = e;
}
e.etx = etx;
@@ -207,71 +177,67 @@ function touch_edge(n1,n2,etx)
/******** NODE CLASS ********/
function node(ip) {
- this.getHTML = function()
- {
+ this.getHTML = function () {
var nh;
- if(this.metric > maxmetric) {
+ if (this.metric > maxmetric) {
return "";
}
var igw = 0;
- for(var h in this.hna) {
- if(h == "0.0.0.0") {
+ for (var h in this.hna) {
+ if (h == "0.0.0.0") {
igw = 1;
break;
}
}
nh =
"<div id='node_" + this.ip + "' onmousedown='dragstart(this)' style="
- + "'top: " + parseInt((this.y+yoff)*scale) + "px; "
- + "left: " + parseInt((this.x+xoff)*scale) + "px; "
+ + "'top: " + parseInt((this.y + yoff) * scale) + "px; "
+ + "left: " + parseInt((this.x + xoff) * scale) + "px; "
+ "width: 150px; height: 1px; z-index: 4; "
+ "position: absolute; background-color: transparent;' >"
- + "<div><img src='/luci-static/resources/olsr-viz/node"+(igw ? "-hna" : "")+iconvariant + ".gif'"
+ + "<div><img src='/luci-static/resources/olsr-viz/node" + (igw ? "-hna" : "") + iconvariant + ".gif'"
+ " alt='node " + this.ip + "' style='border: none;'><br />"
- + "<a href='http://" + this.ip + "/'>"
- + "<span class='label ip'>" + this.ip + "</span></a>"
- + (showdesc && this.desc != "" ?
- "<br /><span class='label desc'>" + this.desc + "</span>" : "")
+ + "<a href='http://" + this.ip + "/'>"
+ + "<span class='label ip'>" + this.ip + "</span></a>"
+ + (showdesc && this.desc != "" ?
+ "<br /><span class='label desc'>" + this.desc + "</span>" : "")
+ "</div></div>";
return nh;
}
- this.isIdle = function()
- {
+ this.isIdle = function () {
return (now_secs - this.lastseen > idle_timeout);
}
- this.isDead = function()
- {
+ this.isDead = function () {
return (now_secs - this.lastseen > erase_timeout);
}
- this.cleanup = function()
- {
+ this.cleanup = function () {
ncount--;
}
-
- this.set_metric = function(metric) {
+
+ this.set_metric = function (metric) {
this.metric = metric;
return this;
}
-
- this.set_desc = function(desc) {
+
+ this.set_desc = function (desc) {
this.desc = desc
return this;
}
-
- this.update = function() {
+
+ this.update = function () {
this.lastseen = now_secs;
return this;
}
-
+
this.ip = ip;
this.x = 0;
this.y = 0;
- this.dx_last=0;
- this.dy_last=0;
+ this.dx_last = 0;
+ this.dy_last = 0;
this.placed = false;
this.weight = 0;
this.edges = new Array();
@@ -286,7 +252,7 @@ function node(ip) {
function touch_node(ip) {
var n = nodes[ip];
- if(!n) {
+ if (!n) {
n = new node(ip);
nodes[ip] = n;
// newnodes.push(n);
@@ -298,24 +264,24 @@ function touch_node(ip) {
function place_new_nodes() {
var nc = 0;
- for(var i = 0;i<newnodes.length;i++){
+ for (var i = 0; i < newnodes.length; i++) {
var n = newnodes[i];
- if(n.placed){continue;}
+ if (n.placed) { continue; }
var sp;
- if(sp = getCookie("node_"+n.ip)) {
+ if (sp = getCookie("node_" + n.ip)) {
var xy = sp.split("x");
- debug_writeln("sp: "+sp+" xy[0]: "+xy[0]+" xy[1]: "+xy[1]);
+ debug_writeln(("sp: " + sp + " xy[0]: " + xy[0] + " xy[1]: " + xy[1]));
n.x = parseFloat(xy[0]);
n.y = parseFloat(xy[1]);
}
- else if(n.weight>1){
+ else if (n.weight > 1) {
// see if we find already placed nodes
- var ox=0, oy=0;
- var dx=0, dy=0;
- var c=0;
- for(var e in n.edges){
- if(nodes[e] && nodes[e].placed){
- if(!ox && !oy) {
+ var ox = 0, oy = 0;
+ var dx = 0, dy = 0;
+ var c = 0;
+ for (var e in n.edges) {
+ if (nodes[e] && nodes[e].placed) {
+ if (!ox && !oy) {
ox = nodes[e].x;
oy = nodes[e].y;
}
@@ -326,35 +292,35 @@ function place_new_nodes() {
c++;
}
}
- if(c>0) {
- n.x = ox + dx/c + Math.random()*iel/2-iel/4;
- n.y = oy + dy/c + Math.random()*iel/2-iel/4;
+ if (c > 0) {
+ n.x = ox + dx / c + Math.random() * iel / 2 - iel / 4;
+ n.y = oy + dy / c + Math.random() * iel / 2 - iel / 4;
}
}
else {
// begin somewhere
- n.x = Math.random()*400;
- n.y = Math.random()*400;
+ n.x = Math.random() * 400;
+ n.y = Math.random() * 400;
}
n.placed = true;
nc++;
}
- newnodes.length=0;
+ newnodes.length = 0;
return nc;
}
/******** HNA CLASS ********/
-function hna(gw,net,mask) {
+function hna(gw, net, mask) {
this.gw = gw;
this.net = net;
this.mask = mask;
return this;
}
-function touch_hna(node,net,mask) {
+function touch_hna(node, net, mask) {
var h = node.hna[net];
- if(!h) {
- h = new hna(node.ip,net,mask);
+ if (!h) {
+ h = new hna(node.ip, net, mask);
node.hna[net] = h;
}
@@ -363,42 +329,39 @@ function touch_hna(node,net,mask) {
}
/******** VIZ SETUP AND SETTINGS ********/
-function viz_setup(iframeid,maindivid,nodedivid,edgedivid) {
+function viz_setup(iframe, maindiv, nodediv, edgediv, debugspan, zoominput, maxmetricinput) {
// assign a reference to the
// object to our global variable IFrameObj.
- IFrameObj=document.getElementById(iframeid);
- if (document.frames) {
- // this is for IE5 Mac, because it will only
- // allow access to the document object
- // of the IFrame if we access it through
- // the document.frames array
- IFrameObj = document.frames[iframeid];
- }
+ IFrameObj = iframe;
draginit();
- maindiv=document.getElementById(maindivid);
- nodediv=document.getElementById(nodedivid);
- edgediv=document.getElementById(edgedivid);
+ mainDiv = maindiv;
+ nodeDiv = nodediv;
+ edgeDiv = edgediv;
+ debugSpan = debugspan;
+ zoomInput = zoominput;
+ maxmetricInput = maxmetricinput;
// autosave on exit?
var autosave;
- if((autosave = getCookie("prefs_autosave"))) {
+ if ((autosave = getCookie("prefs_autosave"))) {
auto_save = parseInt(autosave);
}
viz_autosave(auto_save);
// maximum metric of surrounding nodes
- var mmx;
- if(mmx = getCookie("prefs_maxmetric")) {
- set_maxmetric(mmx,true,true);
- }
+ var mmx = (getCookie("prefs_maxmetric"))||3;
+ set_maxmetric(mmx, true, true);
// scale of view
var savescale;
- if((savescale = getCookie("prefs_scale")) &&
- (savescale = parseFloat(savescale))) {
- set_scale(savescale,true);
+ if ((savescale = getCookie("prefs_scale")) &&
+ (savescale = parseFloat(savescale))) {
+ set_scale(savescale, true);
+ }
+ else {
+ set_scale(2.0, true);
}
// scroll - FIXME
@@ -417,53 +380,49 @@ function viz_setup(iframeid,maindivid,nodedivid,edgedivid) {
*/
}
-function viz_save()
-{
+function viz_save() {
// let cookie survive a month
var exp = new Date();
exp.setTime(exp.getTime() + 2592000000);
// save node positions
- for(var ip in nodes)
- {
- if(nodes[ip].metric > maxmetric) {
+ for (var ip in nodes) {
+ if (nodes[ip].metric > maxmetric) {
continue;
}
- setCookie("node_"+ip,nodes[ip].x+"x"+nodes[ip].y,exp);
+ // setCookie("node_"+ip,nodes[ip].x+"x"+nodes[ip].y,exp);
}
// save maxmetric
- setCookie("prefs_maxmetric",maxmetric,exp);
+ setCookie("prefs_maxmetric", maxmetric, exp);
// save zooming
- setCookie("prefs_scale",scale,exp);
+ setCookie("prefs_scale", scale, exp);
// save scroll - FIXME
setCookie("prefs_innerview",
- parseInt(maindiv.scrollLeft)+"x"+parseInt(maindiv.scrollTop)+"x"+
- parseInt(vwidth*scale)+"x"+parseInt(vheight*scale),exp);
+ parseInt(mainDiv.scrollLeft) + "x" + parseInt(mainDiv.scrollTop) + "x" +
+ parseInt(vwidth * scale) + "x" + parseInt(vheight * scale), exp);
}
-function viz_autosave(autosave)
-{
+function viz_autosave(autosave) {
auto_save = autosave;
- if(auto_save) {
- document.body.onunload=viz_save;
+ if (auto_save) {
+ document.body.onunload = viz_save;
}
else {
deleteCookie("prefs_autosave");
}
}
-function viz_reset()
-{
+function viz_reset() {
deleteAllCookies();
- for(var ip in nodes) {
+ for (var ip in nodes) {
delete nodes[ip];
}
- for(var e in edges) {
+ for (var e in edges) {
delete edges[e];
}
- viz_update();
+ window.location.reload();
}
var updateTimer = 0;
@@ -471,8 +430,7 @@ function viz_update() {
if (updateTimer) {
clearTimeout(updateTimer);
}
- now_secs = new Date().getTime()/1000;
- callToServer(cgi_url);
+ now_secs = new Date().getTime() / 1000;
}
function viz_callback() {
@@ -480,7 +438,7 @@ function viz_callback() {
clearTimeout(updateTimer);
}
- if(place_new_nodes() > 0 && auto_declump) {
+ if (place_new_nodes() > 0 && auto_declump) {
declump();
}
refresh();
@@ -489,7 +447,7 @@ function viz_callback() {
var refresh_running = false;
function refresh() {
- if(refresh_running) {
+ if (refresh_running) {
return;
}
refresh_running = true;
@@ -499,7 +457,7 @@ function refresh() {
// refresh nodes
nh = "";
for (var n in nodes) {
- if(nodes[n].isDead()) {
+ if (nodes[n].isDead()) {
nodes[n].cleanup();
delete nodes[n];
}
@@ -507,13 +465,13 @@ function refresh() {
nh += nodes[n].getHTML();
}
}
- nodediv.innerHTML = nh;
+ nodeDiv.innerHTML = nh;
// refresh edges
- nh = "";
+ nh = "";
for (var e in edges) {
- if(edges[e].isDead()) {
+ if (edges[e].isDead()) {
edges[e].cleanup();
delete edges[e];
}
@@ -521,20 +479,18 @@ function refresh() {
nh += edges[e].getHTML();
}
}
- edgediv.innerHTML = nh;
+ edgeDiv.innerHTML = nh;
refresh_running = false;
}
-function set_showdesc(doit)
-{
+function set_showdesc(doit) {
showdesc = doit;
- if(!noupdate) refresh();
+ if (!noupdate) refresh();
}
-function set_autodeclump(doit)
-{
+function set_autodeclump(doit) {
auto_declump = doit;
- if(doit) {
+ if (doit) {
declump();
}
else {
@@ -542,36 +498,34 @@ function set_autodeclump(doit)
}
}
-function set_scale(inscale,noupdate)
-{
- if(!inscale) {
- inscale = parseFloat(document.getElementById("zoom").value/2);
+function set_scale(inscale, noupdate) {
+ if (!inscale) {
+ inscale = parseFloat(zoomInput.value / 2);
}
- scale = Math.round(inscale*100)/100;
- if(!scale || scale<0.1) {
+ scale = Math.round(inscale * 100) / 100;
+ if (!scale || scale < 0.1) {
scale = 0.1;
}
- document.getElementById("zoom").value = scale*2;
- if(!noupdate) refresh();
+ zoomInput.value = scale * 2;
+ if (!noupdate) refresh();
}
-function set_maxmetric(inmetric,noupdate,noconfirm)
-{
+function set_maxmetric(inmetric, noupdate, noconfirm) {
inmetric = parseInt(inmetric);
- if(inmetric > 0 || !noconfirm || confirm("warning. setting the maximum metric to zero can lead to expensive calculations if you are connected to a network with many nodes. do you want to proceed?")) {
+ if (inmetric > 0 || !noconfirm || confirm("warning. setting the maximum metric to zero can lead to expensive calculations if you are connected to a network with many nodes. do you want to proceed?")) {
maxmetric = inmetric;
}
- document.getElementById("maxmetric").value = maxmetric;
- if(!noupdate) refresh();
+ maxmetricInput.value = maxmetric;
+ if (!noupdate) refresh();
}
// k = area / nodes
function fr(x) {
- return Math.pow((iel*iel)/x,2);
+ return Math.pow((iel * iel) / x, 2);
}
function fa(x) {
- return Math.pow((x*x)/iel,2);
+ return Math.pow((x * x) / iel, 2);
}
var dclTimer = 0;
@@ -582,10 +536,10 @@ function declump(t) {
var d;
// clear declump timer
- if(dclTimer) {
+ if (dclTimer) {
clearTimeout(dclTimer);
}
- if(declump_running) {
+ if (declump_running) {
return;
}
declump_running = true;
@@ -593,16 +547,16 @@ function declump(t) {
// nodes
var nc = 0;
for (var ip1 in nodes) {
- nodes[ip1].fr_x=0;
- nodes[ip1].fr_y=0;
- nodes[ip1].fa_x=0;
- nodes[ip1].fa_y=0;
+ nodes[ip1].fr_x = 0;
+ nodes[ip1].fr_y = 0;
+ nodes[ip1].fa_x = 0;
+ nodes[ip1].fa_y = 0;
nodes[ip1].x_next = nodes[ip1].x;
nodes[ip1].y_next = nodes[ip1].y;
nodes[ip1].randdisplace = 0;
}
for (var ip1 in nodes) {
- if(nodes[ip1].metric > maxmetric || nodes[ip1].pinned) {
+ if (nodes[ip1].metric > maxmetric || nodes[ip1].pinned) {
continue;
}
for (var ip2 in nodes) {
@@ -611,17 +565,17 @@ function declump(t) {
}
dx = (nodes[ip1].x_next - nodes[ip2].x_next);
dy = (nodes[ip1].y_next - nodes[ip2].y_next);
- d = Math.sqrt(dx*dx+dy*dy);
- d = Math.max(d-optsize,(d+optsize)/optsize);
+ d = Math.sqrt(dx * dx + dy * dy);
+ d = Math.max(d - optsize, (d + optsize) / optsize);
- nodes[ip1].fr_x += (dx/d) * fr(d);
- nodes[ip1].fr_y += (dy/d) * fr(d);
+ nodes[ip1].fr_x += (dx / d) * fr(d);
+ nodes[ip1].fr_y += (dy / d) * fr(d);
}
dx = nodes[ip1].fr_x;
dy = nodes[ip1].fr_y;
- d = Math.sqrt(dx*dx+dy*dy);
- var md = Math.min(d,iel/nodes[ip1].weight);
+ d = Math.sqrt(dx * dx + dy * dy);
+ var md = Math.min(d, iel / nodes[ip1].weight);
nodes[ip1].x_next += (dx / d) * md;
nodes[ip1].y_next += (dy / d) * md;
nc++;
@@ -636,59 +590,59 @@ function declump(t) {
}
dx = (edges[e].n1.x_next - edges[e].n2.x_next);
dy = (edges[e].n1.y_next - edges[e].n2.y_next);
- d = Math.sqrt(dx*dx+dy*dy);
-// d = Math.max(d-optsize,(d+optsize)/optsize);
+ d = Math.sqrt(dx * dx + dy * dy);
+ // d = Math.max(d-optsize,(d+optsize)/optsize);
- edges[e].n1.fa_x -= (dx/d) * fa(d);
- edges[e].n1.fa_y -= (dy/d) * fa(d);
- edges[e].n2.fa_x += (dx/d) * fa(d);
- edges[e].n2.fa_y += (dy/d) * fa(d);
+ edges[e].n1.fa_x -= (dx / d) * fa(d);
+ edges[e].n1.fa_y -= (dy / d) * fa(d);
+ edges[e].n2.fa_x += (dx / d) * fa(d);
+ edges[e].n2.fa_y += (dy / d) * fa(d);
ec++;
}
// displacement
- var xmin=-20;
- var ymin=-20;
- var xmax=20;
- var ymax=20;
- var dsum=0;
+ var xmin = -20;
+ var ymin = -20;
+ var xmax = 20;
+ var ymax = 20;
+ var dsum = 0;
for (var ip in nodes) {
- if(nodes[ip].metric > maxmetric || nodes[ip].pinned) {
+ if (nodes[ip].metric > maxmetric || nodes[ip].pinned) {
continue;
}
dx = nodes[ip].fa_x;
dy = nodes[ip].fa_y;
- d = Math.sqrt(dx*dx+dy*dy);
- dx = (dx / d) * Math.min(d,iel/nodes[ip].weight) * 0.75 + nodes[ip].dx_last * 0.25;
- dy = (dy / d) * Math.min(d,iel/nodes[ip].weight) * 0.75 + nodes[ip].dy_last * 0.25;
+ d = Math.sqrt(dx * dx + dy * dy);
+ dx = (dx / d) * Math.min(d, iel / nodes[ip].weight) * 0.75 + nodes[ip].dx_last * 0.25;
+ dy = (dy / d) * Math.min(d, iel / nodes[ip].weight) * 0.75 + nodes[ip].dy_last * 0.25;
nodes[ip].dx_last = dx;
nodes[ip].dy_last = dy;
nodes[ip].x_next += dx;
nodes[ip].y_next += dy;
- if(!nodes[ip].x_next || !nodes[ip].y_next) {
+ if (!nodes[ip].x_next || !nodes[ip].y_next) {
continue;
}
dx = (nodes[ip].x - nodes[ip].x_next);
dy = (nodes[ip].y - nodes[ip].y_next);
- dsum += Math.sqrt(dx*dx+dy*dy);
+ dsum += Math.sqrt(dx * dx + dy * dy);
nodes[ip].x = nodes[ip].x_next;
nodes[ip].y = nodes[ip].y_next;
- xmin = Math.min(xmin,nodes[ip].x);
- xmax = Math.max(xmax,nodes[ip].x);
- ymin = Math.min(ymin,nodes[ip].y);
- ymax = Math.max(ymax,nodes[ip].y);
+ xmin = Math.min(xmin, nodes[ip].x);
+ xmax = Math.max(xmax, nodes[ip].x);
+ ymin = Math.min(ymin, nodes[ip].y);
+ ymax = Math.max(ymax, nodes[ip].y);
}
- vwidth=(xmax-xmin);
- vheight=(ymax-ymin);
+ vwidth = (xmax - xmin);
+ vheight = (ymax - ymin);
- xoff=-xmin;
- yoff=-ymin;
+ xoff = -xmin;
+ yoff = -ymin;
/*
document.getElementById('debug').innerHTML = "<br />" +
"offset: " + xoff + "x" + yoff + " dsum: " + dsum + "<br />" +
@@ -696,8 +650,8 @@ function declump(t) {
"optsize: " + optsize + "<br />";
*/
refresh();
- if(auto_declump) {
- dclTimer = setTimeout("declump()", dsum>ncount ? dcl_timeout : dcllow_timeout );
+ if (auto_declump) {
+ dclTimer = setTimeout("declump()", dsum > ncount ? dcl_timeout : dcllow_timeout);
}
declump_running = false;
}
@@ -728,7 +682,7 @@ function dragstart(element) {
dragy = posy - element.offsetTop;
var n = nodes[dragip];
- if(n) {
+ if (n) {
n.pinned = true;
}
}
@@ -738,11 +692,11 @@ function dragstop() {
//Wird aufgerufen, wenn ein Objekt nicht mehr bewegt werden soll.
var n = nodes[dragip];
- if(n) {
+ if (n) {
n.pinned = false;
}
refresh();
- dragip=null;
+ dragip = null;
}
@@ -751,21 +705,20 @@ function drag(ereignis) {
posx = document.all ? window.event.clientX : ereignis.pageX;
posy = document.all ? window.event.clientY : ereignis.pageY;
- if(dragip != null) {
+ if (dragip != null) {
var n = nodes[dragip];
- if(n) {
- n.x = (posx - dragx)/scale - xoff;
- n.y = (posy - dragy)/scale - yoff;
+ if (n) {
+ n.x = (posx - dragx) / scale - xoff;
+ n.y = (posy - dragy) / scale - yoff;
}
- var e = document.getElementById('node_'+dragip);
- e.style.left = parseInt((n.x+xoff)*scale) + "px";
- e.style.top = parseInt((n.y+yoff)*scale) + "px";
+ var e = document.getElementById('node_' + dragip);
+ e.style.left = parseInt((n.x + xoff) * scale) + "px";
+ e.style.top = parseInt((n.y + yoff) * scale) + "px";
}
}
-function debug_writeln(line)
-{
- document.getElementById('debug').innerHTML = line + "<br />" + document.getElementById('debug').innerHTML;
+function debug_writeln(line) {
+ debugSpan.innerHTML = line + "<br />" + debugSpan.innerHTML;
}
/**
@@ -782,7 +735,7 @@ function debug_writeln(line)
*/
function setCookie(name, value, expires, path, domain, secure) {
- document.cookie= name + "=" + escape(value) +
+ document.cookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
@@ -798,9 +751,8 @@ function setCookie(name, value, expires, path, domain, secure) {
* or null if cookie does not exist.
*/
-function getCookie(name)
-{
- var results = document.cookie.match ( name + '=(.*?)(;|$)' );
+function getCookie(name) {
+ var results = document.cookie.match(name + '=(.*?)(;|$)');
if (results) {
return unescape(results[1]);
}
@@ -826,7 +778,7 @@ function deleteCookie(name, path, domain) {
function deleteAllCookies() {
var cookies = document.cookie.split("; ");
- for(var i=0;i<cookies.length;i++) {
+ for (var i = 0; i < cookies.length; i++) {
deleteCookie(cookies[i].split("=")[0]);
}
}
diff --git a/applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js b/applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
new file mode 100644
index 0000000000..7624e0e7b2
--- /dev/null
+++ b/applications/luci-app-olsr-viz/htdocs/luci-static/resources/view/olsr-viz/olsr-viz-view.js
@@ -0,0 +1,166 @@
+'use strict';
+'require uci';
+'require view';
+'require poll';
+'require ui';
+'require rpc';
+
+
+return view.extend({
+ callGetOlsrVizData: rpc.declare({
+ object: 'olsrvizinfo',
+ method: 'getolsrvizdata'
+ }),
+
+ fetch_jsoninfo: function () {
+ var jsonreq4 = '';
+ var json;
+ var data;
+ var self = this;
+ return new Promise(function (resolve, reject) {
+ L.resolveDefault(self.callGetOlsrVizData(), {})
+ .then(function (res) {
+ json = res;
+ data = json.jsonreq4;
+ resolve([data]);
+ })
+ .catch(function (err) {
+ console.error(err);
+ reject([null]);
+ });
+ });
+ },
+
+ action_olsr_viz: function () {
+ var self = this;
+ return new Promise(function (resolve, reject) {
+ self
+ .fetch_jsoninfo()
+ .then(function ([data]) {
+ var result = { viz_data: data };
+ resolve(result);
+ })
+ .catch(function (err) {
+ reject(err);
+ });
+ });
+ },
+
+ load: function () {
+ var self = this;
+ document.querySelector('head').appendChild(E('style', { 'type': 'text/css' }, [
+ '.label {color:black;background-color:white}',
+ '.olsr_viz_main {width: 100%; height: 93%; border: 1px solid #ccc; margin-left:auto; margin-right:auto; text-align:center; overflow: scroll}'
+ ]));
+ return new Promise(function (resolve, reject) {
+ var script = E('script', { 'type': 'text/javascript' });
+ script.onload = resolve;
+ script.onerror = reject;
+ script.src = L.resource('olsr-viz.js');
+ document.querySelector('head').appendChild(script);
+ });
+ },
+ render: function () {
+ var viz_res;
+ var self = this;
+ return this.action_olsr_viz()
+ .then(function (result) {
+ viz_res = result.viz_data;
+
+ var nodeDiv = E('div', { 'id': 'nodes', 'style': 'width: 1px; height: 1px; position: relative; z-index:4' });
+ var edgeDiv = E('div', { 'id': 'edges', 'style': 'width: 1px; height: 1px; position: relative; z-index:2' });
+
+ var mainDiv = E('div', {
+ 'id': 'main',
+ 'class': 'olsr_viz_main'
+ }, [nodeDiv, edgeDiv]);
+
+ var zoomInput = E('input', {
+ 'id': 'zoom',
+ 'name': 'zoom',
+ 'type': 'text',
+ 'value': '2.0',
+ 'size': '5',
+ 'style': 'min-width: unset !important;',
+ 'onchange': 'set_scale()'
+ });
+ var metricInput = E('input', {
+ 'id': 'maxmetric',
+ 'name': 'maxmetric',
+ 'type': 'text',
+ 'value': '3',
+ 'size': '4',
+ 'style': 'min-width: unset !important;',
+ 'change': (ev)=>set_maxmetric(ev.target.value)
+ });
+ var autoOptimizationCheckbox = E('input', {
+ 'id': 'auto_declump',
+ 'name': 'auto_declump',
+ 'type': 'checkbox',
+ 'change': (ev) => set_autodeclump(ev.target.checked),
+ 'checked': 'checked'
+ });
+ var hostnamesCheckbox = E('input', {
+ 'id': 'show_hostnames',
+ 'name': 'show_hostnames',
+ 'type': 'checkbox',
+ 'change': (ev) => set_showdesc(ev.target.checked),
+ 'checked': 'checked'
+ });
+
+ var form = E('form', { 'action': '' }, [
+ E('p', {}, [
+ E('b', { 'title': 'Bestimmt die Vergrößerungsstufe.' }, 'Zoom '),
+ E('a', { 'href': '#', 'click': () =>set_scale(scale+0.1) }, '+ '),
+ E('a', { 'href': '#', 'click': () =>set_scale(scale-0.1) }, '\u2212 '),
+ zoomInput,
+ E('b', { 'title': 'Beschränkt die Anzeige auf eine maximale Hop-Entfernung.' }, '&nbsp;&nbsp;Metrik'),
+ E('a', { 'href': '#', 'click': () => set_maxmetric(maxmetric+1) }, '+ '),
+ E('a', { 'href': '#', 'click': () => set_maxmetric(Math.max(maxmetric, 1) - 1) }, '\u2212'),
+ metricInput,
+ E('b', { 'title': 'Schaltet die automatischen Layout-Optimierung ein.' }, '&nbsp;&nbsp;Optimierung'),
+ autoOptimizationCheckbox,
+ E('b', { 'title': 'Zeige Hostnamen an.' }, ' | Hostnamen'),
+ hostnamesCheckbox,
+ E('a', { 'href': '#', 'click': viz_save, 'title': 'Speichert die aktuellen Einstellungen in einem Cookie.', 'style': 'font-weight:700;' }, '&nbsp;|&nbsp;&nbsp;Speichern'),
+ E('a', { 'href': '#', 'click': viz_reset, 'title': 'Startet das Viz-Skriptprogramm neu.', 'style': 'font-weight:700;' }, '&nbsp;|&nbsp;&nbsp;Zur&uuml;cksetzen')
+ ])
+ ]);
+
+ var debugSpan = E('span', { 'id': 'debug', 'style': 'visibility:hidden;' });
+ var vizDiv = E('div', { 'id': 'RSIFrame', 'name': 'RSIFrame', 'style': 'border:0px; width:0px; height:0px; visibility:hidden;' });
+ viz_setup(vizDiv, mainDiv, nodeDiv, edgeDiv, debugSpan, zoomInput, metricInput); viz_update();
+
+ function setInnerHTML(elm, html) {
+ elm.innerHTML = html;
+
+ Array.from(elm.querySelectorAll("script"))
+ .forEach(oldScriptEl => {
+ const newScriptEl = document.createElement("script");
+
+ Array.from(oldScriptEl.attributes).forEach(attr => {
+ newScriptEl.setAttribute(attr.name, attr.value)
+ });
+
+ const scriptText = document.createTextNode(oldScriptEl.innerHTML);
+ newScriptEl.appendChild(scriptText);
+
+ oldScriptEl.parentNode.replaceChild(newScriptEl, oldScriptEl);
+ });
+ };
+
+ setInnerHTML(vizDiv, viz_res);
+
+ var renderDiv = E('div', { 'style': 'width:100%; height:640px; border:none', 'scrolling': 'no' }, [mainDiv]);
+ var result = E([], {}, [form, debugSpan, renderDiv, vizDiv]);
+ return result;
+ })
+ .catch(function (error) {
+ console.error(error);
+ });
+ },
+ handleSaveApply: null,
+ handleSave: null,
+ handleReset: null,
+});
+
diff --git a/applications/luci-app-olsr-viz/luasrc/view/olsr-viz/olsr-viz.htm b/applications/luci-app-olsr-viz/luasrc/view/olsr-viz/olsr-viz.htm
deleted file mode 100644
index 47bd88405f..0000000000
--- a/applications/luci-app-olsr-viz/luasrc/view/olsr-viz/olsr-viz.htm
+++ /dev/null
@@ -1,10 +0,0 @@
-<%+header%>
-<noscript>
- <div class="warning">
- <%:You need to allow javascript in your browser to show this page.%>
- </div>
-</noscript>
-
-<iframe style="width:100%; height:640px; border:none" scrolling="no" src="/cgi-bin/olsr-viz.sh"></iframe>
-
-<%+footer%>
diff --git a/applications/luci-app-olsr-viz/root/usr/libexec/rpcd/olsrvizinfo b/applications/luci-app-olsr-viz/root/usr/libexec/rpcd/olsrvizinfo
new file mode 100644
index 0000000000..27c1f67af3
--- /dev/null
+++ b/applications/luci-app-olsr-viz/root/usr/libexec/rpcd/olsrvizinfo
@@ -0,0 +1,59 @@
+#!/bin/sh
+. /usr/share/libubox/jshn.sh
+
+case "$1" in
+list)
+ json_init
+ json_add_object "getolsrvizdata"
+ json_close_object
+ json_dump
+ ;;
+call)
+ case "$2" in
+ getolsrvizdata)
+
+ jsonreq4=$(
+ cat <<EOF
+<script language='JavaScript1.2' type='text/javascript'>
+EOF
+
+ # sed + txtinfo plugin
+ re_ip='[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}'
+ re_sep='[[:space:]]\{1,\}'
+ re_nosep='[^[:space:]]\{1,\}'
+ wget http://127.0.0.1:2006/all -qO - | sed -n "
+/^Table: Links$/,/^$/ {
+s# # - #g
+s#\($re_ip\)$re_sep\($re_ip\)\($re_sep$re_nosep\)\{3\}$re_sep\($re_nosep\)#touch_edge(touch_node('\1').set_metric(1).update(),touch_node('\2').set_metric(1).update(),'\4');#p
+}
+/^Table: Topology$/,/^$/ {
+s#\($re_ip\)$re_sep\($re_ip\)\($re_sep$re_nosep\)\{2\}$re_sep\($re_nosep\)#touch_edge(touch_node('\1').update(),touch_node('\2').update(),'\4');#p
+}
+/^Table: HNA$/,/^$/ {
+s#\($re_ip\)/\([0-9]\{1,\}\)$re_sep\($re_ip\)#touch_hna(touch_node('\3'),'\1','\2');#p
+}
+/^Table: Routes$/,/^$/ {
+s#\($re_ip\)/32$re_sep$re_nosep$re_sep\($re_nosep\).*#touch_node('\1').set_metric('\2').update();#p
+}
+"
+
+ hosts=$(uci show olsrd | grep hosts_file | cut -d "=" -f 2)
+ if [ -n $hosts ]; then
+ sed -n "
+s#\($re_ip\)$re_sep\($re_nosep\)$re_sep.*#touch_node('\1').set_desc('\2');#p
+" <$hosts
+ fi
+
+ cat <<EOF
+ viz_callback();
+</script>
+EOF
+ )
+
+ json_init
+ json_add_string "jsonreq4" "$jsonreq4"
+ json_dump
+ ;;
+ esac
+ ;;
+esac
diff --git a/applications/luci-app-olsr-viz/root/usr/share/luci/menu.d/luci-app-olsr-viz.json b/applications/luci-app-olsr-viz/root/usr/share/luci/menu.d/luci-app-olsr-viz.json
index 02cfd6b646..ad6393b4ac 100644
--- a/applications/luci-app-olsr-viz/root/usr/share/luci/menu.d/luci-app-olsr-viz.json
+++ b/applications/luci-app-olsr-viz/root/usr/share/luci/menu.d/luci-app-olsr-viz.json
@@ -1,10 +1,12 @@
{
- "admin/status/olsr/olsr-viz": {
- "title": "OLSR-Viz",
- "order": 90,
+
+ "olsr/olsr-viz": {
+ "title": "OLSR Visualization",
+ "order": 100,
"action": {
- "type": "template",
- "path": "olsr-viz/olsr-viz"
+ "type": "view",
+ "path": "olsr-viz/olsr-viz-view"
}
}
+
}
diff --git a/applications/luci-app-olsr-viz/root/usr/share/rpcd/acl.d/luci-app-olsr-viz-unauthenticated.json b/applications/luci-app-olsr-viz/root/usr/share/rpcd/acl.d/luci-app-olsr-viz-unauthenticated.json
new file mode 100644
index 0000000000..7238fd9053
--- /dev/null
+++ b/applications/luci-app-olsr-viz/root/usr/share/rpcd/acl.d/luci-app-olsr-viz-unauthenticated.json
@@ -0,0 +1,12 @@
+{
+ "unauthenticated": {
+ "description": "Grant read access for luci-app-olsr-viz",
+ "read": {
+ "ubus": {
+ "olsrvizinfo": [
+ "getolsrvizdata"
+ ]
+ }
+ }
+ }
+}
diff --git a/applications/luci-app-olsr/Makefile b/applications/luci-app-olsr/Makefile
index 168bfab9f3..b503809a78 100644
--- a/applications/luci-app-olsr/Makefile
+++ b/applications/luci-app-olsr/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=OLSR configuration and status module
-LUCI_DEPENDS:=+olsrd
+LUCI_DEPENDS:=+luci-base +olsrd
include ../../luci.mk
diff --git a/applications/luci-app-omcproxy/Makefile b/applications/luci-app-omcproxy/Makefile
index 622ce06950..215fd1e485 100644
--- a/applications/luci-app-omcproxy/Makefile
+++ b/applications/luci-app-omcproxy/Makefile
@@ -14,8 +14,7 @@ PKG_MAINTAINER:=Shun Li <riverscn@gmail.com>
PKG_LICENSE:=Apache-2.0
LUCI_TITLE:=LuCI support for omcproxy
-LUCI_DEPENDS:=+omcproxy
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +omcproxy
include ../../luci.mk
diff --git a/applications/luci-app-openvpn/Makefile b/applications/luci-app-openvpn/Makefile
index 4dfcc682ce..74df261b0d 100644
--- a/applications/luci-app-openvpn/Makefile
+++ b/applications/luci-app-openvpn/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for OpenVPN
-LUCI_DEPENDS:=+luci-compat
+LUCI_DEPENDS:=+luci-base +luci-compat
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-openwisp/Makefile b/applications/luci-app-openwisp/Makefile
index 03fbd83c11..b8b147998d 100644
--- a/applications/luci-app-openwisp/Makefile
+++ b/applications/luci-app-openwisp/Makefile
@@ -8,7 +8,7 @@ PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
LUCI_TITLE:=LuCI support for OpenWISP
LUCI_DESCRIPTION:=Allows configuration of OpenWISP agent settings
-LUCI_DEPENDS:=+openwisp-config
+LUCI_DEPENDS:=+luci-base +openwisp-config
include ../../luci.mk
diff --git a/applications/luci-app-opkg/Makefile b/applications/luci-app-opkg/Makefile
index 5763e9115e..0f3d8a7027 100644
--- a/applications/luci-app-opkg/Makefile
+++ b/applications/luci-app-opkg/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=OPKG package management application
-LUCI_DEPENDS:=+opkg
+LUCI_DEPENDS:=+luci-base +opkg
include ../../luci.mk
diff --git a/applications/luci-app-p910nd/Makefile b/applications/luci-app-p910nd/Makefile
index 8c73f372f4..4b33020cbd 100644
--- a/applications/luci-app-p910nd/Makefile
+++ b/applications/luci-app-p910nd/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=p910nd - Printer server module
-LUCI_DEPENDS:=+luci-compat +p910nd
+LUCI_DEPENDS:=+luci-base +luci-compat +p910nd
include ../../luci.mk
diff --git a/applications/luci-app-pagekitec/Makefile b/applications/luci-app-pagekitec/Makefile
index d875009772..9ed223a7ca 100644
--- a/applications/luci-app-pagekitec/Makefile
+++ b/applications/luci-app-pagekitec/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for PageKite
-LUCI_DEPENDS:=+pagekitec
+LUCI_DEPENDS:=+luci-base +pagekitec
PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
diff --git a/applications/luci-app-pbr/Makefile b/applications/luci-app-pbr/Makefile
index 912db16fd1..3b04a9500d 100644
--- a/applications/luci-app-pbr/Makefile
+++ b/applications/luci-app-pbr/Makefile
@@ -10,7 +10,6 @@ PKG_VERSION:=1.1.1-7
LUCI_TITLE:=Policy Based Routing Service Web UI
LUCI_DESCRIPTION:=Provides Web UI for Policy Based Routing Service.
LUCI_DEPENDS:=+luci-base +jsonfilter +pbr
-LUCI_PKGARCH:=all
PKG_PROVIDES:=luci-app-vpnbypass luci-app-vpn-policy-routing
diff --git a/applications/luci-app-polipo/Makefile b/applications/luci-app-polipo/Makefile
index 0bd1843322..cd157e48e9 100644
--- a/applications/luci-app-polipo/Makefile
+++ b/applications/luci-app-polipo/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for the Polipo Proxy
-LUCI_DEPENDS:=+luci-compat +polipo
+LUCI_DEPENDS:=+luci-base +luci-compat +polipo
include ../../luci.mk
diff --git a/applications/luci-app-privoxy/Makefile b/applications/luci-app-privoxy/Makefile
index f558603795..5c1f30a5b6 100644
--- a/applications/luci-app-privoxy/Makefile
+++ b/applications/luci-app-privoxy/Makefile
@@ -21,8 +21,7 @@ PKG_MAINTAINER:=
# LuCI specific settings
LUCI_TITLE:=LuCI Support for Privoxy WEB proxy
-LUCI_DEPENDS:=+luci-compat +luci-lib-ipkg +luci-mod-admin-full +privoxy
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-compat +luci-lib-ipkg +luci-base +privoxy
define Package/$(PKG_NAME)/config
# shown in make menuconfig <Help>
diff --git a/applications/luci-app-qos/Makefile b/applications/luci-app-qos/Makefile
index 8361b6e2e6..846858d043 100644
--- a/applications/luci-app-qos/Makefile
+++ b/applications/luci-app-qos/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Quality of Service configuration module
-LUCI_DEPENDS:=+luci-compat +qos-scripts
+LUCI_DEPENDS:=+luci-base +luci-compat +qos-scripts
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-radicale/Makefile b/applications/luci-app-radicale/Makefile
index b70683674e..eee10b2a4d 100644
--- a/applications/luci-app-radicale/Makefile
+++ b/applications/luci-app-radicale/Makefile
@@ -21,8 +21,7 @@ PKG_MAINTAINER:=
# LuCI specific settings
LUCI_TITLE:=LuCI Support for Radicale CardDAV/CalDAV
-LUCI_DEPENDS:=+luci-compat +luci-lib-ipkg +luci-mod-admin-full
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-compat +luci-lib-ipkg +luci-base
define Package/$(PKG_NAME)/config
# shown in make menuconfig <Help>
diff --git a/applications/luci-app-radicale2/Makefile b/applications/luci-app-radicale2/Makefile
index aa964d4f51..c2c6838db0 100644
--- a/applications/luci-app-radicale2/Makefile
+++ b/applications/luci-app-radicale2/Makefile
@@ -1,8 +1,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Radicale v2.x CalDAV/CardDAV Server
-LUCI_DEPENDS:=+luci-compat +radicale2 +rpcd-mod-rad2-enc
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +luci-compat +radicale2 +rpcd-mod-rad2-enc
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-rp-pppoe-server/Makefile b/applications/luci-app-rp-pppoe-server/Makefile
index b4edfc9499..4454242d48 100644
--- a/applications/luci-app-rp-pppoe-server/Makefile
+++ b/applications/luci-app-rp-pppoe-server/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Roaring Penguin PPPoE Server
-LUCI_DEPENDS:=+luci-compat +rp-pppoe-server
+LUCI_DEPENDS:=+luci-base +luci-compat +rp-pppoe-server
include ../../luci.mk
diff --git a/applications/luci-app-samba4/Makefile b/applications/luci-app-samba4/Makefile
index b0dedc5413..0073e6a7e3 100644
--- a/applications/luci-app-samba4/Makefile
+++ b/applications/luci-app-samba4/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Network Shares - Samba 4 SMB/CIFS fileserver
-LUCI_DEPENDS:=+samba4-server
+LUCI_DEPENDS:=+luci-base +samba4-server
include ../../luci.mk
diff --git a/applications/luci-app-ser2net/Makefile b/applications/luci-app-ser2net/Makefile
index a77bd4009e..72ca1f698a 100644
--- a/applications/luci-app-ser2net/Makefile
+++ b/applications/luci-app-ser2net/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for ser2net
-LUCI_DEPENDS:=+ser2net
+LUCI_DEPENDS:=+luci-base +ser2net
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-shairplay/Makefile b/applications/luci-app-shairplay/Makefile
index 59ca53d1b1..1e9ca6bef1 100644
--- a/applications/luci-app-shairplay/Makefile
+++ b/applications/luci-app-shairplay/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for Shairplay
-LUCI_DEPENDS:=+luci-compat +shairplay
+LUCI_DEPENDS:=+luci-base +luci-compat +shairplay
include ../../luci.mk
diff --git a/applications/luci-app-siitwizard/Makefile b/applications/luci-app-siitwizard/Makefile
index a411f6aa3d..7677db0cf2 100644
--- a/applications/luci-app-siitwizard/Makefile
+++ b/applications/luci-app-siitwizard/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=SIIT IPv4-over-IPv6 configuration wizard
-LUCI_DEPENDS:=+luci-compat +kmod-siit
+LUCI_DEPENDS:=+luci-base +luci-compat +kmod-siit
include ../../luci.mk
diff --git a/applications/luci-app-smartdns/Makefile b/applications/luci-app-smartdns/Makefile
index 407e98f7c8..a53d89e9c1 100644
--- a/applications/luci-app-smartdns/Makefile
+++ b/applications/luci-app-smartdns/Makefile
@@ -11,8 +11,7 @@ PKG_RELEASE:=1
LUCI_TITLE:=LuCI for smartdns
LUCI_DESCRIPTION:=Provides Luci for smartdns
-LUCI_DEPENDS:=+smartdns
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +smartdns
define Package/$(PKG_NAME)/config
# shown in make menuconfig <Help>
diff --git a/applications/luci-app-snmpd/Makefile b/applications/luci-app-snmpd/Makefile
index ffb14cfe25..ef48151645 100644
--- a/applications/luci-app-snmpd/Makefile
+++ b/applications/luci-app-snmpd/Makefile
@@ -2,7 +2,6 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:= Net-SNMP LuCI interface
LUCI_DEPENDS:=+luci-base +snmpd
-LUCI_PKGARCH:=all
LUCI_DESCRIPTION:=Some common net-snmp config items. In no way is this comprehensive.
PKG_MAINTAINER:= Karl Palsson <karlp@etactica.com>
diff --git a/applications/luci-app-softether/Makefile b/applications/luci-app-softether/Makefile
index 06a310c7e1..0321508401 100644
--- a/applications/luci-app-softether/Makefile
+++ b/applications/luci-app-softether/Makefile
@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Softether management application
-LUCI_DEPENDS:=+softethervpn5-client
+LUCI_DEPENDS:=+luci-base +softethervpn5-client
include ../../luci.mk
diff --git a/applications/luci-app-splash/Makefile b/applications/luci-app-splash/Makefile
index 8950a497ea..5d9503c622 100644
--- a/applications/luci-app-splash/Makefile
+++ b/applications/luci-app-splash/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Freifunk DHCP-Splash application
-LUCI_DEPENDS:=+luci-compat +luci-lib-nixio +luci-lib-iptparser +luci-lua-runtime +tc +kmod-sched +iptables-mod-nat-extra +iptables-mod-ipopt
+LUCI_DEPENDS:=+luci-base +luci-compat +luci-lib-nixio +luci-lib-iptparser +luci-lua-runtime +tc +kmod-sched +iptables-mod-nat-extra +iptables-mod-ipopt
define Package/luci-app-splash/conffiles
/etc/config/luci_splash
diff --git a/applications/luci-app-sqm/Makefile b/applications/luci-app-sqm/Makefile
index 4ab842b241..cce746a2a8 100644
--- a/applications/luci-app-sqm/Makefile
+++ b/applications/luci-app-sqm/Makefile
@@ -8,8 +8,7 @@ LUCI_DESCRIPTION:=Luci interface for the SQM scripts queue management package
PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
-LUCI_DEPENDS:=+sqm-scripts
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +sqm-scripts
include ../../luci.mk
diff --git a/applications/luci-app-squid/Makefile b/applications/luci-app-squid/Makefile
index b16bd5d752..4c89c4a610 100644
--- a/applications/luci-app-squid/Makefile
+++ b/applications/luci-app-squid/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Squid LuCI Interface
-LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full +squid
+LUCI_DEPENDS:=+luci-compat +luci-base +squid
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-tinyproxy/Makefile b/applications/luci-app-tinyproxy/Makefile
index f4c7475b8b..8a90ce7f16 100644
--- a/applications/luci-app-tinyproxy/Makefile
+++ b/applications/luci-app-tinyproxy/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Tinyproxy - HTTP(S)-Proxy configuration
-LUCI_DEPENDS:=+luci-compat +tinyproxy
+LUCI_DEPENDS:=+luci-base +luci-compat +tinyproxy
include ../../luci.mk
diff --git a/applications/luci-app-transmission/Makefile b/applications/luci-app-transmission/Makefile
index d0fddbefef..ff0b105a14 100644
--- a/applications/luci-app-transmission/Makefile
+++ b/applications/luci-app-transmission/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for Transmission
-LUCI_DEPENDS:=+transmission-daemon
+LUCI_DEPENDS:=+luci-base +transmission-daemon
include ../../luci.mk
diff --git a/applications/luci-app-travelmate/Makefile b/applications/luci-app-travelmate/Makefile
index 5444d2bbe0..34ecbe1de5 100644
--- a/applications/luci-app-travelmate/Makefile
+++ b/applications/luci-app-travelmate/Makefile
@@ -4,8 +4,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Travelmate
-LUCI_DEPENDS:=+travelmate
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +travelmate
PKG_LICENSE:=Apache-2.0
diff --git a/applications/luci-app-ttyd/Makefile b/applications/luci-app-ttyd/Makefile
index 65ec02710f..148464411a 100644
--- a/applications/luci-app-ttyd/Makefile
+++ b/applications/luci-app-ttyd/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=ttyd - Command-line tool for sharing terminal over the web
-LUCI_DEPENDS:=+ttyd
+LUCI_DEPENDS:=+luci-base +ttyd
include ../../luci.mk
diff --git a/applications/luci-app-udpxy/Makefile b/applications/luci-app-udpxy/Makefile
index cb8f179232..ee2350ba93 100644
--- a/applications/luci-app-udpxy/Makefile
+++ b/applications/luci-app-udpxy/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for udpxy
-LUCI_DEPENDS:=+udpxy
+LUCI_DEPENDS:=+luci-base +udpxy
include ../../luci.mk
diff --git a/applications/luci-app-uhttpd/Makefile b/applications/luci-app-uhttpd/Makefile
index 95429650a1..da7e8697fd 100644
--- a/applications/luci-app-uhttpd/Makefile
+++ b/applications/luci-app-uhttpd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=uHTTPd Webserver Configuration
-LUCI_DEPENDS:= +uhttpd
+LUCI_DEPENDS:=+luci-base +uhttpd
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Daniel Dickinson <openwrt@daniel.thecshore.com>
diff --git a/applications/luci-app-unbound/Makefile b/applications/luci-app-unbound/Makefile
index 9dd01ffed6..4376a9aa8e 100644
--- a/applications/luci-app-unbound/Makefile
+++ b/applications/luci-app-unbound/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Unbound Recursive DNS Resolver Configuration
-LUCI_DEPENDS:=+luci-compat +unbound-daemon
+LUCI_DEPENDS:=+luci-base +luci-compat +unbound-daemon
include ../../luci.mk
diff --git a/applications/luci-app-upnp/Makefile b/applications/luci-app-upnp/Makefile
index 84a4d48576..15da0fd187 100644
--- a/applications/luci-app-upnp/Makefile
+++ b/applications/luci-app-upnp/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Universal Plug & Play configuration module
-LUCI_DEPENDS:=+miniupnpd +rpcd-mod-ucode
+LUCI_DEPENDS:=+luci-base +miniupnpd +rpcd-mod-ucode
include ../../luci.mk
diff --git a/applications/luci-app-vnstat/Makefile b/applications/luci-app-vnstat/Makefile
index c2e930632e..606a0853c8 100644
--- a/applications/luci-app-vnstat/Makefile
+++ b/applications/luci-app-vnstat/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for VnStat
-LUCI_DEPENDS:=+luci-compat +vnstat +vnstati
+LUCI_DEPENDS:=+luci-base +luci-compat +vnstat +vnstati
include ../../luci.mk
diff --git a/applications/luci-app-vnstat2/Makefile b/applications/luci-app-vnstat2/Makefile
index 420bf548a4..e611a98a27 100644
--- a/applications/luci-app-vnstat2/Makefile
+++ b/applications/luci-app-vnstat2/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for vnStat 2
-LUCI_DEPENDS:=+luci-lib-jsonc +vnstat2 +vnstati2
+LUCI_DEPENDS:=+luci-base +luci-lib-jsonc +vnstat2 +vnstati2
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Jan Hoffmann <jan@3e8.eu>
diff --git a/applications/luci-app-watchcat/Makefile b/applications/luci-app-watchcat/Makefile
index c3c7aada9d..7d45ec1436 100644
--- a/applications/luci-app-watchcat/Makefile
+++ b/applications/luci-app-watchcat/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for Watchcat
-LUCI_DEPENDS:=+watchcat
+LUCI_DEPENDS:=+luci-base +watchcat
include ../../luci.mk
diff --git a/applications/luci-app-wifischedule/Makefile b/applications/luci-app-wifischedule/Makefile
index 891b41bf5a..e6d5c5fbe2 100644
--- a/applications/luci-app-wifischedule/Makefile
+++ b/applications/luci-app-wifischedule/Makefile
@@ -15,7 +15,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Turns WiFi on and off according to a schedule
-LUCI_DEPENDS:=+luci-compat +wifischedule
+LUCI_DEPENDS:=+luci-base +luci-compat +wifischedule
include ../../luci.mk
diff --git a/applications/luci-app-wol/Makefile b/applications/luci-app-wol/Makefile
index d935ee9030..f7466c0175 100644
--- a/applications/luci-app-wol/Makefile
+++ b/applications/luci-app-wol/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for Wake-on-LAN
-LUCI_DEPENDS:=+etherwake
+LUCI_DEPENDS:=+luci-base +etherwake
include ../../luci.mk
diff --git a/applications/luci-app-xfrpc/Makefile b/applications/luci-app-xfrpc/Makefile
index 1a89598388..f7237eb064 100644
--- a/applications/luci-app-xfrpc/Makefile
+++ b/applications/luci-app-xfrpc/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for xfrpc
-LUCI_DEPENDS:=+xfrpc
+LUCI_DEPENDS:=+luci-base +xfrpc
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Dengfeng Liu <liu_df@qq.com>
diff --git a/applications/luci-app-xinetd/Makefile b/applications/luci-app-xinetd/Makefile
index beed1bccbf..bbe0b22c2e 100644
--- a/applications/luci-app-xinetd/Makefile
+++ b/applications/luci-app-xinetd/Makefile
@@ -8,8 +8,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Support for xinetd
-LUCI_DEPENDS:=+xinetd
-LUCI_PKGARCH:=all
+LUCI_DEPENDS:=+luci-base +xinetd
PKG_MAINTAINER:=Helge Mader <ma@dev.tdt.de>
diff --git a/applications/luci-app-yggdrasil/Makefile b/applications/luci-app-yggdrasil/Makefile
index 747d8c3d67..4ce191921b 100644
--- a/applications/luci-app-yggdrasil/Makefile
+++ b/applications/luci-app-yggdrasil/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Yggdrasil
-LUCI_DEPENDS:=+yggdrasil
+LUCI_DEPENDS:=+luci-base +yggdrasil
include ../../luci.mk