Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-25193

[UI] Create a menu item to "test" the integration and how a modal with a default, overrideable message

XMLWordPrintable

    • PlatEx UI Sprint 13

      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.

        1. screenshot-4.png
          screenshot-4.png
          29 kB
        2. screenshot-3.png
          screenshot-3.png
          117 kB
        3. screenshot-2.png
          screenshot-2.png
          48 kB
        4. screenshot-1.png
          screenshot-1.png
          14 kB
        5. image-2022-05-11-17-31-12-274.png
          image-2022-05-11-17-31-12-274.png
          4 kB

              rhn-support-aleriver Xander Rivera (Inactive)
              mbarcina@redhat.com Mikel Barcina
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: