[pve-devel] applied: [PATCH manager] fix #2334: gui/cloudinit: enable edit button only when editor is set
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Jan 9 17:43:35 CET 2020
On 1/9/20 9:59 AM, Dominik Csapak wrote:
> when a user does not have the right privileges for cloudinit (e.g.
> VM.Config.Network), we do not set an editor, which results in a button
> that does nothing when pressed
>
> fix this by enabling the button only when there is an editor set
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> www/manager6/qemu/CloudInit.js | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js
> index cb4742e5..cbb4af9d 100644
> --- a/www/manager6/qemu/CloudInit.js
> +++ b/www/manager6/qemu/CloudInit.js
> @@ -65,6 +65,10 @@ Ext.define('PVE.qemu.CloudInit', {
> {
> xtype: 'proxmoxButton',
> disabled: true,
> + enableFn: function(rec) {
> + let me = this.up('pveCiPanel');
> + return !!me.rows[rec.data.key].editor;
> + },
> handler: function() {
> var me = this.up('grid');
> me.run_editor();
>
applied, thanks!
More information about the pve-devel
mailing list