summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b8c0f51)
raw | patch | inline | side by side (parent: b8c0f51)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Aug 2010 11:36:19 +0000 (11:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Aug 2010 11:36:19 +0000 (11:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19464 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/generic/statistics/chartClasses/class_actionSelectChart.inc b/gosa-core/plugins/generic/statistics/chartClasses/class_actionSelectChart.inc
index a983ab28a1f1b958f636ae95bb030a1887764d5d..e78ff90d294b2f4ed30da6ee6b5e4b635cd363f5 100644 (file)
$gData = $this->graphData;
$dataSet = new pData;
$seriesCnt = 0;
- $pCache = new pCache('/var/spool/gosa/');
+ $pCache = new pCache($this->cachePath);
// Check if we've received data for the graph we've to render now.
$seriesValid = count($gData['actionTypeGraph']);
diff --git a/gosa-core/plugins/generic/statistics/chartClasses/class_categoryActionOverTime.inc b/gosa-core/plugins/generic/statistics/chartClasses/class_categoryActionOverTime.inc
index 6d9e912ff5e05589331ef6377fa7a27ad19076d5..99703a56a08ffe6c6f2c854d287feaf25060a666 100644 (file)
$dataSet->SetAbsciseLabelSerie('date');
// Read graph from cache?
- $pCache = new pCache('/var/spool/gosa/');
+ $pCache = new pCache($this->cachePath);
if($this->enableCaching && $pCache->IsInCache(get_class(),$allSeriesDataSet->GetData())){
$filename = $pCache->GetHash(get_class(),$allSeriesDataSet->GetData());
$filename = '/var/spool/gosa/'.$filename;
diff --git a/gosa-core/plugins/generic/statistics/chartClasses/class_memoryUsageChart.inc b/gosa-core/plugins/generic/statistics/chartClasses/class_memoryUsageChart.inc
index ac6b8d3c3e797eaa436e1b3c0ba7a5c7c69d3db7..83d294cef3ba45532b2e02f3dcc9ace035e084e5 100644 (file)
$dataSet->SetAbsciseLabelSerie('date');
// Read graph from cache?
- $pCache = new pCache('/var/spool/gosa/');
+ $pCache = new pCache($this->cachePath);
if($this->enableCaching && $pCache->IsInCache(get_class(),$dataSet->GetData())){
$filename = $pCache->GetHash(get_class(),$dataSet->GetData());
$filename = '/var/spool/gosa/'.$filename;
diff --git a/gosa-core/plugins/generic/statistics/chartClasses/class_objectCountChart.inc b/gosa-core/plugins/generic/statistics/chartClasses/class_objectCountChart.inc
index b5cf340b21e80db96436eb93b90abbd668b00248..4c5a2f55948da394ed66fb8e2ed28987f4042deb 100644 (file)
$dataSet->SetAbsciseLabelSerie('date');
// Read graph from cache?
- $pCache = new pCache('/var/spool/gosa/');
+ $pCache = new pCache($this->cachePath);
if($this->enableCaching && $pCache->IsInCache(get_class(),$dataSet->GetData())){
$filename = $pCache->GetHash(get_class(),$dataSet->GetData());
$filename = '/var/spool/gosa/'.$filename;
diff --git a/gosa-core/plugins/generic/statistics/chartClasses/class_passwordChangeChart.inc b/gosa-core/plugins/generic/statistics/chartClasses/class_passwordChangeChart.inc
index 725afdefac873d0ce2eb058f62e65c77f283efe3..a2fb8d93f323a2efd56eeffb50e3f885a6451d48 100644 (file)
$dataSet->SetAbsciseLabelSerie('date');
// Read graph from cache?
- $pCache = new pCache('/var/spool/gosa/');
+ $pCache = new pCache($this->cachePath);
if($this->enableCaching && $pCache->IsInCache(get_class(),$dataSet->GetData())){
$filename = $pCache->GetHash(get_class(),$dataSet->GetData());
$filename = '/var/spool/gosa/'.$filename;
diff --git a/gosa-core/plugins/generic/statistics/chartClasses/class_pieChart1.inc b/gosa-core/plugins/generic/statistics/chartClasses/class_pieChart1.inc
index 5bbce475b8692fad7204156553ec4d20fa74cc9e..f13b06d5aba299d55126e15b8dbdef0aab0754b8 100644 (file)
$dataSet->SetAbsciseLabelSerie("Serie2");
// Read graph from cache?
- $pCache = new pCache('/var/spool/gosa/');
+ $pCache = new pCache($this->cachePath);
if($this->enableCaching && $pCache->IsInCache(get_class(),$dataSet->GetData())){
$filename = $pCache->GetHash(get_class(),$dataSet->GetData());
$filename = '/var/spool/gosa/'.$filename;
diff --git a/gosa-core/plugins/generic/statistics/chartClasses/class_statChart.inc b/gosa-core/plugins/generic/statistics/chartClasses/class_statChart.inc
index 5b4cd4f428292e7848558667d52cbaf16e780e43..7b5046506ec8aaf853da590378a3a78d97251c9d 100644 (file)
protected $graphName = 0;
protected $seriesList = array();
+ protected $cachePath = "";
+
function __construct(&$config,$gData = array())
{
+ // Try to get the configured stats path to store image for caching reasons
+ $path = $config->get_cfg_value('core', 'statsDatabaseDirectory');
+ if(!empty($path)){
+ $this->cachePath = "{$path}/images/";
+ }else{
+ $this->cachePath = "/var/spool/gosa/stats/images/";
+ }
+
+ // Try to create the cache path
+ if(!is_dir($this->cachePath)){
+ @mkdir($this->cachePath);
+ }
+
$this->config = $config;
// Collect category translations