all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ui: resourcetree: move guest position on template creation
@ 2021-10-01 12:37 Dominik Csapak
  0 siblings, 0 replies; only message in thread
From: Dominik Csapak @ 2021-10-01 12:37 UTC (permalink / raw)
  To: pve-devel

we sort templates at the end normally, but if we convert a guest to a
template, it was not moved in the tree

this marks the guest to be moved if the template status changes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/tree/ResourceTree.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
index 3b883d23..2bbaca00 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -262,6 +262,10 @@ Ext.define('PVE.tree.ResourceTree', {
 			moved = true;
 		    }
 
+		    if (!moved && item.data.template !== olditem.data.node) {
+			moved = true;
+		    }
+
 		    // tree item has been updated
 		    for (const field of ['text', 'running', 'template', 'status', 'qmpstatus', 'hastate', 'lock']) {
 			if (item.data[field] !== olditem.data[field]) {
-- 
2.30.2





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-01 12:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 12:37 [pve-devel] [PATCH manager] ui: resourcetree: move guest position on template creation Dominik Csapak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal