2008-07-04 Esteban Sanchez <estebans@artica.es>
* operation/reporting/reporting_viewer.php: Fixed error when showing final SLA result. * include/functions_reporting_pdf.php: Added final SLA result. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@933 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
52ebf8ee50
commit
a4450bcd7f
|
@ -1,3 +1,10 @@
|
|||
2008-07-04 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* operation/reporting/reporting_viewer.php: Fixed error when showing
|
||||
final SLA result.
|
||||
|
||||
* include/functions_reporting_pdf.php: Added final SLA result.
|
||||
|
||||
2008-07-02 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* operation/agentes/estado_grupo.php: Fixed missing variable on lag
|
||||
|
|
|
@ -174,6 +174,7 @@ function get_pdf_report ($report) {
|
|||
$table->data = array ();
|
||||
$table->head = array (lang_string ('Info'),
|
||||
lang_string ('sla_result'));
|
||||
$sla_failed = false;
|
||||
foreach ($slas as $sla) {
|
||||
$data = array ();
|
||||
|
||||
|
@ -187,14 +188,23 @@ function get_pdf_report ($report) {
|
|||
if ($sla_value === false) {
|
||||
$data[1] = lang_string ('unknown');
|
||||
} else {
|
||||
if ($sla_value < $sla['sla_limit'])
|
||||
if ($sla_value < $sla['sla_limit']) {
|
||||
$pdf->setColor (0, 1, 0, 0); // Red
|
||||
$sla_failed = true;
|
||||
}
|
||||
$data[1] = format_numeric ($sla_value). " %";
|
||||
$pdf->setColor (0, 0, 0, 1); // Black
|
||||
}
|
||||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
$pdf->ezTable ($table->data, $table->head, "", $table_options);
|
||||
|
||||
if (! $sla_failed) {
|
||||
$pdf->ezText ('<b>'.lang_string ('ok').'</b>', 8);
|
||||
} else {
|
||||
$pdf->ezText ('<b>'.lang_string ('fail').'</b>', 8);
|
||||
}
|
||||
unset ($slas);
|
||||
|
||||
break;
|
||||
|
|
|
@ -221,7 +221,7 @@ foreach ($contents as $content) {
|
|||
}
|
||||
if (sizeof ($slas)) {
|
||||
$data = array ();
|
||||
if ($sla_failed)
|
||||
if (! $sla_failed)
|
||||
$data[0] = '<span style="font: bold 3em Arial, Sans-serif; color: #000000;">'.lang_string ('Ok').'</span>';
|
||||
else
|
||||
$data[0] = '<span style="font: bold 3em Arial, Sans-serif; color: #ff0000;">'.lang_string ('Fail').'</span>';
|
||||
|
|
Loading…
Reference in New Issue