mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-16 01:12:30 +00:00
sort templates after regular VMs
This commit is contained in:
parent
63f9d5119f
commit
13fd499cb6
@ -45,7 +45,13 @@ Ext.define('PVE.tree.ResourceTree', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// numeric compare for VM IDs
|
// numeric compare for VM IDs
|
||||||
|
// sort templates after regular VMs
|
||||||
if (v1 === 'qemu' || v1 === 'openvz') {
|
if (v1 === 'qemu' || v1 === 'openvz') {
|
||||||
|
if (n1.template && !n2.template) {
|
||||||
|
return 1;
|
||||||
|
} else if (n2.template && !n1.template) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
v1 = n1.vmid;
|
v1 = n1.vmid;
|
||||||
v2 = n2.vmid;
|
v2 = n2.vmid;
|
||||||
if ((tcmp = v1 > v2 ? 1 : (v1 < v2 ? -1 : 0)) != 0) {
|
if ((tcmp = v1 > v2 ? 1 : (v1 < v2 ? -1 : 0)) != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user