Package com.morpheusdata.core.dashboard
Interface DashboardItemTypeProvider
- All Superinterfaces:
PluginProvider,UIExtensionProvider
- All Known Implementing Classes:
AbstractDashboardItemTypeProvider
Provides an interface and standard set of methods for creating custom dashboard item types
- Since:
- 0.13
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.EventSubscriberFacet<E extends Event> -
Method Summary
Modifier and TypeMethodDescriptiongetDashboardItemScriptPath(DashboardItem dashboardItem, Map<String, Object> opts) Returns the relative path of a script for this dashboard itemthe dashboard item model representing the dashboard itemrenderDashboardItem(DashboardItem dashboardItem, Map<String, Object> opts) Presents the HTML Rendered output of a dashboard item.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPluginMethods inherited from interface com.morpheusdata.core.providers.UIExtensionProvider
getContentSecurityPolicy, getRenderer
-
Method Details
-
getDashboardItemType
DashboardItemType getDashboardItemType()the dashboard item model representing the dashboard item- Returns:
- the Dasbhaord item model
-
renderDashboardItem
Presents the HTML Rendered output of a dashboard item. This can use differentRendererimplementations. The preferred is to use server side handlebars rendering withHandlebarsRendererExample Render:
ViewModel model = new ViewModel() model.object = reportRowsBySection getRenderer().renderTemplate("hbs/instanceReport", model)- Parameters:
dashboardItem- the dashboard item to renderopts- map of input options- Returns:
- result of rendering an item
-
getDashboardItemScriptPath
Returns the relative path of a script for this dashboard item- Parameters:
dashboardItem- the dashboard item to renderopts- map of input options- Returns:
- result of rendering an item
-