[pve-devel] [PATCH_V2] Extent ZFSPool Content with rootdir

Wolfgang Link w.link at proxmox.com
Fri Jul 24 13:38:21 CEST 2015


---
 www/manager/storage/ZFSPoolEdit.js | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/www/manager/storage/ZFSPoolEdit.js b/www/manager/storage/ZFSPoolEdit.js
index b0a17b2..9ad1284 100644
--- a/www/manager/storage/ZFSPoolEdit.js
+++ b/www/manager/storage/ZFSPoolEdit.js
@@ -49,7 +49,6 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', {
 
 	if (me.create) {
 	    values.type = 'zfspool';
-	    values.content = 'images';
 	} else {
 	    delete values.storage;
 	}
@@ -91,6 +90,15 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', {
 	    }));
 	}
 
+	me.column1.push(
+	    {xtype: 'pveContentTypeSelector',
+	     cts: ['images', 'rootdir'],
+	     fieldLabel: gettext('Content'),
+	     name: 'content',
+	     value: ['images', 'rootdir'],
+	     multiSelect: true,
+	     allowBlank: false});
+
 	me.column2 = [
 	    {
 		xtype: 'pvecheckbox',
@@ -146,7 +154,7 @@ Ext.define('PVE.storage.ZFSPoolEdit', {
 	});
 
 	Ext.apply(me, {
-            subject: 'ZFS Storage',
+            subject: PVE.Utils.format_storage_type('ZFS Storage'),
 	    isAdd: true,
 	    items: [ ipanel ]
 	});
@@ -157,7 +165,11 @@ Ext.define('PVE.storage.ZFSPoolEdit', {
             me.load({
                 success:  function(response, options) {
                     var values = response.result.data;
-                    if (values.nodes) {
+		    var ctypes = values.content || '';
+
+		    values.content = ctypes.split(',');
+
+		    if (values.nodes) {
                         values.nodes = values.nodes.split(',');
                     }
                     values.enable = values.disable ? 0 : 1;
-- 
2.1.4





More information about the pve-devel mailing list