[pve-devel] [PATCH manager v2 3/4] controller: StorageEdit: check if 'maxfiles' could be looked up

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Mar 27 14:19:45 CEST 2018


Allows to extend our, in the ext patch introduced, storage base class
to use the controller for all storage plugins without breaking those
which cannot host backups - i.e., all block based storages

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 www/manager6/controller/StorageEdit.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/manager6/controller/StorageEdit.js b/www/manager6/controller/StorageEdit.js
index fc090046..a10c8fc9 100644
--- a/www/manager6/controller/StorageEdit.js
+++ b/www/manager6/controller/StorageEdit.js
@@ -6,6 +6,9 @@ Ext.define('PVE.controller.StorageEdit', {
 	    change: function(field, value) {
 		var hasBackups = Ext.Array.contains(value, 'backup');
 		var maxfiles = this.lookupReference('maxfiles');
+		if (!maxfiles) {
+		    return;
+		}
 
 		if (!hasBackups) {
 		// clear values which will never be submitted
-- 
2.14.2





More information about the pve-devel mailing list