You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[feat]: Added possibility to store additional data with notifications (#2878)
* * (bluefox) Added the link button in notifications
* Extended io-package.json schema
* Extend link definition
* Fixed ip-package.json schema
* Added script to run npm on the very start
* Added support for notification GUI
* Removed link from notifications
* Removed link from notifications
* Renamed offlineMessage back to message
* Added comments
* Small updates
* Rename actionData to contextData
* Changed comment
* Cleanup context data notifications (#2904)
* prevent having too many args on public methods in the future by introducing options objects
* fix jsdoc
* added notification and made structure a bit more clear
* fix types
---------
Co-authored-by: Max Hauser <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -512,6 +512,12 @@ This method takes the following parameters:
512
512
* scope: scope to be addressed
513
513
* category: category to be addressed, if a null message will be checked by regex of given scope
514
514
* message: message to be stored/checked
515
+
* options: Available with js-controller version 6.1. Additional options for the notification, currently you can provide additional `contextData` which is also stored with the notification information. Notification processing adapters can use this data
516
+
517
+
Note, that the structure of the `contextData` which can be stored via the options object is not defined by the controller. Adapters which handle messages can use individual data attributes.
518
+
Currently, it is planned to support individual notification customization in the `admin` adapter. More information will be available in the `admin` adapter as soon as this feature is ready.
519
+
520
+
As a best practice the top-level of `contextData` should not be populated with individual data belonging to instances. Use a `key` specific to the adapter or if a feature is supported by all adapters of a type, the type (e.g. `messaging`) is also fine.
515
521
516
522
When a regex is defined then `console.error` output from the adapter is always checked by the regex and notifications are registered automatically when the regex matches!
/** `info` will only be shown by admin, while `notify` might also be used by messaging adapters, `alert` ensures both */
39
+
/** Allows defining the severity of the notification with `info` being the lowest, `notify` representing middle priority, `alert` representing high priority and often containing critical information */
0 commit comments