diff options
-rw-r--r-- | health-networkstats-html.lsp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/health-networkstats-html.lsp b/health-networkstats-html.lsp index e00fe1c..a19f71d 100644 --- a/health-networkstats-html.lsp +++ b/health-networkstats-html.lsp @@ -38,7 +38,7 @@ }); if (timestamp == 0 && lastdata != null) timestamp = lastdata.timestamp*1000; $.plot( - $("#chart"), data, {legend:{position:"ne", backgroundOpacity:0}, xaxis:{mode:"time", timeformat:"%H:%M:%S", min:timestamp, max:timestamp+duration}, yaxis:{min:0}}); + $("#chart"), data, {legend:{container: $("#legend")}, xaxis:{mode:"time", timeformat:"%H:%M:%S", min:timestamp, max:timestamp+duration}, yaxis:{min:0}}); } function Update(){ $.ajaxSetup({cache:false}); @@ -100,15 +100,18 @@ <H1>Network Statistics</H1> Network traffic in bytes/second -<div id="chart" style="WIDTH: 600px; HEIGHT: 300px"></div> +<div id="chart" style="FLOAT: left; WIDTH: 600px; HEIGHT: 300px"></div> +<div id="legend" style="FLOAT: left; margin-left: 10px; WIDTH: 50px"></div> <DL> <DT>Display Options</DT> +<DD><TABLE> <% for intf,val in pairs(view.value) do local ipaddr = "" if val.ipaddr then ipaddr = " ("..val.ipaddr..")" end %> - <DD><input type="checkbox" name=<%= intf.."RX" %> checked="checked"><%= intf.." RX"..ipaddr %></input></DD> - <DD><input type="checkbox" name=<%= intf.."TX" %> checked="checked"><%= intf.." TX"..ipaddr %></input></DD> + <TR><TD><input type="checkbox" name=<%= intf.."RX" %> checked="checked"><%= intf.." RX"..ipaddr %></input></TD> + <TD><input type="checkbox" name=<%= intf.."TX" %> checked="checked"><%= intf.." TX"..ipaddr %></input></TD></TR> <% end %> +</TABLE></DD> <DT>Start / Stop</DT> <DD> <input TYPE="button" ID="Start" VALUE="Start"> |