Author:   Lars Michelsen <[email protected]>
Date:     Thu Mar 15 13:24:52 2012 +0100
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Thu Mar 15 13:24:52 2012 +0100

Added line_weather_colors option to nagvis.ini.php [defaults] section

---

 ChangeLog                                        |    1 +
 docs/en_US/map_config_format_description.html    |    2 +-
 docs/en_US/nagvis_config_format_description.html |    6 ++++++
 etc/nagvis.ini.php-sample                        |    6 ++++++
 share/server/core/classes/GlobalMainCfg.php      |    6 ++++++
 share/server/core/mapcfg/default.php             |    8 ++++----
 6 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 47af80b..34a586c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 1.6.5
 Core
+  * Added line_weather_colors option to nagvis.ini.php [defaults] section
   * Bugfix: Fixed wrong variable in MySQL connect error handler
   * Bugfix: Fixed bug in 1.6.1 auth db update scripts
   * Bugfix: Added missing permission for the Url module which is used when
diff --git a/docs/en_US/map_config_format_description.html 
b/docs/en_US/map_config_format_description.html
index a6c2606..85caf7b 100644
--- a/docs/en_US/map_config_format_description.html
+++ b/docs/en_US/map_config_format_description.html
@@ -201,7 +201,7 @@
         <td>line_width</td><td>3</td><td>This defines the width of the line in 
px when this object is being displayed as line.</td>
         </tr>
         <tr>
-        
<td>line_weather_colors</td><td>10:#8c00ff,25:#2020ff,40:#00c0ff,55:#00f000,70:#f0f000,85:#ffc000,100:#ff0000</td><td>This
 defines the colours of weathermap colours in the different percentage levels. 
For example above 10% load it will be coloured #8c00ff. <font 
color="#ff0000">(New in 1.6)</font></td>
+        <td>line_weather_colors</td><td>inherited (<a 
href="nagvis_config_format_description.html">nagvis.ini.php</a>)</td><td>This 
defines the colours of weathermap colours in the different percentage levels. 
For example above 10% load it will be coloured #8c00ff. <font 
color="#ff0000">(New in 1.6)</font></td>
         </tr>
         
         <tr>
diff --git a/docs/en_US/nagvis_config_format_description.html 
b/docs/en_US/nagvis_config_format_description.html
index ba7f5aa..50e97c8 100644
--- a/docs/en_US/nagvis_config_format_description.html
+++ b/docs/en_US/nagvis_config_format_description.html
@@ -348,6 +348,12 @@
             <td>0</td>
             <td><font color="#ff0000">New in 1.6.4:</font> Show the objects 
labels or not.</td>
         </tr>
+        <tr>
+            <td>line_weather_colors</td>
+            
<td>10:#8c00ff,25:#2020ff,40:#00c0ff,55:#00f000,70:#f0f000,85:#ffc000,100:#ff0000</td>
+            <td><font color="#ff0000">New in 1.6.5:</font> This defines the 
colours of weathermap colours
+             in the different percentage levels. For example above 10% load it 
will be coloured #8c00ff.</td>
+        </tr>
         </table>
         
         <a name="index"></a>
diff --git a/etc/nagvis.ini.php-sample b/etc/nagvis.ini.php-sample
index 840d53a..2a56dcb 100644
--- a/etc/nagvis.ini.php-sample
+++ b/etc/nagvis.ini.php-sample
@@ -218,6 +218,12 @@
 
;servicegroupurl="[htmlcgi]/status.cgi?servicegroup=[servicegroup_name]&style=detail"
 ; URL template for nested map links
 ;mapurl="[htmlbase]/index.php?mod=Map&act=view&show=[map_name]"
+; Templates to be used for the different views.
+;view_template="default"
+; Enable/disable object labels for all objects
+;label_show=0
+; Configure the colors used by weathermap lines
+;line_weather_colors="10:#8c00ff,25:#2020ff,40:#00c0ff,55:#00f000,70:#f0f000,85:#ffc000,100:#ff0000"
 
 ; Options to configure the Overview page of NagVis
 [index]
diff --git a/share/server/core/classes/GlobalMainCfg.php 
b/share/server/core/classes/GlobalMainCfg.php
index f91dbf2..5ffe594 100644
--- a/share/server/core/classes/GlobalMainCfg.php
+++ b/share/server/core/classes/GlobalMainCfg.php
@@ -405,6 +405,12 @@ class GlobalMainCfg {
                     'match'      => MATCH_BOOLEAN, 
                     'field_type' => 'boolean',
                 ),
+                'line_weather_colors' => Array(
+                    'must'       => 0,
+                    'editable'   => 1,
+                    'default'    => 
'10:#8c00ff,25:#2020ff,40:#00c0ff,55:#00f000,70:#f0f000,85:#ffc000,100:#ff0000',
+                    'match'      => MATCH_WEATHER_COLORS,
+                ),
             ),
             'wui' => Array(
                 'allowedforconfig' => Array(
diff --git a/share/server/core/mapcfg/default.php 
b/share/server/core/mapcfg/default.php
index 58b3ff4..8a6d790 100644
--- a/share/server/core/mapcfg/default.php
+++ b/share/server/core/mapcfg/default.php
@@ -488,10 +488,10 @@ $mapConfigVars = Array(
         'depends_on' => 'view_type',
         'depends_value' => 'line'),
     'line_weather_colors' => Array(
-        'must' => 0,
-        'default' => 
'10:#8c00ff,25:#2020ff,40:#00c0ff,55:#00f000,70:#f0f000,85:#ffc000,100:#ff0000',
-        'match' => MATCH_WEATHER_COLORS,
-        'depends_on' => 'view_type',
+        'must'          => 0,
+        'default'       => cfg('defaults', 'line_weather_colors'),
+        'match'         => MATCH_WEATHER_COLORS,
+        'depends_on'    => 'view_type',
         'depends_value' => 'line'),
 
     'in_maintenance' => Array(


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to