Author: Lars Michelsen <[email protected]>
Date: Tue Sep 9 17:33:00 2014 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Tue Sep 9 17:33:00 2014 +0200
Now using label_(show|border|background|maxlen) definitions from map globals
---
ChangeLog | 4 +++-
share/server/core/sources/automap.php | 24 ++++++++++++++++++++----
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6a861e0..c25c438 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,9 +7,11 @@ Core:
* Multisite Authorisation: It is now possible to specific manage map
view/edit permissions
Automap:
- * Now using line_color and line_width from map global definitions
+ * Now using line_color and line_width for connectors from map global
definitions
+ * Now using label_(show|border|background|maxlen) definitions from map
globals
* FIX: Removed useless "Make root" link for connector lines
* FIX: Removed map editing options from menus which make no sense
+ * FIX: Removed line_type option from map global definitions
Geomap:
* FIX: Removed map editing options from menus which make no sense
diff --git a/share/server/core/sources/automap.php
b/share/server/core/sources/automap.php
index e8c7328..c316c6e 100644
--- a/share/server/core/sources/automap.php
+++ b/share/server/core/sources/automap.php
@@ -171,6 +171,18 @@ if (cfg('global', 'shinken_features')) {
// Alter some global vars with automap specific things
$updateConfigVars = array(
+ 'label_show' => array(
+ 'default' => '1',
+ ),
+ 'label_border' => array(
+ 'default' => 'transparent',
+ ),
+ 'label_background' => array(
+ 'default' => '#ffffff',
+ ),
+ 'label_maxlen' => array(
+ 'default' => '14',
+ ),
'line_width' => array(
'default' => '1',
),
@@ -179,6 +191,10 @@ $updateConfigVars = array(
),
);
+$hiddenConfigVars = array(
+ 'line_type',
+);
+
/**
* Get root host object by NagVis configuration or by backend.
*/
@@ -318,10 +334,10 @@ function automap_obj($MAPCFG, &$params, &$saved_config,
$obj_name) {
$obj['.height'] = $size[1];
}
- $obj['label_show'] = true;
- $obj['label_border'] = 'transparent';
- $obj['label_background'] = '#fff';
- $obj['label_maxlen'] = 14;
+ $obj['label_show'] = $MAPCFG->getValue(0, 'label_show');
+ $obj['label_border'] = $MAPCFG->getValue(0, 'label_border');
+ $obj['label_background'] = $MAPCFG->getValue(0, 'label_background');
+ $obj['label_maxlen'] = $MAPCFG->getValue(0, 'label_maxlen');
// Header menu has z-index 100, this object's label the below+1
$obj['z'] = 98;
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins