]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #1573: show bootdisk usage on container summary
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 28 Nov 2017 13:05:01 +0000 (14:05 +0100)
committerDominik Csapak <d.csapak@proxmox.com>
Fri, 9 Feb 2018 13:42:56 +0000 (14:42 +0100)
we have the information, so show it
this does not change the output for vms, where we do not have
any information about disk usage at all

if we add the 'disk' info to vms, it will magically work there then

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/panel/GuestStatusView.js

index a645d6f18a9702a27b6c1eee1117ee3fcd13262b..250a93a76f46a78157f52d2d9c6b6a892d4050a6 100644 (file)
@@ -63,9 +63,18 @@ Ext.define('PVE.panel.GuestStatusView', {
        {
            itemId: 'rootfs',
            title: gettext('Bootdisk size'),
-           textField: 'maxdisk',
+           valueField: 'disk',
+           maxField: 'maxdisk',
            printBar: false,
-           renderer: PVE.Utils.render_size
+           renderer: function(used, max) {
+               var me = this;
+               me.setPrintBar(used > 0);
+               if (used === 0) {
+                   return PVE.Utils.render_size(max);
+               } else {
+                   return PVE.Utils.render_size_usage(used,max);
+               }
+           }
        }
     ],