mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-06-04 09:19:31 +00:00
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
538ebe4a84
commit
97ec0d0716
@ -7,6 +7,9 @@ Ext.define('PVE.form.NodeSelector', {
|
|||||||
|
|
||||||
selectCurNode: false,
|
selectCurNode: false,
|
||||||
|
|
||||||
|
// do not allow those nodes (array)
|
||||||
|
disallowedNodes: undefined,
|
||||||
|
|
||||||
// only allow those nodes (array)
|
// only allow those nodes (array)
|
||||||
allowedNodes: undefined,
|
allowedNodes: undefined,
|
||||||
// set default value to empty array, else it inits it with
|
// set default value to empty array, else it inits it with
|
||||||
@ -97,5 +100,13 @@ Ext.define('PVE.form.NodeSelector', {
|
|||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
me.getStore().load();
|
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…
Reference in New Issue
Block a user