From 0bc24f182a0b7e5cc15d2a5b0e00ac19b92b30f2 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 Aug 2010 13:40:13 +0000 Subject: [PATCH] Updated statistic plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19397 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../generic/statistics/class_statistics.inc | 21 +++++++++---------- .../plugins/generic/statistics/statistics.tpl | 8 ------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/gosa-core/plugins/generic/statistics/class_statistics.inc b/gosa-core/plugins/generic/statistics/class_statistics.inc index c22f8937b..6289cba69 100644 --- a/gosa-core/plugins/generic/statistics/class_statistics.inc +++ b/gosa-core/plugins/generic/statistics/class_statistics.inc @@ -130,26 +130,25 @@ class statistics extends plugin $this->graphID_2 = preg_replace("/[^0-9]/","",microtime(TRUE)); // Build up DataSet. - $tmp = array(); $DataSet2 = new pData; - $dates = array(); - $max = 0; - + $intervalEntries = array(); + $max =0; foreach($res['actionsPerInterval'] as $id => $data){ - + $category = $data['category']; $date = $data['date']; + $iDate = strtotime($date); + $count = $data['count']; if(!isset($mostUsedCategories[$category])) continue; - + $intervalEntries[$category][$date] = $count; if($data['count'] > $max) $max = $data['count']; - $tmp[$category][$date] = $data['count']; - $dates[$date] = $date; + $dates[$iDate]=$iDate; } - foreach($tmp as $category => $data){ - ksort($tmp[$category]); - $DataSet2->AddPoint($tmp[$category], $category); + foreach($intervalEntries as $category => $data){ + ksort($intervalEntries[$category]); + $DataSet2->AddPoint($intervalEntries[$category], $category); $DataSet2->SetSerieName(_($category), $category); } diff --git a/gosa-core/plugins/generic/statistics/statistics.tpl b/gosa-core/plugins/generic/statistics/statistics.tpl index 317a831c1..47fd7a832 100644 --- a/gosa-core/plugins/generic/statistics/statistics.tpl +++ b/gosa-core/plugins/generic/statistics/statistics.tpl @@ -15,14 +15,6 @@
- - - -
{t}Interval{/t} - -
{t}Start{/t} -- 2.30.2