ui: sync: add reduced max-depth selector

that allows setting the limit based on sync namespace prefix lengths.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2022-05-13 11:55:54 +02:00
parent 87be232d1c
commit 9dde8cd625
2 changed files with 47 additions and 1 deletions

View File

@ -31,3 +31,16 @@ Ext.define('PBS.form.NamespaceMaxDepth', {
},
});
Ext.define('PBS.form.NamespaceMaxDepthReduced', {
extend: 'PBS.form.NamespaceMaxDepth',
alias: 'widget.pbsNamespaceMaxDepthReduced',
setLimit: function(maxPrefixLength) {
let me = this;
if (maxPrefixLength !== undefined) {
me.maxValue = 7-maxPrefixLength;
} else {
me.maxValue = 7;
}
},
});