]> git.proxmox.com Git - pve-storage.git/commitdiff
fix #1379: return size as number instead of string stable-4
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 16 May 2017 12:53:54 +0000 (14:53 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 2 Jun 2017 08:25:19 +0000 (10:25 +0200)
this caused the webinterface to sort alphabetically instead of numerical
when sorting by image size

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/Storage/LVMPlugin.pm

index 60a58e5aa3e9e26fd380fb50a9f7c981b460aff1..a2b3febaa08be3ab6fd8948eb884ddeaf8003260 100644 (file)
@@ -44,7 +44,7 @@ sub lvm_pv_info {
 
        $pvinfo = {
            pvname => $pvname,
-           size => $size,
+           size => int($size),
            vgname => $vgname,
            uuid => $uuid,
        };
@@ -136,7 +136,7 @@ sub lvm_list_volumes {
        my $lv_type = substr($lv_attr, 0, 1);
 
        my $d = {
-           lv_size => $lv_size,
+           lv_size => int($lv_size),
            lv_type => $lv_type,
        };
        $d->{pool_lv} = $pool_lv if $pool_lv;