Author:   Lars Michelsen <[email protected]>
Date:     Thu Nov 24 19:25:56 2011 +0100
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Thu Nov 24 19:25:56 2011 +0100

Fixed line_y_label position

---

 TODO                                 |    1 -
 share/frontend/nagvis-js/js/lines.js |   10 +++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/TODO b/TODO
index 042821b..0186941 100644
--- a/TODO
+++ b/TODO
@@ -10,7 +10,6 @@ Relative Koordinaten:
     - Beim Config Parsen Fehlermeldung erzeugen
 - Sidebar Folder auf/zu klappbar
 - In Sidebar/Dropdown die aktuelle Map highlighten
-- line_weather_color umbrechen wenn als Text dargestellt
 - line_label_y_offset wird noch nicht sauber berechnet
 
 -------------------------------------------------------------------------------
diff --git a/share/frontend/nagvis-js/js/lines.js 
b/share/frontend/nagvis-js/js/lines.js
index 1d53039..8507007 100644
--- a/share/frontend/nagvis-js/js/lines.js
+++ b/share/frontend/nagvis-js/js/lines.js
@@ -147,17 +147,17 @@ function drawLabel(objectId, num, lineType, lx, ly, z, 
perfdataA, perfdataB, yOf
     labelShift = getLabelShift(perfdataA);
 
     // Maybe use function to detect the real height in future
-    var labelHeight = 22;
+    var labelHeight = 21;
 
     if(lineType == '13') {
         if(oLinkContainer)
-            oLinkContainer.appendChild(drawNagVisTextbox(objectId+'-link'+num, 
'box', '#ffffff', '#000000', (lx-labelShift), (ly - labelHeight / 2), z, 
'auto', 'auto', '<b>' + perfdataA + '</b>'));
+            oLinkContainer.appendChild(drawNagVisTextbox(objectId+'-link'+num, 
'box', '#ffffff', '#000000', (lx-labelShift), parseInt(ly - labelHeight / 2), 
z, 'auto', 'auto', '<b>' + perfdataA + '</b>'));
     } else if(lineType == '14') {
-        var label = drawNagVisTextbox(objectId+'-link'+num, 'box', '#ffffff', 
'#000000', (lx-labelShift), (ly - labelHeight - yOffset), z, 'auto', 'auto', 
'<b>' + perfdataA + '</b>');
+        var label = drawNagVisTextbox(objectId+'-link'+num, 'box', '#ffffff', 
'#000000', (lx-labelShift), parseInt(ly - labelHeight - yOffset), z, 'auto', 
'auto', '<b>' + perfdataA + '</b>');
         if(oLinkContainer)
             oLinkContainer.appendChild(label);
         labelShift = getLabelShift(perfdataB);
-        label = drawNagVisTextbox(objectId+'-link'+(num+1), 'box', '#ffffff', 
'#000000', (lx-labelShift), (ly + yOffset), z, 'auto', 'auto', '<b>' + 
perfdataB + '</b>');
+        label = drawNagVisTextbox(objectId+'-link'+(num+1), 'box', '#ffffff', 
'#000000', (lx-labelShift), parseInt(ly + yOffset), z, 'auto', 'auto', '<b>' + 
perfdataB + '</b>');
         if(oLinkContainer)
             oLinkContainer.appendChild(label);
         label = null;
@@ -338,7 +338,7 @@ function drawNagVisLine(objectId, lineType, cuts, x, y, z, 
width, colorFill, col
             }
 
             // Take the configured line width into account
-            yOffset = yOffset + parseInt(width / 2);
+            yOffset = yOffset + width;
 
             // perfdataA contains the percentage info
             // perfdataB contains the bandwith info


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to