summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-simple-adblock
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-simple-adblock')
-rw-r--r--applications/luci-app-simple-adblock/Makefile4
-rw-r--r--applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js91
-rw-r--r--applications/luci-app-simple-adblock/po/templates/simple-adblock.pot157
-rwxr-xr-xapplications/luci-app-simple-adblock/root/usr/libexec/rpcd/luci.simple-adblock35
4 files changed, 196 insertions, 91 deletions
diff --git a/applications/luci-app-simple-adblock/Makefile b/applications/luci-app-simple-adblock/Makefile
index d7dc975c4f..e67ed6514d 100644
--- a/applications/luci-app-simple-adblock/Makefile
+++ b/applications/luci-app-simple-adblock/Makefile
@@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
-PKG_VERSION:=1.9.3-1
+PKG_VERSION:=1.9.3-3
LUCI_TITLE:=Simple Adblock Web UI
LUCI_DESCRIPTION:=Provides Web UI for simple-adblock service.
-LUCI_DEPENDS:=+luci-mod-admin-full +simple-adblock +jsonfilter
+LUCI_DEPENDS:=+luci-base +simple-adblock +jsonfilter
LUCI_PKGARCH:=all
include ../../luci.mk
diff --git a/applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js b/applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js
index bde2e34c5b..2bc49556c7 100644
--- a/applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js
+++ b/applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js
@@ -83,62 +83,64 @@ var status = baseclass.extend({
]).then(function (data) {
var replyStatus = data[0];
var text ="";
- var status = replyStatus[pkg.Name];
- var outputFile = status.outputFile;
- var outputCache = status.outputCache;
+ var reply = replyStatus[pkg.Name];
+ var outputFile = reply.outputFile;
+ var outputCache = reply.outputCache;
var statusTable = {
- statusNoInstall: _("%s is not installed or not found").format(pkg.Name),
- statusStopped: _("Stopped"),
- statusStarting: _("Starting"),
- statusRestarting: _("Restarting"),
- statusForceReloading: _("Force Reloading"),
- statusDownloading: _("Downloading"),
- statusError: _("Error"),
- statusWarning: _("Warning"),
- statusFail: _("Fail"),
- statusSuccess: _("Active")
+ statusNoInstall: _("%s is not installed or not found").format(pkg.Name),
+ statusStopped: _("Stopped"),
+ statusStarting: _("Starting"),
+ statusProcessing: _("Processing lists"),
+ statusRestarting: _("Restarting"),
+ statusForceReloading: _("Force Reloading"),
+ statusDownloading: _("Downloading lists"),
+ statusError: _("Error"),
+ statusWarning: _("Warning"),
+ statusFail: _("Fail"),
+ statusSuccess: _("Active")
};
var header = E('h2', {}, _("Simple AdBlock - Status"))
var statusTitle = E('label', { class: 'cbi-value-title' }, _("Service Status"));
- if (status.version) {
- text += _("Version: %s").format(status.version) + " - ";
- switch (status.status) {
+ if (reply.version) {
+ text += _("Version: %s").format(reply.version) + " - ";
+ switch (reply.status) {
case 'statusSuccess':
- text += statusTable[status.status] + ".";
- text += "<br />" + _("Blocking %s domains (with %s).").format(status.entries, status.dns);
- if (status.outputGzipExists) {
+ text += statusTable[reply.status] + ".";
+ text += "<br />" + _("Blocking %s domains (with %s).").format(reply.entries, reply.dns);
+ if (reply.outputGzipExists) {
text += "<br />" + _("Compressed cache file created.");
}
- if (status.force_dns_active) {
+ if (reply.force_dns_active) {
text += "<br />" + _("Force DNS ports:");
- status.force_dns_ports.forEach(element => {
+ reply.force_dns_ports.forEach(element => {
text += " " + element;
});
text += ".";
}
break;
case 'statusStopped':
- if (status.enabled) {
- text += statusTable[status.status] + ".";
+ if (reply.enabled) {
+ text += statusTable[reply.status] + ".";
}
else {
- text += statusTable[status.status] + _("disabled") + "."
+ text += statusTable[reply.status] + _("disabled") + "."
}
- if (status.outputCacheExists) {
+ if (reply.outputCacheExists) {
text += "<br />" + _("Cache file found.");
}
- else if (status.outputGzipExists) {
+ else if (reply.outputGzipExists) {
text += "<br />" + _("Compressed cache file found.");
}
break;
case 'statusRestarting':
case 'statusForceReloading':
case 'statusDownloading':
- text += statusTable[status.status] + "...";
+ case 'statusProcessing':
+ text += statusTable[reply.status] + "...";
break;
default:
- text += statusTable[status.status] + ".";
+ text += statusTable[reply.status] + ".";
break;
}
}
@@ -150,16 +152,33 @@ var status = baseclass.extend({
var statusDiv = E('div', { class: 'cbi-value' }, [statusTitle, statusField]);
var warningsDiv = [];
- if (status.warnings) {
+ if (reply.warnings && reply.warnings.length) {
+ var warningTable = {
+ warningExternalDnsmasqConfig: _("use of external dnsmasq config file detected, please set '%s' option to '%s'").format("dns", "dnsmasq.conf"),
+ warningMissingRecommendedPackages: _("some recommended packages are missing")
+ }
var warningsTitle = E('label', { class: 'cbi-value-title' }, _("Service Warnings"));
- var warningsText = E('div', {}, status.warnings);
+ var text = "";
+ (reply.warnings).forEach(element => {
+ text += (warningTable[element.id]).format(element.extra || ' ') + "<br />";
+ });
+ var warningsText = E('div', {}, text);
var warningsField = E('div', { class: 'cbi-value-field' }, warningsText);
warningsDiv = E('div', { class: 'cbi-value' }, [warningsTitle, warningsField]);
}
var errorsDiv = [];
- if ((status.errors).length) {
+ if (reply.errors && reply.errors.length) {
var errorTable = {
+ errorConfigValidationFail: _("Config (%s) validation failure!").format('/etc/config/' + pkg.Name),
+ errorServiceDisabled: _("%s is currently disabled").format(pkg.Name),
+ errorNoDnsmasqIpset: _("dnsmasq ipset support is enabled, but dnsmasq is either not installed or installed dnsmasq does not support ipset"),
+ errorNoIpset: _("dnsmasq ipset support is enabled, but ipset is either not installed or installed ipset does not support '%s' type").format("hash:net"),
+ errorNoDnsmasqNftset: _("dnsmasq nft set support is enabled, but dnsmasq is either not installed or installed dnsmasq does not support nft set"),
+ errorNoNft: _("dnsmasq nft sets support is enabled, but nft is not installed"),
+ errorMkdirFail: _("Unable to create directory for '%s'"),
+ errorNoWanGateway: _("The %s service failed to discover WAN gateway!").format(pkg.Name),
+ errorOutputDirCreate: _("failed to create directory for %s file"),
errorOutputFileCreate: _("failed to create '%s' file").format(outputFile),
errorFailDNSReload: _("failed to restart/reload DNS resolver"),
errorSharedMemory: _("failed to access shared memory"),
@@ -184,8 +203,8 @@ var status = baseclass.extend({
}
var errorsTitle = E('label', { class: 'cbi-value-title' }, _("Service Errors"));
var text = "";
- (status.errors).forEach(element => {
- text += errorTable[element] + ".<br />";
+ (reply.errors).forEach(element => {
+ text += (errorTable[element.id]).format(element.extra || ' ') + "<br />";
});
var errorsText = E('div', {}, text);
var errorsField = E('div', { class: 'cbi-value-field' }, errorsText);
@@ -250,10 +269,10 @@ var status = baseclass.extend({
}
}, _('Disable'));
- if (status.enabled) {
+ if (reply.enabled) {
btn_enable.disabled = true;
btn_disable.disabled = false;
- switch (status.status) {
+ switch (reply.status) {
case 'statusSuccess':
btn_start.disabled = true;
btn_action.disabled = false;
@@ -285,7 +304,7 @@ var status = baseclass.extend({
var buttonsTitle = E('label', { class: 'cbi-value-title' }, _("Service Control"))
var buttonsText = E('div', {}, [btn_start, btn_gap, btn_action, btn_gap, btn_stop, btn_gap_long, btn_enable, btn_gap, btn_disable]);
var buttonsField = E('div', { class: 'cbi-value-field' }, buttonsText);
- if (status.version) {
+ if (reply.version) {
buttonsDiv = E('div', { class: 'cbi-value' }, [buttonsTitle, buttonsField]);
}
diff --git a/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot b/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot
index 23544680c2..06708c773c 100644
--- a/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot
+++ b/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot
@@ -1,11 +1,15 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:174
+msgid "%s is currently disabled"
+msgstr ""
+
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:90
msgid "%s is not installed or not found"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:99
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:100
msgid "Active"
msgstr ""
@@ -58,22 +62,26 @@ msgstr ""
msgid "Blocked Hosts URLs"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:109
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:110
msgid "Blocking %s domains (with %s)."
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:129
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:130
msgid "Cache file found."
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:111
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:112
msgid "Compressed cache file created."
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:132
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:133
msgid "Compressed cache file found."
msgstr ""
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:173
+msgid "Config (%s) validation failure!"
+msgstr ""
+
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:42
msgid "Controls system log and console output verbosity."
msgstr ""
@@ -94,7 +102,7 @@ msgstr ""
msgid "DNS resolution option, see the %sREADME%s for details."
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:251
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:270
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:37
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:39
msgid "Disable"
@@ -105,7 +113,7 @@ msgstr ""
msgid "Disable Debugging"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:247
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:266
msgid "Disabling %s service"
msgstr ""
@@ -131,11 +139,11 @@ msgstr ""
msgid "Download time-out (in seconds)"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:95
-msgid "Downloading"
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:96
+msgid "Downloading lists"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:240
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:259
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:38
msgid "Enable"
msgstr ""
@@ -149,27 +157,27 @@ msgstr ""
msgid "Enables debug output to /tmp/simple-adblock.log."
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:236
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:255
msgid "Enabling %s service"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:96
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:97
msgid "Error"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:98
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:99
msgid "Fail"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:114
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:115
msgid "Force DNS ports:"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:218
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:237
msgid "Force Re-Download"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:94
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:95
msgid "Force Reloading"
msgstr ""
@@ -182,7 +190,7 @@ msgstr ""
msgid "Force Router DNS server to all local devices"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:214
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:233
msgid "Force re-downloading %s block lists"
msgstr ""
@@ -232,7 +240,7 @@ msgstr ""
msgid "Let local devices use their own DNS servers if set"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:146
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:148
msgid "Not installed or not found"
msgstr ""
@@ -259,22 +267,26 @@ msgid "Please note that %s is not supported on this system."
msgstr ""
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:93
+msgid "Processing lists"
+msgstr ""
+
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:94
msgid "Restarting"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:285
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:304
msgid "Service Control"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:185
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:204
msgid "Service Errors"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:103
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:104
msgid "Service Status"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:154
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:160
msgid "Service Warnings"
msgstr ""
@@ -286,7 +298,7 @@ msgstr ""
msgid "Simple AdBlock - Configuration"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:102
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:103
msgid "Simple AdBlock - Status"
msgstr ""
@@ -298,7 +310,7 @@ msgstr ""
msgid "Some output"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:207
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:226
msgid "Start"
msgstr ""
@@ -306,11 +318,11 @@ msgstr ""
msgid "Starting"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:203
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:222
msgid "Starting %s service"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:229
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:248
msgid "Stop"
msgstr ""
@@ -322,7 +334,7 @@ msgstr ""
msgid "Stopped"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:225
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:244
msgid "Stopping %s service"
msgstr ""
@@ -338,6 +350,10 @@ msgstr ""
msgid "Suppress output"
msgstr ""
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:180
+msgid "The %s service failed to discover WAN gateway!"
+msgstr ""
+
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:148
msgid ""
"URL to the external dnsmasq config file, see the %sREADME%s for details."
@@ -355,6 +371,10 @@ msgstr ""
msgid "URLs to lists of hosts to be blocked."
msgstr ""
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:179
+msgid "Unable to create directory for '%s'"
+msgstr ""
+
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:130
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:131
msgid "Use simultaneous processing"
@@ -365,15 +385,15 @@ msgstr ""
msgid "Verbose output"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:105
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:106
msgid "Version: %s"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:97
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:98
msgid "Warning"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:126
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:127
msgid "disabled"
msgstr ""
@@ -389,96 +409,122 @@ msgstr ""
msgid "dnsmasq ipset"
msgstr ""
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:175
+msgid ""
+"dnsmasq ipset support is enabled, but dnsmasq is either not installed or "
+"installed dnsmasq does not support ipset"
+msgstr ""
+
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:176
+msgid ""
+"dnsmasq ipset support is enabled, but ipset is either not installed or "
+"installed ipset does not support '%s' type"
+msgstr ""
+
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:93
msgid "dnsmasq nft set"
msgstr ""
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:177
+msgid ""
+"dnsmasq nft set support is enabled, but dnsmasq is either not installed or "
+"installed dnsmasq does not support nft set"
+msgstr ""
+
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:178
+msgid "dnsmasq nft sets support is enabled, but nft is not installed"
+msgstr ""
+
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:95
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:100
msgid "dnsmasq servers file"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:165
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:184
msgid "failed to access shared memory"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:163
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:182
msgid "failed to create '%s' file"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:175
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:194
msgid "failed to create block-list or restart DNS resolver"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:171
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:190
msgid "failed to create compressed cache"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:183
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:181
+msgid "failed to create directory for %s file"
+msgstr ""
+
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:202
msgid "failed to create output/cache/gzip file directory"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:179
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:198
msgid "failed to download"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:178
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:197
msgid "failed to download Config Update file"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:169
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:188
msgid "failed to format data file"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:174
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:193
msgid "failed to move '%s' to '%s'"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:170
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:189
msgid "failed to move temporary data file to '%s'"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:167
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:186
msgid "failed to optimize data file"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:181
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:200
msgid "failed to parse"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:180
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:199
msgid "failed to parse Config Update file"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:168
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:187
msgid "failed to process allow-list"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:177
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:196
msgid "failed to reload/restart DNS resolver"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:172
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:191
msgid "failed to remove temporary files"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:164
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:183
msgid "failed to restart/reload DNS resolver"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:166
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:185
msgid "failed to sort data file"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:176
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:195
msgid "failed to stop %s"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:173
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:192
msgid "failed to unpack compressed cache"
msgstr ""
-#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:182
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:201
msgid "no HTTPS/SSL support on device"
msgstr ""
@@ -486,6 +532,15 @@ msgstr ""
msgid "none"
msgstr ""
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:158
+msgid "some recommended packages are missing"
+msgstr ""
+
#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js:98
msgid "unbound adblock list"
msgstr ""
+
+#: applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js:157
+msgid ""
+"use of external dnsmasq config file detected, please set '%s' option to '%s'"
+msgstr ""
diff --git a/applications/luci-app-simple-adblock/root/usr/libexec/rpcd/luci.simple-adblock b/applications/luci-app-simple-adblock/root/usr/libexec/rpcd/luci.simple-adblock
index 6ba5790fc7..2ee3ba5d0d 100755
--- a/applications/luci-app-simple-adblock/root/usr/libexec/rpcd/luci.simple-adblock
+++ b/applications/luci-app-simple-adblock/root/usr/libexec/rpcd/luci.simple-adblock
@@ -163,9 +163,40 @@ get_init_status() {
fi
json_add_string 'version' "$(get_version "$name")"
json_add_array 'errors'
- for i in $errors; do json_add_string '' "$i"; done
+ if [ -n "$errors" ]; then
+ for i in $errors; do
+ if str_contains "$i" '|'; then
+ error_extra="${i##*|}"
+ error_id="${i%|*}"
+ else
+ error_id="$i"
+ unset error_extra
+ fi
+ json_add_object
+ json_add_string 'id' "$error_id"
+ json_add_string 'extra' "$error_extra"
+ json_close_object
+ done
+ fi
+ json_close_array
+ json_add_array 'warnings'
+ if [ -n "$warnings" ]; then
+ for i in $warnings; do
+ if str_contains "$i" '|'; then
+ error_extra="${i##*|}"
+ error_id="${i%|*}"
+ else
+ error_id="$i"
+ unset error_extra
+ fi
+ json_add_object
+ json_add_string 'id' "$error_id"
+ json_add_string 'extra' "$error_extra"
+ json_close_object
+ done
+ fi
json_close_array
-# json_add_string 'warnings' "$warnings"
+
if [ -n "$ports" ]; then
json_add_boolean 'force_dns_active' '1'
json_add_array 'force_dns_ports'