ui: tape: refactor renderDriveState to Utils
we will use this later again Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
8bf5769382
commit
9d5b426a6d
16
www/Utils.js
16
www/Utils.js
@ -603,6 +603,22 @@ Ext.define('PBS.Utils', {
|
||||
}).show();
|
||||
},
|
||||
|
||||
renderDriveState: function(value, md) {
|
||||
if (!value) {
|
||||
return gettext('Idle');
|
||||
}
|
||||
|
||||
let icon = '<i class="fa fa-spinner fa-pulse fa-fw"></i>';
|
||||
|
||||
if (value.startsWith("UPID")) {
|
||||
let upid = Proxmox.Utils.parse_task_upid(value);
|
||||
md.tdCls = "pointer";
|
||||
return `${icon} ${upid.desc}`;
|
||||
}
|
||||
|
||||
return `${icon} ${value}`;
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
Ext.define('PBS.Async', {
|
||||
|
Reference in New Issue
Block a user