Title: [opsview-base] [39] Nagviz fix for Fixfox 3.6 and newer, and chrome
- Revision
- 39
- Author
- dferguson
- Date
- 2012-09-17 14:22:40 +0100 (Mon, 17 Sep 2012)
Log Message
Nagviz fix for Fixfox 3.6 and newer, and chrome
Nagvis _javascript_ is a bit lax in checking some vriables exisst before use, which firefox and chrome now complain about.
Improve the code slightly to get FF and chrome working again.
Modified Paths
Added Paths
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2012-09-07 16:22:41 UTC (rev 38)
+++ trunk/CHANGES 2012-09-17 13:22:40 UTC (rev 39)
@@ -4,4 +4,5 @@
ENHANCEMENTS:
NRPE now returns some system version information
FIXES:
+ Fix to nagvis for later versions of firefox and chrome where use of vairables was a bit lax in code
TECHNICAL:
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2012-09-07 16:22:41 UTC (rev 38)
+++ trunk/Makefile 2012-09-17 13:22:40 UTC (rev 39)
@@ -801,6 +801,7 @@
cd ${NAGVIS} && patch -p1 < ../patches/nagvis_opsview_iconset.patch
cd ${NAGVIS} && patch -p1 < ../patches/nagvis_default_timezone.patch
cd ${NAGVIS} && patch -p1 < ../patches/nagvis_custom_css.patch
+ cd ${NAGVIS} && patch -p1 < ../patches/nagvis_firefox_6.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_firefox_6.patch
===================================================================
--- trunk/patches/nagvis_firefox_6.patch (rev 0)
+++ trunk/patches/nagvis_firefox_6.patch 2012-09-17 13:22:40 UTC (rev 39)
@@ -0,0 +1,19 @@
+--- nagvis-1.4.4/wui/includes/js/wui.js 2009-10-15 16:41:24.000000000 +0000
++++ nagvis/wui/includes/js/wui.js 2012-09-13 14:00:01.000000000 +0000
+@@ -397,10 +397,12 @@
+ if(aFields[i].name.charAt(0) !== '_') {
+
+ // Check if the value of the input helper field should be used
+- if(aFields[i].options[aFields[i].selectedIndex].value === lang['manualInput']) {
+- getstr += aFields[i].name + "=" + escapeUrlValues(document.getElementById('_inp_'+aFields[i].name).value) + "&";
+- } else {
+- getstr += aFields[i].name + "=" + escapeUrlValues(aFields[i].options[aFields[i].selectedIndex].value) + "&";
++ if(aFields[i].options[aFields[i].selectedIndex]) {
++ if(aFields[i].options[aFields[i].selectedIndex].value === lang['manualInput']) {
++ getstr += aFields[i].name + "=" + escapeUrlValues(document.getElementById('_inp_'+aFields[i].name).value) + "&";
++ } else {
++ getstr += aFields[i].name + "=" + escapeUrlValues(aFields[i].options[aFields[i].selectedIndex].value) + "&";
++ }
+ }
+ }
+ }
_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins