GRAPH DOES NOT EXIST"; exit; } /* take graph permissions into account here, if the user does not have permission give an "access denied" message */ if (read_config_option("auth_method") != 0) { $access_denied = !(is_graph_allowed($_GET["local_graph_id"])); if ($access_denied == true) { print "ACCESS DENIED"; exit; } } $graph_title = get_graph_title($_GET["local_graph_id"]); if ($_REQUEST["view_type"] == "tree") { print ""; }else{ print "
"; } $rras = get_associated_rras($_GET["local_graph_id"]); switch ($_REQUEST["action"]) { case 'view': ?> 0) { foreach ($rras as $rra) { ?> 0) { foreach ($rras as $rra) { if ($rra["steps"] * $rra["rows"] * $rra["rrd_step"] > $max_timespan) { $max_timespan = $rra["steps"] * $rra["rows"] * $rra["rrd_step"]; } } } /* fetch information for the current RRA */ $rra = db_fetch_row("select id,timespan,steps,name from rra where id=" . $_GET["rra_id"]); /* define the time span, which decides which rra to use */ $timespan = -($rra["timespan"]); /* find the step and how often this graph is updated with new data */ $ds_step = db_fetch_cell("SELECT data_template_data.rrd_step FROM (data_template_data,data_template_rrd,graph_templates_item) WHERE graph_templates_item.task_item_id=data_template_rrd.id AND data_template_rrd.local_data_id=data_template_data.local_data_id AND graph_templates_item.local_graph_id=" . $_GET["local_graph_id"] . " LIMIT 0,1"); $ds_step = empty($ds_step) ? 300 : $ds_step; $seconds_between_graph_updates = ($ds_step * $rra["steps"]); $now = time(); if (isset($_GET["graph_end"]) && ($_GET["graph_end"] <= $now - $seconds_between_graph_updates)) { $graph_end = $_GET["graph_end"]; }else{ $graph_end = $now - $seconds_between_graph_updates; } if (isset($_GET["graph_start"])) { if (($graph_end - $_GET["graph_start"])>$max_timespan) { $graph_start = $now - $max_timespan; }else { $graph_start = $_GET["graph_start"]; } }else{ $graph_start = $now + $timespan; } /* required for zoom out function */ if ($graph_start == $graph_end) { $graph_start--; } $graph = db_fetch_row("select graph_templates_graph.height, graph_templates_graph.width from graph_templates_graph where graph_templates_graph.local_graph_id=" . $_GET["local_graph_id"]); $graph_height = $graph["height"]; $graph_width = $graph["width"]; if ((read_config_option("rrdtool_version")) != "rrd-1.0.x") { if (read_graph_config_option("title_font") == "") { if (read_config_option("title_font") == "") { $title_font_size = 10; }else { $title_font_size = read_config_option("title_size"); } }else { $title_font_size = read_graph_config_option("title_size"); } }else { $title_font_size = 0; } ?>
"; print "

"; include_once("./include/bottom_footer.php"); ?>
Viewing Graph ''
<?php print htmlspecialchars($graph_title);?> Zoom Graph
CSV Export
Graph Source/Properties 'view', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $rra['id'], 'view_type' => $_REQUEST['view_type'])); ?>
Zooming Graph ''
<?php print htmlspecialchars($graph_title);?> Graph Source/Properties CSV Export
'zoom', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $_GET['rra_id'], 'view_type' => $_REQUEST['view_type'])); ?>
Viewing Graph Properties ''
<?php print htmlspecialchars($graph_title);?> Zoom Graph
CSV Export
'properties', 'local_graph_id' => $_GET['local_graph_id'], 'rra' => $_GET['rra_id'], 'view_type' => $_REQUEST['view_type'])); ?>