mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-01 01:24:38 +00:00
snapshot list: include current position
This commit is contained in:
parent
7b2257a8b5
commit
0ea6bc6943
@ -1918,7 +1918,16 @@ __PACKAGE__->register_method({
|
|||||||
my $res = [];
|
my $res = [];
|
||||||
|
|
||||||
foreach my $name (keys %$snaphash) {
|
foreach my $name (keys %$snaphash) {
|
||||||
push @$res, { name => $name };
|
my $d = $snaphash->{$name};
|
||||||
|
my $item = { name => $name, description => $d->{description} };
|
||||||
|
$item->{parent} = $d->{parent} if $d->{parent};
|
||||||
|
push @$res, $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($conf->{parent}) {
|
||||||
|
push @$res, { name => '__current', parent => $conf->{parent} };
|
||||||
|
} else {
|
||||||
|
push @$res, { name => '__current' };
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
|
Loading…
Reference in New Issue
Block a user