Skip to content

Conversation

ricoberger
Copy link
Member

Since our IDs are containing a slash ("/") to seperate the different
parts (satellite, cluster, namespace and name) we had to encode the ID
to use it as parameter in the React Router. This is not working
properly, so that it can happen that the encoded slash character is
replaced by a real slash when a user reloads an URL. This leads to the
situation that React Router isn't aware of this url format and so
nothing is rendered.

We decided to adjust the URLs in React Router, so that we can still use
slashes in our IDs, but instead of just a "type" parameter, we now have
a parameter for every id part, which results in the following routes:

  • /applications/satellite/:satellite/cluster/:cluster/namespace/:namespace/name/:name
  • /dashboards/satellite/:satellite/cluster/:cluster/namespace/:namespace/name/:name

Since our IDs are containing a slash ("/") to seperate the different
parts (satellite, cluster, namespace and name) we had to encode the ID
to use it as parameter in the React Router. This is not working
properly, so that it can happen that the encoded slash character is
replaced by a real slash when a user reloads an URL. This leads to the
situation that React Router isn't aware of this url format and so
nothing is rendered.

We decided to adjust the URLs in React Router, so that we can still use
slashes in our IDs, but instead of just a "type" parameter, we now have
a parameter for every id part, which results in the following routes:

- /applications/satellite/:satellite/cluster/:cluster/namespace/:namespace/name/:name
- /dashboards/satellite/:satellite/cluster/:cluster/namespace/:namespace/name/:name
@ricoberger ricoberger force-pushed the app-change-urls-for-application-and-dashboard-page branch from 437dfe4 to 6443045 Compare June 14, 2022 20:25
@ricoberger ricoberger merged commit 91e8f99 into main Jun 14, 2022
@ricoberger ricoberger deleted the app-change-urls-for-application-and-dashboard-page branch June 14, 2022 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant