Package com.morpheusdata.core.providers
Interface AnalyticsProvider
- All Superinterfaces:
PluginProvider
,UIExtensionProvider
- All Known Implementing Classes:
AbstractAnalyticsProvider
Provides an interface and standard set of methods for creating custom analytics types within Morpheus. The difference
between an analytics provider and a report provider is that analytics providers are typically more focused on realtime
data and are more interactive. They may also have more complex data structures and visualizations.
- Since:
- 1.1.6
-
Method Summary
Modifier and TypeMethodDescriptionThe category of the analytics provider.The description of the analytics provider.The order within a category the analytics provider should be displayed.Is this analytics page reserved for the master tenant only.Is this analytics page reserved for sub tenants only.Load data for the analytics page.Presents the HTML Rendered output of an analytics page.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
Methods inherited from interface com.morpheusdata.core.providers.UIExtensionProvider
getContentSecurityPolicy, getRenderer
-
Method Details
-
getCategory
String getCategory()The category of the analytics provider. This is used to group analytics providers in the UI.- Returns:
- the category name
-
getDescription
String getDescription()The description of the analytics provider. This is used to provide a brief description of the analytics provider in the UI.- Returns:
- the description
-
getMasterTenantOnly
Boolean getMasterTenantOnly()Is this analytics page reserved for the master tenant only. This is used to restrict access to the analytics page to only the master tenant.- Returns:
- the master tenant only flag
-
getSubTenantOnly
Boolean getSubTenantOnly()Is this analytics page reserved for sub tenants only. This is used to restrict access to the analytics page to only sub tenants.- Returns:
- the sub tenant only flag
-
getDisplayOrder
Integer getDisplayOrder()The order within a category the analytics provider should be displayed. This is used to order analytics providers in the UI.- Returns:
- the display order starting from 0 as highest priority
-
loadData
Load data for the analytics page. This method should return a map of data that can be used to render the analytics page.- Parameters:
user
- the current user viewing the pageparams
- the parameters passed to the analytics page- Returns:
- a map of data to be used in the analytics page
-
renderTemplate
Presents the HTML Rendered output of an analytics page. This can use differentRenderer
implementations. The preferred is to use server side handlebars rendering withHandlebarsRenderer
Example Render:
ViewModel model = new ViewModel() model.object = analyticsData getRenderer().renderTemplate("hbs/instanceAnalytics", model)
- Parameters:
user
- the current user loading the analytics pageanalyticsData
- the data loaded from the loadData methodparams
- the parameters passed to the analytics page- Returns:
- result of rendering a template
-