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
-
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, isPlugin
Methods 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 differentRenderer
implementations. The preferred is to use server side handlebars rendering withHandlebarsRenderer
Example 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
-