You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2012/10/27 12:02:26 UTC

[24/49] git commit: CS-16573: cloudstack UI - Alerts page - basic search - encode data passed to API call.

CS-16573: cloudstack UI - Alerts page - basic search - encode data passed to API call.


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

Branch: refs/heads/marvin-parallel
Commit: b8e87cff000155ea201245ef35d2001194f394cf
Parents: 1400f84
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Oct 25 10:21:45 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Thu Oct 25 11:10:49 2012 -0700

----------------------------------------------------------------------
 ui/scripts/events.js |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b8e87cff/ui/scripts/events.js
----------------------------------------------------------------------
diff --git a/ui/scripts/events.js b/ui/scripts/events.js
index 0ff4429..38f7728 100644
--- a/ui/scripts/events.js
+++ b/ui/scripts/events.js
@@ -175,20 +175,12 @@
             sent: { label: 'label.date', converter: cloudStack.converters.toLocalDate }
           },
           dataProvider: function(args) {
-					  var array1 = [];  
-						if(args.filterBy != null) {          
-							if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
-								switch(args.filterBy.search.by) {
-								case "name":
-									if(args.filterBy.search.value.length > 0)
-										array1.push("&keyword=" + args.filterBy.search.value);
-									break;
-								}
-							}
-						}
+					  var data = {};
+						listViewDataProvider(args, data);		
+					
             $.ajax({
-              url: createURL("listAlerts&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
-              dataType: "json",
+              url: createURL('listAlerts'),
+              data: data,
               async: true,
               success: function(json) {
                 var items = json.listalertsresponse.alert;