[pve-devel] [PATCH] Add possibillity to distinguish container and vm on RBD Storage.

Wolfgang Link w.link at proxmox.com
Tue Aug 25 09:47:34 CEST 2015


this is necessary because we use image files for both.
---
 www/manager/lxc/CreateWizard.js |  2 +-
 www/manager/storage/RBDEdit.js  | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/www/manager/lxc/CreateWizard.js b/www/manager/lxc/CreateWizard.js
index 77df991..9c544ac 100644
--- a/www/manager/lxc/CreateWizard.js
+++ b/www/manager/lxc/CreateWizard.js
@@ -18,7 +18,7 @@ Ext.define('PVE.lxc.CreateWizard', {
 	var storagesel = Ext.create('PVE.form.StorageSelector', {
 	    name: 'storage',
 	    fieldLabel: gettext('Storage'),
-	    storageContent: 'images,rootdir',
+	    storageContent: 'images',
 	    autoSelect: true,
 	    allowBlank: false
 	});
diff --git a/www/manager/storage/RBDEdit.js b/www/manager/storage/RBDEdit.js
index 0170ba4..8f1abf2 100644
--- a/www/manager/storage/RBDEdit.js
+++ b/www/manager/storage/RBDEdit.js
@@ -65,6 +65,15 @@ Ext.define('PVE.storage.RBDInputPanel', {
 		checked: true,
 		uncheckedValue: 0,
 		fieldLabel: gettext('Enable')
+	    },
+	    {
+		xtype: 'pveContentTypeSelector',
+		cts: ['images', 'rootdir'],
+		fieldLabel: gettext('Content'),
+		name: 'content',
+		value: ['images', 'rootdir'],
+		multiSelect: true,
+		allowBlank: false
 	    }
 	];
 
@@ -117,6 +126,11 @@ Ext.define('PVE.storage.RBDEdit', {
             me.load({
                 success:  function(response, options) {
                     var values = response.result.data;
+
+		    var ctypes = values.content || '';
+
+		    values.content = ctypes.split(',');
+
                     if (values.nodes) {
                         values.nodes = values.nodes.split(',');
                     }
-- 
2.1.4





More information about the pve-devel mailing list