Fix dashboard not applying mounting point when linking or redirecting to another page #1067
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.
TL;DR: single app redirection is not the root of our issue here, all mounted dashboards seem broken when using 1.3.0.
When upgrading to the latest version of the dashboard, I encountered the same issue as folks in #1054: app redirects and doesn't keep the mounting point.
Since I made the single app redirection changes in the first place (#958) and it was just a couple lines of code, I started investigating and I'm now 100% confident the problem was misattributed to the single app redirection in the first place.
Unless I'm missing something, something changed between 1.2.0 and 1.3.0. Commenting the code I wrote in #958 didn't fix the issue. I tracked the bad redirection to the following line:
But that's not it! Basically, it looks like the mounting point is lost and the navigation is totally broken when the mountPath is not
/
. I've no idea how it was even working before since the whole app is referring/redirecting to/apps
everywhere, without referencing the eventual mount path.This PR is the result of a painful work trying to add the mountPath everywhere I found it was needed, but to be honest, I had no idea was I was doing the whole time, there might be a simple solution.
@flovilmart: I would love your assistance and opinion on this, thanks!