From 125bd09faf21411fafda01e76989b4856bbd267c Mon Sep 17 00:00:00 2001 From: Adam Young Date: Fri, 6 Aug 2010 10:01:44 -0400 Subject: The Javascript code for the new web UI Now with whitespace cleanup. --- install/static/hostgroup.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 install/static/hostgroup.js (limited to 'install/static/hostgroup.js') diff --git a/install/static/hostgroup.js b/install/static/hostgroup.js new file mode 100644 index 00000000..64eeb3af --- /dev/null +++ b/install/static/hostgroup.js @@ -0,0 +1,35 @@ +function setupHostgroup(facet){ + if (facet == "details"){ + setupHostgroupDetails(); + }else{ + setupHostgroupSearch(); + } +} + +function setupHostgroupDetails(){ + var detailsForm = new DetailsForm(); +} + + +function setupHostgroupSearch(){ + + var columns = [ + {title:"Hostgroup",column:"cn",render: function(current,cell){ + renderDetailColumn(current,cell,current[this.column],"hostgroup"); + }}, + {title:"Description", column:"description",render: renderSimpleColumn}]; + + var hostgroupSearchForm = new SearchForm("hostgroup", "find", columns); + + $("#query").unbind(); + + $("#query").click(function(){ + sampleData = "sampledata/hostgrouplist.json"; + executeSearch(hostgroupSearchForm); + }); + $("#new").unbind(); + $("#new").click( function() { + alert("New Hostgroup..."); + }); + +} -- cgit