You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/01/16 00:55:10 UTC
[39/43] git commit: CLOUDSTACK-978:TypeError: instance.displayname is
undefined while adding VM's to the LB rule
CLOUDSTACK-978:TypeError: instance.displayname is undefined while adding VM's to the LB rule
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/8d0091d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/8d0091d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/8d0091d7
Branch: refs/heads/api_limit
Commit: 8d0091d7e2e9b01df3af8deec14246f9eac1418e
Parents: bfd02c5
Author: Pranav Saxena <pr...@citrix.com>
Authored: Tue Jan 15 21:12:10 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Tue Jan 15 21:12:10 2013 +0530
----------------------------------------------------------------------
ui/scripts/network.js | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d0091d7/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 4103c3e..f3308bb 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1259,12 +1259,16 @@
data.listvirtualmachinesresponse.virtualmachine : [],
function(instance) {
var nonAutoScale=0;
+ if(instance.displayname == null)
+ nonAutoScale = 1;
+ else{
if( instance.displayname.match(/AutoScale-LB-/)==null)
nonAutoScale =1;
else {
if(instance.displayname.match(/AutoScale-LB-/).length)
nonAutoScale =0;
}
+ }
var isActiveState= $.inArray(instance.state, ['Destroyed','Expunging']) == -1;
return nonAutoScale && isActiveState;
}
@@ -2623,12 +2627,16 @@
function(instance) {
//Hiding the autoScale VMs
var nonAutoScale =0;
+ if(instance.displayname == null)
+ nonAutoScale = 1
+ else {
if(instance.displayname.match(/AutoScale-LB-/) == null)
nonAutoScale = 1;
else {
if( instance.displayname.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;