diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index 0acf4524ab14..41f97033c5e3 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -424,6 +424,10 @@ export class DocLinksService { // https://opensearch.org/docs/latest/dashboards/visualize/viz-index/ guide: `${OPENSEARCH_WEBSITE_DOCS}visualize/viz-index/`, }, + management: { + // https://opensearch.org/docs/latest/dashboards/management/advanced-settings/ + advancedSettings: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}management/advanced-settings/`, + }, }, noDocumentation: { auditbeat: `${OPENSEARCH_WEBSITE_DOCS}tools/index/#downloads`, @@ -819,6 +823,7 @@ export interface DocLinksStart { readonly guide: string; }; readonly visualize: Record; + readonly management: Record; }; readonly noDocumentation: { readonly auditbeat: string; diff --git a/src/plugins/visualizations/public/embeddable/disabled_lab_visualization.tsx b/src/plugins/visualizations/public/embeddable/disabled_lab_visualization.tsx index 79d6369fa88d..7088fdd3b7ef 100644 --- a/src/plugins/visualizations/public/embeddable/disabled_lab_visualization.tsx +++ b/src/plugins/visualizations/public/embeddable/disabled_lab_visualization.tsx @@ -28,29 +28,39 @@ * under the License. */ +import React, { Fragment } from 'react'; import { FormattedMessage } from '@osd/i18n/react'; -import React from 'react'; +import { EuiEmptyPrompt, EuiLink, EuiText } from '@elastic/eui'; +import { getDocLinks } from '../services'; +import './_visualize_lab_disabled.scss'; export function DisabledLabVisualization({ title }: { title: string }) { + const docLinks = getDocLinks(); + const advancedSettingsLink = docLinks.links.opensearchDashboards.management.advancedSettings; return (
- ); } diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts index 3542e0cc26ff..bd255b82c6af 100644 --- a/src/plugins/visualizations/public/plugin.ts +++ b/src/plugins/visualizations/public/plugin.ts @@ -63,6 +63,7 @@ import { setSavedSearchLoader, setEmbeddable, setNotifications, + setDocLinks, } from './services'; import { VISUALIZE_EMBEDDABLE_TYPE, @@ -96,6 +97,7 @@ import { import { createSavedSearchesLoader } from '../../discover/public'; import { DashboardStart } from '../../dashboard/public'; import { createSavedAugmentVisLoader } from '../../vis_augmenter/public'; +import { DocLinksStart } from '../../../core/public'; /** * Interface for this plugin's returned setup/start contracts. @@ -133,6 +135,7 @@ export interface VisualizationsStartDeps { getAttributeService: DashboardStart['getAttributeService']; savedObjectsClient: SavedObjectsClientContract; notifications: NotificationsStart; + docLinks: DocLinksStart; } /** @@ -224,6 +227,7 @@ export class VisualizationsPlugin }); setSavedSearchLoader(savedSearchLoader); setNotifications(core.notifications); + setDocLinks(core.docLinks); return { ...types, showNewVisModal, diff --git a/src/plugins/visualizations/public/services.ts b/src/plugins/visualizations/public/services.ts index a99a7010af28..62266ff2ba53 100644 --- a/src/plugins/visualizations/public/services.ts +++ b/src/plugins/visualizations/public/services.ts @@ -54,6 +54,7 @@ import { SavedVisualizationsLoader } from './saved_visualizations'; import { SavedObjectLoader } from '../../saved_objects/public'; import { EmbeddableStart } from '../../embeddable/public'; import { SavedObjectLoaderAugmentVis } from '../../vis_augmenter/public'; +import { DocLinksStart } from '../../../core/public'; export const [getUISettings, setUISettings] = createGetterSetter('UISettings'); @@ -116,3 +117,5 @@ export const [getNotifications, setNotifications] = createGetterSetter('savedAugmentVisLoader'); + +export const [getDocLinks, setDocLinks] = createGetterSetter('docLinks');