[pve-devel] [PATCH] fix bug #690: add container content type to RBD storage, at content selector on GUI

Wolfgang Link w.link at proxmox.com
Mon Aug 24 15:06:26 CEST 2015


---
 www/manager/storage/RBDEdit.js | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/www/manager/storage/RBDEdit.js b/www/manager/storage/RBDEdit.js
index 0170ba4..66d91bc 100644
--- a/www/manager/storage/RBDEdit.js
+++ b/www/manager/storage/RBDEdit.js
@@ -6,7 +6,6 @@ Ext.define('PVE.storage.RBDInputPanel', {
 
 	if (me.create) {
 	    values.type = 'rbd';
-            values.content = 'images';
 
 	} else {
 	    delete values.storage;
@@ -65,8 +64,17 @@ 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
 	    }
-	];
+    	];
 
 	if (me.create || me.storageId !== 'local') {
 	    me.column2.unshift({
@@ -117,6 +125,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