Uploaded image for project: 'OpenShift Dev Console'
  1. OpenShift Dev Console
  2. ODC-7274

Prepare a page and modal to invoke a Serverless function



    • Story
    • Resolution: Done
    • Undefined
    • None
    • None
    • UI
    • None
    • ODC Sprint 234



      As a user, I want to invoke a Serverless function from the developer console. This action should be available as a page and as a modal.

      This story is to evaluate a good UI for this and check this with our PM (Serena) and the Serverless team (Naina and Lance).

      Acceptance Criteria

      1. Add a new page with title "Invoke Serverless function {function-name}" and should be available via a new URL (/serverless/ns/:ns/invoke-function/:function-name/).
      2. Implement a form with formik to "invoke" (console.log for now) Serverless functions, without writing the network call for this already. Focus on the UI to get feedback as early as possible. Use reusable, well-named components anyway.
      3. The page should be also available as a modal. Add a new action to all Serverless Services with the label (tbd) to open this modal from the Topology graph or from the Serverless Service list view.
      4. The page should have two tabs or two panes for the request and response. Each of this tabs/panes should have again two tabs, "similar" to the browser network inspector. See below for what we know currently.
      5. Get confirmation from Christoph, Serena, Naina, and Lance.
      6. Disable the action until we implement the network communication in ODC-7275 with the serverless function.
      7. No e2e tests are needed for this story.

      Additional Details:

      Information the form should show:

      1. Request tab shows "Body" and "Options" tab
        1. Body is just a full size editor. We should reuse our code editor.
        2. Options contains:
          1. Auto complete text field “Content type” with placeholder “application/json”, that will be used when nothing is entered
          2. Dropdown “Format” with values “cloudevent” (default) and “http”
          3. Text field “Type” with placeholder text “boson.fn”, that will be used when nothing is entered
          4. Text field “Source” with placeholder “/boson/fn”, that will be used when nothing is entered
      2. Response tab shows Body and Info tab
        1. Body is a full size editor that shows the response. We should format a JSON string with JSON.stringify(data, null, 2)
        2. Info contains:
          1. Id (id)
          2. Type (type)
          3. Source (source)
          4. Time (time) (formatted)
          5. Content-Type: (datacontenttype)


        Issue Links



              avik6028 Avik Kundu
              cjerolim Christoph Jerolimov
              0 Vote for this issue
              1 Start watching this issue