Commit Graph

7 Commits

Author SHA1 Message Date
Thomas Lamprecht
bdc157f8f4 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
8f6397a2a3 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
ad3809d629 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
f6710aac38 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
34c61eaf4b 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
58b35f745b move TemplateMenu to menu directory
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-21 15:54:32 +01:00
Thomas Lamprecht
e488f98182 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