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 committed 2022-05-13 12:20:29 +02:00
1 parent 87be232d1c
commit 9dde8cd625
2 files changed
+47 -1

No files matched your search

+13
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;
}
},
});