Skip to content

Commit

Permalink
Add a link to advanced settings for visualizations docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Nov 9, 2020
1 parent 79073f2 commit f025303
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export class DocLinksService {
management: {
kibanaSearchSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`,
dashboardSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-dashboard-settings`,
visualizationSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-visualization-settings`,
},
visualize: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/visualize.html`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,37 @@
*/

import { FormattedMessage, I18nProvider } from '@kbn/i18n/react';
import { EuiEmptyPrompt } from '@elastic/eui';
import { EuiEmptyPrompt, EuiLink } from '@elastic/eui';
import React from 'react';
import { getDocLinks } from '../services';

export function DisabledLabVisualization({ title }: { title: string }) {
const promptTitle = (
<FormattedMessage
id="visualizations.disabledLabVisualizationTitle"
defaultMessage="{title} is a lab visualization."
values={{ title }}
/>
);
const advancedSettingsLink = getDocLinks().links.management.visualizationSettings;
return (
<I18nProvider>
<EuiEmptyPrompt
title={promptTitle}
title={
<FormattedMessage
id="visualizations.disabledLabVisualizationTitle"
defaultMessage="{title} is a lab visualization."
values={{ title }}
/>
}
iconType="beaker"
body={
<FormattedMessage
id="visualizations.disabledLabVisualizationMessage"
defaultMessage="Please turn on lab-mode in the advanced settings to see lab visualizations."
/>
}
actions={
<EuiLink target="_blank" external href={advancedSettingsLink}>
<FormattedMessage
id="visualizations.disabledLabVisualizationLink"
defaultMessage="Read documentation"
/>
</EuiLink>
}
/>
</I18nProvider>
);
Expand Down

0 comments on commit f025303

Please sign in to comment.