AtlasOfLivingAustralia / alerts

Alerts services
https://alerts.ala.org.au
Other
1 stars 7 forks source link

Built-in test service to allow email alerts to be triggered manually #67

Open nickdos opened 4 years ago

nickdos commented 4 years ago

This still just a vague idea so implementation details may need to be refined or completely changed.

Idea is that when someone deploys this application to a test environment (or runs it locally), that a test-specific alert is created that points to a URL that is hosted within the alerts app itself. The controls for how this self-hosted service is modified, is to be configured via the /admin interface, with the expectation that once you have subscribed to this test alert (only visible on "My Alerts" page if you have a specific role (ROLE_ADMIN by default), that you can then go to the /admin controls, and tell it to increment the output of the test endpoint. This should then trigger a diff check that results in changed: true in logging output and then results in an email being sent (or if postie.enableEmail=false a log message).

The test controller should produce a simple JSON output, something like:

{ 
  "name": "test alerts check",
  "data": [ 0, 1, 2 ]
}

Incrementing the output via a specific GSP entry in /admin should then add an integer to the data array.

adam-collins commented 6 months ago

Biosecurity admin can do this. Add to the debug alert page, with an option for each alert.