diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index ff2c10b0ed..22ff8f5301 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -1020,11 +1020,10 @@ class HostDevices extends Wizard true ), 'arguments' => [ - 'name' => 'auto_monitor', - 'type' => 'switch', - 'return' => true, - 'value' => (isset($this->task['auto_monitor'])) ? $this->task['auto_monitor'] : 1, - 'onclick' => 'toggleTemplatesSelection();', + 'name' => 'auto_monitor', + 'type' => 'switch', + 'return' => true, + 'value' => (isset($this->task['auto_monitor'])) ? $this->task['auto_monitor'] : 1, ], ]; @@ -1129,36 +1128,10 @@ class HostDevices extends Wizard } } - $form['js'] .= ' - - function toggleTemplatesSelection() { - if (document.getElementsByName("auto_monitor")[0].checked) { - document.getElementById("templates_selection").style["display"] = "none"; - var snmp = document.getElementsByName("snmp_enabled"); - if (snmp[0] != undefined) { - if(snmp[0].checked != 1) { - snmp[0].click(); - } - } else { - // Not found. - document.getElementById("templates_selection").style["display"] = "block"; - document.getElementsByName("auto_monitor")[0].checked = false; - } - } else { - document.getElementById("templates_selection").style["display"] = "block"; - } - } - - $(document).ready(function () { - toggleTemplatesSelection(); - }); - -'; - // Submit button. $form['inputs'][] = [ 'arguments' => [ - 'name' => 'submit', + 'name' => 'submit-finish', 'label' => __('Finish'), 'type' => 'submit', 'attributes' => 'class="sub next"', diff --git a/pandora_console/include/styles/wizard.css b/pandora_console/include/styles/wizard.css index 572c3496bf..f80b0078b1 100644 --- a/pandora_console/include/styles/wizard.css +++ b/pandora_console/include/styles/wizard.css @@ -28,7 +28,7 @@ ul.wizard li > textarea { } .wizard .hidden { - display: none !important; + display: none; } .wizard .indented { diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index 2c3d9f1c9f..d2e47fba59 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -938,6 +938,9 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) { $self->{'task_data'}{'id_rt'} ); + # Return if no entries. + return unless scalar @rows > 0; + my @agents; my $progress = 0;