sisense.com

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:

  1. Click the tile's menu button in the top-right corner of the tile and select Edit Script .
  2. In the JavaScript editor that opens, you can add and edit your JavaScript code.
  3. 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

NameTypeDescription
tilesAlert[]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
NameTypeDescriptionExample
alert``Source alert that triggers the event.?
element``Source element that triggers the event.?
name``Tooltip name.?
tooltipConfigobject??
tooltipUiobject??
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
NameTypeDescriptionExample
alert``Source alert that triggers the event.?
element``Source element that triggers the event.?
name``Tooltip name.?
tooltipPosobject??
cancel``Prevent a tooltip from being displayed.?
tooltipPos
tooltipPos : {
  x,
  y
}

beforetilemenu

Fired for the relevant alert before showing its configuration menu.

NameTypeDescriptionExample
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.

NameTypeDescriptionExample
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.

NameTypeDescriptionExample
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.

NameTypeDescriptionExample
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.

NameTypeDescriptionExample
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.

NameTypeDescriptionExample
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

NameTypeDescriptionExample
namestringName of the alert.
typestringType of the alert ('build', 'kpi', and etc.).
categorystringCategory of the alert ('system', 'kpi', and etc.).
actionobjectDescribes notification options.
enabledbooleanDefines 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.

NameTypeDescriptionExample
element``Source element that triggers the event.?
name``Tooltip name.?
tooltipConfigobject??
tooltipUiobject??
tooltipConfig
tooltipConfig : {
  scope,
  template,
  templateUrl
}
tooltipUi
tooltipUi : {
  css,
  placement: {
      place,
      anchor
  },
  radial,
  showDuration,
  initialShowDelay,
  betweenShowDelay
}

beforetooltip

Fired before displaying a tooltip.

NameTypeDescriptionExample
element``Source element that triggers the event.?
name``Tooltip name.?
tooltipPosobject??
cancel``Prevent a tooltip from being displayed.?
tooltipPos
tooltipPos : {
  x,
  y
}

beforemenu

Fired before showing an alert’s configuration menu.

NameTypeDescriptionExample
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.

NameTypeDescriptionExample
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.

NameTypeDescriptionExample
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.

NameTypeDescriptionExample
element``Source element that triggers the event.?
response``Response object.?

beforerender

Fired before an alert tile is rendered.

NameTypeDescriptionExample
element``Source element that triggers the event.?

afterrender

Fired after an alert tile is rendered.

NameTypeDescriptionExample
element``Source element that triggers the event.?
Last Updated: