public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: Fabian Ebner <f.ebner@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH v3 manager 1/4] ui: lxc/qemu: add disk reassign and action submenu
Date: Mon, 14 Mar 2022 09:19:46 +0100	[thread overview]
Message-ID: <00ab1f62-2a8d-bd69-8d1e-8a4be2949a8a@proxmox.com> (raw)
In-Reply-To: <8b358d90-509b-53aa-d0f2-5d1d2a7d9845@proxmox.com>



On 3/14/22 09:18, Fabian Ebner wrote:
> Am 11.03.22 um 15:38 schrieb Aaron Lauterer:
>> On 3/10/22 11:49, Fabian Ebner wrote:
>>> Am 07.03.22 um 11:07 schrieb Aaron Lauterer:
>>>> +    cbindData: function() {
>>>> +    let me = this;
>>>> +    return {
>>>> +        vmid: me.vmid,
>>>> +        disk: me.disk,
>>>> +        isQemu: me.type === 'qemu',
>>>> +        nodename: me.nodename,
>>>> +        url: `/nodes/${me.nodename}/${me.type}/${me.vmid}/`,
>>>> +    };
>>>> +    },
>>>> +
>>>> +    cbind: {
>>>> +    title: get => get('isQemu') ? gettext('Reassign disk') :
>>>> gettext('Reassign volume'),
>>>> +    submitText: get => get('title'),
>>>> +    qemu: '{isQemu}',
>>>> +    url: '{url}',
>>>> +    },
>>>> +
>>>> +    submitUrl: function(url, values) {
>>>> +    url += this.qemu ? 'move_disk' : 'move_volume';
>>>
>>> Why not already construct the full URL above?
>>
>> I'll see how to do that. First tests show that if I construct the
>> submitUrl directly, I need to set the 'url' at some point, even if not
>> used because the edit window does check its existence.
>>
> 
> Sorry, by "above" I meant in the cbindData function, not directly above.

Yeah. In the meantime I found out, that I can also just use the `url` as it will be used if there is no `submitUrl`.




  reply	other threads:[~2022-03-14  8:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 10:07 [pve-devel] [PATCH v3 manager 0/4] ui: lxc/qemu: add reassign for disks and volumes Aaron Lauterer
2022-03-07 10:07 ` [pve-devel] [PATCH v3 manager 1/4] ui: lxc/qemu: add disk reassign and action submenu Aaron Lauterer
2022-03-10 10:49   ` Fabian Ebner
2022-03-11 14:38     ` Aaron Lauterer
2022-03-14  8:18       ` Fabian Ebner
2022-03-14  8:19         ` Aaron Lauterer [this message]
2022-03-07 10:07 ` [pve-devel] [PATCH v3 manager 2/4] ui: lxc/qemu: disk/volume action simplify menu items Aaron Lauterer
2022-03-07 10:07 ` [pve-devel] [PATCH v3 manager 3/4] ui: BusTypeSelector: change noVirtIO to withVirtIO Aaron Lauterer
2022-03-10 11:24   ` Fabian Ebner
2022-03-07 10:07 ` [pve-devel] [PATCH v3 manager 4/4] ui: hdmove: modernize/refactor Aaron Lauterer
2022-03-10 11:19   ` Fabian Ebner

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=00ab1f62-2a8d-bd69-8d1e-8a4be2949a8a@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=f.ebner@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