mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-16 11:04:41 +00:00
parser: perform mountpoint classification
This commit is contained in:
parent
851bd43cc2
commit
ae8a861e5b
@ -307,6 +307,16 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
return;
|
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;
|
return res;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -314,7 +324,8 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
var drivestr = mp.file;
|
var drivestr = mp.file;
|
||||||
|
|
||||||
Ext.Object.each(mp, function(key, value) {
|
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
|
return; // continue
|
||||||
}
|
}
|
||||||
drivestr += ',' + key + '=' + value;
|
drivestr += ',' + key + '=' + value;
|
||||||
|
Loading…
Reference in New Issue
Block a user