diff options
author | Charlie Marshall <charlie0440@gmail.com> | 2013-07-29 23:00:47 +0100 |
---|---|---|
committer | Charlie Marshall <charlie0440@gmail.com> | 2013-07-29 23:00:47 +0100 |
commit | 3bae4ee43dfd0ec1638740eb9365af0e82427840 (patch) | |
tree | d28b30cde20ff62c1c45194f73b75c5af18efd81 /usr/local/www/graph.php | |
parent | 53bd164217644725ede6bdea04e7f1987572ac1a (diff) | |
download | pfsense-3bae4ee43dfd0ec1638740eb9365af0e82427840.zip pfsense-3bae4ee43dfd0ec1638740eb9365af0e82427840.tar.gz |
seperate date & time on traffic graphs
Diffstat (limited to 'usr/local/www/graph.php')
-rwxr-xr-x | usr/local/www/graph.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/graph.php b/usr/local/www/graph.php index 2c0dc94..7cfd346 100755 --- a/usr/local/www/graph.php +++ b/usr/local/www/graph.php @@ -116,7 +116,8 @@ print('<?xml version="1.0" ?>' . "\n");?> <text id="ifname" x="<?=$width?>" y="8" <?=$attribs['graphname']?> text-anchor="end"><?=htmlspecialchars($ifname)?></text> <text id="switch_unit" x="<?=$width*0.55?>" y="5" <?=$attribs['switch_unit']?>><?=gettext("Switch to bytes/s"); ?></text> <text id="switch_scale" x="<?=$width*0.55?>" y="11" <?=$attribs['switch_scale']?>><?=gettext("AutoScale"); ?> (<?=$scale_type?>)</text> - <text id="datetime" x="<?=$width*0.33?>" y="5" <?=$attribs['legend']?>> </text> + <text id="date" x="<?=$width*0.33?>" y="5" <?=$attribs['legend']?>> </text> + <text id="time" x="<?=$width*0.33?>" y="11" <?=$attribs['legend']?>> </text> <text id="graphlast" x="<?=$width*0.55?>" y="17" <?=$attribs['legend']?>><?=gettext("Graph shows last"); ?> <?=$time_interval*$nb_plot?> <?=gettext("seconds"); ?></text> <polygon id="axis_arrow_x" <?=$attribs['axis']?> points="<?=($width) . "," . ($height)?> <?=($width-2) . "," . ($height-2)?> <?=($width-2) . "," . $height?>"/> <text id="error" x="<?=$width*0.5?>" y="<?=$height*0.5?>" visibility="hidden" <?=$attribs['error']?> text-anchor="middle"><?=$error_text?></text> @@ -209,9 +210,10 @@ function fetch_data() { function plot_data(obj) { // Show datetimelegend var now = new Date(); - var datetime = (now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear() + ' ' + - LZ(now.getHours()) + ":" + LZ(now.getMinutes()) + ":" + LZ(now.getSeconds()); - SVGDoc.getElementById('datetime').firstChild.data = datetime; + var time = LZ(now.getHours()) + ":" + LZ(now.getMinutes()) + ":" + LZ(now.getSeconds()); + SVGDoc.getElementById('time').firstChild.data = time; + var date = (now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear(); + SVGDoc.getElementById('date').firstChild.data = date; if (!obj.success) return handle_error(); // getURL failed to get data |