public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, Aaron Lauterer <a.lauterer@proxmox.com>
Subject: Re: [pve-devel] [PATCH v6 manager 2/5] ui: utils: add nextFreeMP
Date: Thu, 7 Apr 2022 14:30:03 +0200	[thread overview]
Message-ID: <76182e3b-c05a-c282-1aa1-89d2f293ac25@proxmox.com> (raw)
In-Reply-To: <20220405123016.2911726-3-a.lauterer@proxmox.com>

Am 05.04.22 um 14:30 schrieb Aaron Lauterer:
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>  www/manager6/Utils.js | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index 3351e53b..fe5be283 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -1800,6 +1800,21 @@ Ext.define('PVE.Utils', {
>  
>  	return undefined;
>      },
> +
> +    nextFreeMP: function(type, config) {
> +	for (let i = 0; i < PVE.Utils.mp_counts[type]; i++) {
> +	    let confid = `${type}${i}`;
> +	    if (!Ext.isDefined(config[confid])) {
> +		return {
> +		    type,
> +		    id: i,
> +		    confid,
> +		};
> +	    }
> +	}
> +
> +	return undefined;
> +    },

Just noting that the getNextFreeDisk function in lxc/MultiMPEdit.js
could now re-use this.




  reply	other threads:[~2022-04-07 12:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 12:30 [pve-devel] [PATCH v6 manager 0/5] ui: lxc/qemu: disk/volume action simplify menu items Aaron Lauterer
2022-04-05 12:30 ` [pve-devel] [PATCH v6 manager 1/5] ui: utils: refactor mps to mp Aaron Lauterer
2022-04-05 12:30 ` [pve-devel] [PATCH v6 manager 2/5] ui: utils: add nextFreeMP Aaron Lauterer
2022-04-07 12:30   ` Fabian Ebner [this message]
2022-04-05 12:30 ` [pve-devel] [PATCH v6 manager 3/5] ui: lxc/qemu: add disk reassign and action submenu Aaron Lauterer
2022-04-07 12:23   ` Fabian Ebner
2022-04-05 12:30 ` [pve-devel] [PATCH v6 manager 4/5] ui: BusTypeSelector: change noVirtIO to withVirtIO Aaron Lauterer
2022-04-05 12:30 ` [pve-devel] [PATCH v6 manager 5/5] ui: hdmove: modernize/refactor Aaron Lauterer
2022-04-07 12:28 ` [pve-devel] [PATCH v6 manager 0/5] ui: lxc/qemu: disk/volume action simplify menu items Fabian Ebner
2022-04-11 10:06 ` [pve-devel] applied-series: " Thomas Lamprecht

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=76182e3b-c05a-c282-1aa1-89d2f293ac25@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=a.lauterer@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