gluon-config-mode: convert templates to use the new site config
This commit is contained in:
parent
c33a434884
commit
24ac1dc1bc
@ -4,8 +4,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gluon-config-mode
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=1.$(GLUON_CONFIG_VERSION)
|
||||
PKG_VERSION:=2
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
@ -34,7 +33,6 @@ endef
|
||||
|
||||
define Package/gluon-config-mode/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(GLUON_GENERATE) ./generate/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,gluon-config-mode))
|
||||
|
@ -12,8 +12,12 @@ $Id$
|
||||
|
||||
module("luci.controller.gluon-config-mode.index", package.seeall)
|
||||
|
||||
local site = require 'gluon.site_config'
|
||||
|
||||
|
||||
local meshvpn_name = "mesh_vpn"
|
||||
|
||||
|
||||
function index()
|
||||
local uci_state = luci.model.uci.cursor_state()
|
||||
|
||||
@ -56,11 +60,11 @@ function action_reboot()
|
||||
uci:save("gluon-config-mode")
|
||||
uci:commit("gluon-config-mode")
|
||||
|
||||
hostname = uci:get_first("system", "system", "hostname")
|
||||
local hostname = uci:get_first("system", "system", "hostname")
|
||||
|
||||
if nixio.fork() ~= 0 then
|
||||
luci.template.render("gluon-config-mode/reboot",
|
||||
{pubkey=pubkey, hostname=hostname})
|
||||
{pubkey=pubkey, hostname=hostname, site=site})
|
||||
else
|
||||
debug.setfenv(io.stdout, debug.getfenv(io.open '/dev/null'))
|
||||
io.stdout:close()
|
||||
|
@ -1,6 +1,10 @@
|
||||
<%-
|
||||
local site = require 'gluon.site_config'
|
||||
-%>
|
||||
|
||||
<h2>Willkommen!</h2>
|
||||
<p>
|
||||
@config_mode.msg_welcome@
|
||||
<%= site.config_mode.msg_welcome %>
|
||||
</p>
|
||||
|
||||
<% if not self.embedded then %>
|
@ -1,18 +1,3 @@
|
||||
<%#
|
||||
LuCI - Lua Configuration Interface
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
$Id$
|
||||
|
||||
-%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title><%=hostname%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %></title>
|
||||
@ -25,17 +10,17 @@ $Id$
|
||||
<% if pubkey then %>
|
||||
<fieldset class="cbi-section">
|
||||
<p>
|
||||
@config_mode.msg_pubkey@
|
||||
<%= site.config_mode.msg_pubkey %>
|
||||
</p>
|
||||
<div class="the-key">
|
||||
# <%=hostname%>
|
||||
# Hostname: <%= hostname %>
|
||||
<br/>
|
||||
<%=pubkey%>
|
||||
<%= pubkey %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<fieldset class="cbi-section">
|
||||
@config_mode.msg_reboot@
|
||||
<%= site.config_mode.msg_reboot %>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user