-
Story
-
Resolution: Done
-
Normal
-
None
-
None
Description
We want to let users modify the event's message whenever they attempt to test their endpoint. That way, they can trigger an event in Notifications that will go through the integration they have set up, containing the message they have defined. The context of this ticket is:
- Notifications allows users to set "endpoints", such as webhooks, to which we can send notifications to.
- However, until now, users had to wait for a real notification in order to see the shape and form of it.
- We implemented a feature in the backend that generated a "test notification" that would get sent on demand, every time the user requests it. That way they can receive a fake notification on their endpoint.
- However, we need the UI people to add a button to the "integration settings" menu that says "Test integration".
- Upon clicking on that, the user would be able to modify the notification's message if they so desire, by introducing a custom message on the modal.
Schema
- Show a "Test..." text whenever you click on the three dots of an integration.
- Once clicked, it should show a modal with a text field with the "Notification message" label and the following placeholder —without the double quotes—: "Congratulations! The integration you created on https://console.redhat.com was successfully tested!"
- A couple of "Send" or "Cancel" buttons should show so that the user can send the message or cancel the operation.
- If the user clicks on "Send", a POST request should be sent to /api/integrations/v1.0/endpoints/{{uuid/test}} with the following optional payload —if the user doesn't specify a new message the request can be sent without the body—:
{ "message": "Overrode message" }
Also, probably an informative message could be shown above the text field's label, which says something along the lines of "You can specify a custom message for the notification's payload. If you don't, a default message will be sent".
Notification popup
When the integration is tested server will response with 204 for success and 400 status code for error. We can show pop up notification that says "Your test to integration
{TYPE}was successfull, to view payload response check event log#link_to_event_log_page.
- depends on
-
RHCLOUD-25186 Allow overriding the default message for the "test endpoint" feature
- Closed
- relates to
-
RHCLOUD-22412 Allow users to test a new/existing integration endpoint with sample HTTP post
- Closed