diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 73b2626010..431cad5a7c 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -168,6 +168,16 @@ class DiscoveryTaskList extends HTML 'attributes' => 'class="sub cancel"', 'return' => true, ], + ],[ + 'class' => 'action-buttons rule-builder-actions', + 'arguments' => [ + 'name' => 'refresh', + 'label' => __('Refresh'), + 'type' => 'button', + 'attributes' => 'class="sub upd"', + 'return' => true, + 'script' => 'location.reload();', + ], ], ], ]; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index de05c0f402..0ce95daf78 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2912,7 +2912,16 @@ function ui_progress( try { val = JSON.parse(data); $("#'.$id.'").attr("data-label", val + " %"); - $("#'.$id.'_progress").width(val+"%"); + $("#'.$id.'_progress").width(val+"%");'; + if (isset($ajax['oncomplete'])) { + $output .= ' + if (val == 100) { + '.$ajax['oncomplete'].'($("#'.$id.'")); + } + '; + } + + $output .= ' } catch (e) { console.error(e); } diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 0c89e3060e..01f8e824b8 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -2301,7 +2301,8 @@ sub wmi_get_command { my @output; if (defined($auth) && $auth ne '') { - @output = `$self->{'timeout_cmd'}"$self->{'wmi_client'}" -U $auth //$target "$query" 2>$DEVNULL`; + $auth =~ s/'/\'/g; + @output = `$self->{'timeout_cmd'}"$self->{'wmi_client'}" -U '$auth' //$target "$query" 2>$DEVNULL`; }else { @output = `$self->{'timeout_cmd'}"$self->{'wmi_client'}" -N //$target "$query" 2>$DEVNULL`; }