From 255d3c41c54c60154cb3b341bfae3e306deeddcf Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 5 Jan 2012 15:56:12 -0800 Subject: [PATCH] cloudstack 3.0 new UI - system - clusters page - implement search. --- ui/scripts/system.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 64736394b19..78cb51822b5 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -5529,7 +5529,17 @@ }, dataProvider: function(args) { - var array1 = []; + 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; + } + } + } array1.push("&zoneid=" + args.context.zones[0].id); if("pods" in args.context) array1.push("&podid=" + args.context.pods[0].id);