diff options
author | Florian Eckert <fe@dev.tdt.de> | 2018-01-18 13:42:21 +0100 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2018-01-18 15:10:05 +0100 |
commit | 406564c7db61f5e80bc246554488d7b04566d4cb (patch) | |
tree | 0c769c17b9c6cfc5abe87b88e8864c0613aade37 /applications/luci-app-mwan3/luasrc/view/mwan | |
parent | 5b92193978e037d646edf23559440f18bf66be2c (diff) |
luci-app-mwan3: refactoring detail status view and controller
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/view/mwan')
-rw-r--r-- | applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm index 0ff2824ed2..4cb65dd2b1 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_detail.htm @@ -10,33 +10,23 @@ <script type="text/javascript" src="<%=resource%>/cbi.js"></script> <script type="text/javascript">//<![CDATA[ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "detailed_status")%>', null, - function(x, mArray) + function(x) { - var status = document.getElementById('mwan_detail_text'); - if (mArray.mwandetail) - { - status.innerHTML = String.format('<pre>%s</pre>', mArray.mwandetail[0]); - } - else - { - status.innerHTML = '<strong><%:No detailed status information available%></strong>'; - } + var legend = document.getElementById('diag-rc-legend'); + var output = document.getElementById('diag-rc-output'); + legend.style.display = 'none'; + output.innerHTML = String.format('<pre>%h</pre>', x.responseText); } ); //]]></script> -<div id="mwan_detail_status"> +<div> <fieldset class="cbi-section"> - <legend><%:MWAN Detailed Status%></legend> - <div id="mwan_detail_text"><img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /><%:Collecting data...%></div> + <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_detail_text { - padding: 20px; - text-align: left; - } -</style> - <%+footer%> |