Imison.Web.NotificationsLive (Imison v0.1.0)

Copy Markdown View Source

The notifications screen (docs/design/notifications.html): one panel per module in the channels option, then the rules, which apply to every channel that's on (a new error, a resolved error that comes back, an error that keeps happening, the daily summary).

A channel's panel is titled by its label/0 (else its type/0), shows its describe/1 line, an On/Off flag for the stored row, its config_fields/0 as inputs and a switch that turns it on or off. Saving stores the switch and the fields, after the channel's validate_config/1; its errors are listed under the fields and nothing is stored. "Send test" sends the test message through that channel alone with the form's values, saved or not, and names the channel in the flash. A secret field is never rendered back: it says a value is set, and leaving it blank keeps the stored value, on save and on test; ticking its Remove box clears the stored value instead (a new value typed in wins). Recipients are separated by commas or new lines.

Without any channel in the channels option (the host doesn't depend on Swoosh) the screen says how to enable email instead.