summaryrefslogtreecommitdiffstats
path: root/install/static/host.js
blob: b249c9b5e49a83248289679dcfacba4f89d3eec9 (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
function setupHost(facet){
    if (facet == "details"){
    hostDetailsForm.setup();
    }else if (facet == "add"){
    hostBuilder.setup();
    }else{
    hostSearchForm.setup();
    }
}

var hostAddProperties = [{title: 'Domain Name', id: 'pkey', type: 'text'}];
var hostBuilder = new EntityBuilder("host",hostAddProperties);


var host_details_list =  [['host', 'Host Details', [
    ['fqdn', 'Fully Qualified Domain Name'],
    ['krbprincipalname', 'Kerberos Principal'],
    ['serverhostname', 'Server Host Name']
]]];
 
var hostDetailsForm = new DetailsForm("host",host_details_list,"fqdn","sampledata/hostshow.json") ;


var hostDetailsColumns = [
    {title:"Host",column:"fqdn",render: function(current,cell){
    renderPkeyColumn(hostDetailsForm,current,cell);
    }},
    {title:"Comment",   column: "description", render: renderSimpleColumn},
    {title:"Enrolled?",  render: renderUnknownColumn},
    {title:"Manages?",   render: renderUnknownColumn}
];
var hostSearchForm = new SearchForm("host", "find", hostDetailsColumns,"sampledata/hostlist.json");