mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch '2166-Hide-not-init-agents' into 'develop'
fixed bug: hide not init agents not working in report item creation See merge request artica/pandorafms!1742
This commit is contained in:
commit
d218c586d9
@ -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();
|
||||
@ -2319,7 +2327,7 @@ function reporting_html_availability(&$table, $item) {
|
||||
|
||||
global $config;
|
||||
|
||||
if (!empty($item["data"])) {
|
||||
if (!empty($item["data"]) || $hide_notinit_agent !=1) {
|
||||
$table1 = new stdClass();
|
||||
$table1->width = '99%';
|
||||
$table1->data = array ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user