sla fixed errors
This commit is contained in:
parent
7faa1eff1e
commit
39f4690ef4
|
@ -499,6 +499,8 @@ function reporting_SLA($report, $content, $type = 'dinamic',
|
||||||
$return['failed'] = __('There are no SLAs defined');
|
$return['failed'] = __('There are no SLAs defined');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
require_once ($config['homedir'] . '/include/functions_planned_downtimes.php');
|
||||||
|
$metaconsole_on = is_metaconsole();
|
||||||
|
|
||||||
// checking if needed to show graph or table
|
// checking if needed to show graph or table
|
||||||
if ($content['show_graph'] == 0 || $content['show_graph'] == 1){
|
if ($content['show_graph'] == 0 || $content['show_graph'] == 1){
|
||||||
|
@ -596,7 +598,7 @@ function reporting_SLA($report, $content, $type = 'dinamic',
|
||||||
$slice
|
$slice
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
|
||||||
if ($metaconsole_on) {
|
if ($metaconsole_on) {
|
||||||
//Restore db connection
|
//Restore db connection
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
|
@ -610,8 +612,6 @@ function reporting_SLA($report, $content, $type = 'dinamic',
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
//$total_SLA += $sla_value;
|
|
||||||
|
|
||||||
if ($show_graphs) {
|
if ($show_graphs) {
|
||||||
$planned_downtimes = reporting_get_planned_downtimes_intervals($sla['id_agent_module'], $report['datetime'] - $content['period'], $report['datetime']);
|
$planned_downtimes = reporting_get_planned_downtimes_intervals($sla['id_agent_module'], $report['datetime'] - $content['period'], $report['datetime']);
|
||||||
|
@ -779,12 +779,12 @@ function reporting_SLA($report, $content, $type = 'dinamic',
|
||||||
|
|
||||||
$return['charts'][] = $dataslice;
|
$return['charts'][] = $dataslice;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if ($metaconsole_on) {
|
if ($metaconsole_on) {
|
||||||
//Restore db connection
|
//Restore db connection
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SLA items sorted descending ()
|
// SLA items sorted descending ()
|
||||||
|
@ -4403,7 +4403,7 @@ function reporting_advanced_sla ($id_agent_module, $time_from = null, $time_to =
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$t_day+=SECONDS_1DAY;
|
$t_day = strtotime(" + 1 days", $t_day);
|
||||||
} // End while -> build matrix
|
} // End while -> build matrix
|
||||||
} // End else (prepare fixed matrix)
|
} // End else (prepare fixed matrix)
|
||||||
} // Finished: Build exceptions
|
} // Finished: Build exceptions
|
||||||
|
@ -4433,9 +4433,9 @@ function reporting_advanced_sla ($id_agent_module, $time_from = null, $time_to =
|
||||||
|
|
||||||
// Analysis begins
|
// Analysis begins
|
||||||
for ($count=0; $count < $slices; $count++) {
|
for ($count=0; $count < $slices; $count++) {
|
||||||
|
// use strtotime based on local timezone to avoid datetime conversions
|
||||||
$datetime_from = $global_datetime_from + ($count*$range);
|
$datetime_from = strtotime(" + " . ($count*$range) . " seconds" , $global_datetime_from);
|
||||||
$datetime_to = $global_datetime_from + (($count+1)*$range);
|
$datetime_to = strtotime(" + " . (($count + 1)*$range) . " seconds", $global_datetime_from);
|
||||||
|
|
||||||
$return = array();
|
$return = array();
|
||||||
// timing
|
// timing
|
||||||
|
@ -4641,7 +4641,6 @@ function reporting_availability($report, $content, $date=false, $time=false) {
|
||||||
$return = array();
|
$return = array();
|
||||||
$return['type'] = 'availability';
|
$return['type'] = 'availability';
|
||||||
$return['subtype'] = $content['group_by_agent'];
|
$return['subtype'] = $content['group_by_agent'];
|
||||||
$return['resume'] = $content['show_resume'];
|
|
||||||
|
|
||||||
if (empty($content['name'])) {
|
if (empty($content['name'])) {
|
||||||
$content['name'] = __('Availability');
|
$content['name'] = __('Availability');
|
||||||
|
@ -4862,6 +4861,7 @@ function reporting_availability($report, $content, $date=false, $time=false) {
|
||||||
|
|
||||||
$return["data"] = $data;
|
$return["data"] = $data;
|
||||||
$return["resume"] = array();
|
$return["resume"] = array();
|
||||||
|
$return['resume']['resume'] = $content['show_resume'];
|
||||||
$return["resume"]['min_text'] = $min_text;
|
$return["resume"]['min_text'] = $min_text;
|
||||||
$return["resume"]['min'] = $min;
|
$return["resume"]['min'] = $min;
|
||||||
$return["resume"]['avg'] = $avg;
|
$return["resume"]['avg'] = $avg;
|
||||||
|
|
|
@ -2104,7 +2104,7 @@ function reporting_html_availability(&$table, $item) {
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
array_push ($table->data, $data2);
|
array_push ($table->data, $data2);
|
||||||
|
|
||||||
if ($item['resume'] && !empty($item["data"])) {
|
if ($item['resume']['resume'] && !empty($item["data"])) {
|
||||||
$table1->width = '99%';
|
$table1->width = '99%';
|
||||||
$table1->data = array ();
|
$table1->data = array ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue