diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-08-08 10:42:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-08 10:42:25 +0200 |
commit | 7609919605f9aca129d4dd72d16c8bd3b6471788 (patch) | |
tree | c33f24a5c074cf3f9b7baa9c38a9daecd9c4b8d6 | |
parent | 849a5bb54e0b53af46daf109157724c3c2540c2f (diff) | |
parent | 327e284b74bd272aa1afaa8b9728c36276440057 (diff) |
Merge pull request #2042 from Ansuel/apprebooy
luci-mod-admin-full: improve applyreboot page
5 files changed, 53 insertions, 18 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/applyreboot.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/applyreboot.htm index e722a4809..66b80896e 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_system/applyreboot.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/applyreboot.htm @@ -6,36 +6,47 @@ <html> <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" /> <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); - 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); //]]></script> </head> <body> - <div id="maincontainer"> - <div id="maincontent"> - <h2 name="content"><%:System%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %></h2> - <fieldset class="cbi-section"> - <p> - <% if msg then %><%=msg%><% else %><%:Changes applied.%><% end %> - </p> - <p> - <img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /> - <%:Waiting for changes to be applied...%> - </p> - </fieldset> + <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> +</html>
\ No newline at end of file diff --git a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css index e34b0b594..644a47fee 100644 --- a/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css +++ b/themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css @@ -2027,3 +2027,7 @@ div.cbi-value var, html body.apply-overlay-active { height: calc(100vh - 63px); } + +#applyreboot-section { + line-height: 300%; +} diff --git a/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/cascade.css b/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/cascade.css index d5e87ebef..3e1b1cd2f 100644 --- a/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/cascade.css +++ b/themes/luci-theme-freifunk-generic/htdocs/luci-static/freifunk-generic/cascade.css @@ -586,6 +586,10 @@ html #menubar a:visited.warning { margin-right: 2em; } +#applyreboot-section { + line-height: 300%; +} + .lang_de #submenu_admin_uci { width: 12em; } diff --git a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css index 2d8bd10cc..4875c33f8 100644 --- a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css +++ b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css @@ -1732,6 +1732,17 @@ body.lang_pl.node-main-login .cbi-value-title { width: 12rem; } +/* applyreboot fix */ + +#applyreboot-container { + margin: 2rem; +} + +#applyreboot-section { + margin: 2rem; + line-height: 300%; +} + @media screen and (max-width: 1600px) { .main-left { width: calc(0% + 13rem); diff --git a/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css b/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css index 197166b73..e7952338e 100644 --- a/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css +++ b/themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css @@ -379,6 +379,11 @@ textarea#syslog { border-color: #444444; } +#applyreboot-section { + margin: 2rem; + line-height: 300%; +} + .lang_he #maincontent { direction: rtl; } |