summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f0f7df)
raw | patch | inline | side by side (parent: 0f0f7df)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 23 Aug 2010 10:46:26 +0000 (10:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 23 Aug 2010 10:46:26 +0000 (10:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19428 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/generic/statistics/class_statistics.inc | patch | blob | history |
diff --git a/gosa-core/plugins/generic/statistics/class_statistics.inc b/gosa-core/plugins/generic/statistics/class_statistics.inc
index d3f967c701b0d263f21cc67b7d4bc0c50ed6c89f..cc43dc1243b27adb90db4887d7e94e65bb962672 100644 (file)
var $rpcHandle = NULL;
var $rpcConfigured = FALSE;
- var $statisticData = array();
-
- var $graphIDs = array();
- var $skipSeries = array();
- var $seriesListPerGraph = array();
+ // Graph data
+ var $statisticData = array(); // Via rpc received stats
+ var $graphIDs = array(); // IDs for created grpah
+ var $skipSeries = array(); // Graph series which should be skipped
+ var $seriesListPerGraph = array(); // Series names per graph
+ // Legend colors
var $legendR = 235;
var $legendG = 235;
var $legendB = 235;
+ // Font used in graphs
var $font = "./themes/default/fonts/LiberationSans-Regular.ttf";
+ // Datepicker initial
var $graph1DatePicker1 = 0;
var $graph1DatePicker2 = 0;
+ // A collection opf timestamps for unsubmitted statistics data.
var $unsbmittedFiles = array();
function __construct($config)
* date strings.
*/
function prepareGraphData($res)
- {
-
+ {
/* Build up array which represents the amount of errors per
* interval.
*/
$cnt ++;
}
ksort($gData['dates']);
-
/* Build up 'actions per category' array, this will later
* be represented using a pie chart.
$this->skipSeries[3] = array();
$this->skipSeries[4] = array();
$this->skipSeries[5] = array();
+
+
+ // Clean data from unusable categories like ('terminals workstations, ...')
+ foreach($gData as $serieName => $seriesData){
+ foreach($seriesData as $key => $data){
+ $list = preg_split("/, /", $key);
+ if(count(array_intersect(array('server','terminal','workstation', 'opsi', 'component'), $list))){
+ unset($gData[$serieName][$key]);
+ $gData[$serieName]['systems'] = $data;
+ }
+ }
+ }
+
return($gData);
}
{
$ret ="";
- // Extract category names from the given string.
- $list = preg_split("/, /", $name);
-
// We do not have a category for systems directly, so we've to map all system types to 'System'.
// If we do not map to _(Systems) the graph legend will be half screen width.
- if(count(array_intersect(array('server','terminal','workstation', 'opsi', 'component'), $list))){
+ if($name == "systems"){
return(_("Systems"));
}
// Walk through category names and try to find a translation.
- foreach($list as $cat){
- $cat = trim($cat);
- if(isset($this->catTranslations[$cat])){
- $cat = _($this->catTranslations[$cat]);
- }elseif(!empty($cat)){
- $cat = _($cat);
- }
- $ret .= $cat.", ";
+ $cat = trim($name);
+ if(isset($this->catTranslations[$cat])){
+ $cat = _($this->catTranslations[$cat]);
+ }elseif(!empty($cat)){
+ $cat = _($cat);
}
- return(rtrim($ret, ', '));
+ return($cat);
}