summaryrefslogtreecommitdiffstats
path: root/install/ui/hostgroup.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-03-18 16:43:54 -0400
committerAdam Young <ayoung@redhat.com>2011-03-31 17:29:33 -0400
commit4270e26adb56b6d1b7a9e80433581b82519d9eec (patch)
treedcb0982b741d92c0be37e262e70b7cd0969e06d0 /install/ui/hostgroup.js
parentdb91321fd2c94680361ae8196ba9227615f92c39 (diff)
downloadfreeipa-4270e26adb56b6d1b7a9e80433581b82519d9eec.tar.gz
freeipa-4270e26adb56b6d1b7a9e80433581b82519d9eec.tar.xz
freeipa-4270e26adb56b6d1b7a9e80433581b82519d9eec.zip
define entities using builder and more declarative syntax
merged hbac and sudo in to single files associaton facet and table supports linking
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();
};