-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI works on subpaths #3992
UI works on subpaths #3992
Conversation
- Allows us to support a wider range of ingress-controllers
db0a707
to
bac6af6
Compare
- golang gocritic linting
@LappleApple I'll write up some docs for this. "How to run weave-gitops on a sub path of your ingress controller", thoughts about where it should go? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should document how to do this?
Looks good, but we probably need some Helm and documentation! |
Co-authored-by: Kevin McDermott <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Love the UI tests and extra helper script.
@foot Let's chat next week about docs-y things :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it locally, and it works, let's get the exported functions either not-exported, if they don't need to be, or documented.
Otherwise, looks good.
- Helps the user find what they are after
The UI is built w/ relative asset links. If you land on a subpage e.g. /git-repo/details, then the base tag must still be present to indicate the relative js/css should be loaded from "/" and not from "/git-repo/details"
- Add Makefile helper too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
@foot Still misses a new proper image and an updated Helm chart to reference that image to be usable by end users if not mistaken? Anyhow, thank you for this - in my view - important feature! |
@gre9ory it should be in the next release |
Fixes #2529
What changed?
Why was this change made?
How was this change implemented?
UI routing now checks for and respects a
<base href="/foo/" />
tag if present.If its not present everything works as it did before.
Understand
<BrowserRouter />
.<base href="/wego/" />
tells the UI where to fetch relative resources from and where the api request can be made from (/wego/v1/api etc)On the backend
How to set the
<base />
tag in the served index.html<base />
tag injected from cli/
302 ->/weave-gitops
How did you validate the change?
Test
additionalArgs
intools/helm-dev-values.yaml
tilt up
Test to check ingress works too..
Spin up a kind cluster w/ ingress support:
./tools/kind-with-ingress.sh
ingress
andadditionalArgs
sections intools/helm-dev-values.yaml
tilt up
Release notes
Documentation Changes