[Freeipa-devel] [WIP] Web UI Refactoring & plugins effort - current state

Endi Sukma Dewata edewata at redhat.com
Tue Mar 26 14:08:46 UTC 2013


Hi, I have some comments & questions.

Navigation:

* Dojo/topic is used to handle low-level UI events such as facet-show 
and facet-change. Is it possible to use dojo/on or direct method calls? 
I suppose topics would also run slower (although that might not be an 
issue).

Dojo/topic seem to be more appropriate for high-level events such as 
phase changes (e.g. UI initialized), data changes (e.g. user added), 
auth changes (e.g. login/logout/expiration), etc. which might affect the 
UI globally. This way 3rd-party code can subscribe to these topics too.

* The navigation uses a 'hash' array that will be joined with a '/'. 
Should we call this a 'path'?

* Is it necessary to have /e and /p prefixes? Is there a possibility 
where 'entity' and 'page' might conflict?

* When is /p used? Any example?

* The paths probably can be made more REST-like. Suppose in the future 
IPA uses REST, they will be easier to translate. Look for REST URL best 
practices. This is the path style used in Dogtag:

   /users                       -> Users search facet
   /users/admin                 -> Admin's details (or initial) facet
   /users/admin/memberof_groups -> Admin's member of groups

* When you hover over a link, the hash shown doesn't match the actual 
hash after clicking the link.

* Changing page number doesn't refresh the content. In Permissions 
search facet if you click Prev or Next or entering the page number 
nothing is changed, but if you go to another facet then come back it 
will show the new page.

* Existing issue, the navigation profile is hard-coded so it's either 
admin or self-service, and the identity/user navigation item is defined 
twice. Is it possible to generalize this so the navigation items are 
defined only once and each item (or the controller) will determine 
whether it's supposed to be visible? In the future it might be possible 
to show more read-only navigation items in self-service mode, so it's 
not only limited to identity/user.


Registers:

* The 'register' objects probably should be called 'registry'.


Phases:

* What's the advantage of using dojo/topic to define phases vs. using 
inheritance to override phase methods?

* Any example where a phase has multiple tasks?

* The 'alternation' phase probably should be called 'customization'.


Plugins:

* Right now the Web UI plugin registration requires running a script to 
update the index file so the plugin can be loaded. Is it possible to 
write a server plugin that reads the content of the UI plugins folder on 
the server, and have the UI call it to get the list of UI plugins and 
then load it dynamically?

* Is there a base class for a plugin? Or is a plugin basically a 
collection of custom UI components (e.g. entities, facets, widgets)?

* Any plugin example? How do you customize the menu (e.g. add a new page)?


Other:

* The HTML elements in widgets/App.js still contain 'id' attributes 
which is a global identifier. Not really a problem since it's only used 
once in UI, but to be really modular it should not contain global 
identifiers.

* This is probably an existing issue, in self-service mode if you select 
one of the memberof tabs you'll see the Add & Delete appear briefly then 
disappear immediately. Ideally they should appear only if the user has 
add/delete rights.

* Also in self-service mode, the user can see the action drop down list 
and action box (of other users) but none of them actually works.

-- 
Endi S. Dewata




More information about the Freeipa-devel mailing list