AlertApi
Provides run-time access to Alert function and associated State
export interfaceMethods
| Method | Description |
|---|---|
| addAlertDefinition(alertDefinition) | Adds given Alert Definition to Adaptable State |
| deleteAlertDefinition(alertDefinition) | Deletes given Alert Definition from Adaptable State |
| displayAdaptableAlert(alertToShow) | Displays the given Adaptable Alert |
| displayAdaptableAlertNotification(alert) | Displays given Alert as a Toast |
| editAlertDefinition(alertDefinition) | Updates given Alert Definition in Adaptable State |
| evaluateAlertDefinitions(alertDefinitions) | Evaluates the given Alert Definitions - will fire Alert if rule is met |
| findAlertDefinitions(alertLookupCriteria) | Find all Alert Definitions which match the given criteria |
| getActiveAlertDefinitions(config) | Retrieves all Alert Definitions which are currently active |
| getAlertDefinitionById(id, config) | Retrieves alert definition by the technical ID (from AlertState) |
| getAlertDefinitionByName(name) | Retrieves an Alert Definition by its Name |
| getAlertDefinitions(config) | Retrieves all Alert Definitions in Alert State |
| getAlertState() | Retrieves Alert section from Adaptable State |
| getSuspendedAlertDefinitions(config) | Retrieves all Alert Definitions which are currently suspended |
| openAlertSettingsPanel() | Opens Settings Panel with Alert section selected and visible |
| showAlert(alertHeader, alertMessage, messageType, alertProperties) | Creates Alert based on given parameters and displays it. |
| showAlertError(alertHeader, alertMessage) | Creates an Adaptable Alert based on given parameters and displays it as Error Alert. |
| showAlertInfo(alertHeader, alertMessage) | Creates an Adaptable Alert based on given parameters and displays it as Info Alert. |
| showAlertSuccess(alertHeader, alertMessage) | Creates an Adaptable Alert based on given parameters and displays it as Succcess Alert. |
| showAlertWarning(alertHeader, alertMessage) | Creates an Adaptable Alert based on given parameters and displays it as Warning Alert. |
| suspendAlertDefinition(alertDefinition) | Suspends Alert Definition |
| suspendAllAlertDefinition() | Suspends all Alert Definitions |
| unSuspendAlertDefinition(alertDefinition) | Activates a suspended Alert Definition |
| unSuspendAllAlertDefinition() | Activates all suspended Alert Definition |
Method Details
addAlertDefinition
Adds given Alert Definition to Adaptable State
addAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertDefinition | AlertDefinition | AlertDefinition to add |
Returns
deleteAlertDefinition
Deletes given Alert Definition from Adaptable State
deleteAlertDefinition(alertDefinition: AlertDefinition): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertDefinition | AlertDefinition |
Returns
void
displayAdaptableAlert
Displays the given Adaptable Alert
displayAdaptableAlert(alertToShow: AdaptableAlert): Promise<void>;Parameters
| Parameter | Type |
|---|---|
| alertToShow | AdaptableAlert |
Returns
Promise<void>
displayAdaptableAlertNotification
Displays given Alert as a Toast
displayAdaptableAlertNotification(alert: AdaptableAlert): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| alert | AdaptableAlert | the Alert to show as a Toast |
Returns
void
editAlertDefinition
Updates given Alert Definition in Adaptable State
editAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertDefinition | AlertDefinition | Alert to Edit |
Returns
evaluateAlertDefinitions
Evaluates the given Alert Definitions - will fire Alert if rule is met
evaluateAlertDefinitions(alertDefinitions: AlertDefinition[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertDefinitions | AlertDefinition[] | Alert Definitions to evaluate |
Returns
void
findAlertDefinitions
Find all Alert Definitions which match the given criteria
findAlertDefinitions(alertLookupCriteria: AdaptableObjectLookupCriteria): AlertDefinition[];Parameters
| Parameter | Type | Description |
|---|---|---|
| alertLookupCriteria | AdaptableObjectLookupCriteria | lookup criteria |
Returns
getActiveAlertDefinitions
Retrieves all Alert Definitions which are currently active
getActiveAlertDefinitions(config?: LayoutExtendedConfig): AlertDefinition[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
getAlertDefinitionById
Retrieves alert definition by the technical ID (from AlertState)
getAlertDefinitionById(id: AlertDefinition['Uuid'], config?: LayoutExtendedConfig): AlertDefinition;Parameters
| Parameter | Type | Description |
|---|---|---|
| id | AlertDefinition['Uuid'] | alert definition id |
| config | LayoutExtendedConfig |
Returns
getAlertDefinitionByName
Retrieves an Alert Definition by its Name
getAlertDefinitionByName(name: string): AlertDefinition | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the Alert Definition |
Returns
AlertDefinition | undefined
getAlertDefinitions
Retrieves all Alert Definitions in Alert State
getAlertDefinitions(config?: LayoutExtendedConfig): AlertDefinition[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
getAlertState
Retrieves Alert section from Adaptable State
getAlertState(): AlertState;Returns
getSuspendedAlertDefinitions
Retrieves all Alert Definitions which are currently suspended
getSuspendedAlertDefinitions(config?: LayoutExtendedConfig): AlertDefinition[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
openAlertSettingsPanel
Opens Settings Panel with Alert section selected and visible
openAlertSettingsPanel(): void;Returns
void
showAlert
Creates Alert based on given parameters and displays it.
showAlert(alertHeader: string, alertMessage: string, messageType: AdaptableMessageType, alertProperties?: AlertProperties): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertHeader | string | Header of the Alert (if shown in a popup its the Title of the Window) |
| alertMessage | string | Main message of the alert |
| messageType | AdaptableMessageType | |
| alertProperties | AlertProperties |
Returns
Promise<void>
showAlertError
Creates an Adaptable Alert based on given parameters and displays it as Error Alert.
showAlertError(alertHeader: string, alertMessage: string): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertHeader | string | Header of the Alert (if shown in a popup its the Title of the Window) |
| alertMessage | string | Main message of the alert |
Returns
Promise<void>
showAlertInfo
Creates an Adaptable Alert based on given parameters and displays it as Info Alert.
showAlertInfo(alertHeader: string, alertMessage: string): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertHeader | string | Header of the Alert (if shown in a popup its the Title of the Window) |
| alertMessage | string | Main message of the alert |
Returns
Promise<void>
showAlertSuccess
Creates an Adaptable Alert based on given parameters and displays it as Succcess Alert.
showAlertSuccess(alertHeader: string, alertMessage: string): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertHeader | string | Header of the Alert (if shown in a popup its the Title of the Window) |
| alertMessage | string | Main message of the alert |
Returns
Promise<void>
showAlertWarning
Creates an Adaptable Alert based on given parameters and displays it as Warning Alert.
showAlertWarning(alertHeader: string, alertMessage: string): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertHeader | string | Header of the Alert (if shown in a popup its the Title of the Window) |
| alertMessage | string | Main message of the alert |
Returns
Promise<void>
suspendAlertDefinition
Suspends Alert Definition
suspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertDefinition | AlertDefinition | Alert to suspend |
Returns
suspendAllAlertDefinition
Suspends all Alert Definitions
suspendAllAlertDefinition(): void;Returns
void
unSuspendAlertDefinition
Activates a suspended Alert Definition
unSuspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;Parameters
| Parameter | Type | Description |
|---|---|---|
| alertDefinition | AlertDefinition | Alert to Un-suspend (activate) |
Returns
unSuspendAllAlertDefinition
Activates all suspended Alert Definition
unSuspendAllAlertDefinition(): void;Returns
void