freeipa/install/static/host.js
Adam Young 49584d6efc hashchange
We now catch the hashchange event and use that to drive most of the site.
To trigger page transitions, modify location.hash.
Params start with # not ?.
Removed user-group.inc.
converted tabs to spaces
trivial imlementation of add and details for netgroup and hostgroup
lots of bug fixes based on routing problems and the refactorings.
2010-08-26 13:15:00 -04:00

33 lines
1.0 KiB
JavaScript

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");