[pve-devel] [PATCH manager v2 2/3] Fix #1523: Display the Max Backups field only if relevant

Emmanuel Kasper e.kasper at proxmox.com
Tue Oct 31 15:52:10 CET 2017


Signed-off-by: Emmanuel Kasper <e.kasper at proxmox.com>
---
 www/manager6/storage/DirEdit.js       | 3 +++
 www/manager6/storage/GlusterFsEdit.js | 3 +++
 www/manager6/storage/NFSEdit.js       | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/www/manager6/storage/DirEdit.js b/www/manager6/storage/DirEdit.js
index cdfa6dda..4e196431 100644
--- a/www/manager6/storage/DirEdit.js
+++ b/www/manager6/storage/DirEdit.js
@@ -1,5 +1,6 @@
 Ext.define('PVE.storage.DirInputPanel', {
     extend: 'PVE.panel.InputPanel',
+    controller: 'storageEdit',
 
     onGetValues: function(values) {
 	var me = this;
@@ -63,7 +64,9 @@ Ext.define('PVE.storage.DirInputPanel', {
 	    {
 		xtype: 'pveIntegerField',
 		fieldLabel: gettext('Max Backups'),
+		disabled: true,
 		name: 'maxfiles',
+		reference: 'maxfiles',
 		minValue: 0,
 		maxValue: 365,
 		value: me.isCreate ? '1' : undefined,
diff --git a/www/manager6/storage/GlusterFsEdit.js b/www/manager6/storage/GlusterFsEdit.js
index 2cde74c3..d861c0b8 100644
--- a/www/manager6/storage/GlusterFsEdit.js
+++ b/www/manager6/storage/GlusterFsEdit.js
@@ -59,6 +59,7 @@ Ext.define('PVE.storage.GlusterFsScan', {
 
 Ext.define('PVE.storage.GlusterFsInputPanel', {
     extend: 'PVE.panel.InputPanel',
+    controller: 'storageEdit',
 
     onGetValues: function(values) {
 	var me = this;
@@ -149,7 +150,9 @@ Ext.define('PVE.storage.GlusterFsInputPanel', {
 	    {
 		xtype: 'pveIntegerField',
 		fieldLabel: gettext('Max Backups'),
+		disabled: true,
 		name: 'maxfiles',
+		reference: 'maxfiles',
 		minValue: 0,
 		maxValue: 365,
 		value: me.isCreate ? '1' : undefined,
diff --git a/www/manager6/storage/NFSEdit.js b/www/manager6/storage/NFSEdit.js
index e1f48e78..728a3ffd 100644
--- a/www/manager6/storage/NFSEdit.js
+++ b/www/manager6/storage/NFSEdit.js
@@ -59,6 +59,7 @@ Ext.define('PVE.storage.NFSScan', {
 
 Ext.define('PVE.storage.NFSInputPanel', {
     extend: 'PVE.panel.InputPanel',
+    controller: 'storageEdit',
 
     onGetValues: function(values) {
 	var me = this;
@@ -144,7 +145,9 @@ Ext.define('PVE.storage.NFSInputPanel', {
 	    {
 		xtype: 'pveIntegerField',
 		fieldLabel: gettext('Max Backups'),
+		disabled: true,
 		name: 'maxfiles',
+		reference: 'maxfiles',
 		minValue: 0,
 		maxValue: 365,
 		value: me.isCreate ? '1' : undefined,
-- 
2.11.0





More information about the pve-devel mailing list