From 24478bd34e2b9ddad96892b9212036533c07a9c9 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 21 Dec 2018 16:25:19 +0800 Subject: [PATCH] Add support luci Signed-off-by: Jianhui Zhao --- luci/controller/rtty.lua | 5 +++++ luci/model/cbi/rtty.lua | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 luci/controller/rtty.lua create mode 100644 luci/model/cbi/rtty.lua diff --git a/luci/controller/rtty.lua b/luci/controller/rtty.lua new file mode 100644 index 0000000..ad7144b --- /dev/null +++ b/luci/controller/rtty.lua @@ -0,0 +1,5 @@ +module("luci.controller.rtty", package.seeall) + +function index() + entry({"admin", "system", "rtty"}, cbi("rtty"), _("Rtty"), 90) +end diff --git a/luci/model/cbi/rtty.lua b/luci/model/cbi/rtty.lua new file mode 100644 index 0000000..befe12a --- /dev/null +++ b/luci/model/cbi/rtty.lua @@ -0,0 +1,25 @@ +local m, s, o + +m = Map("rtty", translate("Rtty")) +m:chain("luci") + + +s = m:section(TypedSection, "rtty") +s.anonymous = true +s.addremove = true + +o = s:option(Value, "id", translate("ID")) + +o = s:option(Value, "host", translate("Server")) + +o = s:option(Value, "port", translate("Port")) +o.datatype = "port" + + +o = s:option(Flag, "ssl", translate("SSL")) + + +o = s:option(Value, "description", translate("Description")) + + +return m