cloudstack UI - advanced search on project page - add domain dropdown, account 
text field.


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

Branch: refs/heads/javelin
Commit: 1a7dbdc8d963524d3da4ed183b20f277d4e40f4d
Parents: c0c0ae1
Author: Jessica Wang <[email protected]>
Authored: Thu Oct 4 14:20:15 2012 -0700
Committer: Jessica Wang <[email protected]>
Committed: Thu Oct 4 14:23:24 2012 -0700

----------------------------------------------------------------------
 ui/scripts/projects.js |   41 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 40 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a7dbdc8/ui/scripts/projects.js
----------------------------------------------------------------------
diff --git a/ui/scripts/projects.js b/ui/scripts/projects.js
index 8280cf0..ff47ac8 100644
--- a/ui/scripts/projects.js
+++ b/ui/scripts/projects.js
@@ -646,7 +646,46 @@
                                                                        }
                                                                });
                                                        }                       
                        
-                                               },                              
                                        
+                                               },      
+            domainid: {                                        
+                                                       label: 'Domain',        
                                
+                                                       select: function(args) {
+                                                               $.ajax({
+                                                                       url: 
createURL('listDomains'),
+                                                                       data: { 
+                                                                               
listAll: true,
+                                                                               
details: 'min'
+                                                                       },
+                                                                       
success: function(json) {
+                                                                               
var array1 = [{id: '', description: ''}];
+                                                                               
var domains = json.listdomainsresponse.domain;
+                                                                               
if(domains != null && domains.length > 0) {
+                                                                               
        for(var i = 0; i < domains.length; i++) {
+                                                                               
                array1.push({id: domains[i].id, description: domains[i].path});
+                                                                               
        }
+                                                                               
}
+                                                                               
args.response.success({
+                                                                               
        data: array1
+                                                                               
});
+                                                                       }
+                                                               });
+                                                       },
+                                                       isHidden: 
function(args) {
+                                                               if(isAdmin() || 
isDomainAdmin())
+                                                                       return 
false;
+                                                               else
+                                                                       return 
true;
+                                                       }
+                                               },              
+                                               account: { 
+                                                       label: 'Account',
+                                                       isHidden: 
function(args) {
+                                                               if(isAdmin() || 
isDomainAdmin())
+                                                                       return 
false;
+                                                               else
+                                                                       return 
true;
+                                                       }                       
+                                               },                              
                
                                                tagKey: { label: 'Tag Key' },
                                                tagValue: { label: 'Tag Value' 
}                                                
                                        },

Reply via email to