mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
entity i18n
Updated the user,group,host, hostgroup, netgroup, service, and all policy entities to use the newer framework functions, in order to replaced the old array style definitions which did not support i18n. update a few of the newer framerwork functions to get the lables from the meta data. Fixed the unit tests which were expecting a details facet for users, no longer automatically created
This commit is contained in:
committed by
Endi Sukma Dewata
parent
37f48c0019
commit
10f3c0825b
@@ -20,23 +20,48 @@
|
||||
|
||||
/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
|
||||
|
||||
ipa_entity_set_search_definition('hostgroup', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'Description', null]
|
||||
]);
|
||||
|
||||
ipa_entity_set_add_definition('hostgroup', [
|
||||
'dialog-add-hostgroup', 'Add New Hostgroup', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'Description', null]
|
||||
]
|
||||
]);
|
||||
IPA.add_entity( function() {
|
||||
var that = ipa_entity({
|
||||
'name': 'hostgroup'
|
||||
});
|
||||
that.init = function() {
|
||||
var search_facet = ipa_search_facet({
|
||||
name: 'search',
|
||||
label: 'Search',
|
||||
entity_name: that.name
|
||||
});
|
||||
search_facet.create_column({name:'cn'});
|
||||
search_facet.create_column({name:'description'});
|
||||
that.add_facet(search_facet);
|
||||
|
||||
that.add_facet(function() {
|
||||
var that = ipa_details_facet({name:'details',label:'Details'});
|
||||
that.add_section(
|
||||
ipa_stanza({name:'identity', label:'Hostgroup Details'}).
|
||||
input({name:'cn'}).
|
||||
input({name: 'description'}));
|
||||
return that;
|
||||
}());
|
||||
|
||||
|
||||
var dialog = ipa_add_dialog({
|
||||
name: 'add',
|
||||
title: 'Add Hostgroup',
|
||||
entity_name:'hostgroup'
|
||||
});
|
||||
|
||||
that.add_dialog(dialog);
|
||||
dialog.init();
|
||||
dialog.add_field(ipa_text_widget({ name: 'cn',
|
||||
entity_name:'hostgroup'}));
|
||||
dialog.add_field(ipa_text_widget({ name: 'description',
|
||||
entity_name:'hostgroup' }));
|
||||
that.create_association_facets();
|
||||
that.entity_init();
|
||||
}
|
||||
return that;
|
||||
}());
|
||||
|
||||
|
||||
ipa_entity_set_details_definition('hostgroup', [
|
||||
ipa_stanza({name:'identity', label:'Hostgroup Details'}).
|
||||
input({name:'cn', label:'Name'}).
|
||||
input({name: 'description', label:'Description'})
|
||||
]);
|
||||
|
||||
ipa_entity_set_association_definition('hostgroup', {
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user