summaryrefslogtreecommitdiffstats
path: root/install/ui/netgroup.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/netgroup.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/netgroup.js')
-rw-r--r--install/ui/netgroup.js62
1 files changed, 14 insertions, 48 deletions
diff --git a/install/ui/netgroup.js b/install/ui/netgroup.js
index 251ffa4d2..9389d0197 100644
--- a/install/ui/netgroup.js
+++ b/install/ui/netgroup.js
@@ -23,52 +23,18 @@
/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
IPA.entity_factories.netgroup = function() {
-
- var that = IPA.entity({
- 'name': 'netgroup'
- });
-
- 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.netgroup.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.netgroup.identity
- }).
- input({name: 'cn'}).
- input({name: 'description'}).
- input({name: 'nisdomainname'})));
-
- that.facet(
- IPA.association_facet({
- name: 'memberof_netgroup',
- associator: IPA.serial_associator
- }));
-
- that.create_association_facets();
- that.entity_init();
- };
-
- return that;
+ return IPA.entity_builder().
+ entity('netgroup').
+ search_facet({
+ columns:['cn','description'],
+ add_fields:['cn', 'description']}).
+ details_facet([{
+ section:'identity',
+ fields:['cn','description','nisdomainname']}]).
+ association_facet({
+ name: 'memberof_netgroup',
+ associator: IPA.serial_associator
+ }).
+ standard_associations().
+ build();
};
-
-
-