eXo Platform provides a gadget package that contains many useful gadgets. They can be categorized into:
* [Engagement gadgets|#GadgetUserguide.AngagementGadgets]
* [Audit gadgets|#GadgetUserguide.AuditGadgets]
* [Collab gadgets|#GadgetUserguide.CollabGadgets]
* [Management and Monitoring gadgets|#GadgetUserguide.ManagementMOnitoringGadget]

h1. Engagement gadgets {anchor:id=GadgetUserguide.AngagementGadgets}
*Engagement* gadgets include gadgets designed to aid users in engagement activities and events.
These gadgets analyze the existing communications and community engagement in your organization, then show what is going on by providing statistics.
h2. Latest Forum Posts  {anchor:id=GadgetUserguide.AngagementGadgets.LatestForumPosts}

The *Latest Forum Posts* gadget shows the latest posts in Forum. You can decide the specified number of the latest posts to be shown. This gadget helps you always stay updated with what is going on in the forum.

!images/Latest_forum_posts_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!
{docbook}
<citetitle>
<para><emphasis role="bold">
Latest Forum Posts settings
</emphasis>
</para>
</citetitle>
{docbook}

*1.* Click !images/edit_gadget.png|scalefit="1" width="4mm"! in the *Title* bar to open the form to edit the gadget settings.

*Details:*

|| Field || Description ||
| *Total* | The number of last posts to be displayed in this gadget. |
| *Forum portlet* | The URL pointing to the Forum portlet. |
| *Subscription url* | The link to the service which you request to get data from (in this case, the data are last posts). For example: http://mycompany.com:8080/portal/rest/ks/forum/getmessage. |

*2.* Input the values for all the fields, then click *Save* to accept your changes.

h2. Top Voted Topics {anchor:id=GadgetUserguide.AngagementGadgets.TopVotedTopics}

The *Top Voted Topics* gadget lists the highest rated topics in a forum. You can decide the maximum number of posts to be shown.

!images/Top_voted_raring_topic.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

By clicking the post previewed-content, you will go to that post in the forum.

{docbook}
<citetitle>
<para><emphasis role="bold">
Top Voted Topics gadget settings
</emphasis>
</para>
</citetitle>
{docbook}

*1.* Click !images/edit_gadget.png| scalefit="1" width="4mm"! in the *Title* bar to open the form to edit the gadget settings.

!images/Top_voted_raring_topic_setting.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

*2.* Select the maximum number of topics to be displayed in the *Maximum to display* drop-down list, then click *Save* to accept your changes.

h2. Forum Statistics {anchor:id=GadgetUserguide.AngagementGadgets.ForumStatistics}

The *Forum Statistics* gadget displays statistics about the forum's activity. This gadget is especially useful for administrators who always need global as well as detailed view about how the forum is going on. 
Based on these statistics, the administrators can find the solution to increase the forum activities.

The statistics include the total number of the topics, posts, members, active members and the maximum number of online users.

You can switch between different views:

{docbook}
<citetitle>
<para><emphasis role="bold">
Global statistics view
</emphasis>
</para>
</citetitle>
{docbook}

*Global statistics* is the default view.

!images/Forums_statistics_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

{docbook}
<citetitle>
<para><emphasis role="bold">
Weekly statistics view
</emphasis>
</para>
</citetitle>
{docbook}

* Click !images/Calendar_weekly_stat_icon.png| scalefit="1" width="4mm"! to switch to *Weekly statistics* view.
* Click !images/Calendar_global_stat_icon.png|scalefit="1" width="4mm"! to back to the *Global* statistics view.

After switching to the *Weekly statistics* view, you can display the statistics in a list or a chart.

*List view*

!images/Forums_weekly_statistics.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

* Click !images/Calendar_weekly_chart_icon.png|scalefit="1" width="4mm"! to switch to the *Chart* view.

*Chart view*

!images/Forums_weekly_statistics_graph.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!


* Click !images/Calendar_weekly_list_icon.png|scalefit="1" width="4mm"! to go back to the *List* view.


h2. Friend Suggestions  {anchor:id=GadgetUserguide.EngagementGadgets.FriendSuggestions}

The *Friend Suggestions* gadget will suggest you to connect with people that have mutual friends with you. 

!images/Friend_suggestion_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

To send the invitation to connect with the suggested people right on this gadget, simply click *Send invitation* under their usernames.

h1. Audit gadgets {anchor:id=GadgetUserguide.AuditGadgets}
h2. Login History {anchor:id=GadgetUserguide.AuditGadgets.UserLoginHistory}

The *Login History* gadget records user login history and provides statistics.

!images/Login_history_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

You can look up a specific user by entering his username in the search box and click *Search*. 

* Click the *Statistics* and *History* links to view the global statistics and global history respectively.
* Click !images/Calendar_weekly_chart_icon.png|scalefit="1" width="4mm"! corresponding to the user to view his login statistics.
!images/Login_history_statistic.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!
* Click !images/Calendar_weekly_list_icon.png|scalefit="1" width="4mm"! corresponding to the user to view his login history.

!images/Login_history_history.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

h1. Collab gadgets {anchor:id=GadgetUserguide.CollabGadgets}
The *Collab* gadgets include gadgets designed for collaborative activities. 

h2. eXo Calendar Gadget {anchor:id=GadgetUserguide.CollabGadgets.Calendar_gadget}

The *eXo Calendar* gadget displays a mini calendar and allows you to quickly add an event.

!images/eXo_Calendar_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

There are three tabs in this gadget, including *Apprearance*, *Quick add*, and *Refresh*.
{docbook}
<citetitle>
<para><emphasis role="bold">
Appearance
</emphasis>
</para>
</citetitle>
{docbook}

!images/eXo_Calendar_gadget_appearance.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

If you have more than one personal calendar, you can select which calendar to display. Select the calendars from the list, then click *save*. Only the event in the calendar of your choice will be displayed. 
{docbook}
<citetitle>
<para><emphasis role="bold">
Quick add
</emphasis>
</para>
</citetitle>
{docbook} 
You can add a new event to your personal calendar in this gadget by simply entering the date, time and description, then click *add* to create your new event.

!images/eXo_Calendar_gadget_quickadd.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

{docbook}
<citetitle>
<para><emphasis role="bold">
eXo Calendar Gadget settings
</emphasis>
</para>
</citetitle>
{docbook}

*1.* Click !images/edit_gadget.png|scalefit="1" width="4mm"! in the *Title* bar to open the form to edit the gadget settings.

!images/eXo_Calendar_gadget_settings.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

|| Field || Description ||
| Rest URL | *Rest URL* from which the gadget will get data. For example: http://mycompany.com:8080/rest/ |

*2.* Input the *Rest URL*, then click *Save* to accept your changes.

Normally, regular users do not have to care about this setting. If administrators make changes on the server that affects the *Rest URL*, you need to contact administrators to get the new Rest URL.

h1. Management and Monitoring Gadgets {anchor:id=GadgetUserguide.ManagementMOnitoringGadget}

The *Management and Monitoring* gadgets include gadgets designed for providing the overall vision of the system. These gadgets monitor the system and provide the current system performance statistics which are especially useful for the system administrators and developers.

h2. Memory Charts {anchor:id=GadgetUserguide.ManagementMonitoringGadget.MemoryCharts}

The *Memory Charts* gadget provides the chart of memory used during runtime.

!images/Memory_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

The chart shows:
* The ratio between free and used heap memory.
* The ratio between free and used non-heap memory.

h2. Cache Levels  {anchor:id=GadgetUserguide.ManagementMonitoringGadget.CacheLevels}

The *Cache Levels* gadget displays the eXo cache levels and settings. Based on these statistics, the administrators can configure the cache settings properly to get better performance:

* If the cache is full but the hit ratio is low (or missed ratio is high), it means the cache is full of unnecessary data. It should be cleared and/or its size is increased, or its lifetime is decreased.
* If the cache is full and the hit ratio is high, this is good. It means most data are retrieved from the cache not the database, so the system gets better performances.
* If the cache is empty, it should be configured differently, for example, increasing its lifetime.

!images/Caches_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

* The *Consumption* tab shows the overall cache consumption in the system.

* The *Hit ratio* tab shows the ratio between requested data fetched from cache and data fetched from database.

!images/Caches_gadget_hitratio.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

* The *Details* tab shows the cache level and the current cache settings.

!images/Caches_gadget_details.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

In which:

* Max size: The maximum size of the cache.
* Time to live: The lifetime (in seconds) of cache entries before being cleared.
* Hit/Missed: The percentage of data fetched from cache versus the percentage of data fetched from database.

h2. Applications Statistics {anchor:id=GadgetUserguide.ManagementMonitoringGadget.ApplicationStatistics}

The *Application Statistics* gadget displays how fast applications are. It shows administrators and developers which applications should be optimized.

!images/Applications_statistic_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

Applications that take long time to execute will be highlighted so that you can easily recognize.

!images/Applications_statistic_highlight.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

Each application is provided with these statistics:

* The number of executions (exec).
* The minimum execution time (min).
* The maximum execution time (max).

h2. All Template Statistics {anchor:id=GadgetUserguide.ManagementMonitoringGadget.AllTemplateStatistics}

The *All Template Statistics* gadget displays how fast templates are. It shows administrators and developers which templates should be optimized.

!images/All_template_statistics_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

Each template is provided with these statistics:

* The number of executions (nb exec).
* The minimum execution time (min).
* The maximum execution time (max).
* The average execution time (avg).

h2. 10 Slowest Templates {anchor:id=GadgetUserguide.ManagementMonitoringGadget.10SlowestTemplates}

The *10 Slowest Templates* gadget displays the 10 slowest groovy templates and their speed statistics. It helps administrators and developers specify what templates are slowing down the system performance most.

!images/10Slowest_templates_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

Similar to the *All Template Statistics* gadget, each template is provided with these statistics:

* The number of executions (nb exec).
* The minimum execution time (min).
* The maximum execution time (max).
* The average execution time (avg).

h2. Services Management {anchor:id=GadgetUserguide.ManagementMonitoringGadget.ServiceManagement}

The *Services Management* gadget provides an easy access to REST management API.

!images/Service_management_gadget.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

* Select the service from the *Services* drop-down list. For each selected service, its respective method(s) and properties are shown.

* Click !images/Service_management_help.png|scalefit="1" width="4mm"! to get the description of the selected service.


{docbook}
<citetitle>
<para><emphasis role="bold">
Services Management settings
</emphasis>
</para>
</citetitle>
{docbook}
*1.* To manage a remote service on another Platform installation, click !images/edit_gadget.png|scalefit="1" width="4mm"! in the *Title* bar.

The form to edit the gadget settings appears.

!images/Service_management_settings.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

*2.* Enter the link to the service in the *Services URL* field, then click *Save* to accept your changes.

h2. eXo Scripting Console {anchor:id=GadgetUserguide.ManagementMonitoringGadget.GroovyConsole}
The *eXo Scripting Console* gadget provides a Groovy console that developers can use to interact with the runtime. This gadget is useful when you want to experiment on code. 
It accepts eXo API and can access eXo components deployed in the portal container, so this can be used as a tool for drafting code, testing or exploring eXo API/components/data interactively on a live system. 
The eXo Scripting Console gadget is better viewed on the entire screen. You should configure an entire page or a Dashboard tab for it. 

!images/GroovyConsole.png|align="center" width="70mm" fo:scalefit="1" html:scalefit="0"!

* Click !images/GroovyConsole_font.png|scalefit="1" width="8mm"! to change the font size.
* Click !images/GroovyConsoleColor.png|scalefit="1" width="8mm"! to change the font color.
* Click !images/GroovyConsoleHelp.png|scalefit="1" width="8mm"! to view the Groovy Console Help.


