diff --git a/LuCI/app-cronosagent/luasrc/controller/cronosagent.lua b/LuCI/app-cronosagent/luasrc/controller/cronosagent.lua index 6a66e47..52b4f00 100644 --- a/LuCI/app-cronosagent/luasrc/controller/cronosagent.lua +++ b/LuCI/app-cronosagent/luasrc/controller/cronosagent.lua @@ -1,8 +1,9 @@ -module("CronosAgent", package.seeall) +module("cronosagent", package.seeall) function index() - entry({ "CronosAgent", "Configure" }, cbi("CronosAgent/configure"), "Configure", 10) - entry({ "CronosAgent", "Restart" }, call("restartCronosAgent"), "Restart", 20) + entry({ "admin", "cronosagent" }, alias("admin", "cronosagent", "configure", "restart"), "CronosAgent") + entry({ "admin", "cronosagent", "configure" }, cbi("cronosagent"), "Configure", 10) + entry({ "admin", "cronosagent", "restart" }, call("restartCronosAgent"), "Restart", 20) end function restartCronosAgent() diff --git a/LuCI/app-cronosagent/luasrc/model/cbi/cronosagent.lua b/LuCI/app-cronosagent/luasrc/model/cbi/cronosagent.lua index 5a70559..be7015c 100644 --- a/LuCI/app-cronosagent/luasrc/model/cbi/cronosagent.lua +++ b/LuCI/app-cronosagent/luasrc/model/cbi/cronosagent.lua @@ -1,8 +1,15 @@ -local map = Map("cronosagent", "CronosAgent") -local section = map:section(TypedSection, "configuration") +local map = Map("cronosagent", "CronosAgent") +local section = map:section(TypedSection, "global", "", "Configuration") -section:option(Value, "number", "Repeater ID", "DMR ID assigned to your repeater") -section:option(Value, "repeaterAddress", "Repeater Address", "Address of your KAIROS repeater") -section:option(Value, "serverAddress", "Server address", "Address of BrandMeister DMR Server") -section:option(Value, "serverPassword", "Password", "Password to login") +local number = section:option(Value, "number", "Repeater ID", "DMR ID assigned to your repeater" ) +local repeater = section:option(Value, "repeaterAddress", "Repeater Address", "Address of your KAIROS repeater" ) +local server = section:option(Value, "serverAddress", "Server address", "Address of BrandMeister DMR Server") +local password = section:option(Value, "serverPassword", "Password", "Password to login" ) + +number.datatype = "range(1,16777215)" +repeater.datatype = "ip4addr" + +server.datatype = "host" +password.datatype = "string" +password.password = true