From 69bcbfeea9bb345364e47f048cd5bcfe64c9c242 Mon Sep 17 00:00:00 2001 From: Kawika Avilla Date: Tue, 28 Feb 2023 12:25:35 -0800 Subject: [PATCH] [BUG][TSVB] Fix serial diff agg link (#3503) Doc link was invalid and causing an undefined error. This prevented the UI from mounting properly. Issue(s) resolved: * https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3498 * https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3327 Signed-off-by: Kawika Avilla --- CHANGELOG.md | 1 + .../public/application/components/aggs/serial_diff.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f64b532afdff..0d1b3a7c119f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -195,6 +195,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Viz Builder] Add index pattern info when loading embeddable ([#2363](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2363)) - Fixes management app breadcrumb error ([#2344](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2344)) - [BUG] Fix suggestion list cutoff issue ([#2607](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2607)) +- [TSVB] Fixes undefined serial diff aggregation documentation link ([#3503](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3503)) ### 🚞 Infrastructure diff --git a/src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js b/src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js index d0941e8c2369..5ecb003e56a4 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js +++ b/src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js @@ -57,7 +57,8 @@ export const SerialDiffAgg = (props) => { const handleNumberChange = createNumberHandler(handleChange); const htmlId = htmlIdGenerator(); - const docLinks = useOpenSearchDashboards().services.docLinks; + const serialDiffDoc = useOpenSearchDashboards().services.docLinks?.links.opensearch.aggregations + .pipeline.serial_diff; return ( { id="visTypeTimeseries.serialDiff.lagLabel" defaultMessage="Lag" description={`'Lag' refers to the parameter name of the serial diff translation - ${docLinks.services.links.opensearch.aggregations.pipeline.serial_diff}. + ${serialDiffDoc}. This should only be translated if there is a reasaonable word explaining what that parameter does.`} /> }