ui: tape/ChangerStatus: only show loading on 'force refresh'

so that we can update in the background without interfering with the
users workflow

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-02-22 14:25:34 +01:00 committed by Dietmar Maurer
parent 0263396187
commit 423e3cbd18
1 changed files with 12 additions and 5 deletions

View File

@ -413,8 +413,10 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
} }
try { try {
Proxmox.Utils.setErrorMask(view, true); if (!use_cache) {
Proxmox.Utils.setErrorMask(me.lookup('content')); Proxmox.Utils.setErrorMask(view, true);
Proxmox.Utils.setErrorMask(me.lookup('content'));
}
let status_fut = PBS.Async.api2({ let status_fut = PBS.Async.api2({
timeout: 5*60*1000, timeout: 5*60*1000,
method: 'GET', method: 'GET',
@ -484,10 +486,15 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
me.lookup('import_export').getStore().setData(data['import-export']); me.lookup('import_export').getStore().setData(data['import-export']);
me.lookup('drives').getStore().setData(data.drive); me.lookup('drives').getStore().setData(data.drive);
Proxmox.Utils.setErrorMask(view); if (!use_cache) {
Proxmox.Utils.setErrorMask(view);
}
Proxmox.Utils.setErrorMask(me.lookup('content'));
} catch (err) { } catch (err) {
Proxmox.Utils.setErrorMask(view); if (!use_cache) {
Proxmox.Utils.setErrorMask(me.lookup('content'), err); Proxmox.Utils.setErrorMask(view);
}
Proxmox.Utils.setErrorMask(me.lookup('content'), err.toString());
} }
}, },