export function getAnnotationMessage(
absolutePagePath,
screenShotsEnabledInBrowsertime,
screenshotType,
webPageTestResultURL,
usingBrowsertime,
options
) {
const screenshotSize = options.mobile ? 'height=200px' : 'width=100%';
const resultPageUrl = absolutePagePath + 'index.html';
let screenshotPath;
if (screenShotsEnabledInBrowsertime) {
screenshotPath =
absolutePagePath +
'data/screenshots/1/afterPageCompleteCheck.' +
screenshotType;
}
const screenshotsEnabledForDatasource =
options.graphite.annotationScreenshot ||
options.influxdb.annotationScreenshot ||
options.grafana.annotationScreenshot;
const harPath =
absolutePagePath +
'data/' +
(usingBrowsertime ? 'browsertime.har' : 'webpagetest.har') +
(options.gzipHAR ? '.gz' : '');
const extraMessage =
options.graphite.annotationMessage ||
options.influxdb.annotationMessage ||
options.grafana.annotationMessage ||
undefined;
const s = options.browsertime.iterations > 1 ? 's' : '';
let message =
screenShotsEnabledInBrowsertime && screenshotsEnabledForDatasource
? `