show nodeselector errors only if a node is selected

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@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-02-15 15:00:24 +01:00 committed by Dietmar Maurer
parent bde1efbf66
commit 09101cdd74

View File

@ -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;