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:
Dominik Csapak 2018-06-29 10:20:21 +02:00 committed by Thomas Lamprecht
parent f0b87b4c28
commit db354940fd

View File

@ -267,12 +267,14 @@ __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);