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

Make the order of policy parameters more intuitive

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Can't Do
    • Icon: Minor Minor
    • None
    • 2.8 GA
    • Gateway
    • None
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      The UI order of policy params (on the admin portal) should be more intuitive, especially the conditional part of the policy. 

      Example (custom metric policy) https://github.com/3scale/APIcast/blob/master/gateway/src/apicast/policy/custom_metrics/apicast-policy.json
      Order in the JSON file:

      "properties": {
                "left": {
                },
                "op": {
                },
                "right": {
                },
                "left_type": {
                },
                "right_type": {
                },  
              }

      Order in the UI is: 

      1. op
      2. right
      3. left_type
      4. left
      5. right_type**

      The order in the UI should be:

      1. left
      2. op
      3. right
      4. left_type
      5. right_type**

       DEV notes:

      I had done some investigation, and it seems that this is caused by the conversion of JSON file to Lua table https://github.com/3scale/APIcast/blob/master/gateway/src/apicast/policy_manifests_loader.lua#L50. Lua tables are not ordered, and the ordering is lost when

      cjson.decode(manifest)

      is performed.

              Unassigned Unassigned
              jsmadis Jakub Smadis (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: