escaped single quotes (wmi) + refresh button
This commit is contained in:
parent
13a1e44a5e
commit
3b71297d56
|
@ -168,6 +168,16 @@ class DiscoveryTaskList extends HTML
|
||||||
'attributes' => 'class="sub cancel"',
|
'attributes' => 'class="sub cancel"',
|
||||||
'return' => true,
|
'return' => true,
|
||||||
],
|
],
|
||||||
|
],[
|
||||||
|
'class' => 'action-buttons rule-builder-actions',
|
||||||
|
'arguments' => [
|
||||||
|
'name' => 'refresh',
|
||||||
|
'label' => __('Refresh'),
|
||||||
|
'type' => 'button',
|
||||||
|
'attributes' => 'class="sub upd"',
|
||||||
|
'return' => true,
|
||||||
|
'script' => 'location.reload();',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -2912,7 +2912,16 @@ function ui_progress(
|
||||||
try {
|
try {
|
||||||
val = JSON.parse(data);
|
val = JSON.parse(data);
|
||||||
$("#'.$id.'").attr("data-label", val + " %");
|
$("#'.$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) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2301,7 +2301,8 @@ sub wmi_get_command {
|
||||||
|
|
||||||
my @output;
|
my @output;
|
||||||
if (defined($auth) && $auth ne '') {
|
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 {
|
}else {
|
||||||
@output = `$self->{'timeout_cmd'}"$self->{'wmi_client'}" -N //$target "$query" 2>$DEVNULL`;
|
@output = `$self->{'timeout_cmd'}"$self->{'wmi_client'}" -N //$target "$query" 2>$DEVNULL`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue