[Rt-commit] rtir branch, 2.4-trunk, updated. 09fc4a88486a0e3c25c6f453cc69228afb67c7d9

Ruslan Zakirov ruz at bestpractical.com
Fri Aug 21 18:08:17 EDT 2009


The branch, 2.4-trunk has been updated
       via  09fc4a88486a0e3c25c6f453cc69228afb67c7d9 (commit)
       via  610a8fe07a0d05d43b2cd4a0fb76e9fae67cbf97 (commit)
      from  568e88b318913c153d0e12894a185dc07b0a8f2e (commit)

Summary of changes:
 html/RTIR/Tools/Traceroute.html |   25 ++++++++++++++++++++-----
 lib/RT/Action/RTIR_FindIP.pm    |    4 +++-
 2 files changed, 23 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 09fc4a88486a0e3c25c6f453cc69228afb67c7d9
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Aug 22 02:06:27 2009 +0400

    tidy traceroute interface
    
    * get rid of bar, it renders page inside the bar
    * use TitleBox
    * don't say to user details, but log them instead
    * localize strings

diff --git a/html/RTIR/Tools/Traceroute.html b/html/RTIR/Tools/Traceroute.html
index a9c6f61..d65e79f 100644
--- a/html/RTIR/Tools/Traceroute.html
+++ b/html/RTIR/Tools/Traceroute.html
@@ -22,8 +22,14 @@
 %# 
 %# 
 %# END LICENSE BLOCK
-<& /RTIR/Elements/Header, Title => $title &>
-<h1><% $title %></h1>
+<& /RTIR/Elements/Header, Title => $title, ShowBar => 0 &>
+
+<div style="margin: 2em;">
+
+<&| /Widgets/TitleBox,
+    title => $title,
+    class => 'traceroute',
+&>
 <pre>
 <%PERL>
 while (my $content = <$tr>) {
@@ -35,14 +41,23 @@ while (my $content = <$tr>) {
 }
 </%PERL>
 </pre>
+</&>
+
+</div>
 <%INIT>
 unless ( $q =~ /^[A-Z0-9.]+$/i ) {
-    Abort("Invalid search query");
+    Abort(loc("Invalid search query"));
 }
-my $title = loc("Traceroute to '[_1]'.", $q);
+my $title = loc("Traceroute to '[_1]'", $q);
 
 my $cmd = RT->Config->Get('TracerouteCommand') || '/usr/sbin/traceroute';
-Abort("Couldn't find '$cmd' or run it's not executable") unless -f $cmd && -x _;
+unless ( -f $cmd && -x _ ) {
+    $RT::Logger->error(
+        "'$cmd' doesn't exist or it's not executable."
+        ."Setup \$TracerouteCommand option"
+    );
+    Abort(loc("Traceroute is not configured properly. Contact system administrator."));
+}
 
 tied(%session)->release_all_locks;
 open my $tr, "$cmd $q|" or Abort("Couldn't run '/usr/sbin/traceroute': $!");

-----------------------------------------------------------------------


More information about the Rt-commit mailing list