7 Commits

Author SHA1 Message Date
Thomas Lamprecht
19a9b4968b ui: menu/item: eslint fixes and code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 10:00:57 +02:00
Thomas Lamprecht
c7404421bb ui: menu/template: hide clone/migrate button if not possible
Depending on permissions and cluster state those action may not make
sense to be shown.

This streamlines behavior with the one we already have for
non-templates.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 10:00:40 +02:00
Thomas Lamprecht
182f56af30 ui: menu/template: eslint fixes and code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 10:00:40 +02:00
Thomas Lamprecht
9beb47513e ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Dominik Csapak
6d7dc5aced adapt and rescope TemplateMenu for containers
make it guest agnostic so that we can use it for lxc also

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-21 15:54:32 +01:00
Dominik Csapak
0eab34b9fb move TemplateMenu to menu directory
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-21 15:54:32 +01:00
Thomas Lamprecht
eced532cf0 ui: add PVE.menu.Item
Extend 'Ext.menu.Item' with a simplified handler logic also used in
'PVE.button.Button'.

If 'confirmMsg' config is set we wrap the defined handler in a
confirm dialog, useful if the menu item just makes an API call and
does not has an own (edit) window shown.

In contrast to the 'pveButton' we do not have a selection model,
enable function and the respective logic here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-19 09:24:46 +02:00