From da9463f5fac1d0737c4b752b31aeef7563a1cb75 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Tue, 17 Apr 2012 14:02:51 +0000 Subject: [PATCH] give dropdown javascript box to change graph type git-svn-id: http://www.observium.org/svn/observer/trunk@3043 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/graphs.inc.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/html/pages/graphs.inc.php b/html/pages/graphs.inc.php index 7fc9384c66..3b2ac44187 100644 --- a/html/pages/graphs.inc.php +++ b/html/pages/graphs.inc.php @@ -38,6 +38,20 @@ if (!$auth) $title .= " :: ".ucfirst($subtype); } + # Load our list of available graphtypes for this object + # Fixme not all of these are going to be valid + if ($handle = opendir($config['install_dir'] . "/html/includes/graphs/".$type."/")) + { + while (false !== ($file = readdir($handle))) + { + if ($file != "." && $file != ".." && strstr($file, ".inc.php")) + { + $types[] = str_replace(".inc.php", "", $file); + } + } + closedir($handle); + } + $graph_array = $vars; $graph_array['height'] = "60"; $graph_array['width'] = $thumb_width; @@ -46,6 +60,25 @@ if (!$auth) print_optionbar_start(); echo($title); + + echo('
'); + ?> +
+ + '); + print_optionbar_end(); // css and js for datetimepicker