cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject [32/50] [abbrv] git commit: cloudstack UI - advanced search - add Tag Key field, Tag Value field in advanced search in volume page.
Date Wed, 17 Oct 2012 08:50:11 GMT
cloudstack UI - advanced search - add Tag Key field, Tag Value field in advanced search in
volume page.


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

Branch: refs/heads/regions
Commit: 3187bc6d30238cf481060acc045ab748fe943613
Parents: 2c6bc0e
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Mon Oct 1 16:57:01 2012 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Mon Oct 1 16:58:33 2012 -0700

----------------------------------------------------------------------
 ui/scripts/storage.js |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3187bc6d/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index dceaeb3..970eadc 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -73,7 +73,9 @@
 									}
 								});
 							}						
-						}
+						},
+						tagKey: { label: 'Tag Key' },
+						tagValue: { label: 'Tag Value' }						
 					},
 
           // List view actions
@@ -299,8 +301,12 @@
             var array1 = [];						
             if(args.filterBy != null) {					
 						  if(args.filterBy.advSearch != null && typeof(args.filterBy.advSearch) ==
"object") {
-							  for(var key in args.filterBy.advSearch) {
-								  if(args.filterBy.advSearch[key] != null && args.filterBy.advSearch[key].length
> 0)
+							  for(var key in args.filterBy.advSearch) {								  
+									if(key == 'tagKey')
+									  array1.push("&tags[0].key=" + args.filterBy.advSearch[key]);
+									else if(key == 'tagValue')
+									  array1.push("&tags[0].value=" + args.filterBy.advSearch[key]);			
+								  else if(args.filterBy.advSearch[key] != null && args.filterBy.advSearch[key].length
> 0)
 								    array1.push("&" + key + "=" + args.filterBy.advSearch[key]);
 								}
 							}						


Mime
View raw message