Commit d571c487 by Kálmán Viktor

dashboard: fix vm order in ajax search index

parent a0c4edae
...@@ -249,13 +249,17 @@ function generateVmHTML(pk, name, host, icon, _status, fav) { ...@@ -249,13 +249,17 @@ function generateVmHTML(pk, name, host, icon, _status, fav) {
'</a>'; '</a>';
} }
/* copare vm-s by fav, pk order */
function compareVmByFav(a, b) { function compareVmByFav(a, b) {
if(a.fav && b.fav) { if(a.fav && b.fav) {
return a.pk < b.pk ? -1 : 1; return a.pk < b.pk ? -1 : 1;
} }
if(a.fav) { else if(a.fav && !b.fav) {
return -1; return -1;
} }
else if(!a.fav && b.fav) {
return 1;
}
else else
return a.pk < b.pk ? -1 : 1; return a.pk < b.pk ? -1 : 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment