From a7a5f56daaa54b70239841bbf2436751d67cdfd5 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 8 Jul 2020 12:08:02 +0200 Subject: [PATCH] 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 --- www/DataStoreContent.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/DataStoreContent.js b/www/DataStoreContent.js index 16314b48..030b7336 100644 --- a/www/DataStoreContent.js +++ b/www/DataStoreContent.js @@ -10,7 +10,7 @@ Ext.define('pbs-data-store-snapshots', { }, 'files', 'owner', - { name: 'size', type: 'int' }, + { name: 'size', type: 'int', allowNull: true, }, { name: 'encrypted', type: 'boolean', @@ -343,7 +343,13 @@ Ext.define('PBS.DataStoreContent', { header: gettext("Size"), sortable: true, 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',