diff options
Diffstat (limited to 'health-networkstats-html.lsp')
-rw-r--r-- | health-networkstats-html.lsp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/health-networkstats-html.lsp b/health-networkstats-html.lsp index a19f71d..22b0a86 100644 --- a/health-networkstats-html.lsp +++ b/health-networkstats-html.lsp @@ -43,7 +43,7 @@ function Update(){ $.ajaxSetup({cache:false}); $.getJSON( - '<%= page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %>', + '<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action) %>', {viewtype:'json'}, function(data) { if (lastdata != null){ @@ -100,16 +100,21 @@ <H1>Network Statistics</H1> Network traffic in bytes/second -<div id="chart" style="FLOAT: left; WIDTH: 600px; HEIGHT: 300px"></div> -<div id="legend" style="FLOAT: left; margin-left: 10px; WIDTH: 50px"></div> + +<TABLE><TR><TD style="vertical-align:top;"> +<div id="chart" style="WIDTH: 100%; HEIGHT: 300px; MIN-WIDTH:600px;"></div></TD> +<TD style="align:left;" WIDTH="140px"><div id="legend" style="margin-left: 10px; width: 130px;"></div></TD> +</TR></TABLE> + + <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 %> - <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> + <TR><TD><input type="checkbox" name=<%= html.html_escape(intf).."RX" %> checked="checked"><%= html.html_escape(intf).." RX"..html.html_escape(ipaddr) %></input></TD> + <TD><input type="checkbox" name=<%= html.html_escape(intf).."TX" %> checked="checked"><%= html.html_escape(intf).." TX"..html.html_escape(ipaddr) %></input></TD></TR> <% end %> </TABLE></DD> <DT>Start / Stop</DT> |