mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Fleet] Fix image in readme for installed integration (#188476)
This commit is contained in:
parent
f02a41c373
commit
601e42ee02
3 changed files with 4 additions and 2 deletions
|
@ -43,7 +43,8 @@ export function useLinks() {
|
|||
version: string;
|
||||
}) => {
|
||||
const imagePath = removeRelativePath(path);
|
||||
const filePath = `${epmRouteService.getInfoPath(packageName, version)}/${imagePath}`;
|
||||
|
||||
const filePath = `${epmRouteService.getInfoPath(packageName, version)}${imagePath}`;
|
||||
return http.basePath.prepend(filePath);
|
||||
},
|
||||
};
|
||||
|
|
|
@ -35,6 +35,6 @@ describe('Readme', () => {
|
|||
const img = result.getByAltText('Image');
|
||||
|
||||
expect(img).toHaveStyle('max-width: 100%');
|
||||
expect(img).toHaveAttribute('src', '/mock/api/fleet/epm/packages/test/1.0.0//img/image.png');
|
||||
expect(img).toHaveAttribute('src', '/mock/api/fleet/epm/packages/test/1.0.0/img/image.png');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -31,6 +31,7 @@ export function Readme({
|
|||
(uri: string) => {
|
||||
const isRelative =
|
||||
uri.indexOf('http://') === 0 || uri.indexOf('https://') === 0 ? false : true;
|
||||
|
||||
const fullUri = isRelative ? toRelativeImage({ packageName, version, path: uri }) : uri;
|
||||
return fullUri;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue