summaryrefslogtreecommitdiffstats
path: root/install/static/test/entity_tests.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-11-09 14:22:31 -0600
committerAdam Young <ayoung@redhat.com>2010-11-11 12:23:05 -0500
commit65c9442e2697f9e5d8b6cc2b7c22a6b8da426247 (patch)
treea998aa317a59102646fada66a4944d022ff2afa5 /install/static/test/entity_tests.js
parent569f4e1a5cb3ff4cf3a7bf3c2aa5fdfa9ced0134 (diff)
downloadfreeipa.git-65c9442e2697f9e5d8b6cc2b7c22a6b8da426247.tar.gz
freeipa.git-65c9442e2697f9e5d8b6cc2b7c22a6b8da426247.tar.xz
freeipa.git-65c9442e2697f9e5d8b6cc2b7c22a6b8da426247.zip
HBAC Services
The HBAC Service search and details pages have been added under the HBAC tab. This requires some changes to the framework. Currently the navigation framework doesn't support multiple entities under one tab. As a temporary solution, an 'entity' URL parameter is used to determine the entity to be displayed. This parameter is now only used by HBAC tab, but its use might be expanded later. The navigation framework needs be redesigned to provide more flexibility. The search page in all entities except DNS records have been changed to use the ipa_search_widget. The Select/Unselect All checbox and Delete button now work correctly and consistently. The Add dialog has been enhanced to render and work in a more consistent way while still supporting custom widgets & layouts. For the search page, the Add button will refresh the search results and clear the fields in the dialog box. The framework now provides some extension points which can be overriden by the subclasses: - init(): for initialization and configuration - create(): for creating the layout dynamically or from template - setup(): for setting the look and feel - load(): for loading the data Entity and facet initialization is now done after IPA.init(). This is to ensure the metadata is loaded first so the entities and facets can use localized messages/labels/titles. The group entity has been partially converted to use the new framework. The unit tests have been updated accordingly.
Diffstat (limited to 'install/static/test/entity_tests.js')
-rw-r--r--install/static/test/entity_tests.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/install/static/test/entity_tests.js b/install/static/test/entity_tests.js
index 08fc3111..5d98d7b1 100644
--- a/install/static/test/entity_tests.js
+++ b/install/static/test/entity_tests.js
@@ -61,7 +61,7 @@ test('Testing ipa_entity_set_search_definition().', function() {
);
});
-test('Testing ipa_entity_generate_views().', function() {
+test('Testing ipa_facet_setup_views().', function() {
var orig_show_page = IPA.show_page;
IPA.ajax_options.async = false;
@@ -83,9 +83,10 @@ test('Testing ipa_entity_generate_views().', function() {
IPA.add_entity(entity);
- var facet = entity.create_association_facet({
+ var facet = ipa_association_facet({
'name': 'associate'
});
+ entity.add_facet(facet);
var container = $('<div/>');
@@ -179,11 +180,12 @@ test('Testing ipa_entity_quick_links().', function() {
var tbody = $('<tbody/>').appendTo(search_table);
var tr = $('<tr/>').appendTo(tbody);
+ var td = $('<td/>').appendTo(tr);
+ var span = $('<span/>', {name:'quick_links'}).appendTo(td);
- ipa_entity_quick_links(tr, null, null, entry_attrs);
+ ipa_entity_quick_links(tr, 'quick_links', null, entry_attrs);
- var td = tr.children().first();
- var link = td.children().first();
+ var link = span.children().first();
equals(
link.attr('href'), '#details',