diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 208d6e669b..550853cf62 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2008-12-24 Raul Mateos + + * index.php: Updated build, again due to the use of the new custom ID. + + * reporting/fgraph2.php: New file, test for ezcomponents. + + * operation/events/event_statistics.php: Use of fgraph2 if test var is + set in the URL. It uses ezComponents, that need to be installed. + This shows a 3D chart. Probably not will be used, but it's an idea + about how to improve graphs in pandora. To test, just add &test to the + event_statistics URL. + 2008-12-23 Evi Vanoost * index.php: Cleaned up some old stuff and fixed the order of GET/POST diff --git a/pandora_console/index.php b/pandora_console/index.php index 32252ae3be..97944d8374 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -20,7 +20,7 @@ // Silk icon set 1.3 (cc) Mark James, http://www.famfamfam.com/lab/icons/silk/ // Pandora FMS uses Pear Image::Graph code -$build_version="PC081221"; +$build_version="PC081224"; $pandora_version="v2.1-dev"; global $build_version; global $pandora_version; diff --git a/pandora_console/operation/events/event_statistics.php b/pandora_console/operation/events/event_statistics.php index 07116dcbf0..79d0a205e3 100644 --- a/pandora_console/operation/events/event_statistics.php +++ b/pandora_console/operation/events/event_statistics.php @@ -17,7 +17,6 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - // Load global vars require("include/config.php"); @@ -36,11 +35,18 @@ echo ""; echo ""; echo "'; echo "
"; echo "

".__('Event graph')."

"; echo ''; -echo "
"; +echo ""; echo "

".__('Event graph by user')."

"; echo ''; +echo "
"; +if (isset($_GET["test"])){ + echo "

".__('Event graph by group')."

"; + echo ''; + echo "
"; +} echo "

".__('Event graph by group')."

"; echo ''; +echo '
"; ?> diff --git a/pandora_console/reporting/fgraph2.php b/pandora_console/reporting/fgraph2.php new file mode 100644 index 0000000000..d4b9b1dfcb --- /dev/null +++ b/pandora_console/reporting/fgraph2.php @@ -0,0 +1,99 @@ + $max_items) { + //Pops an element off the array until the array is small enough + array_pop ($data); + } + $chart = new ezcGraphPieChart(); + $chart->renderer = new ezcGraphRenderer3d(); + $chart->driver = new ezcGraphGdDriver(); + $chart->palette = new customPalette(); + $chart->options->label = '%2$d (%3$.1f%%) '; + $chart->legend->landscapeSize = .05; + $chart->options->font = 'FreeSans.ttf'; + $chart->options->percentThreshold = 0.01; + $chart->legend = true; + $chart->legend->position = ezcGraph::RIGHT; + $chart->data['datos'] = new ezcGraphArrayDataSet($comb); + $chart->data['datos']->highlight = true; + $chart->data['datos']->highlight['SYSTEM'] = false; + $chart->renderToOutput( 300, 200 ); +} +?>