summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js')
-rw-r--r--applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js41
1 files changed, 32 insertions, 9 deletions
diff --git a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js
index 92caf6b35d..ce9041e8f8 100644
--- a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js
+++ b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js
@@ -125,7 +125,7 @@ return view.extend({
if (reply.platform.unbound_installed) {
o.value("unbound.adb_list", _("unbound adblock list"));
}
- o.default = ("dnsmasq.servers", _("dnsmasq servers file"));
+ o.default = "dnsmasq.servers";
o = s1.taboption(
"tab_basic",
@@ -154,6 +154,23 @@ return view.extend({
)
);
o.value("*", _("AdBlock on all instances"));
+
+ // Object.values(L.uci.sections("dhcp", "dnsmasq")).forEach(function (
+ // val,
+ // index
+ // ) {
+ // const nameValueMap = new Map(Object.entries(val));
+ // so.value(
+ // nameValueMap.get(".name"),
+ // "%s (Name: %s, Domain: %s, Local: %s)".format(
+ // nameValueMap.get(".index"),
+ // nameValueMap.get(".name") || "noname",
+ // val.domain || "unset",
+ // val.local || "unset"
+ // )
+ // );
+ // });
+
var sections = uci.sections("dhcp", "dnsmasq");
sections.forEach((element) => {
var description;
@@ -182,7 +199,7 @@ return view.extend({
);
o.value("0", _("Let local devices use their own DNS servers if set"));
o.value("1", _("Force Router DNS server to all local devices"));
- o.default = ("1", _("Force Router DNS server to all local devices"));
+ o.default = "1";
o = s1.taboption(
"tab_basic",
@@ -194,7 +211,7 @@ return view.extend({
o.value("0", _("Suppress output"));
o.value("1", _("Some output"));
o.value("2", _("Verbose output"));
- o.default = ("2", _("Verbose output"));
+ o.default = "2";
if (reply.platform.leds.length) {
o = s1.taboption(
@@ -211,6 +228,7 @@ return view.extend({
o.value(element);
});
}
+
o = s1.taboption(
"tab_advanced",
form.ListValue,
@@ -220,7 +238,7 @@ return view.extend({
);
o.value("0", _("Disable"));
o.value("1", _("Enable"));
- o.default = ("0", _("Disable"));
+ o.default = "0";
o = s1.taboption(
"tab_advanced",
@@ -233,7 +251,7 @@ return view.extend({
o.value("1", _("Add IPv6 entries"));
o.depends("dns", "dnsmasq.addnhosts");
o.depends("dns", "dnsmasq.nftset");
- o.default = ("", _("Do not add IPv6 entries"));
+ o.default = "";
o.rmempty = true;
o.retain = true;
@@ -283,7 +301,7 @@ return view.extend({
);
o.value("0", _("Do not use simultaneous processing"));
o.value("1", _("Use simultaneous processing"));
- o.default = ("1", _("Use simultaneous processing"));
+ o.default = "1";
o = s1.taboption(
"tab_advanced",
@@ -296,7 +314,7 @@ return view.extend({
);
o.value("0", _("Do not store compressed cache"));
o.value("1", _("Store compressed cache"));
- o.default = ("0", _("Do not store compressed cache"));
+ o.default = "0";
o = s1.taboption(
"tab_advanced",
@@ -322,7 +340,7 @@ return view.extend({
);
o.value("0", _("Disable Debugging"));
o.value("1", _("Enable Debugging"));
- o.default = ("0", _("Disable Debugging"));
+ o.default = "0";
s2 = m.section(
form.NamedSection,
@@ -332,14 +350,15 @@ return view.extend({
);
o.addremove = true;
o.rmempty = true;
+
o = s2.option(
form.DynamicList,
"allowed_domain",
_("Allowed Domains"),
_("Individual domains to be allowed.")
);
-
o.addremove = true;
+
o = s2.option(
form.DynamicList,
"blocked_domain",
@@ -358,6 +377,7 @@ return view.extend({
s3.sortable = true;
s3.anonymous = true;
s3.addremove = true;
+
o = s3.option(form.DummyValue, "_size", "Size");
o.modalonly = false;
o.cfgvalue = function (section_id) {
@@ -370,13 +390,16 @@ return view.extend({
});
return _("Size: %s").format(ret);
};
+
o = s3.option(form.Flag, "enabled", _("Enable"));
o.editable = true;
o.default = "1";
+
o = s3.option(form.ListValue, "action", _("Action"));
o.value("allow", _("Allow"));
o.value("block", _("Block"));
o.default = "block";
+
o = s3.option(form.Value, "url", _("URL"));
o.optional = false;