summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorAnthony Hughes <anthony.s.hughes@gmail.com>2017-10-25 18:30:40 +0200
committerDylan William Hardison <dylan@hardison.net>2017-10-31 15:06:30 +0100
commit4c9afb9aa9c3fa8cb16824a7a032d560f5780403 (patch)
tree9187f974bc7c27d6eb1cbb6afa88fcab6beff623 /Bugzilla/Template.pm
parent3465c3905f542d576a61f372a5cb2da3f823d508 (diff)
downloadbugzilla-4c9afb9aa9c3fa8cb16824a7a032d560f5780403.tar.gz
bugzilla-4c9afb9aa9c3fa8cb16824a7a032d560f5780403.tar.xz
Bug 1332016 - Integrate the Socorro Lens into Bug Modal
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 1ad735067..49b7e9435 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -900,7 +900,7 @@ sub create {
html_light => \&Bugzilla::Util::html_light_quote,
email => \&Bugzilla::Util::email_filter,
-
+
mtime => \&mtime_filter,
# iCalendar contentline filter
@@ -1131,6 +1131,19 @@ sub create {
# However, we need to set the meta[name=viewport] server-side or the behavior is
# not as predictable. It is possible other parts of the frontend may use this feature too.
'is_mobile_browser' => sub { return Bugzilla->cgi->user_agent =~ /Mobi/ },
+
+ 'socorro_lens_url' => sub {
+ my ($sigs) = @_;
+
+ # strip [@ ] from sigs
+ my @sigs = map { /^\[\@\s*(.+?)\s*\]$/ } @$sigs;
+
+ return '' unless @sigs;
+ # use a URI object to encode the query string part.
+ my $uri = URI->new(correct_urlbase() . 'static/metricsgraphics/socorro-lens.html');
+ $uri->query_form('s' => join("\\", @sigs));
+ return $uri;
+ },
},
};