From 5bfc5cb7cd67938cb2ee704b175d66f306369bcf Mon Sep 17 00:00:00 2001 From: Tommy Markley Date: Wed, 26 May 2021 21:27:31 +0000 Subject: [PATCH 1/2] Fix dashboards documentation and DQL links, expand help menu width so label isn't truncated Signed-off-by: Tommy Markley --- src/core/public/chrome/ui/header/header_help_menu.tsx | 4 ++-- src/core/public/doc_links/doc_links_service.test.ts | 2 +- src/core/public/doc_links/doc_links_service.ts | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/core/public/chrome/ui/header/header_help_menu.tsx b/src/core/public/chrome/ui/header/header_help_menu.tsx index ad8ceb23ff87..0997bbbb4ff3 100644 --- a/src/core/public/chrome/ui/header/header_help_menu.tsx +++ b/src/core/public/chrome/ui/header/header_help_menu.tsx @@ -91,7 +91,7 @@ export type ChromeHelpExtensionMenuDocumentationLink = EuiButtonEmptyProps & { linkType: 'documentation'; /** * URL to documentation page. - * i.e. `${OPENSEARARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/${appName}.html`, + * i.e. `${OPENSEARCH_DOCS}${appName}`, */ href: string; }; @@ -365,7 +365,7 @@ class HeaderHelpMenuUI extends Component { -
+
{defaultContent} {defaultContent && customContent && } {customContent} diff --git a/src/core/public/doc_links/doc_links_service.test.ts b/src/core/public/doc_links/doc_links_service.test.ts index 606086bc1431..d25b02ea2e33 100644 --- a/src/core/public/doc_links/doc_links_service.test.ts +++ b/src/core/public/doc_links/doc_links_service.test.ts @@ -41,7 +41,7 @@ describe('DocLinksService#start()', () => { const api = service.start({ injectedMetadata }); expect(api.DOC_LINK_VERSION).toEqual('test-branch'); expect(api.links.opensearchDashboards).toEqual( - 'https://www.opensearch.org/guide/en/kibana/test-branch/index.html' + 'https://docs-beta.opensearch.org/docs/opensearch-dashboards/' ); }); }); diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index c037be584e5a..9631cbf563a8 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -43,7 +43,8 @@ export class DocLinksService { public start({ injectedMetadata }: StartDeps): DocLinksStart { const DOC_LINK_VERSION = injectedMetadata.getOpenSearchDashboardsBranch(); const OPENSEARCH_WEBSITE_URL = 'https://www.opensearch.org/'; - const OPENSEARCH_DOCS = `${OPENSEARCH_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`; + const OPENSEARCH_DOCS = `https://docs-beta.opensearch.org/docs/opensearch/`; + const OPENSEARCH_DASHBOARDS_DOCS = `https://docs-beta.opensearch.org/docs/opensearch-dashboards/`; return deepFreeze({ DOC_LINK_VERSION, @@ -126,7 +127,7 @@ export class DocLinksService { introduction: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-patterns.html`, }, addData: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`, - opensearchDashboards: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index.html`, + opensearchDashboards: `${OPENSEARCH_DASHBOARDS_DOCS}`, siem: { guide: `${OPENSEARCH_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/index.html`, gettingStarted: `${OPENSEARCH_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/index.html`, @@ -134,8 +135,8 @@ export class DocLinksService { query: { eql: `${OPENSEARCH_DOCS}eql.html`, luceneQuerySyntax: `${OPENSEARCH_DOCS}query-dsl-query-string-query.html#query-string-syntax`, - queryDsl: `${OPENSEARCH_DOCS}query-dsl.html`, - kueryQuerySyntax: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kuery-query.html`, + queryDsl: `${OPENSEARCH_DOCS}query-dsl`, + kueryQuerySyntax: `${OPENSEARCH_DOCS}query-dsl`, }, date: { dateMath: `${OPENSEARCH_DOCS}common-options.html#date-math`, From b0691c7de06e2e2bc14ce874efc0d6041c7fd77b Mon Sep 17 00:00:00 2001 From: Tommy Markley Date: Wed, 26 May 2021 22:41:20 +0000 Subject: [PATCH 2/2] Remove kibana references from doc links, fix aggregation links Signed-off-by: Tommy Markley --- .../public/doc_links/doc_links_service.ts | 86 +++++++++---------- .../__snapshots__/empty_state.test.tsx.snap | 2 +- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index 9631cbf563a8..b2122cb2380e 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -51,10 +51,10 @@ export class DocLinksService { OPENSEARCH_WEBSITE_URL, links: { dashboard: { - drilldowns: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/drilldowns.html`, - drilldownsTriggerPicker: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/drilldowns.html#url-drilldowns`, - urlDrilldownTemplateSyntax: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/url_templating-language.html`, - urlDrilldownVariables: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/url_templating-language.html#url-template-variables`, + drilldowns: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/drilldowns.html`, + drilldownsTriggerPicker: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/drilldowns.html#url-drilldowns`, + urlDrilldownTemplateSyntax: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/url_templating-language.html`, + urlDrilldownVariables: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/url_templating-language.html#url-template-variables`, }, filebeat: { base: `${OPENSEARCH_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}`, @@ -83,50 +83,50 @@ export class DocLinksService { base: `${OPENSEARCH_WEBSITE_URL}guide/en/beats/winlogbeat/${DOC_LINK_VERSION}`, }, aggs: { - date_histogram: `${OPENSEARCH_DOCS}search-aggregations-bucket-datehistogram-aggregation.html`, - date_range: `${OPENSEARCH_DOCS}search-aggregations-bucket-daterange-aggregation.html`, - filter: `${OPENSEARCH_DOCS}search-aggregations-bucket-filter-aggregation.html`, - filters: `${OPENSEARCH_DOCS}search-aggregations-bucket-filters-aggregation.html`, - geohash_grid: `${OPENSEARCH_DOCS}search-aggregations-bucket-geohashgrid-aggregation.html`, - histogram: `${OPENSEARCH_DOCS}search-aggregations-bucket-histogram-aggregation.html`, - ip_range: `${OPENSEARCH_DOCS}search-aggregations-bucket-iprange-aggregation.html`, - range: `${OPENSEARCH_DOCS}search-aggregations-bucket-range-aggregation.html`, - significant_terms: `${OPENSEARCH_DOCS}search-aggregations-bucket-significantterms-aggregation.html`, - terms: `${OPENSEARCH_DOCS}search-aggregations-bucket-terms-aggregation.html`, - avg: `${OPENSEARCH_DOCS}search-aggregations-metrics-avg-aggregation.html`, - avg_bucket: `${OPENSEARCH_DOCS}search-aggregations-pipeline-avg-bucket-aggregation.html`, - max_bucket: `${OPENSEARCH_DOCS}search-aggregations-pipeline-max-bucket-aggregation.html`, - min_bucket: `${OPENSEARCH_DOCS}search-aggregations-pipeline-min-bucket-aggregation.html`, - sum_bucket: `${OPENSEARCH_DOCS}search-aggregations-pipeline-sum-bucket-aggregation.html`, - cardinality: `${OPENSEARCH_DOCS}search-aggregations-metrics-cardinality-aggregation.html`, - count: `${OPENSEARCH_DOCS}search-aggregations-metrics-valuecount-aggregation.html`, - cumulative_sum: `${OPENSEARCH_DOCS}search-aggregations-metrics-sum-aggregation.html`, - derivative: `${OPENSEARCH_DOCS}search-aggregations-pipeline-derivative-aggregation.html`, - geo_bounds: `${OPENSEARCH_DOCS}search-aggregations-metrics-geobounds-aggregation.html`, - geo_centroid: `${OPENSEARCH_DOCS}search-aggregations-metrics-geocentroid-aggregation.html`, - max: `${OPENSEARCH_DOCS}search-aggregations-metrics-max-aggregation.html`, - median: `${OPENSEARCH_DOCS}search-aggregations-metrics-percentile-aggregation.html`, - min: `${OPENSEARCH_DOCS}search-aggregations-metrics-min-aggregation.html`, - moving_avg: `${OPENSEARCH_DOCS}search-aggregations-pipeline-movavg-aggregation.html`, - percentile_ranks: `${OPENSEARCH_DOCS}search-aggregations-metrics-percentile-rank-aggregation.html`, - serial_diff: `${OPENSEARCH_DOCS}search-aggregations-pipeline-serialdiff-aggregation.html`, - std_dev: `${OPENSEARCH_DOCS}search-aggregations-metrics-extendedstats-aggregation.html`, - sum: `${OPENSEARCH_DOCS}search-aggregations-metrics-sum-aggregation.html`, - top_hits: `${OPENSEARCH_DOCS}search-aggregations-metrics-top-hits-aggregation.html`, + date_histogram: `${OPENSEARCH_DOCS}bucket-agg/#histogram-date_histogram`, + date_range: `${OPENSEARCH_DOCS}bucket-agg/#range-date_range-ip_range`, + filter: `${OPENSEARCH_DOCS}bucket-agg/#filter-filters`, + filters: `${OPENSEARCH_DOCS}bucket-agg/#filter-filters`, + geohash_grid: `${OPENSEARCH_DOCS}bucket-agg/#geo_distance-geohash_grid`, + histogram: `${OPENSEARCH_DOCS}bucket-agg/#histogram-date_histogram`, + ip_range: `${OPENSEARCH_DOCS}bucket-agg/#range-date_range-ip_range`, + range: `${OPENSEARCH_DOCS}bucket-agg/#range-date_range-ip_range`, + significant_terms: `${OPENSEARCH_DOCS}bucket-agg/#significant_terms-significant_text`, + terms: `${OPENSEARCH_DOCS}bucket-agg/#terms`, + avg: `${OPENSEARCH_DOCS}metric-agg/#sum-min-max-avg`, + avg_bucket: `${OPENSEARCH_DOCS}pipeline-agg/#avg_bucket-sum_bucket-min_bucket-max_bucket`, + max_bucket: `${OPENSEARCH_DOCS}pipeline-agg/#avg_bucket-sum_bucket-min_bucket-max_bucket`, + min_bucket: `${OPENSEARCH_DOCS}pipeline-agg/#avg_bucket-sum_bucket-min_bucket-max_bucket`, + sum_bucket: `${OPENSEARCH_DOCS}pipeline-agg/#avg_bucket-sum_bucket-min_bucket-max_bucket`, + cardinality: `${OPENSEARCH_DOCS}metric-agg/#cardinality`, + count: `${OPENSEARCH_DOCS}metric-agg/#value_count`, + cumulative_sum: `${OPENSEARCH_DOCS}pipeline-agg/#cumulative_sum`, + derivative: `${OPENSEARCH_DOCS}pipeline-agg/#derivative`, + geo_bounds: `${OPENSEARCH_DOCS}metric-agg/#geo_bound`, + geo_centroid: `${OPENSEARCH_DOCS}metric-agg/#geo_bound`, + max: `${OPENSEARCH_DOCS}metric-agg/#sum-min-max-avg`, + median: `${OPENSEARCH_DOCS}metric-agg/#sum-min-max-avg`, + min: `${OPENSEARCH_DOCS}metric-agg/#sum-min-max-avg`, + moving_avg: `${OPENSEARCH_DOCS}pipeline-agg/#moving_avg`, + percentile_ranks: `${OPENSEARCH_DOCS}metric-agg/#percentile-percentile_ranks`, + serial_diff: `${OPENSEARCH_DOCS}pipeline-agg/#serial_diff`, + std_dev: `${OPENSEARCH_DOCS}metric-agg/#stats-extended_stats-matrix_stats`, + sum: `${OPENSEARCH_DOCS}metric-agg/#sum-min-max-avg`, + top_hits: `${OPENSEARCH_DOCS}metric-agg/#top_hits`, }, scriptedFields: { scriptFields: `${OPENSEARCH_DOCS}search-request-script-fields.html`, - scriptAggs: `${OPENSEARCH_DOCS}search-aggregations.html#_values_source`, + scriptAggs: `${OPENSEARCH_DOCS}metric-agg/#scripted_metric`, painless: `${OPENSEARCH_DOCS}modules-scripting-painless.html`, painlessApi: `${OPENSEARCH_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-api-reference.html`, painlessSyntax: `${OPENSEARCH_DOCS}modules-scripting-painless-syntax.html`, luceneExpressions: `${OPENSEARCH_DOCS}modules-scripting-expression.html`, }, indexPatterns: { - loadingData: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/tutorial-load-dataset.html`, - introduction: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-patterns.html`, + loadingData: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/tutorial-load-dataset.html`, + introduction: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/index-patterns.html`, }, - addData: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`, + addData: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`, opensearchDashboards: `${OPENSEARCH_DASHBOARDS_DOCS}`, siem: { guide: `${OPENSEARCH_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/index.html`, @@ -142,13 +142,13 @@ export class DocLinksService { dateMath: `${OPENSEARCH_DOCS}common-options.html#date-math`, }, management: { - opensearchDashboardsGeneralSettings: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-general-settings`, - opensearchDashboardsSearchSettings: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`, - dashboardSettings: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-dashboard-settings`, + opensearchDashboardsGeneralSettings: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/advanced-options.html#opensearch-general-settings`, + opensearchDashboardsSearchSettings: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/advanced-options.html#opensearch-search-settings`, + dashboardSettings: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/advanced-options.html#opensearch-dashboard-settings`, }, visualize: { - guide: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html`, - timelineDeprecation: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html#timeline-deprecation`, + guide: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/dashboard.html`, + timelineDeprecation: `${OPENSEARCH_WEBSITE_URL}guide/en/opensearch/${DOC_LINK_VERSION}/dashboard.html#timeline-deprecation`, }, }, }); diff --git a/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/__snapshots__/empty_state.test.tsx.snap b/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/__snapshots__/empty_state.test.tsx.snap index 831acd32e29e..fe2252fc1b7d 100644 --- a/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/__snapshots__/empty_state.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/index_pattern_table/empty_state/__snapshots__/empty_state.test.tsx.snap @@ -132,7 +132,7 @@ exports[`EmptyState should render normally 1`] = ` Object { "description":