Skip to content

Commit 8d0091d

Browse files
committed
CLOUDSTACK-978:TypeError: instance.displayname is undefined while adding VM's to the LB rule
1 parent bfd02c5 commit 8d0091d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎ui/scripts/network.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,12 +1259,16 @@
12591259
data.listvirtualmachinesresponse.virtualmachine : [],
12601260
function(instance) {
12611261
var nonAutoScale=0;
1262+
if(instance.displayname == null)
1263+
nonAutoScale = 1;
1264+
else{
12621265
if( instance.displayname.match(/AutoScale-LB-/)==null)
12631266
nonAutoScale =1;
12641267
else {
12651268
if(instance.displayname.match(/AutoScale-LB-/).length)
12661269
nonAutoScale =0;
12671270
}
1271+
}
12681272
var isActiveState= $.inArray(instance.state, ['Destroyed','Expunging']) == -1;
12691273
return nonAutoScale && isActiveState;
12701274
}
@@ -2623,12 +2627,16 @@
26232627
function(instance) {
26242628
//Hiding the autoScale VMs
26252629
var nonAutoScale =0;
2630+
if(instance.displayname == null)
2631+
nonAutoScale = 1
2632+
else {
26262633
if(instance.displayname.match(/AutoScale-LB-/) == null)
26272634
nonAutoScale = 1;
26282635
else {
26292636
if( instance.displayname.match(/AutoScale-LB-/).length)
26302637
nonAutoScale =0;
2631-
}
2638+
}
2639+
}
26322640
var isActiveState = $.inArray(instance.state, ['Destroyed','Expunging']) == -1;
26332641
var notExisting = !$.grep(itemData, function(item) {
26342642
return item.id == instance.id;

0 commit comments

Comments
 (0)