Fix icon path in tutorial introduction (#49684)
Some icons are included as SVG files with relative paths to their location. Add the base path so these files are correctly displayed when Kibana is not running from the root path.
This commit is contained in:
parent
a899df3f3d
commit
e7472e2f00
|
@ -363,6 +363,11 @@ class TutorialUi extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
let icon = this.state.tutorial.euiIconType;
|
||||
if (icon && icon.includes('/')) {
|
||||
icon = this.props.addBasePath(icon);
|
||||
}
|
||||
|
||||
const instructions = this.getInstructions();
|
||||
content = (
|
||||
<div>
|
||||
|
@ -371,7 +376,7 @@ class TutorialUi extends React.Component {
|
|||
description={this.props.replaceTemplateStrings(this.state.tutorial.longDescription)}
|
||||
previewUrl={previewUrl}
|
||||
exportedFieldsUrl={exportedFieldsUrl}
|
||||
iconType={this.state.tutorial.euiIconType}
|
||||
iconType={icon}
|
||||
isBeta={this.state.tutorial.isBeta}
|
||||
/>
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ class TutorialDirectoryUi extends React.Component {
|
|||
let tutorialCards = tutorialConfigs.map(tutorialConfig => {
|
||||
// add base path to SVG based icons
|
||||
let icon = tutorialConfig.euiIconType;
|
||||
if (icon != null && icon.includes('/')) {
|
||||
if (icon && icon.includes('/')) {
|
||||
icon = this.props.addBasePath(icon);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue