fixed bug: hide not init agents not working in report item creation
This commit is contained in:
parent
6511f67600
commit
3c25125713
|
@ -381,7 +381,7 @@ function reporting_html_SLA($table, $item, $mini) {
|
|||
}
|
||||
}
|
||||
|
||||
if(isset($item['data'])){
|
||||
if(!(!isset($item['data']) && $hide_notinit_agent == 1)) {
|
||||
$table1 = new stdClass();
|
||||
$table1->width = '99%';
|
||||
|
||||
|
@ -471,7 +471,7 @@ function reporting_html_SLA($table, $item, $mini) {
|
|||
foreach ($item['data'] as $sla) {
|
||||
if(isset($sla)){
|
||||
$the_first_men_time = get_agent_first_time(io_safe_output($sla['agent']));
|
||||
if (!$hide_notinit_agent) {
|
||||
|
||||
//first_table
|
||||
$row = array();
|
||||
$row[] = $sla['agent'];
|
||||
|
@ -486,6 +486,9 @@ function reporting_html_SLA($table, $item, $mini) {
|
|||
}
|
||||
$row[] = round($sla['sla_limit'], 2) . "%";
|
||||
|
||||
if (!$hide_notinit_agent) {
|
||||
|
||||
|
||||
if (reporting_sla_is_not_init_from_array($sla)) {
|
||||
$row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NOTINIT.';">' .
|
||||
__('N/A') . '</span>';
|
||||
|
@ -646,6 +649,11 @@ function reporting_html_SLA($table, $item, $mini) {
|
|||
$table->colspan['checks_global']['cell'] = 2;
|
||||
$table->data['checks_global']['cell'] = html_print_table($table3, true);
|
||||
}
|
||||
else {
|
||||
$table->colspan['error']['cell'] = 3;
|
||||
$table->data['error']['cell'] =
|
||||
__('There are no Agent/Modules defined');
|
||||
}
|
||||
|
||||
if (!empty($item['charts'])) {
|
||||
$table1 = new stdClass();
|
||||
|
@ -2313,7 +2321,7 @@ function reporting_html_availability(&$table, $item) {
|
|||
|
||||
global $config;
|
||||
|
||||
if (!empty($item["data"])) {
|
||||
if (!empty($item["data"]) || ($hide_notinit_agent !=1 && ($item['type'] == "availability" || $item['type'] == "sla"))) {
|
||||
$table1 = new stdClass();
|
||||
$table1->width = '99%';
|
||||
$table1->data = array ();
|
||||
|
|
Loading…
Reference in New Issue