mirror of https://github.com/apache/cloudstack.git
CS-15927:Filter to hide the autoscale VM's through a Regular expression Reviewed-By Brian
This commit is contained in:
parent
4b4d4555f3
commit
a38704902e
|
|
@ -2204,12 +2204,20 @@
|
|||
data.listvirtualmachinesresponse.virtualmachine ?
|
||||
data.listvirtualmachinesresponse.virtualmachine : [],
|
||||
function(instance) {
|
||||
// Hiding the AutoScale VMs
|
||||
var nonAutoScale=0;
|
||||
if( instance.name.match(/AutoScale-LB-/)==null)
|
||||
nonAutoScale =1;
|
||||
else {
|
||||
if(instance.name.match(/AutoScale-LB-/).length)
|
||||
nonAutoScale =0;
|
||||
}
|
||||
var isActiveState = $.inArray(instance.state, ['Destroyed']) == -1;
|
||||
var notExisting = !$.grep(itemData, function(item) {
|
||||
return item.id == instance.id;
|
||||
}).length;
|
||||
}).length;
|
||||
|
||||
return isActiveState && notExisting;
|
||||
return nonAutoScale && isActiveState && notExisting ;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue