summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--applications/luci-app-adblock-fast/Makefile19
-rw-r--r--applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js6
-rw-r--r--applications/luci-app-adblock-fast/po/templates/adblock-fast.pot113
-rwxr-xr-xapplications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast10
4 files changed, 91 insertions, 57 deletions
diff --git a/applications/luci-app-adblock-fast/Makefile b/applications/luci-app-adblock-fast/Makefile
index cc7948130d..defaa96ae4 100644
--- a/applications/luci-app-adblock-fast/Makefile
+++ b/applications/luci-app-adblock-fast/Makefile
@@ -1,16 +1,25 @@
-# Copyright 2023 MOSSDeF, Stan Grishin (stangri@melmac.ca)
-# This is free software, licensed under the GNU General Public License v3.
+# Copyright 2023-2024 MOSSDeF, Stan Grishin (stangri@melmac.ca).
+# This is free software, licensed under AGPL-3.0-or-later.
include $(TOPDIR)/rules.mk
-PKG_LICENSE:=GPL-3.0-or-later
+PKG_NAME:=luci-app-adblock-fast
+PKG_LICENSE:=AGPL-3.0-or-later
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
-PKG_VERSION:=1.1.1-r7
+PKG_VERSION:=1.1.2
+PKG_RELEASE:=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
+
+define Package/$(PKG_NAME)/config
+# shown in make menuconfig <Help>
+help
+ $(LUCI_TITLE)
+ .
+ Version: $(PKG_VERSION)-$(PKG_RELEASE)
+endef
include ../../luci.mk
diff --git a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js
index 1040cfb369..bebafff50a 100644
--- a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js
+++ b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js
@@ -189,6 +189,12 @@ var status = baseclass.extend({
warningMissingRecommendedPackages: _(
"Some recommended packages are missing"
),
+ warningOutdatedLuciPackage: _(
+ "The WebUI application (luci-app-adblock-fast) is outdated, please update it"
+ ),
+ warningOutdatedPrincipalPackage: _(
+ "The principal package (adblock-fast) is outdated, please update it"
+ ),
warningInvalidCompressedCacheDir: _(
"Invalid compressed cache directory '%s'"
),
diff --git a/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot b/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot
index 874c6386bc..5976b935cf 100644
--- a/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot
+++ b/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:228
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:234
msgid "%s is currently disabled"
msgstr ""
@@ -121,7 +121,7 @@ msgstr ""
msgid "Cache file found."
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:195
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:201
msgid "Can't detect free RAM"
msgstr ""
@@ -137,7 +137,7 @@ msgstr ""
msgid "Compressed cache file found."
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:226
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:232
msgid "Config (%s) validation failure!"
msgstr ""
@@ -171,7 +171,7 @@ msgid ""
"Directory for compressed cache file of block-list in the persistent memory."
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:429
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:435
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:360
msgid "Disable"
msgstr ""
@@ -184,7 +184,7 @@ msgstr ""
msgid "Disabled"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:423
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:429
msgid "Disabling %s service"
msgstr ""
@@ -213,7 +213,7 @@ msgstr ""
msgid "Downloading lists"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:410
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:416
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:361
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:515
msgid "Enable"
@@ -228,7 +228,7 @@ msgstr ""
msgid "Enables debug output to /tmp/adblock-fast.log."
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:404
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:410
msgid "Enabling %s service"
msgstr ""
@@ -236,7 +236,7 @@ msgstr ""
msgid "Error"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:303
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:309
msgid "Errors encountered, please check the %sREADME%s"
msgstr ""
@@ -244,83 +244,83 @@ msgstr ""
msgid "Fail"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:251
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:257
msgid "Failed to access shared memory"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:247
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:253
msgid "Failed to create '%s' file"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:269
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:275
msgid "Failed to create block-list or restart DNS resolver"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:260
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:266
msgid "Failed to create compressed cache"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:246
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:252
msgid "Failed to create directory for %s file"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:281
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:287
msgid "Failed to create output/cache/gzip file directory"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:283
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:289
msgid "Failed to detect format %s"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:276
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:282
msgid "Failed to download %s"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:274
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:280
msgid "Failed to download Config Update file"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:255
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:261
msgid "Failed to format data file"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:264
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:270
msgid "Failed to move '%s' to '%s'"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:257
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:263
msgid "Failed to move temporary data file to '%s'"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:253
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:259
msgid "Failed to optimize data file"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:278
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:284
msgid "Failed to parse %s"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:277
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:283
msgid "Failed to parse Config Update file"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:254
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:260
msgid "Failed to process allow-list"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:272
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:278
msgid "Failed to reload/restart DNS resolver"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:262
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:268
msgid "Failed to remove temporary files"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:250
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:256
msgid "Failed to restart/reload DNS resolver"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:252
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:258
msgid "Failed to sort data file"
msgstr ""
@@ -328,11 +328,11 @@ msgstr ""
msgid "Failed to start"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:271
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:277
msgid "Failed to stop %s"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:263
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:269
msgid "Failed to unpack compressed cache"
msgstr ""
@@ -357,7 +357,7 @@ msgstr ""
msgid "Force Router DNS server to all local devices"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:351
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:357
msgid "Force redownloading %s block lists"
msgstr ""
@@ -365,7 +365,7 @@ msgstr ""
msgid "Forces Router DNS use on local devices, also known as DNS Hijacking."
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:288
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:294
msgid "Free ram (%s) is not enough to process all enabled block-lists"
msgstr ""
@@ -397,7 +397,7 @@ msgstr ""
msgid "Individual domains to be blocked."
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:193
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:199
msgid "Invalid compressed cache directory '%s'"
msgstr ""
@@ -423,11 +423,11 @@ msgstr ""
msgid "No AdBlock on dnsmasq"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:279
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:285
msgid "No HTTPS/SSL support on device"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:285
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:291
msgid "No blocked list URLs nor blocked-domains enabled"
msgstr ""
@@ -439,11 +439,11 @@ msgstr ""
msgid "Output Verbosity Setting"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:372
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:378
msgid "Pause"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:367
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:373
msgid "Pausing %s"
msgstr ""
@@ -481,7 +481,7 @@ msgstr ""
msgid "Processing lists"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:357
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:363
msgid "Redownload"
msgstr ""
@@ -490,11 +490,11 @@ msgstr ""
msgid "Restarting"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:470
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:476
msgid "Service Control"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:294
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:300
msgid "Service Errors"
msgstr ""
@@ -502,7 +502,7 @@ msgstr ""
msgid "Service Status"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:200
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:206
msgid "Service Warnings"
msgstr ""
@@ -526,7 +526,7 @@ msgstr ""
msgid "Some recommended packages are missing"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:338
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:344
msgid "Start"
msgstr ""
@@ -535,7 +535,7 @@ msgstr ""
msgid "Starting"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:332
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:338
msgid "Starting %s service"
msgstr ""
@@ -543,7 +543,7 @@ msgstr ""
msgid "Status"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:391
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:397
msgid "Stop"
msgstr ""
@@ -556,7 +556,7 @@ msgstr ""
msgid "Stopped"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:385
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:391
msgid "Stopping %s service"
msgstr ""
@@ -572,32 +572,41 @@ msgstr ""
msgid "Suppress output"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:244
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:250
msgid "The %s failed to discover WAN gateway"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:232
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:193
+msgid ""
+"The WebUI application (luci-app-adblock-fast) is outdated, please update it"
+msgstr ""
+
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:238
msgid ""
"The dnsmasq ipset support is enabled, but dnsmasq is either not installed or "
"installed dnsmasq does not support ipset"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:235
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:241
msgid ""
"The dnsmasq ipset support is enabled, but ipset is either not installed or "
"installed ipset does not support '%s' type"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:238
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:244
msgid ""
"The dnsmasq nft set support is enabled, but dnsmasq is either not installed "
"or installed dnsmasq does not support nft set"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:241
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:247
msgid "The dnsmasq nft sets support is enabled, but nft is not installed"
msgstr ""
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:196
+msgid "The principal package (adblock-fast) is outdated, please update it"
+msgstr ""
+
#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:528
msgid "URL"
msgstr ""
@@ -616,11 +625,11 @@ msgstr ""
msgid "Unknown"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:301
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:307
msgid "Unknown error"
msgstr ""
-#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:208
+#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:214
msgid "Unknown warning"
msgstr ""
diff --git a/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast b/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast
index 8859c11d71..2f84904c01 100755
--- a/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast
+++ b/applications/luci-app-adblock-fast/root/usr/libexec/rpcd/luci.adblock-fast
@@ -14,6 +14,7 @@
# ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "pause" }'
# ubus -S call luci.adblock-fast setInitAction '{"name": "adblock-fast", "action": "stop" }'
+readonly luciCompat='1'
readonly adbFunctionsFile='/etc/init.d/adblock-fast'
if [ -s "$adbFunctionsFile" ]; then
# shellcheck source=../../../../../adblock-fast/files/etc/init.d/adblock-fast
@@ -156,6 +157,15 @@ get_init_status() {
json_close_object
done
fi
+ if is_greater "${packageCompat:-0}" "${luciCompat:-0}"; then
+ json_add_object
+ json_add_string 'id' 'warningOutdatedLuciPackage'
+ json_close_object
+ elif is_greater "${luciCompat:-0}" "${packageCompat:-0}"; then
+ json_add_object
+ json_add_string 'id' 'warningOutdatedPrincipalPackage'
+ json_close_object
+ fi
json_close_array
ports="$(ubus_get_ports)"