Title: [opsview-base] [26] Fixed offset for line drawings + icon moving, because of Opsview banner
Revision
26
Author
tvoon
Date
2012-07-31 13:27:45 +0100 (Tue, 31 Jul 2012)

Log Message

Fixed offset for line drawings + icon moving, because of Opsview banner

Modified Paths

Added Paths

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2012-07-31 10:34:28 UTC (rev 25)
+++ trunk/Makefile	2012-07-31 12:27:45 UTC (rev 26)
@@ -792,6 +792,8 @@
 	cd ${NAGVIS} && patch -p1 < ../patches/nagvis_default_timezone.patch
 	cd ${NAGVIS} && patch -p1 < ../patches/nagvis_custom_css.patch
 	cd ${NAGVIS} && patch -p1 < ../patches/nagvis_rightclickmenu_respects_navbar.patch
+	cd ${NAGVIS} && patch -p1 < ../patches/nagvis_icon_save_respects_navbar.patch
+	cd ${NAGVIS} && patch -p1 < ../patches/nagvis_line_drawing_respects_navbar.patch
 	# TODO update patches that work but with some fuzz
 	find ${NAGVIS} -name "*.orig" -exec rm {} \;
 	cp patches/nagvis/opsview.cfg ${NAGVIS}/etc/maps/

Added: trunk/patches/nagvis_icon_save_respects_navbar.patch
===================================================================
--- trunk/patches/nagvis_icon_save_respects_navbar.patch	                        (rev 0)
+++ trunk/patches/nagvis_icon_save_respects_navbar.patch	2012-07-31 12:27:45 UTC (rev 26)
@@ -0,0 +1,16 @@
+diff -ur nagvis.original/wui/includes/classes/WuiMapCfg.php nagvis/wui/includes/classes/WuiMapCfg.php
+--- nagvis.original/wui/includes/classes/WuiMapCfg.php	2009-10-15 16:41:24.000000000 +0000
++++ nagvis/wui/includes/classes/WuiMapCfg.php	2012-07-30 16:35:16.150461062 +0000
+@@ -187,6 +187,12 @@
+ 										$cfgLines = 0;
+ 										$cfgLine = '';
+ 										$cfgLineNr = 0;
++
++										// Opsview hackity hack!!
++										// We subtract the y coordinate at save time, to cater for Opsview banner
++										if ($key == "y") {
++											$val = $val-80;
++										}
+ 										
+ 										// Loop parameters from file (Find line for this option)
+ 										while(isset($file[($l+$cfgLines)]) && trim($file[($l+$cfgLines)]) != '}') {

Added: trunk/patches/nagvis_line_drawing_respects_navbar.patch
===================================================================
--- trunk/patches/nagvis_line_drawing_respects_navbar.patch	                        (rev 0)
+++ trunk/patches/nagvis_line_drawing_respects_navbar.patch	2012-07-31 12:27:45 UTC (rev 26)
@@ -0,0 +1,23 @@
+diff -ur nagvis.original/wui/includes/js/wui.js nagvis/wui/includes/js/wui.js
+--- nagvis.original/wui/includes/js/wui.js	2009-10-15 16:41:24.000000000 +0000
++++ nagvis/wui/includes/js/wui.js	2012-07-30 18:01:10.660474073 +0000
+@@ -145,6 +145,9 @@
+ 		
+ 		myshape.clear();
+ 		
++		// Opsview Hackity Hack! Consider the Opsview banner
++		posy = posy - 80;
++
+ 		if(objtype != 'textbox') {
+ 			myshape.drawLine(myshapex, myshapey, posx, posy);
+ 		} else {
+@@ -178,6 +181,9 @@
+ 			posy = event.clientY;
+ 		}
+ 		
++		// Opsview Hackity Hack! Consider the Opsview banner
++		posy = posy - 80;
++
+ 		// Start drawing a line
+ 		if(cpt_clicks == 2) {		
+ 			myshape = new jsGraphics("mymap");

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to