summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot')
-rw-r--r--applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm100
-rw-r--r--applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm29
-rw-r--r--applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm53
-rw-r--r--applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm25
4 files changed, 0 insertions, 207 deletions
diff --git a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm
deleted file mode 100644
index a28418cc5..000000000
--- a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm
+++ /dev/null
@@ -1,100 +0,0 @@
-<%#
- Copyright 2008 Steven Barth <steven@midlink.org>
- Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org>
- Copyright 2017-2020 Stan Grishin <stangri@melmac.net>
- Licensed to the public under the Apache License 2.0.
--%>
-
-<%+header%>
-
-<h2 name="content"><%:Advanced Reboot%></h2>
-<br />
-
-<%- 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 -%>
-
-<%- if errorMessage and errorMessage ~= "" then -%>
- <p class="alert-message warning"><%:ERROR: %><%=errorMessage%></p>
-<%- end -%>
-
-<%- if device_name then -%>
-<fieldset class="cbi-section">
- <legend><%=device_name%><%: Partitions%></legend>
- <div class="table cbi-section-table" id="partitions">
- <div class="tr cbi-section-table-titles">
- <div class="th cbi-section-table-cell"><%:Partition%></div>
- <div class="th cbi-section-table-cell"><%:Status%></div>
- <div class="th cbi-section-table-cell"><%:Firmware%></div>
- <div class="th cbi-section-table-cell"><%:Reboot%></div>
- </div>
- <div class="tr cbi-section-table-row cbi-rowstyle-<%- if bev1p1 == current_partition then -%><%=1%><%- else -%><%=2%><%- end -%>">
- <div class="td">
- <%=string.format("%X", bev1p1)%>
- </div>
- <div class="td">
- <%- if bev1p1 == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%>
- </div>
- <div class="td">
- <%=p1_os%>
- </div>
- <div class="td">
- <%- if bev1p1 == current_partition then -%>
- <form method="post" action="<%=url('admin/system/advanced_reboot/reboot')%>">
- <input type="hidden" name="token" value="<%=token%>" />
- <input id="reboot-button" type="submit" class="btn cbi-button cbi-button-apply important" value="<%:Reboot to current partition%>" />
- </form>
- <%- else -%>
- <form method="post" action="<%=url('admin/system/advanced_reboot/alternative_reboot')%>">
- <input type="hidden" name="token" value="<%=token%>" />
- <input id="altreboot-button" type="submit" class="btn cbi-button cbi-button-apply important" value="<%:Reboot to alternative partition...%>" />
- </form>
- <%- end -%>
- </div>
- </div>
- <div class="tr cbi-section-table-row cbi-rowstyle-<%- if bev1p2 == current_partition then -%><%=1%><%- else -%><%=2%><%- end -%>">
- <div class="td">
- <%=string.format("%X", bev1p2)%>
- </div>
- <div class="td">
- <%- if bev1p2 == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%>
- </div>
- <div class="td">
- <%=p2_os%>
- </div>
- <div class="td">
- <%- if bev1p2 == current_partition then -%>
- <form method="post" action="<%=url('admin/system/advanced_reboot/reboot')%>">
- <input type="hidden" name="token" value="<%=token%>" />
- <input id="reboot-button" type="submit" class="btn cbi-button cbi-button-apply important" value="<%:Reboot to current partition%>" />
- </form>
- <%- else -%>
- <form method="post" action="<%=url('admin/system/advanced_reboot/alternative_reboot')%>">
- <input type="hidden" name="token" value="<%=token%>" />
- <input id="altreboot-button" type="submit" class="btn cbi-button cbi-button-apply important" value="<%:Reboot to alternative partition...%>" />
- </form>
- <%- end -%>
- </div>
- </div>
- </div>
-</fieldset>
-<%- else -%>
- <%- if rom_board_name then -%>
- <p class="alert-message warning"><%=pcdata(translatef("Warning: Device (%s) is unknown or isn't a dual-partition device!", rom_board_name))%></p>
- <%- else -%>
- <p class="alert-message warning"><%=pcdata(translatef("Warning: Unable to obtain device information!"))%></p>
- <%- end -%>
-<%- end -%>
-
-<hr />
-
-<%- if nixio.fs.access("/sbin/poweroff") then -%>
-<form method="post" action="<%=url('admin/system/advanced_reboot/power_off')%>">
- <input type="hidden" name="token" value="<%=token%>" />
- <input id="poweroff-button" type="submit" class="btn cbi-button cbi-button-apply important" value="<%:Perform power off...%>" />
-</form>
-<%- else -%>
- <p class="alert-message warning"><%:Warning: This system does not support powering off!%></p>
-<%- end -%>
-
-<%+footer%>
diff --git a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm
deleted file mode 100644
index b81aaf455..000000000
--- a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm
+++ /dev/null
@@ -1,29 +0,0 @@
-<%#
- Copyright 2008 Steven Barth <steven@midlink.org>
- Copyright 2008-2009 Jo-Philipp Wich <jow@openwrt.org>
- Copyright 2017-2018 Stan Grishin <stangri@melmac.net>
- Licensed to the public under the Apache License 2.0.
--%>
-
-<%+header%>
-
-<h2 name="content"><%:Reboot Device to an Alternative Partition%> - <%:Confirm%></h2>
-<p>
- <%_ WARNING: An alternative partition might have its own settings and completely different firmware.<br /><br />
- As your network configuration and WiFi SSID/password on alternative partition might be different,
- you might have to adjust your computer settings to be able to access your device once it reboots.<br /><br />
- Please also be aware that alternative partition firmware might not provide an easy way to switch active partition
- and boot back to the currently active partition.<br /><br />
- Click "Proceed" below to reboot device to an alternative partition. %>
-</p>
-
-<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 class="btn cbi-button cbi-button-reset important" name="cancel" type="submit" value="<%:Cancel%>" />
- <input class="btn cbi-button cbi-button-apply important" type="submit" value="<%:Proceed%>" />
- </form>
-</div>
-
-<%+footer%>
diff --git a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm
deleted file mode 100644
index 94ac36bd7..000000000
--- a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm
+++ /dev/null
@@ -1,53 +0,0 @@
-<%#
- 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?v=git-19.271.68204-f8775ee" />
- <script type="text/javascript" src="<%=resource%>/xhr.js?v=git-19.271.68204-f8775ee"></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>
- &#160;
- <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/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm
deleted file mode 100644
index 56200a4c1..000000000
--- a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<%#
- Copyright 2008 Steven Barth <steven@midlink.org>
- Copyright 2008-2009 Jo-Philipp Wich <jow@openwrt.org>
- Copyright 2017-2018 Stan Grishin <stangri@melmac.net>
- Licensed to the public under the Apache License 2.0.
--%>
-
-<%+header%>
-
-<h2 name="content"><%:Power Off Device%> - <%:Confirm%></h2>
-<p>
- <%_ WARNING: Power off might result in a reboot on a device which doesn't support power off.<br /><br />
- Click "Proceed" below to power off your device. %>
-</p>
-
-<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 class="btn cbi-button cbi-button-reset important" name="cancel" type="submit" value="<%:Cancel%>" />
- <input class="btn cbi-button cbi-button-apply important" type="submit" value="<%:Proceed%>" />
- </form>
-</div>
-
-<%+footer%>