fixed 24*7 availavility report pandora_enterprise#9798

This commit is contained in:
Daniel Barbero 2022-11-11 10:19:36 +01:00
parent a8bb6706ca
commit 12b7c81620
2 changed files with 5 additions and 4 deletions

View File

@ -8682,8 +8682,8 @@ function reporting_availability($report, $content, $date=false, $time=false)
$item['id_agent_module']
);
if (isset($item['compare']) === true
&& empty($item['compare']) === true
if (isset($item['compare']) === false
|| empty($item['compare']) === true
) {
$row['data']['compare'] = false;
} else {

View File

@ -4007,7 +4007,7 @@ function reporting_html_text(&$table, $item)
*/
function reporting_html_availability($table, $item, $pdf=0)
{
$retun_pdf = '';
$return_pdf = '';
$style = db_get_value(
'style',
@ -4234,7 +4234,7 @@ function reporting_html_availability($table, $item, $pdf=0)
} else {
$table_row[] = $row['agent'];
$item_name = $row['availability_item'];
if ((bool) $row['compare'] === false) {
if ((bool) $row['compare'] === true) {
$item_name .= ' ('.__('24 x 7').')';
}
@ -4422,6 +4422,7 @@ function reporting_html_availability($table, $item, $pdf=0)
$table2->data[] = $table_row2;
}
} else {
$table = new stdClass();
$table->colspan['error']['cell'] = 3;
$table->data['error']['cell'] = __(
'There are no Agent/Modules defined'