You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/10/04 01:30:05 UTC
git commit: cloudstack UI - advanced search - implement advanced
search on security group page.
Updated Branches:
refs/heads/master b8a3524d2 -> e8fd65d86
cloudstack UI - advanced search - implement advanced search on security group 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/e8fd65d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e8fd65d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e8fd65d8
Branch: refs/heads/master
Commit: e8fd65d86703843fa7bb154ba0b2645d9cb6a045
Parents: b8a3524
Author: Jessica Wang <je...@citrix.com>
Authored: Wed Oct 3 16:21:50 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Wed Oct 3 16:28:57 2012 -0700
----------------------------------------------------------------------
ui/scripts/network.js | 24 ++++++++++--------------
1 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e8fd65d8/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 881c002..834869e 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -208,6 +208,7 @@
sectionsToShow.push('vpc');
sectionsToShow.push('vpnCustomerGateway');
}
+
if(havingSecurityGroupNetwork == true)
sectionsToShow.push('securityGroups');
@@ -3142,23 +3143,18 @@
}
},
+ advSearchFields: {
+ tagKey: { label: 'Tag Key' },
+ tagValue: { label: 'Tag Value' }
+ },
+
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("listSecurityGroups&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
- dataType: "json",
- async: true,
+ url: createURL('listSecurityGroups'),
+ data: data,
success: function(json) {
var items = json.listsecuritygroupsresponse.securitygroup;
args.response.success({