controller: StorageEdit: check if 'maxfiles' could be looked up
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@proxmox.com>
This commit is contained in:
parent
bf855846f2
commit
cf64423cdd
@ -6,6 +6,9 @@ Ext.define('PVE.controller.StorageEdit', {
|
|||||||
change: function(field, value) {
|
change: function(field, value) {
|
||||||
var hasBackups = Ext.Array.contains(value, 'backup');
|
var hasBackups = Ext.Array.contains(value, 'backup');
|
||||||
var maxfiles = this.lookupReference('maxfiles');
|
var maxfiles = this.lookupReference('maxfiles');
|
||||||
|
if (!maxfiles) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!hasBackups) {
|
if (!hasBackups) {
|
||||||
// clear values which will never be submitted
|
// clear values which will never be submitted
|
||||||
|
Loading…
Reference in New Issue
Block a user