[pve-devel] [PATCH v3 manager 1/4] ui: lxc/qemu: add disk reassign and action submenu

Aaron Lauterer a.lauterer at proxmox.com
Mon Mar 14 09:19:46 CET 2022



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`.





More information about the pve-devel mailing list