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