Methods
_showOrHideExpandIcons(isMobileMode)
Parameters:
Name | Type | Description |
---|---|---|
isMobileMode |
addPlaceholderWidget(cell)
Adds a placeholder for a new widget. In the placeholder the user can select which kind of widget to add.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Object | Location where to add the placeholder |
addWidget(options, customizations) → {App.Widget}
Loads a widget with the provided options and adds it to the dashboard.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Options about the widget to create. Location, size, widget type etc. |
customizations |
customizations associated with this widget instance |
Returns:
widget Returns the added widget
- Type
- App.Widget
clearBreadCrumbs()
clearDrilldownDashboard()
clearMinHeight()
collapseOrExpandAll()
Collapses or expands all widgets
destroy()
drilldown(context, dashboardRef)
Drills down in the dashboard. It exchanges the current dashboard with a new one which contains a new context.
Parameters:
Name | Type | Description |
---|---|---|
context |
Context | Context of the dashboard to drill down to |
dashboardRef |
string | Dashboard configuration |
drillDownSearchResult(context, newSearchConfig)
- Since:
- 2023.4.0
Drills down in the dashboard displays exalead data. It exchanges the current dashboard with a new one which contains a new context and exaleadConfig.
Parameters:
Name | Type | Description |
---|---|---|
context |
Context | Context of the dashboard to drill down to |
newSearchConfig |
Object | exalead configuration |
drillup(from, to)
Goto a previous dashboard when doing drill down operations.
Parameters:
Name | Type | Description |
---|---|---|
from |
Dashboard | The current dashboard |
to |
Dashboard | The dashboard to goto |
findWidgetByElement($element) → {Widget}
Finds the widget from a dom element. The element to search with can be either the top level or any child element for the widget.
Parameters:
Name | Type | Description |
---|---|---|
$element |
Object | The dom element for the widget to search by |
Returns:
The widget
- Type
- Widget
getCustomization()
Returns customization for this dashboard's widgets
getDrilldownDashboard() → {null|*}
Returns:
- Type
- null | *
getParentDashboard()
Returns parent dashboard of this dashboard.
Returns:
Dashboard object
getResourceReference()
Gets the XML resource reference for this dashboard
getVisibleWidgets() → {Array}
Returns:
- Type
- Array
getWidgetById(id) → {module:"App.Widget".Widget}
Checks and returns widget by id from this dashboard
Parameters:
Name | Type | Description |
---|---|---|
id |
string | id of the widget configured in XML definition |
Returns:
- Type
- module:"App.Widget".Widget
getWidgets() → {Array.<module:"App.Widget".Widget>}
Returns all widgets from this and drilldown dashboard (if available)
Returns:
list of widgets
- Type
- Array.<module:"App.Widget".Widget>
getWidgetTitles() → {Array.<any>}
Returns:
- Type
- Array.<any>
hasDrilldownDashboard() → {boolean}
Returns:
- Type
- boolean
hasSingleWidget() → {boolean}
Returns:
- Type
- boolean
hide()
hideWidget(widget)
Parameters:
Name | Type | Description |
---|---|---|
widget |
isLoaded()
Returns true if the page is loaded, false otherwise. Note: Widget failures do not classify as false
loadFileWidgets()
Loads file based widgets from dashboard configuration and initializes them.
loadSearchResult()
- Since:
- 2023.4.0
Based on the searchconfig, table widget will be loaded first with search result data. Search result data will also have facet counts. Using the facet counts, the reloadable chart widgets will be reloaded
loadWidgets()
Loads widgets from dashboard configuration and initializes them.
off(event, handler)
Remove a subscription.
Parameters:
Name | Type | Description |
---|---|---|
event |
String | Event to remove subscription from |
handler |
function | Callback to remove |
on(event, handler)
Subscribe to an event.
Parameters:
Name | Type | Description |
---|---|---|
event |
String | Event to subscribe to |
handler |
function | Callback function |
onLoadComplete(callback)
Register callback that will be invoked once dashboard is loaded.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | to be invoked when page is loaded |
refresh(widgetIdopt)
Refresh the dashboard by running the widgets onInit again.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
widgetId |
String |
<optional> |
Id of newly added widget. |
remove()
removeSearchResult()
remove the Search result
removeWidget(widget, done, fadeOutTime)
Removes a widget from the dashboard
Parameters:
Name | Type | Default | Description |
---|---|---|---|
widget |
Widget | Widget to remove |
|
done |
function | Callback when removal is completed (optional) |
|
fadeOutTime |
Number |
400
|
time to fade out the widget. If 0 no fade out |
replaceWidget(oldWidget, newWidgetOptions)
Replaces old widget with new widget
Parameters:
Name | Type | Description |
---|---|---|
oldWidget |
widget to be replaced |
|
newWidgetOptions |
options for widget to be added |
replaceWidgetContent(event)
Turns a placeholder widget into an actual widget.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | event triggered when select box is changed |
saveCustomization()
Saves customization on server
setContextObjectIds(objectIds)
Sets the Array of context object ids associated with this dashboard
Parameters:
Name | Type | Description |
---|---|---|
objectIds |
Array | of object ids |
Returns:
this dashboard instance
setHeight(height, minHeight)
Set the height of the dashboard
Parameters:
Name | Type | Description |
---|---|---|
height |
||
minHeight |
setMinHeight(…widgetHeights)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
widgetHeights |
<repeatable> |
show()
showBreadCrumbs()
Updates the bread crumbs displayed above the dashboard.
updateDashboardWidgetsElement(widgets)
Updates dashboard widget elements
Parameters:
Name | Type | Description |
---|---|---|
widgets |
Array.<Object> | Updated widgets customization. |
updateWidgetConfigOnInit(widget, widget)
Updates onInit params for widget config for a given widget id
Parameters:
Name | Type | Description |
---|---|---|
widget |
string | id. |
widget |
object | onInit params |
updateWidgets(widgetsInfo)
Updates widgets in the dashboard.
Each entry in the input object consists of a key (i.e. 'widget-id') of the widget to be updated and value (an object with list of objectIds as the key) that will serve as input for widget loader.
Example
dashboard.updateWidgets({
'ebom': {
'objectIds': ['12534.36095.35288.16395', '12534.36095.65377.15060']
},
'artwork': {
'objectIds': ['12534.36095.35288.16395', '12534.36095.65377.15060']
}
});
Parameters:
Name | Type | Description |
---|---|---|
widgetsInfo |
Object.<string, Object.<string, Array.<string>>> |