summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 873f575)
raw | patch | inline | side by side (parent: 873f575)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Aug 2010 14:38:04 +0000 (14:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Aug 2010 14:38:04 +0000 (14:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19439 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/generic/statistics/graphClasses/class_categoryActionOverTime.inc | patch | blob | history | |
gosa-core/plugins/generic/statistics/graphClasses/class_statChart.inc | patch | blob | history |
diff --git a/gosa-core/plugins/generic/statistics/graphClasses/class_categoryActionOverTime.inc b/gosa-core/plugins/generic/statistics/graphClasses/class_categoryActionOverTime.inc
index 2fcae6a14c8cf88a7be562150027a9f485bab9fb..a82c3fa7772212ee81477c06a55b91b3aa6b0ee0 100644 (file)
class categoryActionsOverTime extends statChart
{
var $title = 'Plugin usage over time';
- var $gID = 0;
-
- var $graphData = array();
- var $seriesList = array();
-
- var $enableCaching = FALSE;
+ var $enableCaching = TRUE;
function __construct(&$config)
{
parent::__construct($config);
- $this->gID = get_class();
+ $this->graphName = get_class();
}
$seriesCnt ++;
}
+ // Keep a list of all selecteable data-series, to allow the user to disable
+ // or enable series on demand.
+ $this->seriesList = array();
+ foreach($gData['actionsPerInterval'] as $key => $data){
+ $this->seriesList[$key] = $this->getCategoryTranslation($key);
+ }
+ $this->seriesList['errorsPerInterval'] = _("Error");
+
// Create a dataSet containing all series
$allSeriesDataSet = clone $dataSet;
if(!in_array('errorsPerInterval', $this->skipSeries)){
session::set('statistics::graphFile'.$this->graphID,$file);
$pCache->WriteToCache(get_class(),$allSeriesDataSet->GetData(),$chart);
- // Keep a list of all selecteable data-series, to allow the user to disable
- // or enable series on demand.
- $this->seriesList = array();
- foreach($gData['actionsPerInterval'] as $key => $data){
- $this->seriesList[$key] = $this->getCategoryTranslation($key);
- }
- $this->seriesList['errorsPerInterval'] = _("Error");
-
return;
}
diff --git a/gosa-core/plugins/generic/statistics/graphClasses/class_statChart.inc b/gosa-core/plugins/generic/statistics/graphClasses/class_statChart.inc
index 3087bf361dd6968705e7c18d4de8d3bc859e0519..fcbd6f17c1502c60fe05a18dac6fc8a5a982bc1a 100644 (file)
var $skipSeries = array();
+ var $graphName = 0;
+
+ var $seriesList = array();
+
function __construct(&$config,$gData = array())
{
$this->config = $config;
function getSeriesSelector()
{
- $str = "<input type='hidden' name='{$this->gID}_posted' value='1'>";
+ $str = "<input type='hidden' name='{$this->graphName}_posted' value='1'>";
$list = $this->getSeriesList();
foreach($list as $key => $item){
$checked = (in_array($key, $this->skipSeries))? '': 'checked';
$str .= "<span style='padding-right:20px'>".
- " <input type='checkbox' name='addSeries_{$this->gID}_{$key}' value='1'".
+ " <input type='checkbox' name='addSeries_{$this->graphName}_{$key}' value='1'".
" onClick=\"document.mainform.submit();\" ".
" {$checked}>{$item}".
" </span>";
function save_object()
{
- if(!isset($_POST["{$this->gID}_posted"])) return;
+ if(!isset($_POST["{$this->graphName}_posted"])) return;
// Get series to enable or disable
+ $this->skipSeries = array();
foreach($this->seriesList as $seriesName => $seriesDesc){
- if(!isset($_POST["addSeries_{$this->gID}_{$seriesName}"])){
+ if(!isset($_POST["addSeries_{$this->graphName}_{$seriesName}"])){
$this->skipSeries[] = $seriesName;
}
}