]> git.proxmox.com Git - pve-manager.git/commitdiff
parser: perform mountpoint classification
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 23 Feb 2016 14:00:19 +0000 (15:00 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 23 Feb 2016 15:34:16 +0000 (16:34 +0100)
www/manager/Parser.js

index 550e2aa635d7b3da5ac409a7f463ea90e8e238d9..68a6b70a772f0a7555a7579b0af92e0180b188ce 100644 (file)
@@ -307,6 +307,16 @@ Ext.define('PVE.Parser', { statics: {
            return;
        }
 
+       var m = res.file.match(/^([a-z][a-z0-9\-\_\.]*[a-z0-9]):/);
+       if (m) {
+           res.storage = m[1];
+           res.type = 'volume';
+       } else if (res.file.match(/^\/dev\//)) {
+           res.type = 'device';
+       } else {
+           res.type = 'bind';
+       }
+
        return res;
     },
 
@@ -314,7 +324,8 @@ Ext.define('PVE.Parser', { statics: {
        var drivestr = mp.file;
 
        Ext.Object.each(mp, function(key, value) {
-           if (!Ext.isDefined(value) || key === 'file') {
+           if (!Ext.isDefined(value) || key === 'file' ||
+               key === 'type' || key === 'storage') {
                return; // continue
            }
            drivestr += ',' + key + '=' + value;