correctly display lxc templates

This commit is contained in:
Dietmar Maurer 2015-08-18 09:43:15 +02:00
parent 62fb1d2d65
commit b8d5dcf5ae
2 changed files with 12 additions and 2 deletions

View File

@ -236,15 +236,17 @@ sub update_lxc_status {
foreach my $vmid (keys %$vmstatus) {
my $d = $vmstatus->{$vmid};
my $template = $d->{template} ? $d->{template} : "0";
my $data;
if ($d->{status} eq 'running') { # running
$data = "$d->{uptime}:$d->{name}:$d->{status}:0:$ctime:$d->{cpus}:$d->{cpu}:" .
$data = "$d->{uptime}:$d->{name}:$d->{status}:$template:" .
"$ctime:$d->{cpus}:$d->{cpu}:" .
"$d->{maxmem}:$d->{mem}:" .
"$d->{maxdisk}:$d->{disk}:" .
"$d->{netin}:$d->{netout}:" .
"$d->{diskread}:$d->{diskwrite}";
} else {
$data = "0:$d->{name}:$d->{status}:0:$ctime:$d->{cpus}::" .
$data = "0:$d->{name}:$d->{status}:$template:$ctime:$d->{cpus}::" .
"$d->{maxmem}::" .
"$d->{maxdisk}:$d->{disk}:" .
":::";

View File

@ -50,6 +50,7 @@
.pve-itype-icon-qemu-template,
.pve-itype-icon-qemu-running,
.pve-itype-icon-lxc,
.pve-itype-icon-lxc-template,
.pve-itype-icon-lxc-running,
.pve-itype-icon-node,
.pve-itype-icon-node-running,
@ -90,6 +91,13 @@
background-image:url(../images/lxc-off.png);
}
.pve-itype-icon-lxc-template,
.x-tree-node-lxc-template,
.x-grid-tree-node-expanded .x-tree-node-lxc-template
{
background-image:url(../images/computer-template.png);
}
.pve-itype-icon-lxc-running,
.x-tree-node-lxc-running,
.x-grid-tree-node-expanded .x-tree-node-lxc-running