diff options
author | Daniel F. Dickinson <cshored@thecshore.com> | 2018-08-03 12:36:51 -0400 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-09-19 20:08:19 +0200 |
commit | 58d97b5e271bc0d7507eab5b9bd2902181864e02 (patch) | |
tree | 80e250346ad33c79b3f821daf7b7d9be90d99240 /modules/luci-mod-system/luasrc/view/admin_system | |
parent | 6ec0353201435e0d0d7d32820d8ba600b4ca7b5b (diff) |
modules: Split luci-mod-full
Move some common elements to luci-base, and otherwise make three
packages out of status, system, and network. They were mostly
separated already, but there were some shared elements between
status and network that are now in luci-base.
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Diffstat (limited to 'modules/luci-mod-system/luasrc/view/admin_system')
8 files changed, 586 insertions, 0 deletions
diff --git a/modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm b/modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm new file mode 100644 index 0000000000..e235bd4679 --- /dev/null +++ b/modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm @@ -0,0 +1,53 @@ +<%# + Copyright 2008 Steven Barth <steven@midlink.org> + Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> + Licensed to the public under the Apache License 2.0. +-%> + +<html> + <head> + <title><%=luci.sys.hostname()%> - <%= title or translate("Rebooting...") %></title> + <link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" /> + <script type="text/javascript" src="<%=resource%>/xhr.js"></script> + <script type="text/javascript">//<![CDATA[ + var interval = window.setInterval(function() { + var img = new Image(); + var target = ('https:' == document.location.protocol ? 'https://' : 'http://') + <%=addr and "'%s'" % addr or "window.location.host"%>; + + img.onload = function() { + window.clearInterval(interval); + window.location.replace(target); + }; + + img.src = target + '<%=resource%>/icons/loading.gif?' + Math.random(); + + }, 5000); + //]]></script> + </head> + <body> + <header> + <div class="fill"> + <div class="container"> + <p class="brand"><%=luci.sys.hostname() or "?"%></p> + </div> + </div> + </header> +   + <div class="main"> + <div id="maincontainer"> + <div id="maincontent" class="container"> + <h2 name="content" id="applyreboot-container" ><%:System%> - <%= title or translate("Rebooting...") %></h2> + <div class="cbi-section" id="applyreboot-section"> + <div> + <%= msg or translate("Changes applied.") %> + </div> + <div> + <img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /> + <%:Waiting for changes to be applied...%> + </div> + </div> + </div> + </div> + </div> + </body> +</html>
\ No newline at end of file diff --git a/modules/luci-mod-system/luasrc/view/admin_system/backupfiles.htm b/modules/luci-mod-system/luasrc/view/admin_system/backupfiles.htm new file mode 100644 index 0000000000..c1f3361ae2 --- /dev/null +++ b/modules/luci-mod-system/luasrc/view/admin_system/backupfiles.htm @@ -0,0 +1,10 @@ +<%# + Copyright 2008 Steven Barth <steven@midlink.org> + Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> + Licensed to the public under the Apache License 2.0. +-%> + +<ul class="cbi-tabmenu"> + <li class="cbi-tab-disabled"><a href="<%=url("admin/system/flashops")%>"><%:Actions%></a></li> + <li class="cbi-tab"><a href="#"><%:Configuration%></a></li> +</ul> diff --git a/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm b/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm new file mode 100644 index 0000000000..37d8ae0e85 --- /dev/null +++ b/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm @@ -0,0 +1,36 @@ +<%+cbi/valueheader%> + +<script type="text/javascript">//<![CDATA[ + XHR.poll(5, '<%=url('admin/system/clock_status')%>', null, + function(x, rv) + { + var s = document.getElementById('<%=self.option%>-clock-status'); + if (s) + { + s.innerHTML = rv.timestring || '?'; + } + } + ); + + function sync_clock(btn) + { + btn.disabled = true; + btn.value = '<%:Synchronizing...%>'; + + (new XHR()).post('<%=url('admin/system/clock_status')%>', + { token: '<%=token%>', set: Math.floor((new Date()).getTime() / 1000) }, + function() + { + btn.disabled = false; + btn.value = '<%:Sync with browser%>'; + } + ); + + return false; + } +//]]></script> + +<span id="<%=self.option%>-clock-status"><em><%:Collecting data...%></em></span> +<input type="button" class="cbi-button cbi-button-apply" value="<%:Sync with browser%>" onclick="return sync_clock(this)" /> + +<%+cbi/valuefooter%> diff --git a/modules/luci-mod-system/luasrc/view/admin_system/flashops.htm b/modules/luci-mod-system/luasrc/view/admin_system/flashops.htm new file mode 100644 index 0000000000..8204d38e34 --- /dev/null +++ b/modules/luci-mod-system/luasrc/view/admin_system/flashops.htm @@ -0,0 +1,137 @@ +<%# + Copyright 2008 Steven Barth <steven@midlink.org> + Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org> + Licensed to the public under the Apache License 2.0. +-%> + +<%+header%> + +<h2 name="content"><%:Flash operations%></h2> + +<ul class="cbi-tabmenu"> + <li class="cbi-tab"><a href="#"><%:Actions%></a></li> + <li class="cbi-tab-disabled"><a href="<%=url('admin/system/flashops/backupfiles')%>"><%:Configuration%></a></li> +</ul> + +<div class="cbi-section"> + <h3><%:Backup%></h3> + <div class="cbi-section-descr"><%:Click "Generate archive" to download a tar archive of the current configuration files.%></div> + <div class="cbi-section-node"> + <form class="inline" method="post" action="<%=url('admin/system/flashops/backup')%>"> + <input type="hidden" name="token" value="<%=token%>" /> + <div class="cbi-value<% if not reset_avail then %> cbi-value-last<% end %>"> + <label class="cbi-value-title" for="image"><%:Download backup%></label> + <div class="cbi-value-field"> + <input class="cbi-button cbi-button-action important" type="submit" name="backup" value="<%:Generate archive%>" /> + </div> + </div> + </form> + </div> + + <h3><%:Restore%></h3> + <div class="cbi-section-descr"><%:To restore configuration files, you can upload a previously generated backup archive here. To reset the firmware to its initial state, click "Perform reset" (only possible with squashfs images).%></div> + <div class="cbi-section-node"> + <% if reset_avail then %> + <form class="inline" method="post" action="<%=url('admin/system/flashops/reset')%>"> + <input type="hidden" name="token" value="<%=token%>" /> + <div class="cbi-value cbi-value-last"> + <label class="cbi-value-title"><%:Reset to defaults%></label> + <div class="cbi-value-field"> + <input onclick="return confirm('<%:Really reset all changes?%>')" class="cbi-button cbi-button-reset" type="submit" name="reset" value="<%:Perform reset%>" /> + </div> + </div> + </form> + <% end %> + <form class="inline" method="post" action="<%=url('admin/system/flashops/restore')%>" enctype="multipart/form-data"> + <div class="cbi-value cbi-value-last"> + <label class="cbi-value-title" for="archive"><%:Restore backup%></label> + <div class="cbi-value-field"> + <input type="hidden" name="token" value="<%=token%>" /> + <input type="file" name="archive" id="archive" /> + <input type="submit" class="cbi-button cbi-button-action important" name="restore" value="<%:Upload archive...%>" /> + <% if reset_avail then %> + <div class="cbi-value-description"><%:Custom files (certificates, scripts) may remain on the system. To prevent this, perform a factory-reset first.%></div> + <% end %> + </div> + </div> + </form> + <% if backup_invalid then %> + <div class="cbi-section-error"><%:The backup archive does not appear to be a valid gzip file.%></div> + <% end %> + </div> + + <% local mtds = require("luci.sys").mtds(); if #mtds > 0 then -%> + <h3><%:Save mtdblock contents%></h3> + <div class="cbi-section-descr"><%:Click "Save mtdblock" to download specified mtdblock file. (NOTE: THIS FEATURE IS FOR PROFESSIONALS! )%></div> + <div class="cbi-section-node"> + <form class="inline" method="post" action="<%=url('admin/system/flashops/backupmtdblock')%>"> + <input type="hidden" name="token" value="<%=token%>" /> + <div class="cbi-value"> + <label class="cbi-value-title" for="mtdblockname"><%:Choose mtdblock%></label> + <div class="cbi-value-field"> + <select class="cbi-input-select" data-update="change" name="mtdblockname" id="mtdblockname"> + <% for i, key in ipairs(mtds) do + if key and key.name ~= "rootfs_data" then -%> + <option<%= + attr("id", "mtdblockname-" .. key.name) .. + attr("value", key.name .. '/'.. key.size .. '/' .. i - 1) .. + attr("data-index", i) .. + ifattr(key.name == "linux" or key.name == "firmware", "selected", "selected") + %>><%=pcdata(key.name)%></option> + <% end + end -%> + </select> + </div> + </div> + <div class="cbi-value cbi-value-last<% if reset_avail then %> cbi-value-error<% end %>"> + <label class="cbi-value-title" for="image"><%:Download mtdblock%></label> + <div class="cbi-value-field"> + <input type="submit" class="cbi-button cbi-button-action important" value="<%:Save mtdblock%>" /> + </div> + </div> + </form> + </div> + <% end %> + +</div> + +<div class="cbi-section"> + <h3><%:Flash new firmware image%></h3> + <% if upgrade_avail then %> + <form method="post" action="<%=url('admin/system/flashops/sysupgrade')%>" enctype="multipart/form-data"> + <input type="hidden" name="token" value="<%=token%>" /> + <div class="cbi-section-descr"><%:Upload a sysupgrade-compatible image here to replace the running firmware. Check "Keep settings" to retain the current configuration (requires a compatible firmware image).%></div> + <div class="cbi-section-node"> + <div class="cbi-value"> + <label class="cbi-value-title" for="keep"><%:Keep settings%></label> + <div class="cbi-value-field"> + <input type="checkbox" name="keep" id="keep" checked="checked" /> + </div> + </div> + <% if image_invalid then %> + <div class="cbi-value"> + <label class="cbi-value-title" for="force"><%:Force upgrade%></label> + <div class="cbi-value-field"> + <input type="checkbox" name="force" id="force" /> + </div> + <div class="cbi-section-error"> + <%:The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform. %> + <%:Select 'Force upgrade' to flash the image even if the image format check fails. Use only if you are sure that the firmware is correct and meant for your device! %> + </div> + </div> + <% end %> + <div class="cbi-value cbi-value-last<% if image_invalid then %> cbi-value-error<% end %>"> + <label class="cbi-value-title" for="image"><%:Image%></label> + <div class="cbi-value-field"> + <input type="file" name="image" id="image" /> + <input type="submit" class="cbi-button cbi-button-action important" value="<%:Flash image...%>" /> + </div> + </div> + </div> + </form> + <% else %> + <div class="cbi-section-descr"><%:Sorry, there is no sysupgrade support present; a new firmware image must be flashed manually. Please refer to the wiki for device specific install instructions.%></div> + <% end %> +</div> + +<%+footer%> diff --git a/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm b/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm new file mode 100644 index 0000000000..a7ff4e50bd --- /dev/null +++ b/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm @@ -0,0 +1,10 @@ +<%# + Copyright 2008 Steven Barth <steven@midlink.org> + Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> + Licensed to the public under the Apache License 2.0. +-%> + +<ul class="cbi-tabmenu"> + <li class="cbi-tab-disabled"><a href="<%=url("admin/system/packages")%>"><%:Actions%></a></li> + <li class="cbi-tab"><a href="#"><%:Configuration%></a></li> +</ul> diff --git a/modules/luci-mod-system/luasrc/view/admin_system/packages.htm b/modules/luci-mod-system/luasrc/view/admin_system/packages.htm new file mode 100644 index 0000000000..280eabb8ea --- /dev/null +++ b/modules/luci-mod-system/luasrc/view/admin_system/packages.htm @@ -0,0 +1,213 @@ +<%# + Copyright 2008 Steven Barth <steven@midlink.org> + Copyright 2008-2010 Jo-Philipp Wich <jow@openwrt.org> + Licensed to the public under the Apache License 2.0. +-%> + +<%- +local opkg = require "luci.model.ipkg" +local fs = require "nixio.fs" +local wa = require "luci.tools.webadmin" +local rowcnt = 1 + +function rowstyle() + rowcnt = rowcnt + 1 + return (rowcnt % 2) + 1 +end + +local fstat = fs.statvfs(opkg.overlay_root()) +local space_total = fstat and fstat.blocks or 0 +local space_free = fstat and fstat.bfree or 0 +local space_used = space_total - space_free + +local used_perc = math.floor(0.5 + ((space_total > 0) and ((100 / space_total) * space_used) or 100)) +local free_byte = space_free * fstat.frsize + +local filter = { } + + +local opkg_list = luci.model.ipkg.list_all +local querypat +if query and #query > 0 then + querypat = '*%s*' % query + opkg_list = luci.model.ipkg.find +end + +local letterpat +if letter == 35 then + letterpat = "[^a-z]*" +else + letterpat = string.char(letter, 42) -- 'A' '*' +end + +-%> + +<%+header%> + + +<h2 name="content"><%:Software%></h2> + +<div class="cbi-map"> + + <ul class="cbi-tabmenu"> + <li class="cbi-tab"><a href="#"><%:Actions%></a></li> + <li class="cbi-tab-disabled"><a href="<%=REQUEST_URI%>/ipkg"><%:Configuration%></a></li> + </ul> + + <form method="post" action="<%=REQUEST_URI%>"> + <input type="hidden" name="exec" value="1" /> + <input type="hidden" name="token" value="<%=token%>" /> + + <div class="cbi-section"> + <div class="cbi-section-node"> + <% if (install and next(install)) or (remove and next(remove)) or update or upgrade then %> + <div class="cbi-value"> + <% if #stdout > 0 then %><pre><%=pcdata(stdout)%></pre><% end %> + <% if #stderr > 0 then %><pre class="error"><%=pcdata(stderr)%></pre><% end %> + </div> + <% end %> + + <% if querypat then %> + <div class="cbi-value"> + <%:Displaying only packages containing%> <strong>"<%=pcdata(query)%>"</strong> + <input type="button" onclick="location.href='?display=<%=luci.http.urlencode(display)%>'" href="#" class="cbi-button cbi-button-reset" style="margin-left:1em" value="<%:Reset%>" /> + <br style="clear:both" /> + </div> + <% end %> + + <% if no_lists or old_lists then %> + <div class="cbi-value"> + <% if old_lists then %> + <%:Package lists are older than 24 hours%> + <% else %> + <%:No package lists available%> + <% end %> + <input type="submit" name="update" href="#" class="cbi-button cbi-button-apply" style="margin-left:3em" value="<%:Update lists%>" /> + </div> + <% end %> + + <div class="cbi-value cbi-value-last"> + <%:Free space%>: <strong><%=(100-used_perc)%>%</strong> (<strong><%=wa.byte_format(free_byte)%></strong>) + <div style="margin:3px 0; width:300px; height:10px; border:1px solid #000000; background-color:#80C080"> + <div style="background-color:#F08080; border-right:1px solid #000000; height:100%; width:<%=used_perc%>%"> </div> + </div> + </div> + </div> + + <br /> + + <div class="cbi-section-node"> + <input type="hidden" name="display" value="<%=pcdata(display)%>" /> + + <div class="cbi-value"> + <label class="cbi-value-title"><%:Download and install package%>:</label> + <div class="cbi-value-field"> + <span><input type="text" name="url" size="30" value="" /></span> + <input class="cbi-button cbi-button-save" type="submit" name="go" value="<%:OK%>" /> + </div> + </div> + + <div class="cbi-value cbi-value-last"> + <label class="cbi-value-title"><%:Filter%>:</label> + <div class="cbi-value-field"> + <span><input type="text" name="query" size="20" value="<%=pcdata(query)%>" /></span> + <input type="submit" class="cbi-button cbi-button-action" name="search" value="<%:Find package%>" /> + </div> + </div> + </div> + </div> + </form> + + + <h3><%:Status%></h3> + + + <ul class="cbi-tabmenu"> + <li class="cbi-tab<% if display ~= "available" then %>-disabled<% end %>"><a href="?display=available&query=<%=pcdata(query)%>"><%:Available packages%><% if query then %> (<%=pcdata(query)%>)<% end %></a></li> + <li class="cbi-tab<% if display ~= "installed" then %>-disabled<% end %>"><a href="?display=installed&query=<%=pcdata(query)%>"><%:Installed packages%><% if query then %> (<%=pcdata(query)%>)<% end %></a></li> + </ul> + + <% if display ~= "available" then %> + <div class="cbi-section"> + <div class="cbi-section-node"> + <div class="table"> + <div class="tr cbi-section-table-titles"> + <div class="th left"><%:Package name%></div> + <div class="th left"><%:Version%></div> + <div class="th cbi-section-actions"> </div> + </div> + <% local empty = true; luci.model.ipkg.list_installed(querypat, function(n, v, s, d) empty = false; filter[n] = true %> + <div class="tr cbi-rowstyle-<%=rowstyle()%>"> + <div class="td left"><%=luci.util.pcdata(n)%></div> + <div class="td left"><%=luci.util.pcdata(v)%></div> + <div class="td cbi-section-actions"> + <form method="post" class="inline" action="<%=REQUEST_URI%>"> + <input type="hidden" name="exec" value="1" /> + <input type="hidden" name="token" value="<%=token%>" /> + <input type="hidden" name="remove" value="<%=pcdata(n)%>" /> + <input class="cbi-button cbi-button-remove" type="submit" onclick="window.confirm('<%:Remove%> "<%=luci.util.pcdata(n)%>" ?') && this.parentNode.submit(); return false" value="<%:Remove%>" /> + </form> + </div> + </div> + <% end) %> + <% if empty then %> + <div class="tr cbi-section-table-row"> + <div class="td left"> </div> + <div class="td left"><em><%:none%></em></div> + <div class="td left"><em><%:none%></em></div> + </div> + <% end %> + </div> + </div> + </div> + <% else %> + <div class="cbi-section"> + <% if not querypat then %> + <ul class="cbi-tabmenu" style="flex-wrap:wrap"> + <% local i; for i = 65, 90 do %> + <li class="cbi-tab<% if letter ~= i then %>-disabled<% end %>"><a href="?display=available&letter=<%=string.char(i)%>"><%=string.char(i)%></a></li> + <% end %> + <li class="cbi-tab<% if letter ~= 35 then %>-disabled<% end %>"><a href="?display=available&letter=%23">#</a></li> + </ul> + <% end %> + <div class="cbi-section-node cbi-section-node-tabbed"> + <div class="table"> + <div class="tr cbi-section-table-titles"> + <div class="th col-2 left"><%:Package name%></div> + <div class="th col-2 left"><%:Version%></div> + <div class="th col-1 center"><%:Size (.ipk)%></div> + <div class="th col-10 left"><%:Description%></div> + <div class="th cbi-section-actions"> </div> + </div> + <% local empty = true; opkg_list(querypat or letterpat, function(n, v, s, d) if filter[n] then return end; empty = false %> + <div class="tr cbi-rowstyle-<%=rowstyle()%>"> + <div class="td col-2 left"><%=luci.util.pcdata(n)%></div> + <div class="td col-2 left"><%=luci.util.pcdata(v)%></div> + <div class="td col-1 center"><%=luci.util.pcdata(s)%></div> + <div class="td col-10 left"><%=luci.util.pcdata(d)%></div> + <div class="td cbi-section-actions"> + <form method="post" class="inline" action="<%=REQUEST_URI%>"> + <input type="hidden" name="exec" value="1" /> + <input type="hidden" name="token" value="<%=token%>" /> + <input type="hidden" name="install" value="<%=pcdata(n)%>" /> + <input class="cbi-button cbi-button-apply" type="submit" onclick="window.confirm('<%:Install%> "<%=luci.util.pcdata(n)%>" ?') && this.parentNode.submit(); return false" value="<%:Install%>" /> + </form> + </div> + </div> + <% end) %> + <% if empty then %> + <div class="tr"> + <div class="td left"> </div> + <div class="td left"><em><%:none%></em></div> + <div class="td left"><em><%:none%></em></div> + <div class="td right"><em><%:none%></em></div> + <div class="td left"><em><%:none%></em></div> + </div> + <% end %> + </div> + </div> + </div> + <% end %> +</div> + +<%+footer%> diff --git a/modules/luci-mod-system/luasrc/view/admin_system/reboot.htm b/modules/luci-mod-system/luasrc/view/admin_system/reboot.htm new file mode 100644 index 0000000000..d23664adac --- /dev/null +++ b/modules/luci-mod-system/luasrc/view/admin_system/reboot.htm @@ -0,0 +1,62 @@ +<%# + Copyright 2008 Steven Barth <steven@midlink.org> + Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org> + Licensed to the public under the Apache License 2.0. +-%> + +<%+header%> + +<h2 name="content"><%:Reboot%></h2> + +<p><%:Reboots the operating system of your device%></p> + +<%- local c = require("luci.model.uci").cursor():changes(); if c and next(c) then -%> + <p class="alert-message warning"><%:Warning: There are unsaved changes that will get lost on reboot!%></p> +<%- end -%> + +<hr /> + +<input class="cbi-button cbi-button-action important" type="button" value="<%:Perform reboot%>" onclick="reboot(this)" /> + +<p class="alert-message notice reboot-message" style="display:none"> + <img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /> + <span><%:Device is rebooting...%></span> +</p> + +<script type="text/javascript">//<![CDATA[ + var tries = 0, + message = document.querySelector('p.reboot-message'), + label = message.querySelector('span'); + + function ok() { + window.location = '<%=url("admin")%>'; + } + + function check() { + window.setTimeout(ping, 5000); + } + + function ping() { + var img = document.createElement('img'); + + img.onload = ok; + img.onerror = check; + img.src = '<%=resource%>/icons/loading.gif?' + Math.random(); + + if (tries++ >= 30) { + message.classList.remove('notice'); + message.classList.add('warning'); + label.innerHTML = '<%:Device unreachable! Still waiting for device...%>'; + } + } + + function reboot(button) { + button.style.display = 'none'; + message.style.display = ''; + label.innerHTML = '<%:Waiting for device...%>'; + + (new XHR()).post('<%=url("admin/system/reboot/call")%>', { token: '<%=token%>' }, check); + } +//]]></script> + +<%+footer%> diff --git a/modules/luci-mod-system/luasrc/view/admin_system/upgrade.htm b/modules/luci-mod-system/luasrc/view/admin_system/upgrade.htm new file mode 100644 index 0000000000..597ddfd6bf --- /dev/null +++ b/modules/luci-mod-system/luasrc/view/admin_system/upgrade.htm @@ -0,0 +1,65 @@ +<%# + Copyright 2008 Steven Barth <steven@midlink.org> + Copyright 2008-2009 Jo-Philipp Wich <jow@openwrt.org> + Licensed to the public under the Apache License 2.0. +-%> + +<%+header%> + +<h2 name="content"><%:Flash Firmware%> - <%:Verify%></h2> +<p> + <%_ The flash image was uploaded. + Below is the checksum and file size listed, + compare them with the original file to ensure data integrity.<br /> + Click "Proceed" below to start the flash procedure. %> + + <% if storage > 0 and size > storage then %> + <br /><br /> + <div class="error"><%:It appears that you are trying to + flash an image that does not fit into the flash memory, please verify + the image file! %></div> + <% end %> + +</p> + +<div class="cbi-section"> + <ul> + <li><%:Checksum%><br /> + <%:MD5%>: <code><%=checksum%></code><br /> + <%:SHA256%>: <code><%=sha256ch%></code></li> + <li><%:Size%>: <% + local w = require "luci.tools.webadmin" + write(w.byte_format(size)) + + if storage > 0 then + write(luci.i18n.translatef( + " (%s available)", + w.byte_format(storage) + )) + end + %></li> + <li><% if keep then %> + <%:Configuration files will be kept%> + <% else %> + <%:Caution: Configuration files will be erased%> + <% end %></li> + <% if force then %> + <li> + <%:Caution: System upgrade will be forced%> + </li> + <% end %> + </ul> +</div> + +<div class="cbi-page-actions right"> + <form class="inline" action="<%=REQUEST_URI%>" method="post"> + <input type="hidden" name="token" value="<%=token%>" /> + <input type="hidden" name="step" value="2" /> + <input type="hidden" name="keep" value="<%=keep and "1" or ""%>" /> + <input type="hidden" name="force" value="<%=force and "1" or ""%>" /> + <input class="cbi-button cbi-button-reset" name="cancel" type="submit" value="<%:Cancel%>" /> + <input class="cbi-button cbi-button-apply" type="submit" value="<%:Proceed%>" /> + </form> +</div> + +<%+footer%> |