diff --git a/html/includes/graphs/device/bits.inc.php b/html/includes/graphs/device/bits.inc.php index 27c662cf71..c9da334d20 100644 --- a/html/includes/graphs/device/bits.inc.php +++ b/html/includes/graphs/device/bits.inc.php @@ -68,6 +68,7 @@ $colour_area_in = "91B13C"; $colour_area_out = "8080BD"; include("includes/graphs/generic_multi_seperated.inc.php"); + #include("includes/graphs/generic_multi_bits_separated.inc.php"); #include("includes/graphs/generic_multi_data.inc.php"); diff --git a/html/includes/graphs/generic_data.inc.php b/html/includes/graphs/generic_data.inc.php index 5652a4e636..6aa005e9ac 100644 --- a/html/includes/graphs/generic_data.inc.php +++ b/html/includes/graphs/generic_data.inc.php @@ -91,7 +91,6 @@ if($format == "octets" || $format == "bytes") $format = "bits"; } - $rrd_options .= " COMMENT:'bps Now Ave Max 95th %\\n'"; $rrd_options .= " AREA:in".$format."_max#aDEB7B:"; diff --git a/html/includes/graphs/generic_duplex.inc.php b/html/includes/graphs/generic_duplex.inc.php index 0d726d01b6..1472808a99 100644 --- a/html/includes/graphs/generic_duplex.inc.php +++ b/html/includes/graphs/generic_duplex.inc.php @@ -73,8 +73,6 @@ if($_GET['previous'] == "yes") } } - - $rrd_options .= " AREA:in#".$colour_area_in.":"; $rrd_options .= " COMMENT:'".$unit_text." Now Ave Max"; @@ -127,6 +125,4 @@ if($_GET['previous'] == "yes") $rrd_options .= " LINE1.25:dout".$format."X#666666:'Prev Out'"; } - - ?> diff --git a/html/includes/graphs/generic_multi_bits.inc.php b/html/includes/graphs/generic_multi_bits.inc.php index 72365f4a67..86a02a9432 100644 --- a/html/includes/graphs/generic_multi_bits.inc.php +++ b/html/includes/graphs/generic_multi_bits.inc.php @@ -19,7 +19,7 @@ foreach ($rrd_filenames as $key => $rrd_filename) $seperator = ","; $plus = ",+"; - if($_GET['previous']) + if ($_GET['previous']) { $rrd_options .= " DEF:".$in."octets" . $i . "X=".$rrd_filename.":".$ds_in.":AVERAGE:start=".$prev_from.":end=".$from; $rrd_options .= " DEF:".$out."octets" . $i . "X=".$rrd_filename.":".$ds_out.":AVERAGE:start=".$prev_from.":end=".$from; @@ -47,7 +47,7 @@ if ($i) $rrd_options .= " VDEF:95thout=outbits,95,PERCENT"; $rrd_options .= " VDEF:d95thout=doutbits,5,PERCENT"; - if($_GET['previous'] == "yes") + if ($_GET['previous'] == "yes") { $rrd_options .= " CDEF:".$in."octetsX=" . $in_thingX . $pluses; $rrd_options .= " CDEF:".$out."octetsX=" . $out_thingX . $pluses; @@ -85,7 +85,7 @@ if ($i) $rrd_options .= " LINE1:95thin#aa0000"; $rrd_options .= " LINE1:d95thout#aa0000"; - if($_GET['previous'] == "yes") + if ($_GET['previous'] == "yes") { $rrd_options .= " AREA:inbitsX#9999966:"; $rrd_options .= " AREA:doutbitsX#99999966:"; diff --git a/html/includes/graphs/generic_multi_data.inc.php b/html/includes/graphs/generic_multi_data.inc.php index 9bc4fcb8ff..48184a4183 100644 --- a/html/includes/graphs/generic_multi_data.inc.php +++ b/html/includes/graphs/generic_multi_data.inc.php @@ -28,7 +28,7 @@ foreach ($rrd_filenames as $key => $rrd_filename) $seperator = ","; $plus = ",+"; - if($_GET['previous']) + if ($_GET['previous']) { $rrd_options .= " DEF:".$in."octets" . $i . "X=".$rrd_filename.":".$ds_in.":AVERAGE:start=".$prev_from.":end=".$from; $rrd_options .= " DEF:".$out."octets" . $i . "X=".$rrd_filename.":".$ds_out.":AVERAGE:start=".$prev_from.":end=".$from; @@ -56,7 +56,7 @@ if ($i) $rrd_options .= " VDEF:95thout=outbits,95,PERCENT"; $rrd_options .= " VDEF:d95thout=doutbits,5,PERCENT"; - if($_GET['previous'] == "yes") + if ($_GET['previous'] == "yes") { $rrd_options .= " CDEF:".$in."octetsX=" . $in_thingX . $pluses; $rrd_options .= " CDEF:".$out."octetsX=" . $out_thingX . $pluses; @@ -94,7 +94,7 @@ if ($i) $rrd_options .= " LINE1:95thin#aa0000"; $rrd_options .= " LINE1:d95thout#aa0000"; - if($_GET['previous'] == "yes") + if ($_GET['previous'] == "yes") { $rrd_options .= " AREA:in".$format."X#99999999:"; $rrd_options .= " AREA:dout".$format."X#99999999:"; diff --git a/html/includes/graphs/generic_multi_seperated.inc.php b/html/includes/graphs/generic_multi_seperated.inc.php index 1a450ba832..78d99a4bd4 100644 --- a/html/includes/graphs/generic_multi_seperated.inc.php +++ b/html/includes/graphs/generic_multi_seperated.inc.php @@ -35,7 +35,7 @@ foreach ($rrd_list as $rrd) $rrd_options .= " CDEF:outB".$i."_neg=outB".$i.",-1,*"; $rrd_options .= " CDEF:octets".$i."=inB".$i.",outB".$i.",+"; - if($_GET['previous']) + if ($_GET['previous']) { $rrd_options .= " DEF:".$in."octets" . $i . "X=".$rrd['filename'].":".$ds_in.":AVERAGE:start=".$prev_from.":end=".$from; $rrd_options .= " DEF:".$out."octets" . $i . "X=".$rrd['filename'].":".$ds_out.":AVERAGE:start=".$prev_from.":end=".$from; @@ -77,7 +77,7 @@ foreach ($rrd_list as $rrd) $i++; $iter++; } - if($_GET['previous'] == "yes") + if ($_GET['previous'] == "yes") { $rrd_options .= " CDEF:".$in."octetsX=" . $in_thingX . $plusesX; $rrd_options .= " CDEF:".$out."octetsX=" . $out_thingX . $plusesX; @@ -90,7 +90,7 @@ foreach ($rrd_list as $rrd) $rrd_options .= " VDEF:d95thoutX=doutbitsX,5,PERCENT"; } - if($_GET['previous'] == "yes") + if ($_GET['previous'] == "yes") { $rrd_options .= " AREA:in".$format."X#99999999:"; $rrd_options .= " AREA:dout".$format."X#99999999:"; @@ -98,7 +98,6 @@ foreach ($rrd_list as $rrd) $rrd_options .= " LINE1.25:dout".$format."X#666666:"; } - $rrd_options .= $rrd_optionsb; $rrd_options .= " HRULE:0#999999"; diff --git a/html/includes/graphs/generic_multi_simplex_seperated.inc.php b/html/includes/graphs/generic_multi_simplex_seperated.inc.php index 04b5359159..d4908e5a53 100644 --- a/html/includes/graphs/generic_multi_simplex_seperated.inc.php +++ b/html/includes/graphs/generic_multi_simplex_seperated.inc.php @@ -52,7 +52,7 @@ foreach ($rrd_list as $i => $rrd) $rrd_options .= " DEF:".$rrd['ds'].$i."max=".$rrd['filename'].":".$rrd['ds'].":MAX "; } - if($_GET['previous']) + if ($_GET['previous']) { $rrd_options .= " DEF:".$i . "X=".$rrd['filename'].":".$rrd['ds'].":AVERAGE:start=".$prev_from.":end=".$from; $rrd_options .= " SHIFT:".$i . "X:$period"; @@ -88,8 +88,6 @@ foreach ($rrd_list as $i => $rrd) $rrd_options .= " CDEF:" . $g_defname . $i . "max=" . $rrd['ds'] . $i . "max," . $divider . ",/"; } - - ## Are our text values related to te multiplier/divisor or not? if (isset($text_orig) && $text_orig) { @@ -108,7 +106,7 @@ foreach ($rrd_list as $i => $rrd) $rrd_options .= " COMMENT:'\\n'"; } - if($_GET['previous'] == "yes") + if ($_GET['previous'] == "yes") { if (is_numeric($multiplier)) { @@ -116,7 +114,7 @@ foreach ($rrd_list as $i => $rrd) } elseif (is_numeric($divider)) { $rrd_options .= " CDEF:X=" . $thingX . $plusesX.",".$divider. ",/"; - } else + } else { $rrd_options .= " CDEF:X=" . $thingX . $plusesX; } @@ -124,9 +122,6 @@ foreach ($rrd_list as $i => $rrd) $rrd_options .= " AREA:X#99999999:"; $rrd_options .= " LINE1.25:X#666666:"; - } - - ?> diff --git a/html/includes/graphs/generic_simplex.inc.php b/html/includes/graphs/generic_simplex.inc.php index 2b839efe5a..edaed3897a 100644 --- a/html/includes/graphs/generic_simplex.inc.php +++ b/html/includes/graphs/generic_simplex.inc.php @@ -73,7 +73,6 @@ if($colour_minmax) } } - $rrd_options .= " COMMENT:'".$unit_text."Now Ave Max"; if ($percentile) diff --git a/html/includes/graphs/graph.inc.php b/html/includes/graphs/graph.inc.php index eec34aed3e..2b9a6b88a3 100644 --- a/html/includes/graphs/graph.inc.php +++ b/html/includes/graphs/graph.inc.php @@ -146,10 +146,10 @@ if ($error_msg) { $dst_x = '0'; // destination x $dst_y = '0'; // destination y $dst_im = imagecreatetruecolor($src_w, $src_h); - imagesavealpha($dst_im, true); + imagesavealpha($dst_im, true); $white = imagecolorallocate($dst_im, 255, 255, 255); - $trans_colour = imagecolorallocatealpha($dst_im, 0, 0, 0, 127); - imagefill($dst_im, 0, 0, $trans_colour); + $trans_colour = imagecolorallocatealpha($dst_im, 0, 0, 0, 127); + imagefill($dst_im, 0, 0, $trans_colour); imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h); imagepng($dst_im); imagedestroy($dst_im); diff --git a/html/includes/graphs/processor/usage.inc.php b/html/includes/graphs/processor/usage.inc.php index 3b8d317b0c..cdcb593b6b 100755 --- a/html/includes/graphs/processor/usage.inc.php +++ b/html/includes/graphs/processor/usage.inc.php @@ -17,15 +17,14 @@ $unit_text = "Usage"; include("includes/graphs/generic_simplex.inc.php"); - - - if($poop) { $scale_min = "0"; $scale_max = "100"; + include("includes/graphs/common.inc.php"); + $iter = "1"; $rrd_options .= " COMMENT:' Cur Max\\n'"; diff --git a/html/includes/graphs/storage/usage.inc.php b/html/includes/graphs/storage/usage.inc.php index 8d65bc2227..b92ef3c8f9 100644 --- a/html/includes/graphs/storage/usage.inc.php +++ b/html/includes/graphs/storage/usage.inc.php @@ -33,7 +33,7 @@ $rrd_options .= " GPRINT:size:LAST:%6.2lf%sB"; $rrd_options .= " GPRINT:free:LAST:%6.2lf%sB"; $rrd_options .= " GPRINT:perc:LAST:%5.2lf%%\\\\n"; -if($_GET['previous']) +if ($_GET['previous']) { $descr = substr(str_pad("Prev ".$storage[storage_descr], 12),0,12); $descr = str_replace(":","\:",$descr); @@ -53,4 +53,5 @@ if($_GET['previous']) $rrd_options .= " GPRINT:freeX:LAST:%6.2lf%sB"; $rrd_options .= " GPRINT:percX:LAST:%5.2lf%%\\\\n"; } + ?> diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 7d6d9332ad..3c7781138f 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -68,7 +68,7 @@ if ($_SESSION['userlevel'] >= '10') { if (count($cache['device_types'])) { - echo (' + echo('
'.generate_device_link($device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).' | '); - echo(''.$app_device['app_instance'].' | '); - echo(''.$app_device['app_status'].' | '); + echo(''.$app_device['app_instance'].' | '); + echo(''.$app_device['app_status'].' | '); echo(''); echo(' |
'); + echo(' | |||||
'); - foreach($graphs[$vars['app']] as $graph_type) + foreach ($graphs[$vars['app']] as $graph_type) { - $graph_array['type'] = "application_".$vars['app']."_".$graph_type; - $graph_array['id'] = $app_device['app_id']; - $graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type; + $graph_array['type'] = "application_".$vars['app']."_".$graph_type; + $graph_array['id'] = $app_device['app_id']; + $graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type; $graph_array_zoom['id'] = $app_device['app_id']; - $link_array = $graph_array; - $link_array['page'] = "graphs"; - unset($link_array['height'], $link_array['width']); - $link = generate_url($link_array); - - echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL)); + $link_array = $graph_array; + $link_array['page'] = "graphs"; + unset($link_array['height'], $link_array['width']); + $link = generate_url($link_array); + + echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL)); } echo(' | '); echo('