Skip to content

Commit

Permalink
Allow customizing trace quality menu title (jaegertracing#592)
Browse files Browse the repository at this point in the history
* Allow customizing Quality Metrics menu title

Signed-off-by: Yuri Shkuro <ys@uber.com>

* Change default title

Signed-off-by: Yuri Shkuro <ys@uber.com>

* Move defaults

Signed-off-by: Yuri Shkuro <ys@uber.com>

* prettier

Signed-off-by: Yuri Shkuro <ys@uber.com>

* comment

Signed-off-by: Yuri Shkuro <ys@uber.com>

* default

Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
  • Loading branch information
yurishkuro committed Jun 10, 2020
1 parent e7aa715 commit 084624d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/components/App/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if (getConfigValue('qualityMetrics.menuEnabled')) {
NAV_LINKS.push({
to: qualityMetrics.getUrl(),
matches: qualityMetrics.matches,
text: 'Quality Metrics',
text: getConfigValue('qualityMetrics.menuLabel'),
});
}

Expand Down
4 changes: 4 additions & 0 deletions packages/jaeger-ui/src/constants/default-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export default deepFreeze(
menuEnabled: true,
},
linkPatterns: [],
qualityMetrics: {
menuEnabled: false,
menuLabel: 'Trace Quality',
},
menu: [
{
label: 'About Jaeger',
Expand Down
2 changes: 2 additions & 0 deletions packages/jaeger-ui/src/types/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type LinkPatternsConfig = {
text: string;
};

// Default values are provided in packages/jaeger-ui/src/constants/default-config.tsx
export type Config = {
archiveEnabled?: boolean;
deepDependencies?: {
Expand All @@ -48,6 +49,7 @@ export type Config = {
pathAgnosticDecorations?: TPathAgnosticDecorationSchema[];
qualityMetrics?: {
menuEnabled?: boolean;
menuLabel?: string;
};
search?: { maxLookback: { label: string; value: string }; maxLimit: number };
scripts?: TScript[];
Expand Down

0 comments on commit 084624d

Please sign in to comment.