mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 18:29:46 +00:00
task log: set default in the api call
we have the defaults documented here, so set them here too otherwise if the default change in PVE::Tools, we probably forget to update the api description Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
f0b87b4c28
commit
db354940fd
@ -267,15 +267,17 @@ __PACKAGE__->register_method({
|
||||
my $rpcenv = PVE::RPCEnvironment::get();
|
||||
my $user = $rpcenv->get_user();
|
||||
my $node = $param->{node};
|
||||
my $start = $param->{start} // 0;
|
||||
my $limit = $param->{limit} // 50;
|
||||
|
||||
if ($user ne $task->{user}) {
|
||||
$rpcenv->check($user, "/nodes/$node", [ 'Sys.Audit' ]);
|
||||
}
|
||||
|
||||
my ($count, $lines) = PVE::Tools::dump_logfile($filename, $param->{start}, $param->{limit});
|
||||
my ($count, $lines) = PVE::Tools::dump_logfile($filename, $start, $limit);
|
||||
|
||||
$rpcenv->set_result_attrib('total', $count);
|
||||
|
||||
|
||||
return $lines;
|
||||
}});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user