diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-14 22:49:54 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-14 22:49:54 +0000 |
commit | 68e428ef64958b90274b3f6169413030631ce0ba (patch) | |
tree | e81cfc0ed4fac73961b1bf8ef0b2612898c3907e /lib/custodian | |
parent | 04a75a95148d1c76e1b255da86fcf7fcc4b5fd9e (diff) |
Format the inside message more neatly
Diffstat (limited to 'lib/custodian')
-rw-r--r-- | lib/custodian/alerter.rb | 8 |
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 |