mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update luci-base and luci-mod-admin-full to latest upstream version
This commit is contained in:
parent
7a86a163f5
commit
602a83668e
74 changed files with 7498 additions and 3067 deletions
|
|
@ -16,18 +16,24 @@
|
|||
|
||||
<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;
|
||||
var tries = 0,
|
||||
message = document.querySelector('p.reboot-message'),
|
||||
label = message.querySelector('span');
|
||||
|
||||
function ok() {
|
||||
window.location = '<%=controller%>/admin';
|
||||
window.location = '<%=url("admin")%>';
|
||||
}
|
||||
|
||||
function check() {
|
||||
if (tries++ < 12)
|
||||
window.setTimeout(ping, 5000);
|
||||
else
|
||||
alert('<%:Device unreachable%>');
|
||||
window.setTimeout(ping, 5000);
|
||||
}
|
||||
|
||||
function ping() {
|
||||
|
|
@ -37,22 +43,20 @@
|
|||
img.onerror = check;
|
||||
img.src = '<%=resource%>/icons/loading.gif?' + Math.random();
|
||||
|
||||
document.getElementById('reboot-message').innerHTML = '<%:Waiting for device...%>';
|
||||
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';
|
||||
document.getElementById('reboot-message').parentNode.style.display = '';
|
||||
message.style.display = '';
|
||||
label.innerHTML = '<%:Waiting for device...%>';
|
||||
|
||||
(new XHR()).post('<%=controller%>/admin/system/reboot/call', { token: '<%=token%>' }, check);
|
||||
(new XHR()).post('<%=url("admin/system/reboot/call")%>', { token: '<%=token%>' }, check);
|
||||
}
|
||||
//]]></script>
|
||||
|
||||
<input class="cbi-button cbi-button-action important" type="button" value="<%:Perform reboot%>" onclick="reboot(this)" />
|
||||
|
||||
<p class="alert-message" style="display:none">
|
||||
<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" />
|
||||
<span id="reboot-message"><%:Device is rebooting...%></span>
|
||||
</p>
|
||||
|
||||
<%+footer%>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue