[pve-devel] [PATCH manager 3/3] show nodeselector errors only if a node is selected

Dominik Csapak d.csapak at proxmox.com
Wed Feb 15 15:00:24 CET 2017


otherwise we get the error:

'Node seems to be offline'

if we do not have a node selected

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/form/NodeSelector.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/manager6/form/NodeSelector.js b/www/manager6/form/NodeSelector.js
index 6bbb0e2..0cc60bf 100644
--- a/www/manager6/form/NodeSelector.js
+++ b/www/manager6/form/NodeSelector.js
@@ -81,11 +81,11 @@ Ext.define('PVE.form.NodeSelector', {
 	    }
 	});
 
-	if (notAllowed.length !== 0) {
+	if (value && notAllowed.length !== 0) {
 	    return "Node " + notAllowed.join(', ') + " is not allowed for this action!";
 	}
 
-	if (offline.length !== 0) {
+	if (value && offline.length !== 0) {
 	    return "Node " + offline.join(', ') + " seems to be offline!";
 	}
 	return true;
-- 
2.1.4





More information about the pve-devel mailing list