Module: nagvis
Branch: master
Commit: f45bfbf3842e551d61505dca3df8c2e36c4f4f14
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=f45bfbf3842e551d61505dca3df8c2e36c4f4f14

Author: Lars Michelsen <[email protected]>
Date:   Sat Nov 27 16:35:11 2010 +0100

#396 Added mechanism to automaticaly lighten the bgcolor on acked/downtime 
states

---

 share/frontend/nagvis-js/js/frontend.js |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/share/frontend/nagvis-js/js/frontend.js 
b/share/frontend/nagvis-js/js/frontend.js
index 11dc348..8db60f9 100644
--- a/share/frontend/nagvis-js/js/frontend.js
+++ b/share/frontend/nagvis-js/js/frontend.js
@@ -498,11 +498,16 @@ function getBackgroundColor(oObj) {
        // When state is PENDING, OK, UP, set default background color
        if(!oObj.summary_state || oObj.summary_state == 'PENDING' || 
oObj.summary_state == 'OK' || oObj.summary_state == 'UP')
                sColor = oPageProperties.background_color;
-       else
+       else {
                sColor = oStates[oObj.summary_state].bgcolor;
+
+               // Ack or downtime?
+               if((oObj.summary_in_downtime && oObj.summary_in_downtime === 1)
+                        || (oObj.summary_problem_has_been_acknowledged && 
oObj.summary_problem_has_been_acknowledged === 1))
+                       sColor = lightenColor(sColor, 100, 100, 100);
+       }
        
        oObj = null;
-       
        return sColor;
 }
 


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to