NodeSelector: add disallowedNodes configuration property
This can be used to mask out some nodes from the node selector. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
a7c2cda748
commit
b6eb65687b
@ -7,6 +7,9 @@ Ext.define('PVE.form.NodeSelector', {
|
||||
|
||||
selectCurNode: false,
|
||||
|
||||
// do not allow those nodes (array)
|
||||
disallowedNodes: undefined,
|
||||
|
||||
// only allow those nodes (array)
|
||||
allowedNodes: undefined,
|
||||
// set default value to empty array, else it inits it with
|
||||
@ -97,5 +100,13 @@ Ext.define('PVE.form.NodeSelector', {
|
||||
|
||||
me.callParent();
|
||||
me.getStore().load();
|
||||
|
||||
// filter out disallowed nodes
|
||||
me.getStore().addFilter(new Ext.util.Filter({
|
||||
filterFn: function(item) {
|
||||
return !Ext.Array.contains(me.disallowedNodes, item.data.node);
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user