Package com.morpheusdata.core.dashboard
Interface DashboardProvider
-
- All Superinterfaces:
PluginProvider
,UIExtensionProvider
- All Known Implementing Classes:
AbstractDashboardProvider
public interface DashboardProvider extends UIExtensionProvider
Provides an interface and standard set of methods for creating custom dashboards- Since:
- 0.13
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Dashboard
getDashboard()
the dashboard model representing the dashboard to save as an optionjava.lang.String
getDashboardScriptPath(Dashboard dashboard, java.util.Map<java.lang.String,java.lang.Object> opts)
Returns the relative path of a script for this dashboardHTMLResponse
renderDashboard(Dashboard dashboard, java.util.Map<java.lang.String,java.lang.Object> opts)
Presents the HTML Rendered output of a dashboard.-
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
-
getDashboard
Dashboard getDashboard()
the dashboard model representing the dashboard to save as an option- Returns:
- the Dasbhaord model
-
renderDashboard
HTMLResponse renderDashboard(Dashboard dashboard, java.util.Map<java.lang.String,java.lang.Object> opts)
Presents the HTML Rendered output of a dashboard. 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:
dashboard
- the dashboard to renderopts
- map of input options- Returns:
- result of rendering a dashboard
-
getDashboardScriptPath
java.lang.String getDashboardScriptPath(Dashboard dashboard, java.util.Map<java.lang.String,java.lang.Object> opts)
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
-
-