[pve-devel] [PATCH manager 2/5 v2] GUI: Utils: Helpers for backup type and icon
Matthias Heiserer
m.heiserer at proxmox.com
Fri Mar 18 14:52:23 CET 2022
Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---
changes from v1:
add "backup" to name
return empty string instead of throwing
www/manager6/Utils.js | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index aafe359a..337ccfae 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -1803,6 +1803,26 @@ Ext.define('PVE.Utils', {
return undefined;
},
+
+ get_backup_type_icon_cls: function(volid, format) {
+ var cls = '';
+ if (PVE.Utils.volume_is_qemu_backup(volid, format)) {
+ cls = 'fa-desktop';
+ } else if (PVE.Utils.volume_is_lxc_backup(volid, format)) {
+ cls = 'fa-cube';
+ }
+ return cls;
+ },
+
+ get_backup_type: function(volid, format) {
+ if (PVE.Utils.volume_is_qemu_backup(volid, format)) {
+ return 'qemu';
+ } else if (PVE.Utils.volume_is_lxc_backup(volid, format)) {
+ return 'lxc';
+ } else {
+ return '';
+ }
+ },
},
singleton: true,
--
2.30.2
More information about the pve-devel
mailing list