cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: updated refs/heads/master to 932758e
Date Fri, 20 Dec 2013 21:38:55 GMT
Updated Branches:
  refs/heads/master 9947e688c -> 932758e2e


CLOUDSTACK-5551: Pass search 'name' field to listConfigurations UI

Passes search bar value (by 'name') for the settings in the following sections'
detail views:

-Account
-Primary storage
-Cluster
-Zone


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

Branch: refs/heads/master
Commit: 932758e2efd8a0e2776f44a4f14cd65e14c08f1a
Parents: 9947e68
Author: Brian Federle <brian.federle@citrix.com>
Authored: Fri Dec 20 13:37:59 2013 -0800
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Fri Dec 20 13:38:46 2013 -0800

----------------------------------------------------------------------
 ui/scripts/accounts.js        |  7 +------
 ui/scripts/sharedFunctions.js | 14 ++++++++++----
 ui/scripts/system.js          | 18 +++---------------
 3 files changed, 14 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/932758e2/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index 8780206..0293992 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -851,15 +851,10 @@
                                     dataProvider: function(args) {
                                         $.ajax({
                                             url: createURL('listConfigurations&accountid='
+ args.context.accounts[0].id),
-                                            data: {
-                                                page: args.page,
-                                                pageSize: pageSize,
-                                                listAll: true
-                                            },
+                                            data: listViewDataProvider(args, {}, { searchBy:
'name' }),
                                             success: function(json) {
                                                 args.response.success({
                                                     data: json.listconfigurationsresponse.configuration
-
                                                 });
 
                                             },

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/932758e2/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 66eaf7a..a632850 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -1120,7 +1120,7 @@ cloudStack.converters = {
 
 //data parameter passed to API call in listView
 
-function listViewDataProvider(args, data) {
+function listViewDataProvider(args, data, options) {
     //search
     if (args.filterBy != null) {
         if (args.filterBy.advSearch != null && typeof(args.filterBy.advSearch) ==
"object") { //advanced search
@@ -1141,9 +1141,13 @@ function listViewDataProvider(args, data) {
             switch (args.filterBy.search.by) {
                 case "name":
                     if (args.filterBy.search.value.length > 0) {
-                        $.extend(data, {
-                            keyword: args.filterBy.search.value
-                        });
+                        if (options && options.searchBy) {
+                            data[options.searchBy] = args.filterBy.search.value;
+                        } else {
+                            $.extend(data, {
+                                keyword: args.filterBy.search.value
+                            });
+                        }
                     }
                     break;
             }
@@ -1156,6 +1160,8 @@ function listViewDataProvider(args, data) {
         page: args.page,
         pagesize: pageSize
     });
+
+    return data;
 }
 
 //used by infrastructure page and network page

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/932758e2/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 6656fc1..547b9fe 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -7556,11 +7556,7 @@
                                             dataProvider: function(args) {
                                                 $.ajax({
                                                     url: createURL('listConfigurations&zoneid='
+ args.context.physicalResources[0].id),
-                                                    data: {
-                                                        page: args.page,
-                                                        pageSize: pageSize,
-                                                        listAll: true
-                                                    },
+                                                    data: listViewDataProvider(args, {},
{ searchBy: 'name' }),
                                                     success: function(json) {
                                                         args.response.success({
                                                             data: json.listconfigurationsresponse.configuration
@@ -13275,11 +13271,7 @@
                                     dataProvider: function(args) {
                                         $.ajax({
                                             url: createURL('listConfigurations&clusterid='
+ args.context.clusters[0].id),
-                                            data: {
-                                                page: args.page,
-                                                pageSize: pageSize,
-                                                listAll: true
-                                            },
+                                            data: listViewDataProvider(args, {}, { searchBy:
'name' }),
                                             success: function(json) {
                                                 args.response.success({
                                                     data: json.listconfigurationsresponse.configuration
@@ -15493,11 +15485,7 @@
 
                                         $.ajax({
                                             url: createURL('listConfigurations&storageid='
+ args.context.primarystorages[0].id),
-                                            data: {
-                                                page: args.page,
-                                                pageSize: pageSize,
-                                                listAll: true
-                                            },
+                                            data: listViewDataProvider(args, {}, { searchBy:
'name' }),
                                             success: function(json) {
                                                 args.response.success({
                                                     data: json.listconfigurationsresponse.configuration


Mime
View raw message