summaryrefslogtreecommitdiffstats
path: root/install/ui/hostgroup.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/hostgroup.js')
-rw-r--r--install/ui/hostgroup.js58
1 files changed, 15 insertions, 43 deletions
diff --git a/install/ui/hostgroup.js b/install/ui/hostgroup.js
index 4738a26d6..46f2ab68c 100644
--- a/install/ui/hostgroup.js
+++ b/install/ui/hostgroup.js
@@ -25,49 +25,21 @@
IPA.entity_factories.hostgroup = function() {
- var that = IPA.entity({
- 'name': 'hostgroup'
- });
-
- that.init = function() {
-
- that.facet(
- IPA.search_facet({
- name: 'search',
- label: IPA.messages.facets.search,
- entity_name: that.name
- }).
- column({name:'cn'}).
- column({name:'description'}).
- dialog(
- IPA.add_dialog({
- name: 'add',
- title: IPA.messages.objects.hostgroup.add
- }).
- field(IPA.text_widget({name: 'cn', undo: false})).
- field(IPA.text_widget({name: 'description', undo: false}))));
-
- that.facet(
- IPA.details_facet({name:'details'}).
- section(
- IPA.stanza({
- name: 'identity',
- label: IPA.messages.objects.hostgroup.identity
- }).
- input({name:'cn'}).
- input({name: 'description'})));
-
- that.facet(
- IPA.association_facet({
- name: 'memberof_hostgroup',
- associator: IPA.serial_associator
- }));
-
- that.create_association_facets();
- that.entity_init();
- };
-
- return that;
+ return IPA.entity_builder().
+ entity('hostgroup').
+ search_facet({columns:['cn','description'],
+ add_fields:['cn','description']}).
+ details_facet([{
+ section:'identity',
+ label: IPA.messages.objects.hostgroup.identity,
+ fields:['cn','description']
+ }]).
+ association_facet({
+ name: 'memberof_hostgroup',
+ associator: IPA.serial_associator
+ }).
+ standard_associations().
+ build();
};