-Refactored the associations code into a set of objects that are configured by the entities
-Added support for associations that can be done in a single rpc
-hostgroup to host and group to user associations working
-Restructed sampledata so that the file is matched automatically by the RPC method name
-The new ipa_cmd/sampledata scheme insists on there being sample data for any commands or the ipa_command fails.
-Added sampledata files for all the calls we make
-renamed several of the sampledata files to match their rpc calls
-Started a pattern of refactoring where all the forms for the entity fall under a single object
35 lines
1.1 KiB
JavaScript
35 lines
1.1 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 hostFacets = ["details","hostgroup", "hostgroupmembership"];
|
|
|
|
var hostDetailsForm = new DetailsForm("host",host_details_list,"fqdn",
|
|
hostFacets ) ;
|
|
|
|
var hostSearchColumns = [
|
|
{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", hostSearchColumns);
|