summaryrefslogtreecommitdiffstats
path: root/install/static/hostgroup.js
blob: 64eeb3afc1c333e11c54c8f0e7d28006693dcee7 (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
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...");
    });

}