Skip to content
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

Provide a means to define a path-prefix for the UI #745

Closed
tiffon opened this issue Mar 19, 2018 · 0 comments · Fixed by #748
Closed

Provide a means to define a path-prefix for the UI #745

tiffon opened this issue Mar 19, 2018 · 0 comments · Fixed by #748
Assignees

Comments

@tiffon
Copy link
Member

tiffon commented Mar 19, 2018

With jaegertracing/jaeger-ui#198, a path prefix for the UI can be configured dynamically, e.g. the Jaeger UI can be rooted at /some-prefix/ instead of the root path.

This is to address jaegertracing/jaeger-ui#42.

In order to configure path-prefix, the query-service needs to replace the value of a <base> element in the index.html provided by the UI.

The text to match is:

<base href="/" data-inject-target="BASE_URL"/>

The portion to replace is the "/" value to the href attribute.

For instance, if the path-prefix is "/tracing/east/", the resultant text should be:

<base href="/tracing/east/" data-inject-target="BASE_URL"/>

Note: The data-inject-target="BASE_URL" is only there to serve as some indication that the element is manipulated programmatically, i.e. don't edit manually.

The user needs some way to define the path-prefix. Seems like a CLI param or envvar would be good candidates. The query-service would then use the user-provided value to do the replacement.

A quick note on the format of the value: The first and last characters should be /. If the first is omitted then the base URL will be relative to whatever the current URL is, e.g. http://localhost/trace/abc/tracing/east/ instead of http://localhost/tracing/east/. If the last char is not a / then relative URLs (mostly the static assets referenced in index.html) will not have a separating / from the base URL.

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 a pull request may close this issue.

2 participants