luci-mod-admin-full: fix broken applyreboot page
This improve applyreboot page and fix problem with luci-nginx that doesn't refresh the page when the router reboot. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
parent
849a5bb54e
commit
327e284b74
5 changed files with 53 additions and 18 deletions
|
@ -6,36 +6,47 @@
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><%=luci.sys.hostname()%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %></title>
|
<title><%=luci.sys.hostname()%> - <%= title or translate("Rebooting...") %></title>
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" />
|
<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" src="<%=resource%>/xhr.js"></script>
|
||||||
<script type="text/javascript">//<![CDATA[
|
<script type="text/javascript">//<![CDATA[
|
||||||
var interval = window.setInterval(function() {
|
var interval = window.setInterval(function() {
|
||||||
var img = new Image();
|
var img = new Image();
|
||||||
|
var target = ('https:' == document.location.protocol ? 'https://' : 'http://') + <%=addr and "'%s'" % addr or "window.location.host"%>;
|
||||||
|
|
||||||
img.onload = function() {
|
img.onload = function() {
|
||||||
window.clearInterval(interval);
|
window.clearInterval(interval);
|
||||||
location.href = ('https:' == document.location.protocol ? 'https://' : 'http://') + '<%=addr or luci.http.getenv("SERVER_NAME")%>/';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
img.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + '<%=addr or luci.http.getenv("SERVER_NAME")%><%=resource%>/icons/loading.gif?' + Math.random();
|
img.src = target + '<%=resource%>/icons/loading.gif?' + Math.random();
|
||||||
|
|
||||||
}, 5000);
|
}, 5000);
|
||||||
//]]></script>
|
//]]></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="maincontainer">
|
<header>
|
||||||
<div id="maincontent">
|
<div class="fill">
|
||||||
<h2 name="content"><%:System%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %></h2>
|
<div class="container">
|
||||||
<fieldset class="cbi-section">
|
<p class="brand"><%=luci.sys.hostname() or "?"%></p>
|
||||||
<p>
|
</div>
|
||||||
<% if msg then %><%=msg%><% else %><%:Changes applied.%><% end %>
|
</div>
|
||||||
</p>
|
</header>
|
||||||
<p>
|
 
|
||||||
<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" />
|
<div class="main">
|
||||||
<%:Waiting for changes to be applied...%>
|
<div id="maincontainer">
|
||||||
</p>
|
<div id="maincontent" class="container">
|
||||||
</fieldset>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -2027,3 +2027,7 @@ div.cbi-value var,
|
||||||
html body.apply-overlay-active {
|
html body.apply-overlay-active {
|
||||||
height: calc(100vh - 63px);
|
height: calc(100vh - 63px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#applyreboot-section {
|
||||||
|
line-height: 300%;
|
||||||
|
}
|
||||||
|
|
|
@ -586,6 +586,10 @@ html #menubar a:visited.warning {
|
||||||
margin-right: 2em;
|
margin-right: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#applyreboot-section {
|
||||||
|
line-height: 300%;
|
||||||
|
}
|
||||||
|
|
||||||
.lang_de #submenu_admin_uci {
|
.lang_de #submenu_admin_uci {
|
||||||
width: 12em;
|
width: 12em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1732,6 +1732,17 @@ body.lang_pl.node-main-login .cbi-value-title {
|
||||||
width: 12rem;
|
width: 12rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* applyreboot fix */
|
||||||
|
|
||||||
|
#applyreboot-container {
|
||||||
|
margin: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#applyreboot-section {
|
||||||
|
margin: 2rem;
|
||||||
|
line-height: 300%;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1600px) {
|
@media screen and (max-width: 1600px) {
|
||||||
.main-left {
|
.main-left {
|
||||||
width: calc(0% + 13rem);
|
width: calc(0% + 13rem);
|
||||||
|
|
|
@ -379,6 +379,11 @@ textarea#syslog {
|
||||||
border-color: #444444;
|
border-color: #444444;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#applyreboot-section {
|
||||||
|
margin: 2rem;
|
||||||
|
line-height: 300%;
|
||||||
|
}
|
||||||
|
|
||||||
.lang_he #maincontent {
|
.lang_he #maincontent {
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue