11 return "https://docs.openwrt.melmac.net/" + pkg.Name + "/";
15 var getInitStatus = rpc.declare({
16 object: "luci." + pkg.Name,
17 method: "getInitStatus",
21 return baseclass.extend({
22 title: _("AdBlock-Fast"),
25 return Promise.all([getInitStatus(pkg.Name)]);
28 render: function (data) {
30 status: (data[0] && data[0][pkg.Name]) || {
37 force_dns_active: null,
44 outputFileExists: null,
45 outputCacheExists: null,
46 outputGzipExists: null,
51 statusNoInstall: _("%s is not installed or not found").format(pkg.Name),
52 statusStopped: _("Stopped"),
53 statusStarting: _("Starting"),
54 statusProcessing: _("Processing lists"),
55 statusRestarting: _("Restarting"),
56 statusForceReloading: _("Force Reloading"),
57 statusDownloading: _("Downloading lists"),
58 statusError: _("Error"),
59 statusWarning: _("Warning"),
60 statusFail: _("Fail"),
61 statusSuccess: _("Active"),
65 if (reply.status.outputCacheExists) {
66 cacheText = _("Cache file");
67 } else if (reply.status.outputGzipExists) {
68 cacheText = _("Compressed cache");
70 var forceDnsText = "";
71 if (reply.status.force_dns_active) {
72 reply.status.force_dns_ports.forEach((element) => {
73 forceDnsText += element + " ";
81 { class: "table", id: "adblock-fast_status_table" },
83 E("tr", { class: "tr table-titles" }, [
84 E("th", { class: "th" }, _("Status")),
85 E("th", { class: "th" }, _("Version")),
86 E("th", { class: "th" }, _("DNS Service")),
87 E("th", { class: "th" }, _("Blocked Domains")),
88 E("th", { class: "th" }, _("Cache")),
89 E("th", { class: "th" }, _("Force DNS Ports")),
91 E("tr", { class: "tr" }, [
95 statusTable[reply.status.status] || _("Unknown")
97 E("td", { class: "td" }, reply.status.version || _("-")),
98 E("td", { class: "td" }, reply.status.dns || _("-")),
99 E("td", { class: "td" }, reply.status.entries || _("-")),
100 E("td", { class: "td" }, cacheText || _("-")),
101 E("td", { class: "td" }, forceDnsText || _("-")),