[Rt-commit] rtir branch, 4.0/save-lookup-results, updated. 4.0.0-39-g9438763
Aaron Kondziela
aaron at bestpractical.com
Wed Mar 22 22:42:49 EDT 2017
The branch, 4.0/save-lookup-results has been updated
via 94387639bbc688aee8c2ae27e9aab2f66be7899d (commit)
from 74c709e5116eb0ab9d49e859a5b71b6bf0ad89dc (commit)
Summary of changes:
html/RTIR/Tools/Elements/ToolResultsWhois | 1 -
html/RTIR/Tools/Traceroute.html | 21 +++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit 94387639bbc688aee8c2ae27e9aab2f66be7899d
Author: Aaron Kondziela <aaron at bestpractical.com>
Date: Wed Mar 22 22:42:45 2017 -0400
Add button to save Traceroute results to a ticket
diff --git a/html/RTIR/Tools/Elements/ToolResultsWhois b/html/RTIR/Tools/Elements/ToolResultsWhois
index d5ec771..c4fae70 100644
--- a/html/RTIR/Tools/Elements/ToolResultsWhois
+++ b/html/RTIR/Tools/Elements/ToolResultsWhois
@@ -128,7 +128,6 @@ $q => undef
$handparse => 1
$TicketObj => undef
$WhoisServer => undef
-$WhoisResults => undef
$results => undef
$server => undef
</%args>
diff --git a/html/RTIR/Tools/Traceroute.html b/html/RTIR/Tools/Traceroute.html
index 8ea29e3..b2909d8 100644
--- a/html/RTIR/Tools/Traceroute.html
+++ b/html/RTIR/Tools/Traceroute.html
@@ -50,13 +50,19 @@
<div style="margin: 2em;">
+% my $SavedContent = '';
+
<&| /Widgets/TitleBox,
title => $title,
class => 'traceroute',
&>
+% if ($TicketObj) {
+ <button onClick="jQuery('#save-results-to-ticket').click()"><% loc('Save these results to the ticket') %></button>
+% }
<pre>
<%PERL>
while (my $content = <$tr>) {
+ $SavedContent = $SavedContent . $content . "\n";
$m->comp('/Elements/MakeClicky', content => \$content, ($TicketObj? (object => $TicketObj):()) );
$m->out( $content );
$m->out('<br />');
@@ -66,6 +72,21 @@ while (my $content = <$tr>) {
</pre>
</&>
+% if ($TicketObj and $SavedContent) {
+% my $url = RT::IR->HREFTo(
+% "Tools/Lookup.html?"
+% . $m->comp(
+% '/Elements/QueryString',
+% ticket => $ticket,
+% q => $q,
+% )
+% );
+ <form method="post" action="<% $url | n %>">
+ <input type="hidden" name="LookupResults" value="<% $SavedContent | h %>" />
+ <input type="submit" value="<% loc('Save these results to the ticket') %>" id="save-results-to-ticket" />
+ </form>
+% }
+
</div>
<%INIT>
unless ( $q =~ /^[A-Z0-9.:]+$/i ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list