[pve-devel] [PATCH manager 4/4] gui: settings: Add recursive search default

Dominic Jäger d.jaeger at proxmox.com
Thu Apr 2 13:34:14 CEST 2020


Add a radiobox to the settings to control if search should be done recursively
as default or not. Set to no recursion as default.

Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
---
This did not exist in RFC

 www/manager6/storage/ContentView.js |  2 +-
 www/manager6/window/Settings.js     | 38 +++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js
index 5c6f1418..fb87f5e6 100644
--- a/www/manager6/storage/ContentView.js
+++ b/www/manager6/storage/ContentView.js
@@ -587,7 +587,7 @@ Ext.define('PVE.storage.ContentView', {
 		    fieldLabel: gettext('Recursive'),
 		    labelWidth: 65,
 		    name : 'recursive',
-		    checked: false,
+		    checked: me.sp.get('recursive-search'),
 		    listeners: {
 			change: function(box, value) {
 			    me.store.proxy.url = me.store.proxy.url.replace(
diff --git a/www/manager6/window/Settings.js b/www/manager6/window/Settings.js
index 2fa01ef0..af708898 100644
--- a/www/manager6/window/Settings.js
+++ b/www/manager6/window/Settings.js
@@ -41,6 +41,9 @@ Ext.define('PVE.window.Settings', {
 	    if (vncMode !== undefined) {
 		me.lookupReference('noVNCScalingGroup').setValue({ noVNCScalingField: vncMode });
 	    }
+	    var spSearchValue = sp.get('recursive-search');
+	    me.lookupReference('recursiveSearchGroup').setValue({
+		recursiveSearchField: spSearchValue });
 
 	    let summarycolumns = sp.get('summarycolumns', 'auto');
 	    me.lookup('summarycolumns').setValue(summarycolumns);
@@ -428,6 +431,41 @@ Ext.define('PVE.window.Settings', {
 			},
 		    },
 		]
+	    },{
+		xtype: 'fieldset',
+		title: gettext('Storage Settings'),
+		items: [
+		    {
+			xtype: 'radiogroup',
+			fieldLabel: gettext('Recursive Search'),
+			reference: 'recursiveSearchGroup',
+			height: '15px', // renders faster with value assigned
+			layout: {
+			    type: 'hbox',
+			},
+			items: [
+			    {
+				xtype: 'radiofield',
+				name: 'recursiveSearchField',
+				inputValue: 1,
+				boxLabel: gettext('On'),
+			    },{
+				xtype: 'radiofield',
+				name: 'recursiveSearchField',
+				inputValue: 0,
+				boxLabel: gettext('Off'),
+				margin: '0 0 0 10',
+				checked: true,
+			    }
+			],
+			listeners: {
+			    change: function(el, newValue, undefined) {
+				var sp = Ext.state.Manager.getProvider();
+				sp.set('recursive-search', newValue.recursiveSearchField);
+			    }
+			},
+		    },
+		]
 	    },
 	]
     }],
-- 
2.20.1




More information about the pve-devel mailing list