diff --git a/gosa-core/plugins/generic/statistics/class_statistics.inc b/gosa-core/plugins/generic/statistics/class_statistics.inc
index 15db5bc1798e2838b4b08d4e8f43abcc7d543a0b..433e33833440fb7cfb4c2de8ab73a272294c605e 100644 (file)
$available = $this->getLocalStatisticsFiles();
$alreadyTransmitted = $this->getStatisticsDatesFromServer();
$unsubmitted = array_intersect($available,$alreadyTransmitted);
$available = $this->getLocalStatisticsFiles();
$alreadyTransmitted = $this->getStatisticsDatesFromServer();
$unsubmitted = array_intersect($available,$alreadyTransmitted);
+
+ // Exclude statistic collection from today, they are still active and cannot be submitted.
+ $curDate = date('Y-m-d');
+ if(isset($unsubmitted)) unset($unsubmitted[$curDate]);
+
return($unsubmitted);
}
return($unsubmitted);
}
$dates = array();
$DataSet2 = new pData;
$max = 1;
$dates = array();
$DataSet2 = new pData;
$max = 1;
+ $seriesNumber = 0;
foreach($res['actionsPerInterval'] as $category => $entriesPerDate){
// Collect data per category and store used timestamps
foreach($res['actionsPerInterval'] as $category => $entriesPerDate){
// Collect data per category and store used timestamps
$DataSet2->SetSerieName(_($category), $category);
$Test->setLabel($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie1",0,"Daily incomes");
$DataSet2->AddSerie($category);
$DataSet2->SetSerieName(_($category), $category);
$Test->setLabel($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie1",0,"Daily incomes");
$DataSet2->AddSerie($category);
+ $seriesNumber++;
// Detect maximum value, to adjust the Y-Axis
$tmpMax = max($dataArray[$category]);
// Detect maximum value, to adjust the Y-Axis
$tmpMax = max($dataArray[$category]);
if(count($dates)){
$Test2->drawScale($DataSet2->GetData(),$DataSet2->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2);
if(count($dates)){
$Test2->drawScale($DataSet2->GetData(),$DataSet2->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2);
- $DataSet2->RemoveSerie('date');
}
// Draw the cubic curve graph
}
// Draw the cubic curve graph
$DataSet2->AddPoint($errors, 'Errors');
$DataSet2->SetSerieName('Errors', 'Errors');
$DataSet2->AddSerie('Errors');
$DataSet2->AddPoint($errors, 'Errors');
$DataSet2->SetSerieName('Errors', 'Errors');
$DataSet2->AddSerie('Errors');
-
+ $seriesNumber ++;
+
+ $Test2->setColorPalette($seriesNumber-1,255,0,0);
// Draw legend
$Test2->drawLegend(650,30,$DataSet2->GetDataDescription(),255,255,255);
// Draw legend
$Test2->drawLegend(650,30,$DataSet2->GetDataDescription(),255,255,255);
// Draw right scale (Errors per day)
$Test2->setFixedScale(0.0001,(max($errors) +1) *1.1);
$Test2->drawRightScale($DataSet2->GetData(),$DataSet2->GetDataDescription(),SCALE_NORMAL,120,150,150,TRUE,0,2);
// Draw right scale (Errors per day)
$Test2->setFixedScale(0.0001,(max($errors) +1) *1.1);
$Test2->drawRightScale($DataSet2->GetData(),$DataSet2->GetDataDescription(),SCALE_NORMAL,120,150,150,TRUE,0,2);
- $Test2->drawBarGraph($DataSet2->GetData(),$DataSet2->GetDataDescription(),TRUE);
+ $Test2->drawBarGraph($DataSet2->GetData(),$DataSet2->GetDataDescription());
$file = '/tmp/graph_'.$this->graphID_2;
$Test2->Render($file);
$file = '/tmp/graph_'.$this->graphID_2;
$Test2->Render($file);
$smarty->assign('graphID_1', $this->graphID_1);
$smarty->assign('graphID_2', $this->graphID_2);
$smarty->assign('graphID_1', $this->graphID_1);
$smarty->assign('graphID_2', $this->graphID_2);
+ $smarty->assign('unsbmittedFiles', count($this->unsbmittedFiles));
+ $smarty->assign('unsbmittedFilesMsg',
+ sprintf(
+ _("You have currently %s unsubmitted statistic collection, do you want to transmit them now?"),
+ count($this->unsbmittedFiles)));
return($smarty->fetch(get_template_path('statistics.tpl', TRUE)));
}
return($smarty->fetch(get_template_path('statistics.tpl', TRUE)));
}