summaryrefslogtreecommitdiffstats
path: root/install/static/hostgroup.js
blob: b6cb413faaacb73a996ebf6ccd82a50475d42340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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...");
    });


}