# Pulse JavaScript API Reference
The Sisense Pulse API exposes several objects and Pulse events that allow you to customize how your Pulse tiles are displayed in the Sisense Pulse page and when.
The Sisense Pulse API includes two objects, Alerts
and AlertsBoard
. The AlertsBoard
contains Alerts
that are displayed in the Sisense Pulse page. Each object has events that you can leverage to modify how Pulse tiles are displayed.
To add custom JavaScript to a tile:
- Click the tile's menu button in the top-right corner of the tile and select Edit Script .
- In the JavaScript editor that opens, you can add and edit your JavaScript code.
- Click Save and refresh Pulse.
# AlertsBoard
The AlertsBoard object contains all the alert objects on a Pulse page and triggers events related to the Alerts.
Properties
Name | Type | Description |
---|---|---|
tiles | Alert[] | List of alerts on the page. |
# Events
# beforetiletooltipconfig
Fired for the relevant alert before a tooltip is created. You can use this event to configure an alert's tooltip appearance.
Available tooltip names:
headerTooltip
contentTooltip
offTippets
Name | Type | Description | Example |
---|---|---|---|
alert | `` | Source alert that triggers the event. | ? |
element | `` | Source element that triggers the event. | ? |
name | `` | Tooltip name. | ? |
tooltipConfig | object | ? | ? |
tooltipUi | object | ? | ? |
# tooltipConfig
tooltipConfig : {
scope,
template,
templateUrl
}
# tooltipUi
tooltipUi : {
css,
placement: {
place,
anchor
},
radial,
showDuration,
initialShowDelay,
betweenShowDelay
}
# beforetiletooltip
Fired for the relevant alert before showing its tooltip.
Available tooltip names:
headerTooltip
contentTooltip
offTipper
Name | Type | Description | Example |
---|---|---|---|
alert | `` | Source alert that triggers the event. | ? |
element | `` | Source element that triggers the event. | ? |
name | `` | Tooltip name. | ? |
tooltipPos | object | ? | ? |
cancel | `` | Prevent a tooltip from being displayed. | ? |
# tooltipPos
tooltipPos : {
x,
y
}
# beforetilemenu
Fired for the relevant alert before showing its configuration menu.
Name | Type | Description | Example |
---|---|---|---|
alert | `` | Source alert that triggers the event. | ? |
element | `` | Source element that triggers the event. | ? |
items | `` | Array of items to be displayed. | ? |
cancel | `` | Prevent a tooltip from being displayed. | ? |
# tiletabselected
Fired for the relevant alert after its tab is selected.
Name | Type | Description | Example |
---|---|---|---|
alert | `` | Source alert that triggers the event. | ? |
element | `` | Source element that triggers the event. | ? |
name | `` | Name of the opened tab. | ? |
cancel | `` | Prevent a tooltip from being displayed. | ? |
# beforetilequery
Fired for the relevant alert before sending a query for data to the server.
Name | Type | Description | Example |
---|---|---|---|
alert | `` | Source alert that triggers the event. | ? |
element | `` | Source element that triggers the event. | ? |
request | `` | Request object. | ? |
cancel | `` | Prevent a tooltip from being displayed. | ? |
# aftertilequery
Fired for the relevant alert after a query response received from the server.
Name | Type | Description | Example |
---|---|---|---|
alert | `` | Source alert that triggers the event. | ? |
element | `` | Source element that triggers the event. | ? |
response | `` | Response object. | ? |
# beforetilerender
Fired for the relevant alert before an alert tile is rendered.
Name | Type | Description | Example |
---|---|---|---|
alert | `` | Source alert that triggers the event. | ? |
element | `` | Source element that triggers the event. | ? |
# aftertilerender
Fired for the relevant alert after an alert tile is rendered.
Name | Type | Description | Example |
---|---|---|---|
alert | `` | Source alert that triggers the event. | ? |
element | `` | Source element that triggers the event. | ? |
# loaded
Fired after all alerts are loaded and rendered.
# Alert
Contains an alert’s properties and trigger life cycle events.
Properties
Name | Type | Description | Example |
---|---|---|---|
name | string | Name of the alert. | |
type | string | Type of the alert ('build', 'kpi', and etc.). | |
category | string | Category of the alert ('system', 'kpi', and etc.). | |
action | object | Describes notification options. | |
enabled | boolean | Defines if an alert enabled or disabled. |
# Events
# beforetooltipconfig
Fired before a tooltip is created. You can use this event to configure an alert's tooltip appearance.
Name | Type | Description | Example |
---|---|---|---|
element | `` | Source element that triggers the event. | ? |
name | `` | Tooltip name. | ? |
tooltipConfig | object | ? | ? |
tooltipUi | object | ? | ? |
# tooltipConfig
tooltipConfig : {
scope,
template,
templateUrl
}
# tooltipUi
tooltipUi : {
css,
placement: {
place,
anchor
},
radial,
showDuration,
initialShowDelay,
betweenShowDelay
}
# beforetooltip
Fired before displaying a tooltip.
Name | Type | Description | Example |
---|---|---|---|
element | `` | Source element that triggers the event. | ? |
name | `` | Tooltip name. | ? |
tooltipPos | object | ? | ? |
cancel | `` | Prevent a tooltip from being displayed. | ? |
# tooltipPos
tooltipPos : {
x,
y
}
# beforemenu
Fired before showing an alert’s configuration menu.
Name | Type | Description | Example |
---|---|---|---|
element | `` | Source element that triggers the event. | ? |
items | `` | Array of items to be displayed. | ? |
cancel | `` | Prevent a menu from being displayed. | ? |
# tabselected
Fired after an alert tab selected.
Name | Type | Description | Example |
---|---|---|---|
element | `` | Source element that triggers the event. | ? |
name | `` | Name of the opened tab. | ? |
cancel | `` | Prevent a tab from being displayed. | ? |
# beforequery
Fired before sending a query for data to the server.
Name | Type | Description | Example |
---|---|---|---|
element | `` | Source element that triggers the event. | ? |
request | `` | Request object. | ? |
cancel | `` | Prevent a query from being sent. | ? |
# afterquery
Fired after a query response is received from the server.
Name | Type | Description | Example |
---|---|---|---|
element | `` | Source element that triggers the event. | ? |
response | `` | Response object. | ? |
# beforerender
Fired before an alert tile is rendered.
Name | Type | Description | Example |
---|---|---|---|
element | `` | Source element that triggers the event. | ? |
# afterrender
Fired after an alert tile is rendered.
Name | Type | Description | Example |
---|---|---|---|
element | `` | Source element that triggers the event. | ? |