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

Change UI configuration to a Javascript file #677

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/jaeger-ui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
// Jaeger UI config data is embedded by the query-service via search-replace.
// This is later merged with defaults into the redux `state.config` via
// src/utils/config/get-config.js.
// JAEGER_CONFIG_JS
// the line above may be replaced by user-provided JS file that should define a UIConfig function.
function getJaegerUiConfig() {
if(typeof window.UIConfig === 'function') {
return UIConfig();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the result be memorized? I see a dozen log lines with the following config:

function UIConfig() {
    console.log("loading config");
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
const DEFAULT_CONFIG = null;
const JAEGER_CONFIG = DEFAULT_CONFIG;
return JAEGER_CONFIG;
Expand Down