Fix maxwidth size for Grafana annotations
This commit is contained in:
parent
b1566ba3ce
commit
dbcdc72bed
|
|
@ -6,9 +6,6 @@ export function getAnnotationMessage(
|
|||
usingBrowsertime,
|
||||
options
|
||||
) {
|
||||
const screenshotSize = options.mobile
|
||||
? 'height=200px'
|
||||
: 'style="max-width:400px;height:auto;"';
|
||||
const resultPageUrl = absolutePagePath + 'index.html';
|
||||
let screenshotPath;
|
||||
if (screenShotsEnabledInBrowsertime) {
|
||||
|
|
@ -38,7 +35,7 @@ export function getAnnotationMessage(
|
|||
|
||||
let message =
|
||||
screenShotsEnabledInBrowsertime && screenshotsEnabledForDatasource
|
||||
? `<a href='${resultPageUrl}' target='_blank'><img src='${screenshotPath}' ${screenshotSize}></a><p><a href='${resultPageUrl}'>Result</a> - <a href='${harPath}'>Download HAR</a></p>`
|
||||
? `<a href='${resultPageUrl}' target='_blank'><img src='${screenshotPath}' style='max-width:400px'></a><p><a href='${resultPageUrl}'>Result</a> - <a href='${harPath}'>Download HAR</a></p>`
|
||||
: `<a href='${resultPageUrl}' target='_blank'>Result ${options.browsertime.iterations} run${s}</a>`;
|
||||
|
||||
if (extraMessage) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue