Add parsedUrl to the code driving viz/dashboards (#15335) (#15347)

This commit is contained in:
Chris Roberson 2017-12-01 14:07:51 -05:00 committed by GitHub
parent 86ebcb6938
commit 35970c512a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,3 +1,5 @@
import chrome from 'ui/chrome';
let i = 0;
// eslint-disable-next-line kibana-custom/no-default-export
@ -36,7 +38,12 @@ AggConfigResult.prototype.createFilter = function () {
};
AggConfigResult.prototype.toString = function (contentType) {
return this.aggConfig.fieldFormatter(contentType)(this.value);
const parsedUrl = {
origin: window.location.origin,
pathname: window.location.pathname,
basePath: chrome.getBasePath(),
};
return this.aggConfig.fieldFormatter(contentType)(this.value, null, null, parsedUrl);
};
AggConfigResult.prototype.valueOf = function () {