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

Author: Lars Michelsen <[email protected]>
Date:   Sat Aug 21 22:28:38 2010 +0200

Fixed minor problems in latest changes

---

 share/frontend/nagvis-js/js/lines.js       |   11 ++++---
 share/server/core/classes/GlobalMapCfg.php |   43 ++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 5 deletions(-)

diff --git a/share/frontend/nagvis-js/js/lines.js 
b/share/frontend/nagvis-js/js/lines.js
index 83756e4..53888a7 100644
--- a/share/frontend/nagvis-js/js/lines.js
+++ b/share/frontend/nagvis-js/js/lines.js
@@ -171,7 +171,6 @@ function getLabelShift(str) {
 
 // This function draws an arrow like it is used on NagVis maps
 // It draws following line types: ---> and ---><---
-//function drawArrow(objectId, x1, y1, x2, y2, z, w, colorFill, colorBorder, 
bLinkArea lineType, perfdata, labelPosition) {
 function drawArrow(objectId, lineType, x1, y1, x2, y2, z, w, colorFill, 
perfdataA, perfdataB, colorBorder, bLinkArea, labelPosition) {
        var xCoord = [];
        var yCoord = [];
@@ -199,7 +198,6 @@ function drawArrow(objectId, lineType, x1, y1, x2, y2, z, 
w, colorFill, perfdata
        var ly = middle(y1, y2, labelPosition);
        
        drawPolygonBasedObject(objectId, lineType, xCoord, yCoord, z, w, 
colorFill, perfdataA, perfdataB, colorBorder, bLinkArea, lx, ly);
-//     drawPolygonBasedObject(objectId, xCoord, yCoord, z, w, colorFill, 
colorBorder, bLinkArea);
        
        yCoord = null;
        xCoord = null;
@@ -241,9 +239,12 @@ function drawNagVisLine(objectId, type, cuts, x1, y1, x2, 
y2, z, width, colorFil
        var perfdataB = null;
 
        // Cuts
-       cut = cuts[0];                  // Lines meeting point position
-       cutIn = cuts[1];                // First line label position
-       cutOut = cuts[2];               // Second line label position
+       // Lines meeting point position
+  // First line label position
+       // Second line label position
+       var cut = cuts[0];
+       var cutIn = cuts[1];
+       var cutOut = cuts[2];
        
        switch (type) {
                case '10':
diff --git a/share/server/core/classes/GlobalMapCfg.php 
b/share/server/core/classes/GlobalMapCfg.php
index dca98ea..3a17fbf 100644
--- a/share/server/core/classes/GlobalMapCfg.php
+++ b/share/server/core/classes/GlobalMapCfg.php
@@ -239,6 +239,13 @@ class GlobalMapCfg {
                                                'match' => MATCH_LINE_ARROW,
                                                'depends_on' => 'view_type',
                                                'depends_value' => 'line'),
+                                       'line_cut' => Array(
+                                               'must'          => 0,
+                                               'default'       => '0.5',
+                                               'match'         => MATCH_FLOAT,
+                                               'field_type'    => 'dropdown',
+                                               'depends_on'    => 'view_type',
+                                               'depends_value' => 'line'),
                                        'line_width' => Array('must' => 0,
                                                'default' => '3',
                                                'match' => MATCH_INTEGER,
@@ -360,6 +367,13 @@ class GlobalMapCfg {
                                                'match' => MATCH_LINE_ARROW,
                                                'depends_on' => 'view_type',
                                                'depends_value' => 'line'),
+                                       'line_cut' => Array(
+                                               'must'          => 0,
+                                               'default'       => '0.5',
+                                               'match'         => MATCH_FLOAT,
+                                               'field_type'    => 'dropdown',
+                                               'depends_on'    => 'view_type',
+                                               'depends_value' => 'line'),
                                        'line_width' => Array('must' => 0,
                                                'default' => '',
                                                'match' => MATCH_INTEGER,
@@ -526,6 +540,13 @@ class GlobalMapCfg {
                                                'match' => MATCH_LINE_ARROW,
                                                'depends_on' => 'view_type',
                                                'depends_value' => 'line'),
+                                       'line_cut' => Array(
+                                               'must'          => 0,
+                                               'default'       => '0.5',
+                                               'match'         => MATCH_FLOAT,
+                                               'field_type'    => 'dropdown',
+                                               'depends_on'    => 'view_type',
+                                               'depends_value' => 'line'),
                                        'line_width' => Array('must' => 0,
                                                'default' => '',
                                                'match' => MATCH_INTEGER,
@@ -693,6 +714,7 @@ class GlobalMapCfg {
                                                'default' => '',
                                                'match' => MATCH_LINE_ARROW,
                                                'depends_on' => 'view_type',
+                                               'depends_value' => 'line'),
                                        'line_cut' => Array(
                                                'must'          => 0,
                                                'default'       => '0.5',
@@ -891,6 +913,13 @@ class GlobalMapCfg {
                                                'match' => MATCH_LINE_ARROW,
                                                'depends_on' => 'view_type',
                                                'depends_value' => 'line'),
+                                       'line_cut' => Array(
+                                               'must'          => 0,
+                                               'default'       => '0.5',
+                                               'match'         => MATCH_FLOAT,
+                                               'field_type'    => 'dropdown',
+                                               'depends_on'    => 'view_type',
+                                               'depends_value' => 'line'),
                                        'line_width' => Array('must' => 0,
                                                'default' => '',
                                                'match' => MATCH_INTEGER,
@@ -1049,6 +1078,13 @@ class GlobalMapCfg {
                                                'match' => MATCH_LINE_ARROW,
                                                'depends_on' => 'view_type',
                                                'depends_value' => 'line'),
+                                       'line_cut' => Array(
+                                               'must'          => 0,
+                                               'default'       => '0.5',
+                                               'match'         => MATCH_FLOAT,
+                                               'field_type'    => 'dropdown',
+                                               'depends_on'    => 'view_type',
+                                               'depends_value' => 'line'),
                                        'line_width' => Array('must' => 0,
                                                'default' => '',
                                                'match' => MATCH_INTEGER,
@@ -1182,6 +1218,13 @@ class GlobalMapCfg {
                                        'line_type' => Array('must' => 1,
                                                'match' => MATCH_LINE_TYPE,
                                                'field_type' => 'dropdown'),
+                                       'line_cut' => Array(
+                                               'must'          => 0,
+                                               'default'       => '0.5',
+                                               'match'         => MATCH_FLOAT,
+                                               'field_type'    => 'dropdown',
+                                               'depends_on'    => 'view_type',
+                                               'depends_value' => 'line'),
                                        'line_width' => Array('must' => 0,
                                                'default' => '3',
                                                'match' => MATCH_INTEGER),


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to