mirror of https://github.com/apache/cloudstack.git
CS-15927:Filter to hide the autoscale VM's through a Regular expression for a load balancer Rule
This commit is contained in:
parent
ce8fe90aae
commit
b8bb6f483e
|
|
@ -2359,12 +2359,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','Expunging']) == -1;
|
||||
var notExisting = !$.grep(itemData, function(item) {
|
||||
return item.id == instance.id;
|
||||
}).length;
|
||||
|
||||
return isActiveState && notExisting;
|
||||
return nonAutoScale && isActiveState && notExisting;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue