luci-app-openvpn: move to new vpn menu section
Move the app openvpn to the new vpn menu section. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
d3e060ae6c
commit
a63b465adb
6 changed files with 16 additions and 16 deletions
|
@ -5,11 +5,11 @@
|
||||||
module("luci.controller.openvpn", package.seeall)
|
module("luci.controller.openvpn", package.seeall)
|
||||||
|
|
||||||
function index()
|
function index()
|
||||||
entry( {"admin", "services", "openvpn"}, cbi("openvpn"), _("OpenVPN") )
|
entry( {"admin", "vpn", "openvpn"}, cbi("openvpn"), _("OpenVPN") )
|
||||||
entry( {"admin", "services", "openvpn", "basic"}, cbi("openvpn-basic"), nil ).leaf = true
|
entry( {"admin", "vpn", "openvpn", "basic"}, cbi("openvpn-basic"), nil ).leaf = true
|
||||||
entry( {"admin", "services", "openvpn", "advanced"}, cbi("openvpn-advanced"), nil ).leaf = true
|
entry( {"admin", "vpn", "openvpn", "advanced"}, cbi("openvpn-advanced"), nil ).leaf = true
|
||||||
entry( {"admin", "services", "openvpn", "file"}, form("openvpn-file"), nil ).leaf = true
|
entry( {"admin", "vpn", "openvpn", "file"}, form("openvpn-file"), nil ).leaf = true
|
||||||
entry( {"admin", "services", "openvpn", "upload"}, call("ovpn_upload"))
|
entry( {"admin", "vpn", "openvpn", "upload"}, call("ovpn_upload"))
|
||||||
end
|
end
|
||||||
|
|
||||||
function ovpn_upload()
|
function ovpn_upload()
|
||||||
|
@ -50,5 +50,5 @@ function ovpn_upload()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
http.redirect(luci.dispatcher.build_url('admin/services/openvpn'))
|
http.redirect(luci.dispatcher.build_url('admin/vpn/openvpn'))
|
||||||
end
|
end
|
||||||
|
|
|
@ -800,7 +800,7 @@ local cts = { }
|
||||||
local params = { }
|
local params = { }
|
||||||
|
|
||||||
local m = Map("openvpn")
|
local m = Map("openvpn")
|
||||||
m.redirect = luci.dispatcher.build_url("admin", "services", "openvpn")
|
m.redirect = luci.dispatcher.build_url("admin", "vpn", "openvpn")
|
||||||
m.apply_on_parse = true
|
m.apply_on_parse = true
|
||||||
|
|
||||||
local p = m:section( SimpleSection )
|
local p = m:section( SimpleSection )
|
||||||
|
|
|
@ -95,7 +95,7 @@ local basicParams = {
|
||||||
|
|
||||||
|
|
||||||
local m = Map("openvpn")
|
local m = Map("openvpn")
|
||||||
m.redirect = luci.dispatcher.build_url("admin", "services", "openvpn")
|
m.redirect = luci.dispatcher.build_url("admin", "vpn", "openvpn")
|
||||||
m.apply_on_parse = true
|
m.apply_on_parse = true
|
||||||
|
|
||||||
local p = m:section( SimpleSection )
|
local p = m:section( SimpleSection )
|
||||||
|
|
|
@ -18,9 +18,9 @@ local cfg = s:option(DummyValue, "config")
|
||||||
function cfg.cfgvalue(self, section)
|
function cfg.cfgvalue(self, section)
|
||||||
local file_cfg = self.map:get(section, "config")
|
local file_cfg = self.map:get(section, "config")
|
||||||
if file_cfg then
|
if file_cfg then
|
||||||
s.extedit = luci.dispatcher.build_url("admin", "services", "openvpn", "file", "%s")
|
s.extedit = luci.dispatcher.build_url("admin", "vpn", "openvpn", "file", "%s")
|
||||||
else
|
else
|
||||||
s.extedit = luci.dispatcher.build_url("admin", "services", "openvpn", "basic", "%s")
|
s.extedit = luci.dispatcher.build_url("admin", "vpn", "openvpn", "basic", "%s")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ end
|
||||||
local updown = s:option( Button, "_updown", translate("Start/Stop") )
|
local updown = s:option( Button, "_updown", translate("Start/Stop") )
|
||||||
updown._state = false
|
updown._state = false
|
||||||
updown.redirect = luci.dispatcher.build_url(
|
updown.redirect = luci.dispatcher.build_url(
|
||||||
"admin", "services", "openvpn"
|
"admin", "vpn", "openvpn"
|
||||||
)
|
)
|
||||||
function updown.cbid(self, section)
|
function updown.cbid(self, section)
|
||||||
local pid = s.getPID(section)
|
local pid = s.getPID(section)
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
if (form)
|
if (form)
|
||||||
{
|
{
|
||||||
form.enctype = 'multipart/form-data';
|
form.enctype = 'multipart/form-data';
|
||||||
form.action = '<%=url('admin/services/openvpn/upload')%>';
|
form.action = '<%=url('admin/vpn/openvpn/upload')%>';
|
||||||
form.submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,21 +8,21 @@
|
||||||
|
|
||||||
<div class="cbi-section">
|
<div class="cbi-section">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="<%=url('admin/services/openvpn')%>"><%:Overview%></a> »
|
<a href="<%=url('admin/vpn/openvpn')%>"><%:Overview%></a> »
|
||||||
<%=luci.i18n.translatef("Instance \"%s\"", self.instance)%>
|
<%=luci.i18n.translatef("Instance \"%s\"", self.instance)%>
|
||||||
</h3>
|
</h3>
|
||||||
<% if self.mode == "basic" then %>
|
<% if self.mode == "basic" then %>
|
||||||
<a href="<%=url('admin/services/openvpn/advanced', self.instance, "Service")%>"><%:Switch to advanced configuration%> »</a><p/>
|
<a href="<%=url('admin/vpn/openvpn/advanced', self.instance, "Service")%>"><%:Switch to advanced configuration%> »</a><p/>
|
||||||
<hr />
|
<hr />
|
||||||
<% elseif self.mode == "advanced" then %>
|
<% elseif self.mode == "advanced" then %>
|
||||||
<a href="<%=url('admin/services/openvpn/basic', self.instance)%>"><%:Switch to basic configuration%> »</a><p/>
|
<a href="<%=url('admin/vpn/openvpn/basic', self.instance)%>"><%:Switch to basic configuration%> »</a><p/>
|
||||||
<hr />
|
<hr />
|
||||||
<%:Configuration category%>:
|
<%:Configuration category%>:
|
||||||
<% for i, c in ipairs(self.categories) do %>
|
<% for i, c in ipairs(self.categories) do %>
|
||||||
<% if c == self.category then %>
|
<% if c == self.category then %>
|
||||||
<strong><%=translate(c)%></strong>
|
<strong><%=translate(c)%></strong>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a href="<%=luci.dispatcher.build_url("admin", "services", "openvpn", "advanced", self.instance, c)%>"><%=translate(c)%></a>
|
<a href="<%=luci.dispatcher.build_url("admin", "vpn", "openvpn", "advanced", self.instance, c)%>"><%=translate(c)%></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if next(self.categories, i) then %>|<% end %>
|
<% if next(self.categories, i) then %>|<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue