summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_graph.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-02-19 18:03:22 +0000
committerErmal <eri@pfsense.org>2013-02-19 18:03:22 +0000
commitb1b930dd1b7d1dc060402dfd10960077bfa4e203 (patch)
tree72ad544a30b8a024458a7aa3ecc07e750a1278d6 /usr/local/www/status_graph.php
parentb406c78a1fa408dde44fdbba5eedd103fc20b1fd (diff)
downloadpfsense-b1b930dd1b7d1dc060402dfd10960077bfa4e203.zip
pfsense-b1b930dd1b7d1dc060402dfd10960077bfa4e203.tar.gz
Use jQuery fully on traffic graph. Also remove some unused code from bandwidth_by_ip
Diffstat (limited to 'usr/local/www/status_graph.php')
-rwxr-xr-xusr/local/www/status_graph.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php
index cd08de2..561062e 100755
--- a/usr/local/www/status_graph.php
+++ b/usr/local/www/status_graph.php
@@ -109,8 +109,8 @@ include("head.inc");
<script language="javascript" type="text/javascript">
function updateBandwidth(){
- var hostinterface = "<?php echo htmlspecialchars($curif); ?>";
- var sorting = "<?php echo htmlspecialchars($cursort); ?>";
+ var hostinterface = $("#if").val();
+ var sorting = $("#sorting").val();
bandwidthAjax(hostinterface, sorting);
}
@@ -125,7 +125,7 @@ function bandwidthAjax(hostinterface, sorting) {
alert('Error 404: location "' + uri + '" was not found.');
// Handle other errors
else
- alert('Error ' + req.status + ' -- ' + req.statusText);
+ alert('Error ' + req.status + ' -- ' + req.statusText + ' -- ' + uri);
},
success: function(data) {
updateBandwidthHosts(data);
@@ -192,7 +192,7 @@ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enabl
?>
<form name="form1" action="status_graph.php" method="get" style="padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid #999999">
<?=gettext("Interface"); ?>:
-<select name="if" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
+<select id="if" name="if" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
<?php
foreach ($ifdescrs as $ifn => $ifd) {
echo "<option value=\"$ifn\"";
@@ -202,13 +202,11 @@ foreach ($ifdescrs as $ifn => $ifd) {
?>
</select>
, Sort by:
-<select name="sort" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
+<select id="sort" name="sort" class="formselect" style="z-index: -10;" onchange="document.form1.submit()">
<option value="">Bandwidth In</option>
<option value="out"<?php if ($cursort == "out") echo " selected";?>>Bandwidth Out</option>
</select>
</form>
-<p><form method="post" action="status_graph.php">
-</form>
<p>
<div id="niftyOutter">
<div id="col1" style="float: left; width: 46%; padding: 5px; position: relative;">
@@ -310,11 +308,7 @@ foreach ($ifdescrs as $ifn => $ifd) {
<?php include("fend.inc"); ?>
<script type="text/javascript">
-window.onload = function(in_event)
- {
- updateBandwidth();
- }
-
+jQuery(document).ready('updateBandwidth');
</script>
</body>
</html>
OpenPOWER on IntegriCloud