[pve-devel] [PATCH manager] ui: NodeSelector: check status field for offline nodes
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu May 9 18:32:13 CEST 2019
On 5/8/19 11:12 AM, Dominik Csapak wrote:
> the memory stat is not available if the user has no audit privilges on
> /nodes/NODENAME but the status is always available
but couldn't it be argued that this is desired behaviour?
Or is it out of consistency, as the node shows up all elsewhere or?
>
> 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);
>
More information about the pve-devel
mailing list