[THREESCALE-6116] Conditional policy: disable UI field #1530
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
THREESCALE-6116 is assigned to porta but I think it belongs to here.
I don't think we'll be able to edit the
conditional
policy from UI because this is a corner case where we need to recursively add a jsonschema form inside another. I'm not sure that's possible but in any case it would take much more resources than the issue deserves IMO.After a discussion in the comments, it was agreed to just add a notice about this policy being managed by operator. In my opinion, the right place to do this is the policy schema in Apicast.
After taking a look, I think we don't actually need to disable the whole policy from UI, only the recursive field
policy_chain
. I tested thecondition
field and it works fine and can be edited from UI without problems.Since I already made some changes in the policy locally, I thought it would be good to share them.
This is how the form looks now: