ui: ds/content: show spinner for backups in progress

use the fact that they do not have a size property at all

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-07-08 12:08:02 +02:00
parent 05389a0109
commit a7a5f56daa

View File

@ -10,7 +10,7 @@ Ext.define('pbs-data-store-snapshots', {
}, },
'files', 'files',
'owner', 'owner',
{ name: 'size', type: 'int' }, { name: 'size', type: 'int', allowNull: true, },
{ {
name: 'encrypted', name: 'encrypted',
type: 'boolean', type: 'boolean',
@ -343,7 +343,13 @@ Ext.define('PBS.DataStoreContent', {
header: gettext("Size"), header: gettext("Size"),
sortable: true, sortable: true,
dataIndex: 'size', dataIndex: 'size',
renderer: Proxmox.Utils.format_size, renderer: (v, meta, record) => {
if (v === undefined || v === null) {
meta.tdCls = "x-grid-row-loading";
return '';
}
return Proxmox.Utils.format_size(v);
},
}, },
{ {
xtype: 'numbercolumn', xtype: 'numbercolumn',