Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-6210

Redirect url field is not rendered when editing a mapping rule

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • None
    • SaaS
    • System
    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • No
    • Undefined
    • Hide

      The workaround is to use the 3scale API endpoint "Proxy Mapping Rule Update" and add the field redirect_url, i.e.:

      curl -v  -X PATCH "https://<admin-portal-url>/admin/api/services/<service-id>/proxy/mapping_rules/<mapping-rule-id>.xml" -d 'access_token=<access-token>&redirect_url=http%3A%2F%2Fexample.com%3A8080'
      
      Show
      The workaround is to use the 3scale API endpoint "Proxy Mapping Rule Update" and add the field redirect_url , i.e.: curl -v -X PATCH "https: //<admin-portal-url>/admin/api/services/<service-id>/proxy/mapping_rules/<mapping-rule-id>.xml" -d 'access_token=<access-token>&redirect_url=http%3A%2F%2Fexample.com%3A8080'
    • Hide

      Using for example 3scale On-premises 2.8:

      1. Enable proxy pro feature in system ConfigMap, redeploy system app and system sidekiq
      2. Set APIcast to self-managed
      3. Go to the Admin portal > Integration > Mapping rules. You should be able to see the Redirect field between "Pattern" and "+".
      4. On one mapping rule click edit, the field "Redirect" is not rendered.
      Show
      Using for example 3scale On-premises 2.8: Enable proxy pro feature in system ConfigMap, redeploy system app and system sidekiq Set APIcast to self-managed Go to the Admin portal > Integration > Mapping rules. You should be able to see the Redirect field between "Pattern" and "+". On one mapping rule click edit, the field "Redirect" is not rendered.

    Description

      Current behaviour

      Proxy pro feature adds a redirect url field to the mapping rule object which should be editable in the UI but unfortunately the field does not render so this value cannot be updated after the mapping rule has been created.

      Expected behaviour

      Proxy pro feature adds a redirect url field to the mapping rule object which a user can edit in the UI.

      Patching the deployment with the following steps fixes the issue:

      1. Create a file edit.html.slim that adds:
        include_redirect: @service.using_proxy_pro?
        
      2. Create the ConfigMap:
         oc create configmap edit --from-file=edit.html.slim
        
      3. Add the volume to system-app:
        oc set volumes dc/system-app --add --overwrite --name=edit --mount-path=/opt/system/app/views/api/proxy_rules/edit.html.slim --sub-path=edit.html.slim --source='{"configMap":{"name":"edit"}}'
        
      4. Go to the admin portal and try to edit a mapping rule, the Redirect field is rendered now.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-avilatus Anna Vila Tusell
            Jose Miguel Gallas Olmedo Jose Miguel Gallas Olmedo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: