Files
freeipa/install/static/netgroup.js
T
Adam Young dde1577270 associations
-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
2010-09-07 10:08:19 -04:00

46 lines
1.3 KiB
JavaScript

function setupNetgroup(facet){
if (facet == "details"){
netgroupDetailsForm.setup();
}else if(facet == "add"){
netgroupBuilder.setup();
}else{
netgroupSearchForm.setup();
}
}
var netgroup_details_list =
[['identity', 'Netgroup Details', [
['cn', 'Netgroup Name'],
['description', 'Description'],
['nisdomainname', 'NIS Domain']]]];
var netgroupDetailsForm = new DetailsForm("netgroup",netgroup_details_list,"cn", ["details","hosts","groups","users"]) ;
var netgroupAddProperties =
[{title: 'Netgroup Name', id: 'pkey', type: 'text'},
{title: 'Description', id: 'description', type: 'text'}];
function netgroupAddOptionsFunction (){
var options = {
name: $('#pkey').val(),
description: $('#description').val()
};
return options;
}
var netgroupBuilder = new EntityBuilder("netgroup",netgroupAddProperties,netgroupAddOptionsFunction);
var netgroupSearchColumns = [
{title:"Netgroup",column:"cn",render: function(current,cell){
renderPkeyColumn(netgroupDetailsForm, current,cell);
}},
{title:"Description", column:"description",render: renderSimpleColumn}];
var netgroupSearchForm =
new SearchForm("netgroup", "find", netgroupSearchColumns);