summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-nextdns/luasrc/controller/nextdns.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-11-19 12:04:07 +0100
committerGitHub <noreply@github.com>2019-11-19 12:04:07 +0100
commit15816e668df0bbdc36f6426557e488f6ade2e3ed (patch)
tree576b04d39c5381944dfeb1d75211f37da6e1535b /applications/luci-app-nextdns/luasrc/controller/nextdns.lua
parent8262e1272552db43cef527e5da88e6706d50e7a4 (diff)
parent29fdc2b014b05a4d6ae2324b36ea9ce1c956360b (diff)
Merge pull request #3328 from ysc3839/nextdns
luci-app-nextdns: port to client side
Diffstat (limited to 'applications/luci-app-nextdns/luasrc/controller/nextdns.lua')
-rw-r--r--applications/luci-app-nextdns/luasrc/controller/nextdns.lua22
1 files changed, 2 insertions, 20 deletions
diff --git a/applications/luci-app-nextdns/luasrc/controller/nextdns.lua b/applications/luci-app-nextdns/luasrc/controller/nextdns.lua
index 0552981938..bfa4887b03 100644
--- a/applications/luci-app-nextdns/luasrc/controller/nextdns.lua
+++ b/applications/luci-app-nextdns/luasrc/controller/nextdns.lua
@@ -3,30 +3,12 @@
module("luci.controller.nextdns", package.seeall)
-local util = require("luci.util")
-local i18n = require("luci.i18n")
-local templ = require("luci.template")
-local http = require("luci.http")
-
function index()
if not nixio.fs.access("/etc/config/nextdns") then
return
end
entry({"admin", "services", "nextdns"}, firstchild(), _("NextDNS"), 60).dependent = false
- entry({"admin", "services", "nextdns", "overview"}, cbi("overview", {hideresetbtn=true, hidesavebtn=true}), _("Overview"), 10).leaf = true
- entry({"admin", "services", "nextdns", "log"}, template("nextdns/logread"), _("Logs"), 30).leaf = true
-
- entry({"admin", "services", "nextdns", "logread"}, call("logread"), nil).leaf = true
-
-end
-
-function logread()
- local content = util.trim(util.exec("logread -e 'nextdns'")) or ""
-
- if content == "" then
- content = "No nextdns related logs yet!"
- end
- http.write(content)
+ entry({"admin", "services", "nextdns", "overview"}, view("nextdns/overview"), _("Overview"), 10).leaf = true
+ entry({"admin", "services", "nextdns", "log"}, view("nextdns/logread"), _("Logs"), 30).leaf = true
end
-