Skip to content

Commit

Permalink
[Visualizations] Remove kui usage (#82810)
Browse files Browse the repository at this point in the history
* [Visualize] Remove kui usage

* Use EuiPromptButton istead of EuiCallout

* Add a link to advanced settings for visualizations docs

* Changes requested on code review

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
stratoula and kibanamachine authored Nov 10, 2020
1 parent af5f299 commit 471c281
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 33 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
1 change: 0 additions & 1 deletion src/plugins/visualizations/public/embeddable/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@import 'visualize_lab_disabled';
@import 'embeddables';

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,42 @@
* under the License.
*/

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

export function DisabledLabVisualization({ title }: { title: string }) {
const advancedSettingsLink = getDocLinks().links.management.visualizationSettings;
return (
<div className="visDisabledLabVisualization">
<div
className="kuiVerticalRhythm visDisabledLabVisualization__icon kuiIcon fa-flask"
aria-hidden="true"
<I18nProvider>
<EuiEmptyPrompt
titleSize="xs"
title={
<h6>
<FormattedMessage
id="visualizations.disabledLabVisualizationTitle"
defaultMessage="{title} is a lab visualization."
values={{ title }}
/>
</h6>
}
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>
}
/>
<div className="kuiVerticalRhythm">
<FormattedMessage
id="visualizations.disabledLabVisualizationTitle"
defaultMessage="{title} is a lab visualization."
values={{ title: <em className="visDisabledLabVisualization__title">{title}</em> }}
/>
</div>
<div className="kuiVerticalRhythm">
<FormattedMessage
id="visualizations.disabledLabVisualizationMessage"
defaultMessage="Please turn on lab-mode in the advanced settings to see lab visualizations."
/>
</div>
</div>
</I18nProvider>
);
}

0 comments on commit 471c281

Please sign in to comment.