]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/Utils.js
storage content GUI: improve detection of backup volumes
[pve-manager.git] / www / manager6 / Utils.js
index 68edc27559c6a52b4f7d55504726b67b8b41b178..f681d01dacb4db103578ab4d37a779a5b958bff9 100644 (file)
@@ -545,6 +545,14 @@ Ext.define('PVE.Utils', { utilities: {
        'snippets': gettext('Snippets')
     },
 
+    volume_is_qemu_backup: function(volid, format) {
+       return format === 'pbs-vm' || volid.match(':backup/vzdump-qemu-');
+    },
+
+    volume_is_lxc_backup: function(volid, format) {
+       return format === 'pbs-ct' || volid.match(':backup/vzdump-(lxc|openvz)-');
+    },
+
     storageSchema: {
        dir: {
            name: Proxmox.Utils.directoryText,
@@ -661,7 +669,7 @@ Ext.define('PVE.Utils', { utilities: {
                Ext.String.leftPad(data.channel,2, '0') +
                " ID " + data.id + " LUN " + data.lun;
        }
-       return data.volid.replace(/^.*:(.*\/)?/,'');
+       return data.volid.replace(/^.*?:(.*?\/)?/,'');
     },
 
     render_serverity: function (value) {
@@ -1337,4 +1345,3 @@ Ext.define('PVE.Utils', { utilities: {
     }
 
 });
-