diff --git a/src/app/filters/all.js b/src/app/filters/all.js index d9b3ced5f2f8d..43cc9385f00f0 100644 --- a/src/app/filters/all.js +++ b/src/app/filters/all.js @@ -118,6 +118,15 @@ define([ }; }); + module.filter('shareLink', function($location, filterSrv) { + return function(event) { + var from = new Date(Date.parse(event._source[this.panel.timeField])-60000); + var to = new Date(Date.parse(event._source[this.panel.timeField])+60000); + var text=event._id; + return($location.absUrl().replace(/(\?.*)?$/,'?from='+from.toISOString()+'&to='+to.toISOString()+'&query=_id:'+text)); + }; + }); + module.filter('gistid', function() { var gist_pattern = /(\d{5,})|([a-z0-9]{10,})|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/; return function(input) { diff --git a/src/app/panels/table/module.html b/src/app/panels/table/module.html index 233bb2d23d7c6..0e3c1e0016dca 100644 --- a/src/app/panels/table/module.html +++ b/src/app/panels/table/module.html @@ -140,7 +140,8 @@