Module: check_mk
Branch: master
Commit: 3725f0ad4622727cc4d21bcc59190fdc737aa8b2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3725f0ad462272…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 3 14:06:36 2012 +0200
Updated bug entries #0777
---
.bugs/777 | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/.bugs/777 b/.bugs/777
index 6e8fc98..c1fb8d0 100644
--- a/.bugs/777
+++ b/.bugs/777
@@ -7,3 +7,8 @@ Class: bug
In the role editor the section with the WATO permissions
is displayed twice.
+
+LM: This does only happen when one defines a permission
+for a section, e.g. wato.*, which has already been followed
+by another section.
+I have a fix for this but this is too big for a fix release.
Module: check_mk
Branch: master
Commit: 7b37c052dd074317ee1dac75903844d359d3fd51
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7b37c052dd0743…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 3 13:33:36 2012 +0200
FIX: The refresh time in footer is updated now when changing the value
---
.bugs/699 | 7 +++++--
.bugs/767 | 7 +++++--
.bugs/770 | 3 +++
.bugs/778 | 7 +++++--
.bugs/780 | 7 +++++--
ChangeLog | 2 ++
web/htdocs/htmllib.py | 4 ++--
web/htdocs/js/checkmk.js | 16 ++++++++++++++++
web/htdocs/views.css | 6 ++++--
web/htdocs/views.py | 4 ++--
web/plugins/views/commands.py | 2 +-
11 files changed, 50 insertions(+), 15 deletions(-)
diff --git a/.bugs/699 b/.bugs/699
index 0bac86b..3dca62d 100644
--- a/.bugs/699
+++ b/.bugs/699
@@ -1,8 +1,11 @@
Title: "refresh: 30 secs" footer in views does not change on changed refreshed
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2012-06-19 15:28:47
Targetversion: future
-Class: bug
The code is only rendered once and not changed/updated when changing the update interval.
+
+2012-07-03 13:32:46: changed state open -> done
+Added javascript code to update the value in footer
diff --git a/.bugs/767 b/.bugs/767
index 5041025..7164748 100644
--- a/.bugs/767
+++ b/.bugs/767
@@ -1,11 +1,14 @@
Title: Remove all downtimes does not work
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2012-06-08 16:02:53
Targetversion: 1.2.0
-Class: bug
The button "Remove all downtimes" in the host/services
commands dialog is not yet implemented. One can remove
downtimes in the downtimes table - but nicer would be
to do it here - or remove the button.
+
+2012-07-03 13:18:33: changed state open -> done
+Has been fixed before
diff --git a/.bugs/770 b/.bugs/770
index 330a9dd..b1ae05a 100644
--- a/.bugs/770
+++ b/.bugs/770
@@ -6,3 +6,6 @@ Targetversion: 1.2.0
Class: bug
The list of views selectable when linking contains duplicates.
+
+LM: The duplicate titles are in fact different views. The second
+views are the mobile views.
diff --git a/.bugs/778 b/.bugs/778
index 7cd0e9c..07a975a 100644
--- a/.bugs/778
+++ b/.bugs/778
@@ -1,10 +1,13 @@
Title: Button "Remove all" Downtimes not working
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2012-06-25 13:04:59
Targetversion: 1.2.0
-Class: bug
In the Multisite views of hosts and services one cannot remove
downtimes. The button is there, seems to work, but the downtimes
are not being removed.
+
+2012-07-03 13:12:17: changed state open -> done
+The timestamp was added twice to this command.
diff --git a/.bugs/780 b/.bugs/780
index 26a7341..748682a 100644
--- a/.bugs/780
+++ b/.bugs/780
@@ -1,9 +1,9 @@
Title: Error when removing downtimes
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2012-06-28 12:22:44
Targetversion: 1.2.0
-Class: bug
[1340871811] Warning: Unrecognized external command -> [1340871810]
DEL_SVC_DOWNTIME;1
@@ -33,3 +33,6 @@ DEL_SVC_DOWNTIME;26
DEL_SVC_DOWNTIME;27
[1340871811] Warning: Unrecognized external command -> [1340871810]
DEL_SVC_DOWNTIME;28
+
+2012-07-03 13:12:34: changed state open -> done
+Duplicate of 778. Has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 467439e..2635658 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,8 @@
* FIX: fixed several localization problems in view/command processing
* FIX: fixed duplicated settings in WATO when using localisation
* FIX: fixed exception when refering to a language which does not exist
+ * FIX: Removing all downtimes of a host/service is now possible again
+ * FIX: The refresh time in footer is updated now when changing the value
WATO:
* Main menu of ruleeditor (Host & Service Parameters) now has
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 7f9adf3..deffebd 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -850,8 +850,8 @@ class html:
if self.req.header_sent:
self.bottom_focuscode()
corner_text = ""
- if self.browser_reload:
- corner_text += _("refresh: %s secs") % self.browser_reload
+ corner_text += '<div id=foot_refresh>%s</div>' % \
+ _("refresh: <div id=foot_refresh_time>%s</div> secs") % self.browser_reload
if self.render_headfoot:
si = self.render_status_icons()
self.write("<table class=footer><tr>"
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 7d94a05..e89fa5e 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -651,6 +651,21 @@ function toggleRefreshButton(s, enable) {
o = null;
}
+function toggleRefreshFooter(s) {
+ var o = document.getElementById('foot_refresh');
+ var o2 = document.getElementById('foot_refresh_time');
+ if(o) {
+ if(s == 0) {
+ o.style.display = 'none';
+ } else {
+ o.style.display = 'inline-block';
+ if(o2) {
+ o2.innerHTML = s;
+ }
+ }
+ }
+ o = null;
+}
// When called with one or more parameters parameters it reschedules the
// timer to the given interval. If the parameter is 0 the reload is stopped.
@@ -666,6 +681,7 @@ function setReload(secs, url) {
}
toggleRefreshButton(secs, true);
+ toggleRefreshFooter(secs);
if (secs !== 0) {
gReloadTime = secs;
diff --git a/web/htdocs/views.css b/web/htdocs/views.css
index e6c4f57..56c0cb7 100644
--- a/web/htdocs/views.css
+++ b/web/htdocs/views.css
@@ -32,6 +32,10 @@ body.main.dashlet {
padding: 0px;
}
+div#foot_refresh, div#foot_refresh_time {
+ display: inline-block;
+}
+
/*-------------------------------------------------------------------------.
| _____ _ ___ ___ _ _ |
| |_ _|_ _| |__ ___ ( _ ) / _ \ _ __ | |_(_) ___ _ __ ___ |
@@ -491,5 +495,3 @@ table.views td.buttons {
vertical-align: middle;
background-color: #8EAEB8;
}
-
-
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index ee9841e..2c3f7e2 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2067,8 +2067,8 @@ def core_command(what, row):
if not commands:
raise MKUserError(None, _("Sorry. This command is not implemented."))
- # Some commands return lists of complete command lines, others
- # just return one basic command without timestamp. Convert those
+ # Some commands return lists of commands, others
+ # just return one basic command. Convert those
if type(commands) != list:
commands = [commands]
diff --git a/web/plugins/views/commands.py b/web/plugins/views/commands.py
index f27d8c4..4ad52c4 100644
--- a/web/plugins/views/commands.py
+++ b/web/plugins/views/commands.py
@@ -357,7 +357,7 @@ def command_downtime(cmdtag, spec, row):
downtime_ids.append(int(id))
commands = []
for dtid in downtime_ids:
- commands.append("[%d] DEL_%s_DOWNTIME;%d\n" % (int(time.time()), cmdtag, dtid))
+ commands.append("DEL_%s_DOWNTIME;%d\n" % (cmdtag, dtid))
title = _("<b>remove all scheduled downtimes</b> of ")
return commands, title
Module: check_mk
Branch: master
Commit: 6ef81c702d2903fba286a18e10bd3e6972dd1862
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ef81c702d2903…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 3 12:58:59 2012 +0200
FIX: fixed exception when refering to a language which does not exist
---
.bugs/781 | 7 +++++--
ChangeLog | 1 +
web/htdocs/lib.py | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.bugs/781 b/.bugs/781
index efd7c29..807a4f2 100644
--- a/.bugs/781
+++ b/.bugs/781
@@ -1,9 +1,9 @@
Title: Setting default_language = "de" in multisite.mk breaks all
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2012-07-02 13:55:03
Targetversion: 1.2.0
-Class: bug
Try: set default_language = "de" in multisite.mk. But do not
provide a language file. The result is an exception:
@@ -20,3 +20,6 @@ Traceback (most recent call last):
NameError: global name 'config' is not defined
[URL to this frame] [URL to this page including sidebar]
+
+2012-07-03 12:57:56: changed state open -> done
+The inline comment was correct, but the code was wrong. Fixed it.
diff --git a/ChangeLog b/ChangeLog
index 93837a1..467439e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* FIX: fix problem in showing exceptions (due to help function)
* FIX: fixed several localization problems in view/command processing
* FIX: fixed duplicated settings in WATO when using localisation
+ * FIX: fixed exception when refering to a language which does not exist
WATO:
* Main menu of ruleeditor (Host & Service Parameters) now has
diff --git a/web/htdocs/lib.py b/web/htdocs/lib.py
index f1298fc..5b8c253 100644
--- a/web/htdocs/lib.py
+++ b/web/htdocs/lib.py
@@ -193,7 +193,7 @@ def load_language(lang):
except IOError, e:
# Fallback to non localized multisite
# I'd prefer to fallback to multisite default language but can not import config module here
- __builtin__.current_language = config.default_language
+ __builtin__.current_language = None
else:
# Replace the _() function to disable i18n again
__builtin__._ = lambda x: x
Module: check_mk
Branch: master
Commit: 6525c62e5ef543b5a029b8503a387e8f92f58843
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6525c62e5ef543…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 3 13:59:48 2012 +0200
FIX: fixed default setting if "Hide names of configuration variables"
in WATO
---
.bugs/759 | 12 ++++++++++++
.bugs/774 | 7 +++++--
ChangeLog | 2 ++
web/plugins/wato/check_mk_configuration.py | 2 +-
4 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.bugs/759 b/.bugs/759
index bd1c060..5a35e43 100644
--- a/.bugs/759
+++ b/.bugs/759
@@ -20,3 +20,15 @@ working!
Furthermore: If you now uncheck the one single
checkbox and again issue a command: it will still
think this box is checked.
+
+----
+
+This is related to the URL parsing code in javascript.
+The "no" link destroys the url because it issues a POST
+request. We need to make the POST vars available in js
+to make this code work again. Maybe we add a general code
+which makes all variables available as json construct in JS.
+
+But this does not resolve the problem completely. Once we
+have too many vars we need to make POST requests for reloading
+views.
diff --git a/.bugs/774 b/.bugs/774
index ae43041..5a1f575 100644
--- a/.bugs/774
+++ b/.bugs/774
@@ -1,11 +1,14 @@
Title: Option "hide names of configuration variables" works only after switching
Component: wato
-State: open
+Class: bug
+State: done
Date: 2012-06-15 13:53:06
Targetversion: 1.2.0
-Class: bug
The configuration variable is - per WATO - default off. But
in fact the real default value seems to be True. So
in order to see the variable names you need to toggle
once on and off again.
+
+2012-07-03 13:58:51: changed state open -> done
+Fixed WATO option definition
diff --git a/ChangeLog b/ChangeLog
index 2635658..a052e19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,6 +52,8 @@
* FIX: massive speedup when changing roles/users and activing changes
(especially when you have a larger number of users and folders)
* Add variable CONTACTPAGER to allowed macros in notifications
+ * FIX: fixed default setting if "Hide names of configuration variables"
+ in WATO
BI:
* New iterators FOREACH_CHILD and FOREACH_PARENT
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 513fc6c..d4e5d7c 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -179,7 +179,7 @@ register_configvar(group,
label = _("hide variable names"),
help = _("When enabled, internal configuration variable names of Check_MK are hidded "
"from the user (for example in the rule editor)"),
- default_value = False),
+ default_value = True),
domain = "multisite")
register_configvar(group,
Module: check_mk
Branch: master
Commit: c7bec8a3180bd03375261e9036745757bb10f78f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c7bec8a3180bd0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 3 12:38:21 2012 +0200
Do no load plugins before config
Internal restructuration. Plugins are now not loaded before the configuration. From that
results that page handlers must not be defined in plugins but in regular modules in htdocs.
Needed to move a few ajax handlers from plugins to their according module for that reason.
---
web/htdocs/dashboard.py | 2 +-
web/htdocs/sidebar.py | 136 +++++++++++++++++++++++++++++++++++++++-
web/htdocs/views.py | 2 +-
web/htdocs/wato.py | 5 +-
web/plugins/pages/shipped.py | 1 +
web/plugins/pages/wato.py | 3 +-
web/plugins/sidebar/shipped.py | 134 ---------------------------------------
web/plugins/sidebar/wato.py | 3 -
8 files changed, 143 insertions(+), 143 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=c7bec8a318…
Module: check_mk
Branch: master
Commit: 51075a9c37997bca34a57afee5dcb88cc5787329
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=51075a9c37997b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 3 10:38:28 2012 +0200
Add variable CONTACTPAGER to allowed macros in notifications
---
ChangeLog | 1 +
check_mk_templates.cfg | 1 +
web/plugins/wato/globals_notification.py | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ea14d5b..93837a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,7 @@
* FIX: fixed problem with disabled sites in WATO
* FIX: massive speedup when changing roles/users and activing changes
(especially when you have a larger number of users and folders)
+ * Add variable CONTACTPAGER to allowed macros in notifications
BI:
* New iterators FOREACH_CHILD and FOREACH_PARENT
diff --git a/check_mk_templates.cfg b/check_mk_templates.cfg
index b1879b3..ec5f600 100644
--- a/check_mk_templates.cfg
+++ b/check_mk_templates.cfg
@@ -309,6 +309,7 @@ define command {
command_line \
NOTIFY_CONTACTNAME='$CONTACTNAME$' \
NOTIFY_CONTACTEMAIL='$CONTACTEMAIL$' \
+ NOTIFY_CONTACTPAGER='$CONTACTPAGER$' \
NOTIFY_NOTIFICATIONTYPE='$NOTIFICATIONTYPE$' \
NOTIFY_HOSTNAME='$HOSTNAME$' \
NOTIFY_HOSTALIAS='$HOSTALIAS$' \
diff --git a/web/plugins/wato/globals_notification.py b/web/plugins/wato/globals_notification.py
index af3db6c..f97441a 100644
--- a/web/plugins/wato/globals_notification.py
+++ b/web/plugins/wato/globals_notification.py
@@ -98,6 +98,7 @@ register_configvar(group,
"The following macros are available in all templates:<br><br>"
"<tt><b>$CONTACTNAME$</b></tt>: login name of the contact person, "
"<tt><b>$CONTACTEMAIL$</b></tt>: email address of the contact person, "
+ "<tt><b>$CONTACTPAGER$</b></tt>: pager address of the contact person, "
"<tt><b>$NOTIFICATIONTYPE$</b></tt>: one of PROBLEM, RECOVERY, ACKNOWLEDGEMENT, FLAPPINGSTART, FLAPPINGSTOP, FLAPPINGDISABLED, DOWNTIMESTART, DOWNTIMEEND, or DOWNTIMECANCELLED, "
"<tt><b>$HOSTNAME$</b></tt>: the name of the host, "
"<tt><b>$HOSTALIAS$</b></tt>: the alias of the host, "
Module: check_mk
Branch: master
Commit: ffd8da5930f2abb85f02b5470dde5184f1f00f76
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ffd8da5930f2ab…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jul 2 16:17:17 2012 +0200
FIX: Precisely define order of reading of configuration files.
---
ChangeLog | 2 ++
modules/check_mk.py | 19 ++++++++++++++++++-
2 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d58677d..ea14d5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
Core:
* simulation_mode: legacy_checks, custom_checks and active_checks
are replaced with dummy checks always being OK
+ * FIX: Precisely define order of reading of configuration files. This
+ fixes a WATO rule precedence problem
Checks & Agents:
* FIX: Fixed syntax errors in a bunch of man pages
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 2c5725a..8f9dbe9 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -4229,6 +4229,22 @@ def marks_hosts_with_path(old, all, filename):
if host not in old:
host_paths[host] = path
+# Helper functions that determines the sort order of the
+# configuration files. The following two rules are implemented:
+# 1. *.mk files in the same directory will be read
+# according to their lexical order.
+# 2. subdirectories in the same directory will be
+# scanned according to their lexical order.
+# 3. subdirectories of a directory will always be read *after*
+# the *.mk files in that directory.
+def cmp_config_paths(a, b):
+ pa = a.split('/')
+ pb = b.split('/')
+ return cmp(pa[:-1], pb[:-1]) or \
+ cmp(len(pa), len(pb)) or \
+ cmp(pa, pb)
+
+
def read_config_files(with_autochecks=True, with_conf_d=True):
global vars_before_config, final_mk, local_mk, checks
@@ -4243,7 +4259,8 @@ def read_config_files(with_autochecks=True, with_conf_d=True):
list_of_files = reduce(lambda a,b: a+b,
[ [ "%s/%s" % (d, f) for f in fs if f.endswith(".mk")]
for d, sb, fs in os.walk(check_mk_configdir) ], [])
- list_of_files.sort()
+ # list_of_files.sort()
+ list_of_files.sort(cmp = cmp_config_paths)
list_of_files = [ check_mk_configfile ] + list_of_files
else:
list_of_files = [ check_mk_configfile ]