CLOUDSTACK-2074: cloudstack UI - Affinity - Affinity Groups page - remove 
"Instances" tab that has been replaced with "View Instances" drilldown in 
Details tab.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f548ce4f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f548ce4f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f548ce4f

Branch: refs/heads/master
Commit: f548ce4fad95ee7e03357143b419261d6688b9a9
Parents: ea2a43e
Author: Jessica Wang <jessica.w...@citrix.com>
Authored: Thu Apr 18 17:52:20 2013 -0700
Committer: Jessica Wang <jessica.w...@citrix.com>
Committed: Thu Apr 18 17:52:20 2013 -0700

----------------------------------------------------------------------
 ui/scripts/affinity.js |   59 +------------------------------------------
 1 files changed, 1 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f548ce4f/ui/scripts/affinity.js
----------------------------------------------------------------------
diff --git a/ui/scripts/affinity.js b/ui/scripts/affinity.js
index e6e8e34..a9c6695 100644
--- a/ui/scripts/affinity.js
+++ b/ui/scripts/affinity.js
@@ -175,64 +175,7 @@
                                                                }
                                                        });                   
             }
-          },
-                                                                               
-                                       /**
-           * VMs tab
-           */
-          vms: {
-            title: 'label.instances',
-            multiple: true,
-            fields: [
-              {
-                id: { label: 'ID' },
-                displayname: { label: 'label.display.name' },
-                state: { label: 'label.state' }                                
                        
-              }
-            ],
-            dataProvider: function(args) {             
-                                                 var vmIds = 
args.context.affinityGroups[0].virtualmachineIds;
-                                                       if(vmIds == null || 
vmIds.length == 0) {
-                                                         
args.response.success({data: null});          
-                                                         return;
-                                                       }
-                                               
-              $.ajax({
-                                                         url: 
createURL('listVirtualMachines'),
-                                                               success: 
function(json) {                                                                
 
-                                                                       var 
firstPageVms = json.listvirtualmachinesresponse.virtualmachine;                 
                                                    
-                                                                       var 
items = [];                                                                 
-                                                                       
if(vmIds != null) {
-                                                                               
for(var i = 0; i < vmIds.length; i++) {                                         
                                  
-                                                                               
        var item = {id: vmIds[i]};      
-                      var matchFound = false;                                  
                                                
-                                                                               
        if(firstPageVms != null) {
-                                                                               
          for(var k = 0; k < firstPageVms.length; k++) {
-                                                                               
                  if(firstPageVms[k].id == vmIds[i]) {
-                                                                               
                          matchFound = true;
-                                                                               
                          item = firstPageVms[k];
-                                                                               
                                break; //break for looup
-                                                                               
                        }
-                                                                               
                }
-                                                                               
        }               
-                      if(matchFound == false) { //the VM is not in API 
response of "listVirtualMachines&page=1&pagesize=500"
-                        $.ajax({
-                                                                               
                  url: createURL('listVirtualMachines'),
-                                                                               
                        async: false,
-                                                                               
                        data: {id: vmIds[i]},
-                                                                         
success: function(json) {     
-                                                                               
                          item = 
json.listvirtualmachinesresponse.virtualmachine[0];                             
                                                                               
-                                                                               
                        }
-                                                                               
                });
-                      }                                                        
                                
-                                                                               
        items.push(item);                                                       
          
-                                                                               
}
-                                                                       }       
                                                                                
        
-                                                                       
args.response.success({data: items});                                           
                                                                                
        
-                                                               }
-                                                       });                     
                  
-            }
-          }                                    
+          }            
         }
       }
     }

Reply via email to