EventListener

Label: :IA_Function
Property: type: EventListener
Inherits from: Function

Listens to global events such as environment loading, login, errors, etc and conveys them through Triggers.

Parameters

Key Description Default value Possible values
event The event to convey. object

Outgoing triggers

Type: environmentLoaded

Occurrence: When the Graphileon environment and config has loaded successfully.

Additional event properties (besides the inherited properties):

Key Description Possible values
data Data in the event. object
data.name Environment name string
data.stores List of stores and their properties object

Type: login

Occurrence: When the user has successfully logged in.

Additional event properties (besides the inherited properties):

Key Description Possible values
data Data in the event. object
data.automatic User was logged in automatically true/false
data.user User information. User node

Type: logout

Occurrence: When the user has logged out.

Additional event properties (besides the inherited properties):

Key Description Possible values
data The user node data User node

Type: dashboardLoaded

Occurrence: When a dashboard successfully loaded.

Additional event properties (besides the inherited properties):

Key Description Possible values
data Data in the event. object
data.name Dashboard name string
data.iaName Unique Graphileon name, to be used in URLs. string
data.id Store ID of Dashboard node. string
data.shortcuts Functions connected to the Dashboard by :SHORTCUT array
data.startTriggers Functions connected to the Dashboard by :START array
data. Unique Graphileon name, to be used in URLs. string

Type: getOriginFunction

Occurrence: When the dashboard designer requests the Function behind a View (by clicking the cog wheel on a panel).

Additional event properties (besides the inherited properties):

Key Description Possible values
data Data in the event. object
data.id The Function's node ID number

Type: error

Occurrence: When a global error occurs.

Additional event properties (besides the inherited properties):

Key Description Possible values
data Data in the event. object
data.errorType The type of error that occurred. * string
data.message The error message. string

/* Possible error types:

  • error: Non-specific error.
  • errorConfiguration: An error occurred in loading the Graphileon configuration.
  • errorServer: An error occurred while connecting to the server.