[pve-devel] [PATCH manager] ui: NodeSelector: check status field for offline nodes
Dominik Csapak
d.csapak at proxmox.com
Wed May 8 11:12:23 CEST 2019
the memory stat is not available if the user has no audit privilges on
/nodes/NODENAME but the status is always available
also it makes simple more sense to check if it is online not only if the
memory value is there
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/form/NodeSelector.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/manager6/form/NodeSelector.js b/www/manager6/form/NodeSelector.js
index 3cd7835f..76a55f24 100644
--- a/www/manager6/form/NodeSelector.js
+++ b/www/manager6/form/NodeSelector.js
@@ -74,7 +74,7 @@ Ext.define('PVE.form.NodeSelector', {
Ext.Array.each(value.split(/\s*,\s*/), function(node) {
var rec = me.store.findRecord(me.valueField, node);
- if (!(rec && rec.data) || !Ext.isNumeric(rec.data.mem)) {
+ if (!(rec && rec.data) || rec.data.status !== 'online') {
offline.push(node);
} else if (me.allowedNodes && !Ext.Array.contains(me.allowedNodes, node)) {
notAllowed.push(node);
--
2.11.0
More information about the pve-devel
mailing list