Interface AnalyticsProvider

All Superinterfaces:
PluginProvider, UIExtensionProvider
All Known Implementing Classes:
AbstractAnalyticsProvider

public interface AnalyticsProvider extends UIExtensionProvider
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 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

      ServiceResponse<Map<String,Object>> loadData(User user, Map<String,Object> params)
      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 page
      params - the parameters passed to the analytics page
      Returns:
      a map of data to be used in the analytics page
    • renderTemplate

      HTMLResponse renderTemplate(User user, Map<String,Object> analyticsData, Map<String,Object> params)
      Presents the HTML Rendered output of an analytics page. This can use different Renderer implementations. The preferred is to use server side handlebars rendering with HandlebarsRenderer

      Example Render:

      
          ViewModel model = new ViewModel()
       	  model.object = analyticsData
       	  getRenderer().renderTemplate("hbs/instanceAnalytics", model)
       
      Parameters:
      user - the current user loading the analytics page
      analyticsData - the data loaded from the loadData method
      params - the parameters passed to the analytics page
      Returns:
      result of rendering a template