Package com.morpheusdata.core.dashboard
Interface DashboardItemTypeProvider
-
- All Superinterfaces:
PluginProvider
,UIExtensionProvider
- All Known Implementing Classes:
AbstractDashboardItemTypeProvider
public interface DashboardItemTypeProvider extends UIExtensionProvider
Provides an interface and standard set of methods for creating custom dashboard item types- Since:
- 0.13
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDashboardItemScriptPath(DashboardItem dashboardItem, java.util.Map<java.lang.String,java.lang.Object> opts)
Returns the relative path of a script for this dashboard itemDashboardItemType
getDashboardItemType()
the dashboard item model representing the dashboard itemHTMLResponse
renderDashboardItem(DashboardItem dashboardItem, java.util.Map<java.lang.String,java.lang.Object> opts)
Presents the HTML Rendered output of a dashboard item.-
Methods inherited from interface com.morpheusdata.core.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
-
Methods inherited from interface com.morpheusdata.core.UIExtensionProvider
getContentSecurityPolicy, getRenderer
-
-
-
-
Method Detail
-
getDashboardItemType
DashboardItemType getDashboardItemType()
the dashboard item model representing the dashboard item- Returns:
- the Dasbhaord item model
-
renderDashboardItem
HTMLResponse renderDashboardItem(DashboardItem dashboardItem, java.util.Map<java.lang.String,java.lang.Object> opts)
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
java.lang.String getDashboardItemScriptPath(DashboardItem dashboardItem, java.util.Map<java.lang.String,java.lang.Object> opts)
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
-
-