[Rt-commit] rtir branch, 2.6-trunk, updated. 2.6.0-11-gad5b933
Jesse Vincent
jesse at bestpractical.com
Thu Dec 16 11:25:14 EST 2010
The branch, 2.6-trunk has been updated
via ad5b9336cbb171a7f1737a6368dcec8e69f6fe75 (commit)
via 14c29f1718b2dc9025412e733b46a63e9f6318ed (commit)
via 281985696ef15ea0732ea8fe2828de9c19dc2ee4 (commit)
via 52610a77e6dddefbb007de1683d473729f4f94c2 (commit)
via 5405fea7935f8c6dbbd7563389a9789681644089 (commit)
from a7a82b7619677f5eaa8520f73bcc93ee4273a475 (commit)
Summary of changes:
etc/RTIR_Config.pm | 30 +++++++++++++++++++++++++++++
html/RTIR/Display.html | 2 +-
html/RTIR/Incident/Display.html | 6 ++--
html/RTIR/Tools/Elements/ToolFormWhois | 2 +-
html/RTIR/Tools/Elements/ToolResultsWhois | 1 +
html/RTIR/Tools/Elements/Tools | 18 +++++++++++++---
html/RTIR/Tools/Lookup.html | 7 +-----
7 files changed, 51 insertions(+), 15 deletions(-)
- Log -----------------------------------------------------------------
commit 5405fea7935f8c6dbbd7563389a9789681644089
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Dec 15 10:14:54 2010 -0500
Silence a couple warnings
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index 4e38d44..49ab129 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -245,7 +245,7 @@ if ( $Type eq 'Report' ) {
my $Title = loc("[_1] #[_2]: [_3]", $name, $Ticket->Id, $Ticket->Subject);
my $TimeWorked = $Ticket->TimeWorked;
-if ($Ticket->TimeLeft > 0 ) {
+if (defined $Ticket->TimeLeft && $Ticket->TimeLeft > 0 ) {
$TimeWorked .= "/".$Ticket->TimeLeft;
}
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index bf94ed4..ca0de8f 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -231,7 +231,7 @@ unless( $TicketObj->QueueObj->Name eq 'Incidents' ) {
$ARGS{'id'} = $id = $TicketObj->Id;
if( 1 ) {
- my $oldstate = RT::IR::Ticket::FirstCustomFieldValue( $TicketObj, 'State' );
+ my $oldstate = RT::IR::Ticket::FirstCustomFieldValue( $TicketObj, 'State' ) || '';
if ( $ARGS{'Action'} && $ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/ )
{
@@ -273,7 +273,7 @@ if( 1 ) {
push @results, ProcessUpdateMessage( ARGSRef => \%ARGS, TicketObj => $TicketObj );
}
- my $newstate = RT::IR::Ticket::FirstCustomFieldValue( $TicketObj, 'State' );
+ my $newstate = RT::IR::Ticket::FirstCustomFieldValue( $TicketObj, 'State' ) || '';
if ($newstate ne $oldstate) {
push @results, loc("State changed from [_1] to [_2]", $oldstate, $newstate );
}
@@ -285,7 +285,7 @@ unless ( $TicketObj->CurrentUserHasRight('ShowTicket') ) {
}
my $TimeWorked = $TicketObj->TimeWorked;
-if ( $TicketObj->TimeLeft > 0 ) {
+if ( defined $TicketObj->TimeLeft && $TicketObj->TimeLeft > 0 ) {
$TimeWorked .= '/'. $TicketObj->TimeLeft;
}
commit 52610a77e6dddefbb007de1683d473729f4f94c2
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Thu Dec 16 11:23:15 2010 -0500
fix a typo in an html tag
diff --git a/html/RTIR/Tools/Elements/ToolFormWhois b/html/RTIR/Tools/Elements/ToolFormWhois
index 06b95bd..6dac889 100644
--- a/html/RTIR/Tools/Elements/ToolFormWhois
+++ b/html/RTIR/Tools/Elements/ToolFormWhois
@@ -2,7 +2,7 @@
<input type="hidden" name="ticket" value="<% $TicketObj->id %>" />
<tr>
<span class="label">WHOIS:</span>
- <spanclass="input">
+ <span class="input">
<input size="30" name="q" value="<% $q %>" /> at
<select name="server">
<%PERL>
commit 281985696ef15ea0732ea8fe2828de9c19dc2ee4
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Thu Dec 16 11:23:49 2010 -0500
Allow local customization of research tools
diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index 13af1b2..c9a212d 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -18,6 +18,36 @@ Set($MaxInlineBody, 0);
Set($OverdueAfter, 7);
+# Which research tools should RTIR display for address/domain lookups
+#
+
+
+# For each tool listed in this section, RTIR will attempt to display
+# share/html/RTIR/Tools/Elements/ToolForm____
+# and
+# share/html/RTIR/Tools/Elements/ToolResults____
+#
+# on the Tools/Lookup.html
+Set( @RTIRResearchTools, (qw(Traceroute Whois Iframe)));
+
+# One of the research tools available in RTIR allows you to
+# configure a set of search URLs that incident handlers
+# can use to open searches in IFRAMES. Entries are keyed
+# by integer in the order you'd like to see them in the dropdown
+# on the research page
+# Each entry consists of a hashref containing "FriendlyName" and "URL"
+# The URLs will be evaluated to replace __SearchTerm__ with the
+# user's current search term.
+
+ Set ($RTIRIframeResearchToolConfig, {
+ 1 => { FriendlyName => 'Google', URL => 'https://encrypted.google.com/search?q=__SearchTerm__' },
+ 2 => { FriendlyName => 'CVE', URL => 'http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=__SearchTerm__'},
+ 3 => { FriendlyName => 'TrustedSource.org', URL => 'http://www.trustedsource.org/query/__SearchTerm__'},
+ 4 => { FriendlyName => 'McAfee SiteAdvisor', URL => 'http://www.siteadvisor.com/sites/__SearchTerm__'},
+ 5 => { FriendlyName => 'BFK DNS Logger', URL => 'http://www.bfk.de/bfk_dnslogger.html?query=__SearchTerm__#result'}
+ } );
+
+
# Set the hash of whois servers
# Host is of the form "hostname:port"
Set($whois, {
diff --git a/html/RTIR/Tools/Elements/Tools b/html/RTIR/Tools/Elements/Tools
index 972fb1b..7160d60 100644
--- a/html/RTIR/Tools/Elements/Tools
+++ b/html/RTIR/Tools/Elements/Tools
@@ -1,5 +1,15 @@
-<& ToolFormWhois, %ARGS &>
-<& ToolFormTraceroute, %ARGS &>
-<hr>
+<%perl>
+my $tools = RT->Config->Get('RTIRResearchTools') || ();
+ for my $tool (@$tools) {
+warn $tool;
+if ($m->comp_exists('ToolForm'.$tool)) {
+ $m->comp('ToolForm'.$tool, %ARGS);
+}
+}
+for my $tool (@$tools) {
+if ($m->comp_exists('ToolResults'.$tool)) {
+ $m->comp('ToolResults'.$tool, %ARGS);
+}
+}
-<& ToolResultsWhois, %ARGS &>
+</%perl>
commit 14c29f1718b2dc9025412e733b46a63e9f6318ed
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Thu Dec 16 11:24:10 2010 -0500
No longer do a whois lookup by default just by visiting the lookup page.
(Doing so could, potentially, have security reprecussions in some
environments)
diff --git a/html/RTIR/Tools/Elements/ToolResultsWhois b/html/RTIR/Tools/Elements/ToolResultsWhois
index 24309c8..f4cedc6 100644
--- a/html/RTIR/Tools/Elements/ToolResultsWhois
+++ b/html/RTIR/Tools/Elements/ToolResultsWhois
@@ -63,6 +63,7 @@ $TicketObj => undef
$WhoisServer => undef
</%args>
<%init>
+return unless ($WhoisServer);
use Net::Whois::RIPE;
my ($whois, $port) = split(/\s*:\s*/, $WhoisServer, 2);
$port = 43 unless ($port || '') =~ /^\d+$/;
diff --git a/html/RTIR/Tools/Lookup.html b/html/RTIR/Tools/Lookup.html
index 8d059ea..7ca49f7 100644
--- a/html/RTIR/Tools/Lookup.html
+++ b/html/RTIR/Tools/Lookup.html
@@ -69,11 +69,6 @@ if ( $ARGS{'InvestigateTo'} ) {
);
}
-unless ( $server ) {
- # just pick the first one
- ($server) = map ref $servers->{$_}? $servers->{$_}->{'Host'}: $servers->{$_}, (sort keys %$servers)[0];
-}
-
my $title = loc("Lookup '[_1]' using server [_2]", $q, $server);
my $max_age = -60;
commit ad5b9336cbb171a7f1737a6368dcec8e69f6fe75
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Thu Dec 16 11:24:56 2010 -0500
Pass al query parameters through to lookup tools
diff --git a/html/RTIR/Tools/Lookup.html b/html/RTIR/Tools/Lookup.html
index 7ca49f7..2913ffb 100644
--- a/html/RTIR/Tools/Lookup.html
+++ b/html/RTIR/Tools/Lookup.html
@@ -42,7 +42,7 @@
<hr>
<h2><&|/l&>Look Up Information</&></h2>
-<& Elements/Tools, q => $q,
+<& Elements/Tools, %ARGS, q => $q,
TicketType => $TicketType,
TicketObj => $TicketObj,
WhoisServer => $server,
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list