System Status Messages
Summary
- System Status Messages keep users informed about application or data health at run time
- They appear in the System Status toolbar, tool panel, status bar, dashboard module button, and Settings Panel history
- Optional toast popups use the same notification stack as Alerts (
showSystemStatusMessageNotifications) - Post messages via
systemStatusApi; configure history size and toasts innotificationsOptions
AdapTable allows developers and support teams to send System Status Messages at run time.
Each message has a StatusType (Info, Success, Warning, Error) with an associated theme colour.
Messages are sent through adaptableApi.systemStatusApi — see Sending messages below.
Topics in this Section
| Topic | Summary |
|---|---|
| This page | Where messages appear, status types, sending, session history |
| Configuring System Status Messages | maxSystemMessagesInStore, showSystemStatusMessageNotifications |
| System Status Message Technical Reference | systemStatusApi, SystemStatusMessageDisplayed event |
| Toast Notifications | Shared toast styling (notificationsOptions) for System Status and Alerts |
Displaying Messages
System Status Messages are displayed in the System Status Message section of the Settings Panel.
Hint
This screen can be accessed by selecting Show System Status in the Column and Context Menus
This shows a history of all System Status Messages (sent in the current session) and ordered by the most recently received Message.
Note
- Messages which include a
FurtherInformationproperty (or which are very long Messages) display an ellipsis - This allows for the whole Message to be read when it is clicked
There is a Delete All Messages button which will clear the Messages from State.
Other Message Locations
System Status messages can also be displayed in multiple places in AdapTable including:
-
as a Toast Notification (if
showSystemStatusMessageNotificationsis set to true in Notifications Options) -
in System Status Toolbar
-
in System Status ToolPanel
-
in the Dashboard via the
SystemStatusModule Button which shows a different icon appropriate to the last Message's Status Type -
in the Status Bar
-
in a Custom Div (if one is provided by a developer in Container Options via
systemStatusContainer) -
through the System Status Message Displayed Event
Find Out More
See Configuring System Status Messages for toast and history limits.
Status Types
Each System Status Message has a StatusType with an associated colour.
Note
- AdapTable associates each StatusType with a CSS Variable to set the colour of the System Status Message
- The colour returned by any of these variables can be set when Customising an AdapTable Theme
The 4 Status Types (of type AdaptableMessageType) and their associated default colours are:
| Status Type | CSS Variable | Default Colour |
|---|---|---|
| Info | --ab-color-info | Blue |
| Success | --ab-color-success | Green |
| Warning | --ab-color-warn | Orange |
| Error | --ab-color-destructive | Red |
- This demo sends System Status messages (via
systemStatusApi) in 2 ways:- clicking the buttons in the 'Setting Message Buttons' Custom Toolbar - there is one button for each available Status Type
- selecting the entries in the 'Set System Status' User Menu Item in the Context Menu
- It displays these System Status messages:
- in the System Status Toolbar
- in the System Status Tool Panel
- the System Status Module Button in the Dashboard (which changes colour and image based on the System Type)
- in the System Status section of the Settings Panel (available by clicking the System Status Module Button or the configure button in the System Status Toolbar)
- Click the buttons in the Setting Message Buttons Toolbar to see the System Status Message change
Sending Messages
Use adaptableApi.systemStatusApi (see System Status API):
| Method | Purpose |
|---|---|
setInfoSystemStatus(message, furtherInformation?) | Info status |
setSuccessSystemStatus(message, furtherInformation?) | Success status |
setWarningSystemStatus(message, furtherInformation?) | Warning status |
setErrorSystemStatus(message, furtherInformation?) | Error status |
setSystemStatus(message, messageType, furtherInformation?) | Any AdaptableMessageType |
getCurrentSystemStatusMessageInfo() | Current message (if any) |
deleteAllSystemStatusMessages() | Clear session history |
openSystemStatusSettingsPanel() | Open Settings Panel on System Status |
Optional furtherInformation shows expandable detail in the Settings Panel history.
Alerts can also write to System Status when DisplaySystemStatusMessage is enabled on the Alert — see Scheduled Alerts and Alerting.
Storing Messages
By default AdapTable stores the 100 most recent System Status Messages in session state (in memory for the current grid session).
Note
This is configurable via the maxSystemMessagesInStore property in Notifications Options
Caution
System Status Messages are not stored between sessions and are not part of persisted Adaptable State
FAQ
Can I choose where System Status messages are displayed? Yes. The System Status message will always display in the Toolbar and ToolPanel but additionally you can
- provide a Div (via the
systemStatusContainerproperty in Container Options) where it will display - set
showSystemStatusMessageNotificationsto true in Notifications Options to also show a toast - subscribe to the System Status Message Displayed Event and handle messages in custom UI
Can Alerts post System Status messages?
Yes. Set DisplaySystemStatusMessage on the Alert definition (or in Alert Properties in the wizard). Team Sharing can publish System Status when active shares update (updateNotification: 'SystemStatus').
Can I react in code when a message is shown?
Subscribe to SystemStatusMessageDisplayed — see System Status Message Displayed Event.