ui: Change the URL prefix of partitions from -
to _
#11801
Merged
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.
We currently use special non-DNS permitted prefixes to detect the URL segments for partitions and namespace in order to keep our URLs as backwards compatible as possible whilst avoiding the use of query parameters
?
for identifying completely different sets of data (as opposed to different views of the same data, which is what we mostly use query params for). For example our URLs can look like any of the following:/ui/datacenter-name/services/service-name
/ui/~namespace-name/datacenter-name/services/service-name
/ui/-partition-name/~namespace-name/datacenter-name/services/service-name
We decided to change the nicer looking
-
to a_
for the less common partition segment in order to keep the nicer-
for other potentially more common purposes.TLDR; This PR changes the last URL in the above examples to:
/ui/_partition-name/~namespace-name/datacenter-name/services/service-name
There are only a handful of places in the UI where need to change this as its almost all managed in the custom Ember Location we use for our "optional" URL segments, but in order to double check I did a search across the codebase for
~
, which whilst we aren't changing~
brought up all the areas where we do anything to do with these special prefix characters.