<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 10/27/2010 11:51 PM, Endi Sukma Dewata wrote:
<blockquote cite="mid:4CC8F326.7070603@redhat.com" type="cite">Hi,
<br>
<br>
Please review the attached patch. Thanks!
<br>
<br>
<a class="moz-txt-link-freetext" href="https://fedorahosted.org/reviewboard/r/97/diff/2/">https://fedorahosted.org/reviewboard/r/97/diff/2/</a>
<br>
<br>
This patch introduces a new framework for implementing custom UI.
<br>
It consists of the following classes:
<br>
<br>
Main:
<br>
- IPA: global namespace and object repository
<br>
- ipa_entity: base class for entities
<br>
- ipa_facet: base class for facets
<br>
<br>
Add dialog:
<br>
- ipa_add_dialog: default add dialog
<br>
- ipa_add_field: the fields used in the dialog
<br>
<br>
Search facet:
<br>
- ipa_search_facet: default search facet
<br>
- ipa_search_column: the columns in the search result
<br>
<br>
Details facet:
<br>
- ipa_details_facet: default details facet
<br>
- ipa_details_section: the sections in the details facet
<br>
- ipa_details_field: the fields in the details facet
<br>
<br>
Association facet:
<br>
- ipa_association_facet: default association facet
<br>
- ipa_association_config: the association configurations
<br>
<br>
To use this framework, create a class extending the ipa_entity (e.g.
<br>
ipa_hbac). Use the create_* methods to create add dialog, search facet,
<br>
details facet, and association facet. The fields/columns for the dialog
<br>
and facets can be specified using the init() function. Custom UI can be
<br>
defined by overwriting the base methods (e.g. setup, save, load).
<br>
The entity must be added into the repository using IPA.add_entity().
<br>
<br>
The original ipa_entity_setup() has been generalized by moving facet-
<br>
specific codes into the corresponding facet. Some facet names are still
<br>
hard-coded. This will be fixed in follow-up patches.
<br>
<br>
Some global variables have been removed because their function has been
<br>
replaced by the object repository:
<br>
- ipa_entity_add_list
<br>
- ipa_entity_search_list
<br>
- ipa_entity_details_list
<br>
- window_hash_cache
<br>
<br>
Some functions and variables have been moved into IPA namespace:
<br>
- ipa_json_url -> IPA.json_url
<br>
- ipa_use_static_files -> IPA.use_static_files
<br>
- ipa_ajax_options -> IPA.ajax_options
<br>
- ipa_objs -> IPA.metadata
<br>
- ipa_messages -> IPA.messages
<br>
- ipa_dialog -> IPA.error_dialog
<br>
- ipa_init() -> IPA.init()
<br>
<br>
Initially the HBAC and Service entities have been rewritten to use the
<br>
new framework. The DNS is partially converted, the ipa_records_facet
<br>
is used to define custom records facet.
<br>
<br>
Other entities can still work using the old framework. The old
framework
<br>
has been modified to be a wrapper for the new framework. Eventually all
<br>
entities will be converted to use the new framework.
<br>
<br>
Some unit tests have been modified to use the new framework.
<br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Freeipa-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a></pre>
</blockquote>
Pushed to master<br>
</body>
</html>