diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2014-05-16 18:19:19 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2014-06-23 15:13:13 +0200 |
commit | 27836cba9d865b1c912a65d0cd04562194f9e93f (patch) | |
tree | 0c01fba3b6af948ec4b1e20afc25abcbbdce754a /install/ui | |
parent | c6c7dfeefbb8b94f102aef6a04d828530e3ccb0f (diff) | |
download | freeipa-27836cba9d865b1c912a65d0cd04562194f9e93f.tar.gz freeipa-27836cba9d865b1c912a65d0cd04562194f9e93f.tar.xz freeipa-27836cba9d865b1c912a65d0cd04562194f9e93f.zip |
webui: support standalone facets in navigation module
One can access standard standalone facets with:
`navigation.show('facet_name')`
and completely custom facets with low level call:
`navigation.show_generic('/custom/hash', facet)``
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui')
-rw-r--r-- | install/ui/src/freeipa/navigation.js | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/install/ui/src/freeipa/navigation.js b/install/ui/src/freeipa/navigation.js index ef0a0bf3f..7cf309f15 100644 --- a/install/ui/src/freeipa/navigation.js +++ b/install/ui/src/freeipa/navigation.js @@ -77,7 +77,7 @@ define([ * type. * * When facet is defined as a string it has to be registered in - * facet register. //FIXME: not yet implemented + * facet register. * * When it's an object (Facet) and has an entity set it will be * dealt as entity facet. @@ -98,9 +98,7 @@ define([ var facet = params.facet; if (typeof facet === 'string') { - // FIXME: doesn't work at the moment - throw 'Not yet supported'; - //facet = IPA.get_facet(facet); + nav.navigate_to_facet(facet, params.args); } if (!facet) throw 'Argument exception: missing facet'; @@ -141,6 +139,22 @@ define([ }, /** + * Uses lower level access + * + * `experimental` + * + * Navigates to generic page by changing hash. + * + * @param {string} hash Hash of the change + * @param {Object} [facet] Facet we are navigating to. Usually used for + * notification purposes + */ + show_generic: function(hash, facet) { + var nav = get_router(); + nav.navigate_to_hash(hash, facet); + }, + + /** * Show default facet * @method show_default */ |