From fd4ed0a5dfb4caae526d1ae1109fdb763681d7c1 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 10 Jun 2020 15:55:49 -0400 Subject: [PATCH 1/6] Allow customizing Quality Metrics menu title Signed-off-by: Yuri Shkuro --- packages/jaeger-ui/src/components/App/TopNav.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jaeger-ui/src/components/App/TopNav.tsx b/packages/jaeger-ui/src/components/App/TopNav.tsx index 4cf3b78b6c..055383b10a 100644 --- a/packages/jaeger-ui/src/components/App/TopNav.tsx +++ b/packages/jaeger-ui/src/components/App/TopNav.tsx @@ -64,7 +64,7 @@ if (getConfigValue('qualityMetrics.menuEnabled')) { NAV_LINKS.push({ to: qualityMetrics.getUrl(), matches: qualityMetrics.matches, - text: 'Quality Metrics', + text: getConfigValue('qualityMetrics.menuLabel') || 'Quality Metrics', }); } From 986fd152bc3ee4cba9d1d2c8fc2b0008902dfdde Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 10 Jun 2020 15:56:28 -0400 Subject: [PATCH 2/6] Change default title Signed-off-by: Yuri Shkuro --- packages/jaeger-ui/src/components/App/TopNav.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jaeger-ui/src/components/App/TopNav.tsx b/packages/jaeger-ui/src/components/App/TopNav.tsx index 055383b10a..6b7a483fe0 100644 --- a/packages/jaeger-ui/src/components/App/TopNav.tsx +++ b/packages/jaeger-ui/src/components/App/TopNav.tsx @@ -64,7 +64,7 @@ if (getConfigValue('qualityMetrics.menuEnabled')) { NAV_LINKS.push({ to: qualityMetrics.getUrl(), matches: qualityMetrics.matches, - text: getConfigValue('qualityMetrics.menuLabel') || 'Quality Metrics', + text: getConfigValue('qualityMetrics.menuLabel') || 'Trace Quality', }); } From 18d2631aeb26084732241d789f0c5a37db94a748 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 10 Jun 2020 16:48:42 -0400 Subject: [PATCH 3/6] Move defaults Signed-off-by: Yuri Shkuro --- packages/jaeger-ui/src/components/App/TopNav.tsx | 2 +- packages/jaeger-ui/src/constants/default-config.tsx | 4 ++++ packages/jaeger-ui/src/types/config.tsx | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/jaeger-ui/src/components/App/TopNav.tsx b/packages/jaeger-ui/src/components/App/TopNav.tsx index 6b7a483fe0..1bdf5d742f 100644 --- a/packages/jaeger-ui/src/components/App/TopNav.tsx +++ b/packages/jaeger-ui/src/components/App/TopNav.tsx @@ -64,7 +64,7 @@ if (getConfigValue('qualityMetrics.menuEnabled')) { NAV_LINKS.push({ to: qualityMetrics.getUrl(), matches: qualityMetrics.matches, - text: getConfigValue('qualityMetrics.menuLabel') || 'Trace Quality', + text: getConfigValue('qualityMetrics.menuLabel'), }); } diff --git a/packages/jaeger-ui/src/constants/default-config.tsx b/packages/jaeger-ui/src/constants/default-config.tsx index 198b84f9a3..fd4bc28c56 100644 --- a/packages/jaeger-ui/src/constants/default-config.tsx +++ b/packages/jaeger-ui/src/constants/default-config.tsx @@ -25,6 +25,10 @@ export default deepFreeze( menuEnabled: true, }, linkPatterns: [], + qualityMetrics: { + menuEnabled: false, + menuLabel: '' + }, menu: [ { label: 'About Jaeger', diff --git a/packages/jaeger-ui/src/types/config.tsx b/packages/jaeger-ui/src/types/config.tsx index a34a461f46..fe9d14659a 100644 --- a/packages/jaeger-ui/src/types/config.tsx +++ b/packages/jaeger-ui/src/types/config.tsx @@ -48,6 +48,7 @@ export type Config = { pathAgnosticDecorations?: TPathAgnosticDecorationSchema[]; qualityMetrics?: { menuEnabled?: boolean; + menuLabel?: string; }; search?: { maxLookback: { label: string; value: string }; maxLimit: number }; scripts?: TScript[]; From 9b230fc5d9b7707aca877e2d5b792aef2d8ac219 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 10 Jun 2020 17:19:00 -0400 Subject: [PATCH 4/6] prettier Signed-off-by: Yuri Shkuro --- packages/jaeger-ui/src/constants/default-config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jaeger-ui/src/constants/default-config.tsx b/packages/jaeger-ui/src/constants/default-config.tsx index fd4bc28c56..c4b6ebb7c4 100644 --- a/packages/jaeger-ui/src/constants/default-config.tsx +++ b/packages/jaeger-ui/src/constants/default-config.tsx @@ -27,7 +27,7 @@ export default deepFreeze( linkPatterns: [], qualityMetrics: { menuEnabled: false, - menuLabel: '' + menuLabel: '', }, menu: [ { From 487d18f993caec36073f630d1ea2b2aa2357713d Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 10 Jun 2020 17:25:26 -0400 Subject: [PATCH 5/6] comment Signed-off-by: Yuri Shkuro --- packages/jaeger-ui/src/types/config.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/jaeger-ui/src/types/config.tsx b/packages/jaeger-ui/src/types/config.tsx index fe9d14659a..899be04904 100644 --- a/packages/jaeger-ui/src/types/config.tsx +++ b/packages/jaeger-ui/src/types/config.tsx @@ -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?: { From 9e67533e047e28ffc4bacc8067d6defd1702dace Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Wed, 10 Jun 2020 17:26:51 -0400 Subject: [PATCH 6/6] default Signed-off-by: Yuri Shkuro --- packages/jaeger-ui/src/constants/default-config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jaeger-ui/src/constants/default-config.tsx b/packages/jaeger-ui/src/constants/default-config.tsx index c4b6ebb7c4..5fd6bf472e 100644 --- a/packages/jaeger-ui/src/constants/default-config.tsx +++ b/packages/jaeger-ui/src/constants/default-config.tsx @@ -27,7 +27,7 @@ export default deepFreeze( linkPatterns: [], qualityMetrics: { menuEnabled: false, - menuLabel: '', + menuLabel: 'Trace Quality', }, menu: [ {