Package com.morpheusdata.core.dashboard
Interface DashboardProvider
- All Superinterfaces:
PluginProvider,UIExtensionProvider
- All Known Implementing Classes:
AbstractDashboardProvider
Provides an interface and standard set of methods for creating custom dashboards
- 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 TypeMethodDescriptionthe dashboard model representing the dashboard to save as an optiongetDashboardScriptPath(Dashboard dashboard, Map<String, Object> opts) Returns the relative path of a script for this dashboardrenderDashboard(Dashboard dashboard, Map<String, Object> opts) Presents the HTML Rendered output of a dashboard.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
-
getDashboard
Dashboard getDashboard()the dashboard model representing the dashboard to save as an option- Returns:
- the Dasbhaord model
-
renderDashboard
Presents the HTML Rendered output of a dashboard. 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:
dashboard- the dashboard to renderopts- map of input options- Returns:
- result of rendering a dashboard
-
getDashboardScriptPath
Returns the relative path of a script for this dashboard- Parameters:
dashboard- the dashboard to renderopts- map of input options- Returns:
- path to a dashboard script
-