summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-14 22:49:54 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-14 22:49:54 +0000
commit68e428ef64958b90274b3f6169413030631ce0ba (patch)
treee81cfc0ed4fac73961b1bf8ef0b2612898c3907e
parent04a75a95148d1c76e1b255da86fcf7fcc4b5fd9e (diff)
Format the inside message more neatly
-rw-r--r--lib/custodian/alerter.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/custodian/alerter.rb b/lib/custodian/alerter.rb
index ec6168d..69de28e 100644
--- a/lib/custodian/alerter.rb
+++ b/lib/custodian/alerter.rb
@@ -51,13 +51,17 @@ class Alerter
return "" unless ( !resolved.nil? )
+ if ( host =~ /^http/ )
+ host = "<a href=\"#{host}\">#{host}</a>"
+ end
+
#
# Test trange
#
if ( BYTEMARK_RANGES.any?{|range| range.include?(IPAddr.new(resolved.to_s))} )
- return "<p>#{host} resolves to #{resolved} which is inside the Bytemark network.</p>"
+ return "<p>#{host} resolves to <tt>#{resolved}</tt> which is inside the Bytemark network.</p>"
else
- return "<p>#{host} resolves to #{resolved} which <b>is not</b> inside the Bytemark network.</p>"
+ return "<p>#{host} resolves to <tt>#{resolved}</tt> which <b>is not</b> inside the Bytemark network.</p>"
end
end