[Rt-commit] [rtir] 06/06: When RTIR stopped matching IPs in every ticket, Traceroute stopped being clicky

Kevin Falcone falcone at bestpractical.com
Thu Oct 2 16:24:09 EDT 2014


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch 3.0/traceroute-cleanup
in repository rtir.

commit 88bb61c95290fbcf4c2d6d123cf415be564b95d8
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Oct 2 16:15:07 2014 -0400

    When RTIR stopped matching IPs in every ticket, Traceroute stopped being clicky
    
    This was done in ca41f89a for performance on the rest of the system
    (plus users of the Sales queue likely don't have access to
     /RTIR/Tools/Lookup.html)
    
    To re-enabled this on traceroute, we need a ticket object.  This has
    been available to us, but it just wasn't being passed to the URL for
    some reason (lost during the great Tools refactor in 2.6 I guess).
    
    If you go to Lookup and type in an IP you won't get MakeClicky, but if
    you click on an IP from a ticket, traceroute it and then add one of the
    other IPs in the results, it'll correctly get back to your ticket.
---
 html/RTIR/Tools/Elements/ToolFormTraceroute | 4 ++++
 html/RTIR/Tools/Traceroute.html             | 8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/html/RTIR/Tools/Elements/ToolFormTraceroute b/html/RTIR/Tools/Elements/ToolFormTraceroute
index 0b6f583..ae3afa8 100644
--- a/html/RTIR/Tools/Elements/ToolFormTraceroute
+++ b/html/RTIR/Tools/Elements/ToolFormTraceroute
@@ -46,10 +46,14 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <form action="Traceroute.html" method="get" target="_blank">
+% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) {
+  <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
+% }
     <span class="label">Traceroute to:</span>
     <span class="input"><input type="text" size="30" name="q" value="<% $q %>" /></span>
     <input type="submit" value="<%loc('Go')%>" />
 </form>
 <%args>
 $q => ''
+ at PassArguments => ()
 </%args>
diff --git a/html/RTIR/Tools/Traceroute.html b/html/RTIR/Tools/Traceroute.html
index b4745fc..b7d95f1 100644
--- a/html/RTIR/Tools/Traceroute.html
+++ b/html/RTIR/Tools/Traceroute.html
@@ -57,7 +57,7 @@
 <pre>
 <%PERL>
 while (my $content = <$tr>) {
-    $m->comp('/Elements/MakeClicky', content => \$content);
+    $m->comp('/Elements/MakeClicky', content => \$content, ($TicketObj? (ticket => $TicketObj):()) );
     $m->out( $content );
     $m->out('<br />');
     $m->flush_buffer;
@@ -82,9 +82,15 @@ unless ( -f $cmd && -x _ ) {
     Abort(loc("Traceroute is not configured properly. Contact system administrator."));
 }
 
+my $TicketObj;
+if ($ticket) {
+    $TicketObj = LoadTicket($ticket);
+}
+
 tied(%session)->release_all_locks;
 open(my $tr, "-|", $cmd, $q) or Abort("Couldn't run '$cmd': $!");
 </%INIT>
 <%ARGS>
+$ticket => undef
 $q => ''
 </%ARGS>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list