summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-aria2/luasrc/model/cbi/aria2/files.lua
diff options
context:
space:
mode:
authorVan Waholtz <vanwaholtz@gmail.com>2020-07-28 07:14:52 -0700
committerVan Waholtz <vanwaholtz@gmail.com>2021-11-17 15:36:41 +0800
commit9dda104ee7136d805dfb3ab965f020b21cdea3bc (patch)
tree05134587d021211a6dff4d197b95f064c736fcb7 /applications/luci-app-aria2/luasrc/model/cbi/aria2/files.lua
parent8d35d78c61782b393e2f0a9aebb9ae91abca3a2c (diff)
luci-app-aria2: convert to client side
Signed-off-by: Van Waholtz <vanwaholtz@gmail.com>
Diffstat (limited to 'applications/luci-app-aria2/luasrc/model/cbi/aria2/files.lua')
-rw-r--r--applications/luci-app-aria2/luasrc/model/cbi/aria2/files.lua39
1 files changed, 0 insertions, 39 deletions
diff --git a/applications/luci-app-aria2/luasrc/model/cbi/aria2/files.lua b/applications/luci-app-aria2/luasrc/model/cbi/aria2/files.lua
deleted file mode 100644
index 954a4ec5ef..0000000000
--- a/applications/luci-app-aria2/luasrc/model/cbi/aria2/files.lua
+++ /dev/null
@@ -1,39 +0,0 @@
--- Copyright 2017-2019 Xingwang Liao <kuoruan@gmail.com>
--- Licensed to the public under the MIT License.
-
-local m, s, o
-
-local fs = require "nixio.fs"
-local util = require "luci.util"
-local uci = require "luci.model.uci".cursor()
-
-local config_dir = uci:get("aria2", "main", "config_dir") or "/var/etc/aria2"
-local config_file = "%s/aria2.conf.main" % config_dir
-local session_file = "%s/aria2.session.main" % config_dir
-
-m = SimpleForm("aria2", "%s - %s" % { translate("Aria2"), translate("Files") },
- translate("Here shows the files used by aria2."))
-m.reset = false
-m.submit = false
-
-s = m:section(SimpleSection, nil, translatef("Content of config file: <code>%s</code>", config_file))
-
-o = s:option(TextValue, "_config")
-o.rows = 20
-o.readonly = true
-o.cfgvalue = function()
- local v = fs.readfile(config_file) or translate("File does not exist.")
- return util.trim(v) ~= "" and v or translate("Empty file.")
-end
-
-s = m:section(SimpleSection, nil, translatef("Content of session file: <code>%s</code>", session_file))
-
-o = s:option(TextValue, "_session")
-o.rows = 20
-o.readonly = true
-o.cfgvalue = function()
- local v = fs.readfile(session_file) or translate("File does not exist.")
- return util.trim(v) ~= "" and v or translate("Empty file.")
-end
-
-return m