add missing cases of using alias (#2248)

This commit is contained in:
Peter Hedenskog 2019-01-12 21:42:02 +01:00 committed by GitHub
parent 289a9c1b7b
commit 593f2daa28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 3 deletions

View File

@ -13,6 +13,7 @@ module.exports = {
this.annotationType = 'webpagetest.pageSummary';
this.tsdbType = 'graphite';
this.make = context.messageMaker('grafana').make;
this.alias = {};
},
processMessage(message, queue) {
// First catch if we are running Browsertime and/or WebPageTest
@ -29,6 +30,8 @@ module.exports = {
this.useScreenshots = message.data.screenshot;
this.screenshotType = message.data.screenshotType;
}
} else if (message.type === 'browsertime.alias') {
this.alias[message.url] = message.data;
} else if (
message.type === this.annotationType &&
this.resultUrls.hasBaseUrl()
@ -44,6 +47,7 @@ module.exports = {
this.screenshotType,
this.timestamp,
this.tsdbType,
this.alias,
this.options
);
}

View File

@ -15,6 +15,7 @@ module.exports = {
screenshotType,
time,
tsdbType,
alias,
options
) {
// The tags make it possible for the dashboard to use the
@ -32,7 +33,8 @@ module.exports = {
url,
tsdbType === 'graphite'
? options.graphite.includeQueryParams
: options.influxdb.includeQueryParams
: options.influxdb.includeQueryParams,
alias
)
.split('.');

View File

@ -116,6 +116,7 @@ module.exports = {
this.useScreenshots,
this.screenshotType,
this.timestamp,
this.alias,
this.options
);
}

View File

@ -14,6 +14,7 @@ module.exports = {
screenShotsEnabledInBrowsertime,
screenshotType,
time,
alias,
options
) {
// The tags make it possible for the dashboard to use the
@ -24,7 +25,13 @@ module.exports = {
const browser = options.browser;
const namespace = options.graphite.namespace.split('.');
const urlAndGroup = graphiteUtil
.getURLAndGroup(options, group, url, options.graphite.includeQueryParams)
.getURLAndGroup(
options,
group,
url,
options.graphite.includeQueryParams,
alias
)
.split('.');
const tags = [
connectivity,

View File

@ -111,6 +111,7 @@ module.exports = {
this.useScreenshots,
this.screenshotType,
this.timestamp,
this.alias,
this.options
);
}

View File

@ -15,6 +15,7 @@ module.exports = {
screenShotsEnabledInBrowsertime,
screenshotType,
time,
alias,
options
) {
// The tags make it possible for the dashboard to use the
@ -24,7 +25,13 @@ module.exports = {
const connectivity = tsdbUtil.getConnectivity(options);
const browser = options.browser;
const urlAndGroup = tsdbUtil
.getURLAndGroup(options, group, url, options.influxdb.includeQueryParams)
.getURLAndGroup(
options,
group,
url,
options.influxdb.includeQueryParams,
alias
)
.split('.');
let tags = [connectivity, browser, urlAndGroup[0], urlAndGroup[1]];