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

Fabian Ebner f.ebner at proxmox.com
Mon Mar 14 09:18:27 CET 2022


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.





More information about the pve-devel mailing list