From: Stephen L Johnson Date: Fri, 15 Dec 2000 21:01:10 +0000 (+0000) Subject: added code to display FDQN for hostname if $HISTORY_FQDN is set to 1 X-Git-Tag: spong-2_7_2~42 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc1691caf3d6836a0dfccbf417d43d0940142be6;p=spong.git added code to display FDQN for hostname if $HISTORY_FQDN is set to 1 --- diff --git a/src/lib/Spong/History.pm b/src/lib/Spong/History.pm index 1884d7f..8e707c1 100755 --- a/src/lib/Spong/History.pm +++ b/src/lib/Spong/History.pm @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl # # This object represents an event that has happened that a record should be # kept for. The current case is when a service changes state (color change). @@ -20,6 +20,8 @@ # History: # (1) Cleaned up (Ed July 31, 1997); +# $Id: History.pm,v 1.5 2000/12/15 21:01:10 sljohnson Exp $ + package Spong::History; use Spong::HistoryService; @@ -82,6 +84,7 @@ sub display_text { my( $min, $hour ) = (localtime($self->time()))[1,2]; my $shost = $main::HOSTS{$self->host()}->{'display_name'}; + $shost = $self->host() if $main::HISTORY_FQDN; $shost = (split( /\./, $self->host() ))[0] unless $shost; print $self->color(), " "x(7-length($self->color())); @@ -103,6 +106,7 @@ sub display_html { my $other = $self->other(); my $time = $self->time(); + $shost = $self->host() if $main::HISTORY_FQDN; $shost = (split( /\./, $self->host() ))[0] unless $shost; print "";