Give ability to send test message when creating integration
unkrich opened this issue · 0 comments
unkrich commented
Problem
There's no good way to check that an integration is working as expected today until an anomaly occurs and sends a message through.
Solution
Implement a test button similar to datasources that send a test message through to the integration to confirm it is working. Today, these integrations are slack and webhooks.
Additional Context
- First, add test button / call to frontend.
Refer to data sources for how to do this easily
https://github.com/monosidev/monosi/blob/master/src/ui/src/pages/settings/Sources/components/SourcesTable.tsx#L26-L42
https://github.com/monosidev/monosi/blob/master/src/ui/src/pages/settings/Sources/components/SourcesTable.tsx#L95-L101
Implement similar in integrations:
https://github.com/monosidev/monosi/blob/master/src/ui/src/pages/settings/Integrations
- Add an endpoint in integrations to handle test, again refer to data sources
https://github.com/monosidev/monosi/blob/master/src/server/handlers/datasources.py#L76-L85
https://github.com/monosidev/monosi/blob/master/src/server/handlers/__init__.py#L30
Do the same in:
https://github.com/monosidev/monosi/blob/master/src/server/handlers/integrations.py
https://github.com/monosidev/monosi/blob/master/src/server/handlers/__init__.py#L30
- Add method to integrations which is responsible for creating a test message and sending it.