-
Notifications
You must be signed in to change notification settings - Fork 1
User Menu
Every Eureka! Clinical webclient has a menu in the upper right corner of the screen, named as the user's name. It appears only while the user is logged in. It contains a link to logout of the application. It also functions as an application switcher, listing other Eureka! Clinical applications that are available.
The menu name should appear in the standard menu bar at the top of the screen, using the same font and background. It should use the fontawesome fa-user icon. It should be styled using the Bootstrap dropdown-toggle class and use default styling otherwise.
The menu contents should be styled using the Bootstrap dropdown-menu class and use default styling otherwise.
The menu should first list the available applications in alphabetical order by display name, and then list the Logout link. If there are no available applications, then the menu should only list the Logout link.
Each menu item should contain the menu item text and an icon to the left of the text.
The list of available applications is populated from the Eureka! Clinical registry service. The list is available from the following URL:
/eurekaclinical-registry-service/api/protected/components?type=WEBAPP&type=EXTERNAL
For webclients, you should call the registry service through the corresponding webapp, in which case the call will look like:
/my-webapp/proxy-resource/components?type=WEBAPP&type=EXTERNAL
For each component, create a hyperlink as follows:
- the URL: use the url property of the component
- the display name: use the displayName property of the component
- the icon: use the smallIcon property of the component
If smallIcon is not populated, display the fontawesome fa-link icon instead.
If the endpoint above responds with a 200 status code with an empty list or a 404 status code, the menu should only list the Logout link.
The logout menu item's link should be obtained from the webclient's configuration file, and the menu item should have the fontawesome fa-sign-out icon.