Overview#
It’s expected that Web UI plugins want to add new pages. They need a way how to modify application navigation, for user to be able to navigate to new pages. It’s not an easy task to do in FreeIPA up to version 3.0. This enhancement tries to make the task easy.
Use Cases#
Server plugin defines a new object type. Web UI needs to be extended to support modification of objects of the new type.
Design#
Web UI internals and mostly navigation code undertook a major refactoring which is temporarily documented outside of this wiki.
This refactoring introduces a menu object which contains an menu item object store. Menu object is observed by menu widget. Changes in menu object are therefore reflected in the UI.
Plugins should use new menu proxy located in freeipa/menu module for performing modifications of menu. The main benefit of the proxy is that plugins don’t have to care about knowing how to get an instance of the menu object.
This proxy has following methods:
add_item(item, parent, options)
Add new menu item. Look into /install/ui/src/freeipa/navigation/Menu.js for all available properties of item spec.
remove_item(item)
Remove menu item, item is menu item object or menu item name.
query(query, search_options)
Query menu store. Uses Dojo SimpleQueryEngine.
get()
Get instance of menu object for advanced use cases.
Examples#
Query#
// get added item
var item = menu.get({name: 'identity/dhcp'})[0];
Implementation#
N/A
Feature Management#
UI
No visible UI changes.
CLI
No CLI changes.
Major configuration options and enablement#
N/A
Replication#
N/A
Updates and Upgrades#
N/A
Dependencies#
N/A
External Impact#
N/A