Initial commit gluon-luci-admin
based on freifunk-gluon/packages@9d364a6fbc
This commit is contained in:
parent
638aef092e
commit
7e1713945a
6 changed files with 504 additions and 0 deletions
|
@ -0,0 +1,56 @@
|
|||
<%- if self.message then %>
|
||||
<p class="message success"><%=self.message%></p>
|
||||
<%- end %>
|
||||
<%- if self.errmessage then %>
|
||||
<p class="message error"><%=self.errmessage%></p>
|
||||
<%- end %>
|
||||
<% if not self.embedded then %>
|
||||
<form method="post" enctype="multipart/form-data" action="<%=REQUEST_URI%>">
|
||||
<div>
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
|
||||
<input type="hidden" name="cbi.submit" value="1" />
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cbi-map" id="cbi-<%=self.config%>">
|
||||
<% if self.title and #self.title > 0 then %><h2><a id="content" name="content"><%=self.title%></a></h2><% end %>
|
||||
<% if self.description and #self.description > 0 then %><div class="cbi-map-descr"><%=self.description%></div><% end %>
|
||||
<% self:render_children() %>
|
||||
</div>
|
||||
<% if not self.embedded then %>
|
||||
<div class="cbi-page-actions">
|
||||
<%-
|
||||
if type(self.hidden) == "table" then
|
||||
for k, v in pairs(self.hidden) do
|
||||
-%>
|
||||
<input type="hidden" id="<%=k%>" name="<%=k%>" value="<%=pcdata(v)%>" />
|
||||
<%-
|
||||
end
|
||||
end
|
||||
%>
|
||||
<% if redirect then %>
|
||||
<div style="float:left">
|
||||
<input class="cbi-button cbi-button-link" type="button" value="<%:Back to Overview%>" onclick="location.href='<%=pcdata(redirect)%>'" />
|
||||
</div>
|
||||
<% end %>
|
||||
<%- if self.flow and self.flow.skip then %>
|
||||
<input class="cbi-button cbi-button-skip" type="submit" name="cbi.skip" value="<%:Skip%>" />
|
||||
<% end %>
|
||||
<%- if self.submit ~= false then %>
|
||||
<input class="cbi-button cbi-button-save" type="submit" name="cbi.apply" value="
|
||||
<%- if not self.submit then -%><%-:Submit-%><%-else-%><%=self.submit%><%end-%>
|
||||
" />
|
||||
<% end %>
|
||||
<%- if self.reset ~= false then %>
|
||||
<input class="cbi-button cbi-button-reset" type="reset" value="
|
||||
<%- if not self.reset then -%><%-:Reset-%><%-else-%><%=self.reset%><%end-%>
|
||||
" />
|
||||
<% end %>
|
||||
<%- if self.cancel ~= false and self.on_cancel then %>
|
||||
<input class="cbi-button cbi-button-reset" type="submit" name="cbi.cancel" value="
|
||||
<%- if not self.cancel then -%><%-:Cancel-%><%-else-%><%=self.cancel%><%end-%>
|
||||
" />
|
||||
<% end %>
|
||||
<script type="text/javascript">cbi_d_update();</script>
|
||||
</div>
|
||||
</form>
|
||||
<% end %>
|
105
gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade.htm
Normal file
105
gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade.htm
Normal file
|
@ -0,0 +1,105 @@
|
|||
<%#
|
||||
LuCI - Lua Configuration Interface
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2009 Jo-Philipp Wich <xm@subsignal.org>
|
||||
|
||||
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$
|
||||
|
||||
-%>
|
||||
|
||||
<%+header%>
|
||||
|
||||
<h2>Firmware aktualisieren</h2>
|
||||
|
||||
<% if step == 1 then %>
|
||||
<% if supported then %>
|
||||
<form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
|
||||
<p>
|
||||
Hier kannst du ein manuelles Firmwareupdate durchführen.
|
||||
</p>
|
||||
<% if bad_image then %>
|
||||
<p class="error">Die übermittelte Firmwaredatei kann nicht verwendet werden.</p>
|
||||
<% end %>
|
||||
<div>
|
||||
<h3>Firmware image</h3>
|
||||
<input type="hidden" name="step" value="2" />
|
||||
<input type="file" size="30" name="image" />
|
||||
<% if keepavail then -%>
|
||||
<br/>
|
||||
<input type="checkbox" name="keepcfg" value="1" checked="checked" />
|
||||
<label for="keepcfg">Einstellungen beibehalten</label>
|
||||
<% end -%>
|
||||
|
||||
<div class="cbi-page-actions right">
|
||||
<input class="cbi-button cbi-button-apply" type="submit" value="Upload image" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<% else %>
|
||||
<p class="error">Auf diesem Gerät kann kein Upgrade durchgeführt werden.
|
||||
Bitte führe das Upgrade manuell durch.</p>
|
||||
<% end %>
|
||||
<% elseif step == 2 then %>
|
||||
<p>
|
||||
Die Firmwaredatei wurde übermittelt. Bitte vergleiche MD5-Checksumme
|
||||
und Dateigröße und klicke anschließend auf "Fortfahren".
|
||||
</p>
|
||||
|
||||
<% if flashsize > 0 and filesize > flashsize then %>
|
||||
<p class="error">Die Firmware passt nicht in den Speicher des Gerätes.</p>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<ul>
|
||||
<li>md5sum: <code><%=checksum%></code></li>
|
||||
<li>Größe: <%
|
||||
function byte_format(byte)
|
||||
local suff = {"B", "KB", "MB", "GB", "TB"}
|
||||
for i=1, 5 do
|
||||
if byte > 1024 and i < 5 then
|
||||
byte = byte / 1024
|
||||
else
|
||||
return string.format("%.2f %s", byte, suff[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
write(byte_format(filesize))
|
||||
|
||||
if flashsize > 0 then
|
||||
write(luci.i18n.translatef(
|
||||
" (%s available)",
|
||||
w.byte_format(flashsize)
|
||||
))
|
||||
end
|
||||
%></li>
|
||||
</ul>
|
||||
</p>
|
||||
<div class="cbi-page-actions right">
|
||||
<form style="display:inline">
|
||||
<input type="hidden" name="step" value="3" />
|
||||
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
|
||||
<input class="cbi-button cbi-button-apply" type="submit" value="Fortfahren" />
|
||||
</form>
|
||||
<form style="display:inline">
|
||||
<input type="hidden" name="step" value="1" />
|
||||
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
|
||||
<input class="cbi-button cbi-button-reset" type="submit" value="Abbrechen" />
|
||||
</form>
|
||||
</div>
|
||||
<% elseif step == 3 then %>
|
||||
<p>
|
||||
Die Firmware wird jetzt aktualisiert.
|
||||
<strong>UNTERBRECHE AUF KEINEN FALL DIE STROMVERSORGUNG!</strong>
|
||||
Dieser Vorgang wird einige Minuten dauern. Anschließend startet
|
||||
das Gerät automatisch neu.
|
||||
</p>
|
||||
<% end %>
|
||||
<%+footer%>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue