Module: check_mk
Branch: master
Commit: dfef29c6d5d00e8133c2816f6923dbf456fc2c03
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dfef29c6d5d00e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 3 11:00:02 2013 +0100
FIX: Speedometer: Terminating data updates when snapin is removed from sidebar
---
ChangeLog | 1 +
web/plugins/sidebar/shipped.py | 12 +++++++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9e3df7e..d9a93de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -72,6 +72,7 @@
* Option dials (refresh, number of columns) now turnable by mouse wheel
* FIX: Sidebar not raising exceptions on configured but not available snapins
* FIX: Quicksearch: Fixed Up/Down arrow handling in chrome
+ * FIX: Speedometer: Terminating data updates when snapin is removed from sidebar
WATO:
* FIX: Fixed generated manual check definitions for checks without items
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 339aab2..b869586 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -656,7 +656,11 @@ def render_speedometer():
html.javascript("""
function show_speed(percentage) {
- var context = document.getElementById('speedometer').getContext('2d');
+ var canvas = document.getElementById('speedometer');
+ if (!canvas)
+ return;
+
+ var context = canvas.getContext('2d');
if (!context)
return;
@@ -701,6 +705,12 @@ function speedometer_show_speed(last_perc, program_start, scheduled_rate)
title = code[4];
oDiv = document.getElementById('speedometer');
+
+ // Terminate reschedule when the speedometer div does not exist anymore
+ // (e.g. the snapin has been removed)
+ if (!oDiv)
+ return;
+
oDiv.title = title
oDiv = document.getElementById('speedometerbg');
oDiv.title = title
Module: check_mk
Branch: master
Commit: 12dc9c5064b025a750bf8a3dcc2b5711e2155649
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12dc9c5064b025…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 3 11:10:32 2013 +0100
Updated bug entries #0874, #0811
---
.bugs/811 | 7 +++++--
.bugs/874 | 10 ++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.bugs/811 b/.bugs/811
index c52ad1d..ca511fa 100644
--- a/.bugs/811
+++ b/.bugs/811
@@ -1,9 +1,9 @@
Title: Multisite does not display local check man pages
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2012-11-16 10:39:32
Targetversion: 1.2.0
-Class: bug
If you install an MKP and it brings a check man page this man page is not
displayed from Multisite, instead it gives an error about not finding the
@@ -14,3 +14,6 @@ LM: This is already implemented, but with the nastyness, that the regular
check manpages are placed in share/doc/check_mk/checks but the local
check manpages are searched in local/share/check_mk/checkman. This should
be cleaned up!
+
+2013-01-03 11:08:57: changed state open -> done
+This is already solved. I open a new bug for the path nastiness
diff --git a/.bugs/874 b/.bugs/874
new file mode 100644
index 0000000..62a68b5
--- /dev/null
+++ b/.bugs/874
@@ -0,0 +1,10 @@
+Title: Cleanup OMD manpage paths
+Component: core
+State: open
+Date: 2013-01-03 11:09:30
+Targetversion: future
+Class: nastiness
+
+The regular check manpage path in OMD is share/doc/check_mk/checks but the local path
+is local/share/check_mk/checkman. This is confusing. Cleanup the normal/local paths to
+make them equal.
Module: check_mk
Branch: master
Commit: 717b393ab7da8a1d613f89b84d321f0283aaa1a3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=717b393ab7da8a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 3 10:58:15 2013 +0100
Updated bug entries #0872
---
.bugs/872 | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.bugs/872 b/.bugs/872
index dfc0f4e..420abf5 100644
--- a/.bugs/872
+++ b/.bugs/872
@@ -1,12 +1,15 @@
-Title: Sidebar does not terminate refresh jobs of removed snapins
+Title: Speedometer scheduler is not terminated when removed from sidebar
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2012-10-29 09:20:48
Targetversion: future
-Class: bug
When having e.g. the speedometer in the sidebar and removing it, the javascript worker code
remains fetching the speedometer webservice. The worker should detect that the snapin has
been removed and stop updating the data.
Not a general problem: The speedometer uses its own scheduler. Must be fixed individually.
+
+2013-01-03 10:58:12: changed state open -> done
+The speedometer timeout detects the removal of the snpain and terminates itselfs now.
Module: check_mk
Branch: master
Commit: 9ae7fb1f18c21240d8a3e4f22cba8fb6b735c1bf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ae7fb1f18c212…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 3 09:57:40 2013 +0100
FIX: Sidebar not raising exceptions on configured but not available snapins
---
ChangeLog | 1 +
web/htdocs/sidebar.py | 6 +++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9d3eb83..a19f579 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,6 +70,7 @@
* FIX: handle ldap logins with ',' in distinguished name
* FIX: quote HTML variable names, fixes potential JS injection
* Option dials (refresh, number of columns) now turnable by mouse wheel
+ * FIX: Sidebar not raising exceptions on configured but not available snapins
WATO:
* FIX: Fixed generated manual check definitions for checks without items
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index e4cb533..fbfed65 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -116,7 +116,11 @@ def load_user_config():
user_config = config.sidebar
# Remove entries the user is not allowed for or which have state "off" (from legacy version)
- return [ entry for entry in user_config if entry[1] != "off" and config.may("sidesnap." + entry[0])]
+ # silently skip configured but not existant snapins
+ return [ entry for entry in user_config
+ if entry[0] in sidebar_snapins
+ and entry[1] != "off"
+ and config.may("sidesnap." + entry[0])]
def save_user_config(user_config):
if config.may("general.configure_sidebar"):
Module: check_mk
Branch: master
Commit: ede18e27b704b62b1d50693ffecc019c9ad2c25d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ede18e27b704b6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 3 09:43:31 2013 +0100
Allowing "%" and "+" in mail prefixes of contacts now
---
ChangeLog | 1 +
web/htdocs/wato.py | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7125342..9d3eb83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,6 +81,7 @@
* Modularized the authentication and user management code
* Default config: add contact group 'all' and put all hosts into it
* Reverse order of Condition, Value and General options in rule editor
+ * Allowing "%" and "+" in mail prefixes of contacts now
Event Console:
* FIX: fix exception in rules that use facility local7
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5f5b2a8..77ba498 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7924,7 +7924,7 @@ def mode_edit_user(phase):
# Email address
email = html.var("email").strip()
- regex_email = '^[-a-zäöüÄÖÜA-Z0-9_.]+(a)xn--[-a-za-z0-9]+(\-4kba73ab2jc.xn--[-a-za-z0-9]+)*$-znba55ab8jc'
+ regex_email = '^[-a-zäöüÄÖÜA-Z0-9_.+%]+(a)xn--[-a-za-z0-9]+(\-4kba73ab2jc.xn--[-a-za-z0-9]+)*$-znba55ab8jc'
if email and not re.match(regex_email, email):
raise MKUserError("email", _("'%s' is not a valid email address." % email))
new_user["email"] = email
Module: check_mk
Branch: master
Commit: b814b62fc038ecddc32c92d17b1a8a515ad09f94
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b814b62fc038ec…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 3 09:11:10 2013 +0100
FIX: Fixed rendering bug after folder editing
(The references from parent to child folders are updated during load_folders now)
---
ChangeLog | 1 +
web/htdocs/wato.py | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4a3e760..cc6312e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,7 @@
* FIX: Fixed generated manual check definitions for checks without items
like ntp_time and tcp_conn_stats
* FIX: Persisting changing of folder titles when only the title has changed
+ * FIX: Fixed rendering bug after folder editing
* Add: Creating a new rule immediately opens its edit formular
* The rules formular now uses POST as transaction method
* Modularized the authentication and user management code
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 95d7236..5f5b2a8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -469,8 +469,12 @@ def load_folder(dir, name="", path="", parent=None, childs = True):
folder[".lock_subfolders"] = folder.get("lock_subfolders", False)
folder[".lock_hosts"] = False
if parent:
+ # Update reference to parent folder
folder[".parent"] = parent
+ # Update reference in parent folder
+ parent[".folders"][name] = folder
+
if "attributes" not in folder: # Make sure, attributes are always present
folder["attributes"] = {}
@@ -952,14 +956,14 @@ def mode_folder(phase):
lock_messages.append(_("Folder is locked (You cannot create or remove folders in this folder)"))
else:
lock_messages.append(g_folder[".lock_subfolders"])
-
+
if len(lock_messages) > 0:
lock_message = ", ".join(lock_messages)
html.write("<div class=info>" + lock_message + "</div>")
have_something = show_subfolders(g_folder)
# Show hosts only if we have permission to this folder
-
+
if True == check_folder_permissions(g_folder, "read", False):
have_something = show_hosts(g_folder) or have_something
if not have_something:
@@ -1440,6 +1444,8 @@ def show_hosts(folder):
return True
move_to_folder_combo_cache_id = None
+# In case of what == "host", thing is either None or the name of the host
+# In case of what == "folder", thing is the folder dict
def move_to_folder_combo(what, thing = None, top = False, multiple = False):
global move_to_folder_combo_cache, move_to_folder_combo_cache_id
if move_to_folder_combo_cache_id != id(html):
@@ -1458,6 +1464,7 @@ def move_to_folder_combo(what, thing = None, top = False, multiple = False):
# TODO: Check permisssions
if afolder != g_folder and \
(what != "folder" or not (
+ # no move to itselfs or child folders of "thing"
folder_is_parent_of(thing, afolder)
# avoid naming conflict!
or thing[".name"] in afolder[".folders"])):
@@ -1757,6 +1764,7 @@ def mode_editfolder(phase, new):
# in Nagios-relevant attributes.
rewrite_config_files_below(g_folder) # due to inherited attributes
save_folder(g_folder)
+ # This updats g_folder and g_folders[...]
g_folder = reload_folder(g_folder)
mark_affected_sites_dirty(g_folder)
Module: check_mk
Branch: master
Commit: b928b7108608531bc871eb07ced79347a3e1862a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b928b710860853…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 2 10:59:06 2013 +0100
ldap: More detailed exception text in case of connection errors
---
web/plugins/userdb/ldap.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 7c57aec..5d7b6fa 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -141,9 +141,10 @@ def ldap_connect():
# on success, store the connection options the connection has been made with
ldap_connection_options = config.ldap_connection
- except ldap.SERVER_DOWN:
+ except ldap.SERVER_DOWN, e:
+ msg = e[0].get('info', e[0].get('desc', ''))
ldap_connection = None # Invalidate connection on failure
- raise MKLDAPException(_('The LDAP connector is unable to connect to the LDAP server.'))
+ raise MKLDAPException(_('The LDAP connector is unable to connect to the LDAP server (%s).') % msg)
except ldap.LDAPError, e:
html.write(repr(e))