luci-app-mwan3: remove css styling from status_interface page
[project/luci.git] / applications / luci-app-mwan3 / luasrc / view / mwan / status_interface.htm
index 1c9123c..ae28df1 100644 (file)
@@ -1,3 +1,9 @@
+<%#
+ Copyright 2014 Aedan Renner <chipdankly@gmail.com>
+ Copyright 2018 Florian Eckert <fe@dev.tdt.de>
+ Licensed to the public under the GNU General Public License v2.
+-%>
+
 <%+header%>
 
 <ul class="cbi-tabmenu">
@@ -12,7 +18,9 @@
        XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null,
                function(x, status)
                {
-                       var statusDiv = document.getElementById('mwan_status_text');
+                       var legend = document.getElementById('diag-rc-legend');
+                       var statusDiv = document.getElementById('diag-rc-output');
+                       legend.style.display = 'none';
                        if (status.interfaces)
                        {
                                var statusview = '';
        );
 //]]></script>
 
-<div id="mwan_interface_status">
-       <fieldset id="interface_field" class="cbi-section">
-               <legend><%:MWAN status - Interface Live Status%></legend>
-               <div id="mwan_status_text"><img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /><%:Collecting data...%></div>
+<div class="cbi-map">
+       <h2 name="content"><%:MWAN Status - Interface%></h2>
+       <%if not require("luci.sys").init.enabled("mwan3") then%>
+       <div><strong><%:INFO: MWAN not running%></strong></div>
+       <%end%>
+       <fieldset class="cbi-section">
+               <legend id="diag-rc-legend"><%:Collecting data...%></legend>
+               <span id="diag-rc-output">
+                       <img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align: middle;" />
+               </span>
        </fieldset>
 </div>
 
-<style type="text/css">
-  #mwan_status_text {
-       display: table;
-       font-size: 14px;
-       margin: auto;
-       max-width: 1044px;
-       min-width: 246px;
-       width: 100%;
-  }
-  .wanon {
-       background-color: rgb(144, 240, 144);
-  }
-  .wanoff {
-       background-color: rgb(240, 144, 144);
-  }
-  .wanon, .wanoff {
-       border-radius: 60px;
-       box-shadow: 0px 2px 5px -3px;
-       float: left;
-       margin: 8px 3px 0px 3px;
-       min-height: 30px;
-       min-width: 235px;
-       padding: 5px 10px 8px 10px;
-       text-align: center;
-  }
-  #mwan_statuslog_text {
-       padding: 20px;
-       text-align: left;
-  }
-</style>
-
 <%+footer%>