BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: {bb} Background color to green on acknowledge



Brother Jens,

The following patches to $BBHOME/web/mkbb.page and $BBHOME/web/mkbb.bkg
prevent acknowledged events from affecting the background colour of
generated  web pages... at least, they do on my setup (BBDISPLAY, BBPAGER,
BBNET all on the one machine - bb-19c under RH 7.2 on Intel).



==================================
$ diff -b $BBHOME/web/mkbb.page.DIST $BBHOME/web/mkbb.page
12a13
>
161a163,179
> if [ "$ACK_SET_BKG" = "FALSE" ]; then
>       #
>       # GET A LIST OF LOGFILE NAMES MATCHING
>       # CURRENT ACKNOWLEDGEMENTS AND BUILD sed
>       # EXPRESSIONS TO APPLY TO A FILE LIST
>       #
>       SEDSCRIPTS=`for ackfile in ${BBVAR}/acks/ack.*
>       do
>               basename $ackfile | awk -F. '{
>                       printf("-e /%s",$2)
>                       for(i=3;i<NF;i++){printf(",%s",$i)}
>                       printf("\\.%s/d ",$NF)
>                       }'
>       done`
> fi
>
>
167a186,192
>       #BBFILES=`$LS $BBFILES 2>/dev/null`             # SMM TEST
>       if [ "$ACK_SET_BKG" = "FALSE" ];then
>               #
>               # REMOVE THE ACKED FILENAMES FROM THE LIST
>               #
>               BBFILES=`$LS $BBFILES | $SED $SEDSCRIPTS 2>/dev/null`
>       else
168a194
>       fi
================================

================================
$ diff -b $BBHOME/web/mkbb.bkg.DIST $BBHOME/web/mkbb.bkg
12a13
>
26a28,43
> #
> # Get a list of logfile names matching
> # current acknowledgements and build sed
> # expressions to apply to a file list
> #
> if [ "$ACK_SET_BKG" = "FALSE" ];then
>       SEDSCRIPTS=`for ackfile in ${BBVAR}/acks/ack.*
>       do
>               basename $ackfile | awk -F. '{
>                       printf("-e /%s",$2)
>                       for(i=3;i<NF;i++){printf(",%s",$i)}
>                       printf("\\.%s/d ",$NF)
>                       }'
>       done`
> fi
>
46a64,71
>                                       #
>                                       # Always look for the current colour
in
>                                       # the logs, otherwise acked events
won't
>                                       # appear on bb2.html
>                                       #
>                                       # COLOR_FOUND is needed to avoid the
if
>                                       # clause clobbering $?
>                                       #
48c73,84
<                                       if [ "$?" -eq 0 ]
---
>                                       COLOR_FOUND=$?
>                                       if [ "$ACK_SET_BKG" = "FALSE" ];then
>                                               #
>                                               # Now make a list of log
files
>                                                 # that are not acked and
look
>                                               # for the current colour
again
>                                               #
>                                               FLIST=`$LS $expr | $SED
$SEDSCRIPTS`
>                                               $GREP -l "^${COLOR}[    ]"
$FLIST > /dev/null
>                                               COLOR_FOUND=$?
>                                       fi
>                                       if [ "$COLOR_FOUND" -eq 0 ]
50c86
<                                               rcode="$?"
---
>                                               rcode="$COLOR_FOUND"
56c92,98
<                               rcode="$?"
---
>                               COLOR_FOUND=$?
>                               if [ "$ACK_SET_BKG" = "FALSE" ];then
>                                       FLIST=`$LS | $SED $SEDSCRIPTS`
>                                       $GREP -l "^${COLOR}[    ]" $FLIST >
/dev/null
>                                       COLOR_FOUND=$?
>                               fi
>                               rcode="$COLOR_FOUND"
67,68c109,116
<                                       $GREP -l "^${COLOR}[    ]" $expr |
$GREP -v "summary." >> $BBTMP/BB.$$ 2>/dev/null
<                                       if [ "$?" -eq 0 ]
---
>                                       $GREP -l "^${COLOR}[    ]" $expr >>
$BBTMP/BB.$$ 2>/dev/null
>                                       COLOR_FOUND=$?
>                                       if [ "$ACK_SET_BKG" = "FALSE" ];then
>                                               FLIST=`$LS $expr | $SED
$SEDSCRIPTS`
>                                               $GREP -l "^${COLOR}[    ]"
$FLIST > /dev/null
>                                               COLOR_FOUND=$?
>                                       fi
>                                       if [ "$COLOR_FOUND" -eq 0 ]
70c118
<                                               rcode="$?"
---
>                                               rcode="$COLOR_FOUND"
76,77c124,131
<                               $GREP -l "^${COLOR}[    ]" * | $GREP -v
"summary." >> $BBTMP/BB.$$
<                               rcode="$?"
---
>                               $GREP -l "^${COLOR}[    ]" * >> $BBTMP/BB.$$
>                               COLOR_FOUND=$?
>                               if [ "$ACK_SET_BKG" = "FALSE" ];then
>                                       FLIST=`$LS | $SED $SEDSCRIPTS`
>                                       $GREP -l "^${COLOR}[    ]" $FLIST >
/dev/null
>                                       COLOR_FOUND=$?
>                               fi
>                               rcode="$COLOR_FOUND"
$

====================


You will also need to add the following two lines to $BBHOME/etc/bbsys.local
(or to any of bbsys.sh, bbinc.sh, or bbdef.sh)

ACK_SET_BKG="FALSE"
export ACK_SET_BKG


Of course, all the usual disclaimers apply (all care and no responsibility;
this will void your warranty; YMMV; caveat scriptor; etc, etc.)

I hope it works as well for you, as it has for me.

Cheers,
	Matt L.


> -----Original Message-----
> From: Peters Jens-WFJP280 [mailto:Jens.Peters@motorola.com]
> Sent: Friday, December 13, 2002 11:26 PM
> To: 'bb@bb4.com'
> Subject: {bb} Background color to green on acknowledge
> 
> 
> Hi,
> 
> I have seen that there was a discussion about setting alerts 
> if they are acknowledged to an additional color in late 1999.
> 
> I would like to do so. If someone has implemented this 
> functionality, please let me know.
> 
> http://support.bb4.com/archive/199909/msg00223.html
> 
> 
> Regards
> 
>  Jens Peters
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
> To unsubscribe from this list, or to subscribe to the bb-digest list
> send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
> subscribe bb-digest in the BODY of the message.
> 



*****************************************************************************
Notice:
This e-mail and any attachments are confidential and may contain legally 
privileged information and/or copyright material of Hansen Technologies 
Limited or third parties.  Copying, distributing, disclosing, 
commercialising or otherwise acting in reliance on this e-mail and any 
attachments is strictly prohibited unless you are the addressee of this 
e-mail and have written permission to do so.  If you have received this 
e-mail in error please delete this e-mail (including any copies and 
attachments) and contact Hansen Technologies Limited by return e-mail 
or by telephone on + 61 3 9840 3000.  Any views expressed in this e-mail
are those of the individual sender and may not necessarily reflect the 
views of or be a commitment by the organisation, except where the 
individual sender has the authority and expressly states them to be so.
*****************************************************************************
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index