Issue:
A user would like to change the default background colors for the high and low bounds on a numeric object.
Product Line:
ION Enterprise
StruxureWare Power Monitoring
StruxureWare Power Monitoring Expert
Environment:
Webreach / Web Applications Diagrams
Cause:
Support for high/low limit flags in WebReach was added to ION Enterprise 5.0 SP5 and ION Enterprise 5.5 SP1. However in WebReach, unlike Vista, the flag colors used are hard-coded in one of the WebReach style sheets. This article describes how to edit the style sheet file to change the flag colors. Note that this setting is global and all WebReach users will see the same colors.
Resolution:
Caution: ALWAYS make a copy of any file before editing it in case of error and it becomes necessary to revert to the original file.
This procedure is to change the background colors on simple numeric objects when they reach the high or low bounds. This procedure is not intended to change the high and low band colors on Dials or Gauges. Dial and Gauge high and low band colors are hard-coded to red and blue within the ION Enterprise software and cannot be changed.
Procedure for ION Enterprise (all supported versions) and Struxureware Power Monitoring 7.0
The file that must be edited is called "vista_prototype.xsl" and is located in the "...\system\webreach\includes" directory on the ION Enterprise/Struxureware Power Monitoring primary server. To find the section of the file that must be edited, open the file in a text editor and search for "00ff". The resultant code should look like:
else if (value > highBound)
{
// use a red background
parentTable.style.background = "#ff0000";
}
else if (value < lowBound)
{
// use a blue background
parentTable.style.background = "#0000FF";
}
The hexadecimal areas above indicate the color used for flags. To change colors, simply edit the 'parentTable.style.background' value using the appropriate code from the table below.
Procedure for Struxureware Power Monitoring 7.0.1 (WebReach was refactored in this release) and StruxureWare Power Monitoring Expert 7.2.x
The file to alter is called "realtime.js" and is in the "...\system\webreach\scripts" folder.
The new code snippet to change is:
if (rawValue > Number(highBound)) {
// use a red background
color = '#ff0000';
}
else if (rawValue < Number(lowBound)) {
// use a blue background
color = '#0000ff';
}
Procedure for Power Monitoring 8.0 (the flag colors now support more ranges)
The file to alter is still named "realtime.js" and is in the "...\system\webreach\scripts" folder but the code needs to be edited in a different place.
The new code snippet to change is:
if (m_HiHiFlagColor === undefined) {
var m_HiHiFlagColor = "#ff0000"; // red
var m_HighFlagColor = "#ff8000"; // orange
var m_LowFlagColor = "#00b8ff"; // light blue
var m_LoLoFlagColor = "#0000ff"; // blue
if (m_ErrorFlagColor === undefined) {
var m_ErrorFlagColor = m_HighFlagColor
var m_StaleFlagColor = "#ffff00"; // yellow
}
}
You will need to set the color variables above to the colors from the palette that you would like to see.
The IIS Admin Service must be restarted for any changes to take effect.
interior | HTML | bgcolor= | Red | Green | Blue | Color |
Black | #000000 | #000000 | 0 | 0 | 0 | [Black] |
White | #FFFFFF | #FFFFFF | 255 | 255 | 255 | [White] |
Red | #FF0000 | #FF0000 | 255 | 0 | 0 | [Red] |
Green | #00FF00 | #00FF00 | 0 | 255 | 0 | [Green] |
Blue | #0000FF | #0000FF | 0 | 0 | 255 | [Blue] |
Yellow | #FFFF00 | #FFFF00 | 255 | 255 | 0 | [Yellow] |
Magenta | #FF00FF | #FF00FF | 255 | 0 | 255 | [Magenta] |
Cyan | #00FFFF | #00FFFF | 0 | 255 | 255 | [Cyan] |
[Color 9] | #800000 | #800000 | 128 | 0 | 0 | [Color 9] |
[Color 10] | #008000 | #008000 | 0 | 128 | 0 | [Color 10] |
[Color 11] | #000080 | #000080 | 0 | 0 | 128 | [Color 11] |
[Color 12] | #808000 | #808000 | 128 | 128 | 0 | [Color 12] |
[Color 13] | #800080 | #800080 | 128 | 0 | 128 | [Color 13] |
[Color 14] | #008080 | #008080 | 0 | 128 | 128 | [Color 14] |
[Color 15] | #C0C0C0 | #C0C0C0 | 192 | 192 | 192 | [Color 15] |
[Color 16] | #808080 | #808080 | 128 | 128 | 128 | [Color 16] |
[Color 17] | #9999FF | #9999FF | 153 | 153 | 255 | [Color 17] |
[Color 18] | #993366 | #993366 | 153 | 51 | 102 | [Color 18] |
[Color 19] | #FFFFCC | #FFFFCC | 255 | 255 | 204 | [Color 19] |
[Color 20] | #CCFFFF | #CCFFFF | 204 | 255 | 255 | [Color 20] |
[Color 21] | #660066 | #660066 | 102 | 0 | 102 | [Color 21] |
[Color 22] | #FF8080 | #FF8080 | 255 | 128 | 128 | [Color 22] |
[Color 23] | #0066CC | #0066CC | 0 | 102 | 204 | [Color 23] |
[Color 24] | #CCCCFF | #CCCCFF | 204 | 204 | 255 | [Color 24] |
[Color 25] | #000080 | #000080 | 0 | 0 | 128 | [Color 25] |
[Color 26] | #FF00FF | #FF00FF | 255 | 0 | 255 | [Color 26] |
[Color 27] | #FFFF00 | #FFFF00 | 255 | 255 | 0 | [Color 27] |
[Color 28] | #00FFFF | #00FFFF | 0 | 255 | 255 | [Color 28] |
[Color 29] | #800080 | #800080 | 128 | 0 | 128 | [Color 29] |
[Color 30] | #800000 | #800000 | 128 | 0 | 0 | [Color 30] |
[Color 31] | #008080 | #008080 | 0 | 128 | 128 | [Color 31] |
[Color 32] | #0000FF | #0000FF | 0 | 0 | 255 | [Color 32] |
[Color 33] | #00CCFF | #00CCFF | 0 | 204 | 255 | [Color 33] |
[Color 34] | #CCFFFF | #CCFFFF | 204 | 255 | 255 | [Color 34] |
[Color 35] | #CCFFCC | #CCFFCC | 204 | 255 | 204 | [Color 35] |
[Color 36] | #FFFF99 | #FFFF99 | 255 | 255 | 153 | [Color 36] |
[Color 37] | #99CCFF | #99CCFF | 153 | 204 | 255 | [Color 37] |
[Color 38] | #FF99CC | #FF99CC | 255 | 153 | 204 | [Color 38] |
[Color 39] | #CC99FF | #CC99FF | 204 | 153 | 255 | [Color 39] |
[Color 40] | #FFCC99 | #FFCC99 | 255 | 204 | 153 | [Color 40] |
[Color 41] | #3366FF | #3366FF | 51 | 102 | 255 | [Color 41] |
[Color 42] | #33CCCC | #33CCCC | 51 | 204 | 204 | [Color 42] |
[Color 43] | #99CC00 | #99CC00 | 153 | 204 | 0 | [Color 43] |
[Color 44] | #FFCC00 | #FFCC00 | 255 | 204 | 0 | [Color 44] |
[Color 45] | #FF9900 | #FF9900 | 255 | 153 | 0 | [Color 45] |
[Color 46] | #FF6600 | #FF6600 | 255 | 102 | 0 | [Color 46] |
[Color 47] | #666699 | #666699 | 102 | 102 | 153 | [Color 47] |
[Color 48] | #969696 | #969696 | 150 | 150 | 150 | [Color 48] |
[Color 49] | #003366 | #003366 | 0 | 51 | 102 | [Color 49] |
[Color 50] | #339966 | #339966 | 51 | 153 | 102 | [Color 50] |
[Color 51] | #003300 | #003300 | 0 | 51 | 0 | [Color 51] |
[Color 52] | #333300 | #333300 | 51 | 51 | 0 | [Color 52] |
[Color 53] | #993300 | #993300 | 153 | 51 | 0 | [Color 53] |
[Color 54] | #993366 | #993366 | 153 | 51 | 102 | [Color 54] |
[Color 55] | #333399 | #333399 | 51 | 51 | 153 | [Color 55] |
[Color 56] | #333333 | #333333 | 51 | 51 | 51 | [Color 56] |
Released for:Schneider Electric Indonesia

