Merge branch 'ent-5575-wizard-de-modulos-y-recon-by-steps' of brutus.artica.es:artica/pandorafms into ent-5575-wizard-de-modulos-y-recon-by-steps

This commit is contained in:
Jose Gonzalez 2020-04-01 17:26:09 +02:00
commit 30844bac35
3 changed files with 9 additions and 33 deletions

View File

@ -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"',

View File

@ -28,7 +28,7 @@ ul.wizard li > textarea {
}
.wizard .hidden {
display: none !important;
display: none;
}
.wizard .indented {

View File

@ -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;