Module: check_mk
Branch: master
Commit: e36a03cf537d6e1dfed23df15c1cb904b69c6861
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e36a03cf537d6e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 1 16:13:11 2014 +0100
#1576 FIX SNMP Community host attribute is now visible for IE<=8
The SNMP Community was not visible on host edit page for hosts
using the snmp tag when opening the page with Internet Explorer
version 8 or below.
---
.bugs/2184 | 7 +++++--
.werks/1576 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/js/wato.js | 19 ++++++++++---------
4 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/.bugs/2184 b/.bugs/2184
index 9f39b7c..fd548b3 100644
--- a/.bugs/2184
+++ b/.bugs/2184
@@ -1,12 +1,15 @@
Title: SNMP Community in host properties not shown on IE?
Component: wato
-State: open
+Class: bug
+State: done
Date: 2014-09-25 16:13:09
Targetversion: future
-Class: bug
A host that is tagged as SNMP host is opened in WATO. Nevertheless
the attribute SNMP Community is not visible. In Firefox it is
visible. Looks like some JS problem with IE...
Switching back and forth the tag seems not help.
+
+2014-12-01 16:09:41: changed state open -> done
+Fixed.
diff --git a/.werks/1576 b/.werks/1576
new file mode 100644
index 0000000..ccb1c87
--- /dev/null
+++ b/.werks/1576
@@ -0,0 +1,11 @@
+Title: SNMP Community host attribute is now visible for IE<=8
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417446679
+Class: fix
+
+The SNMP Community was not visible on host edit page for hosts
+using the snmp tag when opening the page with Internet Explorer
+version 8 or below.
diff --git a/ChangeLog b/ChangeLog
index d46cc47..adebc73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -107,6 +107,7 @@
* 1542 FIX: Changed text of "debug_log" option to be clearer in distributed
setups...
* 1546 FIX: Fixed adding cluster nodes to new cluster in complain phase...
* 1556 FIX: WATO inventory ignores already inventorized checks which does not exist
anymore...
+ * 1576 FIX: SNMP Community host attribute is now visible for IE<=8...
Notifications:
* 1512 Bulk notification can now be grouped according to custom macro values...
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index 9961431..afe109f 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -86,7 +86,8 @@ function wato_fix_visibility() {
var oTable = oHostTags.childNodes[0]; /* tbody */
oHostTags = null;
- for (var i in oTable.childNodes) {
+
+ for (var i = 0; i < oTable.childNodes.length; i++) {
var oTr = oTable.childNodes[i];
if (oTr.tagName == 'TR') {
var oTdLegend = oTr.childNodes[0];
@@ -119,7 +120,7 @@ function wato_fix_visibility() {
stored in the global variable wato_depends_on_tags, which is filled
during the creation of the web page. */
- for (var i in wato_check_attributes) {
+ for (var i = 0; i < wato_check_attributes.length; i++) {
var attrname = wato_check_attributes[i];
/* Now comes the tricky part: decide whether that attribute should
be visible or not: */
@@ -132,8 +133,8 @@ function wato_fix_visibility() {
// Visibility depends on roles
if( display == "" && attrname in wato_depends_on_roles){
- for (var i in wato_depends_on_roles[attrname]) {
- var role = wato_depends_on_roles[attrname][i];
+ for (var index = 0; index < wato_depends_on_roles[attrname].length;
index++) {
+ var role = wato_depends_on_roles[attrname][index];
var negate = role[0] == '!';
var rolename = negate ? role.substr(1) : role;
var have_role = user_roles.indexOf(rolename) != -1;
@@ -146,8 +147,8 @@ function wato_fix_visibility() {
// Visibility depends on tags
if( display == "" && attrname in wato_depends_on_tags){
- for (var i in wato_depends_on_tags[attrname]) {
- var tag = wato_depends_on_tags[attrname][i];
+ for (var index = 0; index < wato_depends_on_tags[attrname].length;
index++) {
+ var tag = wato_depends_on_tags[attrname][index];
var negate = tag[0] == '!';
var tagname = negate ? tag.substr(1) : tag;
var have_tag = currentTags.indexOf(tagname) != -1;
@@ -199,9 +200,9 @@ function wato_fix_visibility() {
// FIXME: use generic identifier for each form
var available_forms = [ "form_edithost", "form_editfolder",
"form_bulkedit" ];
- for ( var try_form in available_forms ){
- var my_form = document.getElementById(available_forms[try_form]);
- if (my_form != null) {
+ for (var try_form = 0; try_form < available_forms.length; try_form++) {
+ var my_form = document.getElementById(available_forms[try_form]);
+ if (my_form != null) {
for (var child in my_form.childNodes){
oTr = my_form.childNodes[child];
if (oTr.className == "nform"){