public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager] ui: hide bulk migrate options on standalone nodes
Date: Sun, 12 Nov 2023 18:12:11 +0100	[thread overview]
Message-ID: <a828f656-168c-4357-8793-041d713ce1d3@proxmox.com> (raw)
In-Reply-To: <20231110100553.2426835-1-d.csapak@proxmox.com>

Am 10/11/2023 um 11:05 schrieb Dominik Csapak:
> since there is nowhere to migrate to and we hide the regular migrate
> buttons/options too.
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  www/manager6/node/CmdMenu.js | 5 +++++
>  www/manager6/node/Config.js  | 2 ++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/www/manager6/node/CmdMenu.js b/www/manager6/node/CmdMenu.js
> index dc56ef08..f5f9fae3 100644
> --- a/www/manager6/node/CmdMenu.js
> +++ b/www/manager6/node/CmdMenu.js
> @@ -139,5 +139,10 @@ Ext.define('PVE.node.CmdMenu', {
>  	if (me.pveSelNode.data.running) {
>  	    me.getComponent('wakeonlan').setDisabled(true);
>  	}
> +
> +	let standalone = PVE.data.ResourceStore.getNodes().length < 2;

We have that quite a few times already, sometimes also the negation,
i.e., length > 1.

let's move this into a helper, while I do not like it existence PVE.Utils
could be OK for here (I mean, what isn't a util...) but maybe you got a
better idea.




      reply	other threads:[~2023-11-12 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10 10:05 Dominik Csapak
2023-11-12 17:12 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a828f656-168c-4357-8793-041d713ce1d3@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal