ASNMTAP
view release on metacpan or search on metacpan
applications/display.pl view on Meta::CPAN
my $title = @_;
print HTML "</BODY>\n</HTML>";
print HTMLCV "</BODY>\n</HTML>";
print HTMLMCV "</BODY>\n</HTML>";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printGroepFooter {
my ($title, $show) = @_;
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printItemFooter {
my ($catalogID_uniqueKey, $catalogID, $uniqueKey, $title, $status, $timeslot, $statusIcon, $insertInMCV, $inIMW, $itemFullCondensedView, $printCondensedView, $arrayStatusMessage, $catalogID_uKey_timeperiodID) = @_;
$itemFullCondensedView .= "</TR>\n";
if (@$arrayStatusMessage) {
$itemFullCondensedView .= '<TR style="{height: 0;}"><TD COLSPAN="'. $colspanDisplayTime .'"><DIV id="'.$catalogID_uniqueKey.'" style="display:none"><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=2>'. "\n";
foreach my $arrayStatusMessage ( @$arrayStatusMessage ) { $itemFullCondensedView .= printStatusMessage ( $arrayStatusMessage ); }
$itemFullCondensedView .= "</TABLE></DIV></TD></TR>\n";
}
$groupFullView += 1;
$groupCondensedView += $printCondensedView;
my $groep = ( $title =~ /^\[(\d+)\]/ ? $1 : 0);
push ( @multiarrayFullCondensedView, [ $ERRORS{"$status"}, $groep, $timeslot, $statusIcon, $itemFullCondensedView, $printCondensedView ] );
my $priorityGroup = '-MCV-' . ( ( exists $$catalogID_uKey_timeperiodID{$catalogID}->{$uniqueKey}->{SDE_IMW}->{priority} ) ? $$catalogID_uKey_timeperiodID{$catalogID}->{$uniqueKey}->{SDE_IMW}->{priority} : 'P01' ) . '-';
push ( @multiarrayMinimalCondensedView, [ $ERRORS{"$status"}, $priorityGroup, $timeslot, $statusIcon, $itemFullCondensedView ] ) if ( ( ! $statusIcon or ( $statusIcon and $insertInMCV ) ) and $status !~ /(?:OK|DEPENDENT|OFFLINE|NO TEST|TRENDLINE)/ ...
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printStatusFooter {
my ($title, $emptyFullView, $emptyCondencedView, $emptyMinimalCondencedView, $playSoundStatus) = @_;
print HTML '</TABLE>', "\n";
print HTML <<EOH;
<script language="JavaScript" type="text/javascript">
function toggleDiv (div_id){
if (document.getElementById(div_id)) {
if (document.getElementById(div_id).style.display == 'none') {
document.getElementById(div_id).style.display = 'block';
} else {
document.getElementById(div_id).style.display = 'none';
}
}
}
</script>
EOH
if ($playSoundStatus) {
print HTML <<EOH;
<script language="JavaScript" type="text/javascript">
var soundState = getSoundCookie( 'soundState' );
if ( soundState != null && soundState == 'on' ) {
playSound = '<embed src="$HTTPSURL/sound/$SOUND{$playSoundStatus}" width="" height="" alt="" hidden="true" autostart="true" loop="false"><\\/embed>';
dynamicContentNS4NS6FF ('SoundStatus', playSound, 1);
}
</script>
EOH
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print HTMLCV '</TABLE>', "\n";
print HTMLCV <<EOH;
<script language="JavaScript" type="text/javascript">
function toggleDiv (div_id){
if (document.getElementById(div_id)) {
if (document.getElementById(div_id).style.display == 'none') {
document.getElementById(div_id).style.display = 'block';
} else {
document.getElementById(div_id).style.display = 'none';
}
}
}
</script>
EOH
if ($playSoundStatus) {
print HTMLCV <<EOH;
<script language="JavaScript" type="text/javascript">
var soundState = getSoundCookie( 'soundState' );
if ( soundState != null && soundState == 'on' ) {
playSound = '<embed src="$HTTPSURL/sound/$SOUND{$playSoundStatus}" width="" height="" alt="" hidden="true" autostart="true" loop="false"><\\/embed>';
dynamicContentNS4NS6FF ('SoundStatus', playSound, 1);
}
</script>
EOH
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print HTMLMCV '</TABLE>', "\n";
print HTMLMCV <<EOH;
<script language="JavaScript" type="text/javascript">
function toggleDiv (div_id){
if (document.getElementById(div_id)) {
if (document.getElementById(div_id).style.display == 'none') {
document.getElementById(div_id).style.display = 'block';
} else {
document.getElementById(div_id).style.display = 'none';
}
}
}
</script>
EOH
if ($playSoundStatus) {
print HTMLMCV <<EOH;
<script language="JavaScript" type="text/javascript">
var soundState = getSoundCookie( 'soundState' );
if ( soundState != null && soundState == 'on' ) {
playSound = '<embed src="$HTTPSURL/sound/$SOUND{$playSoundStatus}" width="" height="" alt="" hidden="true" autostart="true" loop="false"><\\/embed>';
dynamicContentNS4NS6FF ('SoundStatus', playSound, 1);
}
</script>
EOH
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub maskPassword {
my ($parameters) = @_;
# --dnPass=
if ($parameters =~ /--dnPass=/) {
$parameters =~ s/(--dnPass=)\w+/$1********/g;
}
# --proxy=user:pasword\@proxy
if ($parameters =~ /--proxy=/) {
$parameters =~ s/(--proxy=\w*:)\w*(\@\w+)/$1********$2/g;
}
# -p user:pasword\@proxy
if ($parameters =~ /-p / and ($parameters !~ /-u / and $parameters !~ /--username=/)) {
$parameters =~ s/(-p \w*:)\w*(\@\w+)/$1********$2/g;
}
# --password=
if ($parameters =~ /--password=/) {
$parameters =~ s/(--password=)\w+/$1********/g;
}
# --username= or -u and --password= or -p (database plugins)
if ($parameters =~ /-p / and ($parameters =~ /-u / or $parameters =~ /--username=/)) {
$parameters =~ s/(-p )\w+/$1********/g;
}
# --username= or -U and --password= or -P (ftp plugins)
if ($parameters =~ /-P / and ($parameters =~ /-U / or $parameters =~ /--username=/)) {
$parameters =~ s/(-P )\w+/$1********/g;
}
# j_username= or j_password= (J2EE based Applications)
if ($parameters =~ /j_username=/ and $parameters =~ /j_password=/) {
$parameters =~ s/(j_password=)\w+/$1********/g;
}
return ($parameters);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub print_usage () {
print "Usage: $PROGNAME -H <MySQL hostname> [-C <Checklist>] [-P <pagedir>] [-L <loop>] [-t <trigger>] [-c <YYYY-MM-DD HH:MM:SS> ] [-T <displayTime>] [-l <lockMySQL>] [-D <debug>] [-V version] [-h help]\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
( run in 0.568 second using v1.01-cache-2.11-cpan-39bf76dae61 )