Module: check_mk
Branch: master
Commit: 6b706f6bf0a874863a28ce4ac66445a91cffe321
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6b706f6bf0a874…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 23 15:19:23 2016 +0200
3891 Changed graph time range choices
It seems more practical to have slightly wider time ranges, e.g. 8 days instead of 7 days
to have a little more context. We also extended the "month" and "year"
time ranges.
You have now the following available:
The last 4 hours
The last 25 hours
The last 8 days
The last 35 days
The last 400 days
---
.werks/3891 | 18 ++++++++++++++++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 14 +++++++-------
3 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/.werks/3891 b/.werks/3891
new file mode 100644
index 0000000..4e40ce3
--- /dev/null
+++ b/.werks/3891
@@ -0,0 +1,18 @@
+Title: Changed graph time range choices
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.4.0i1
+Date: 1474636659
+Class: feature
+
+It seems more practical to have slightly wider time ranges, e.g. 8 days instead of 7
days
+to have a little more context. We also extended the "month" and
"year" time ranges.
+
+You have now the following available:
+
+The last 4 hours
+The last 25 hours
+The last 8 days
+The last 35 days
+The last 400 days
diff --git a/ChangeLog b/ChangeLog
index 3311e42..e1ca282 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -436,6 +436,7 @@
* 3847 Painter options can now be reset to defaults...
* 3856 Improved handling of Check_MK GUI request timeouts...
* 3876 New filter option: negation for several service and host groups
+ * 3891 Changed graph time range choices...
* 3059 FIX: Fixed highlighting of availability timeline time slices
* 3175 FIX: Fix timeranges of graphs that are embedded in a dashboard...
* 3076 FIX: fixed broken views in check_mk raw edition
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 699629d..c8ac050 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -2460,9 +2460,9 @@ class Timerange(CascadingDropdown):
kwargs['choices'] += [
( "4h", _("The last 4 hours")),
( "25h", _("The last 25 hours")),
- ( "7d", _("The last 7 days")),
- ( "31d", _("The last 31 days")),
- ( "365d", _("The last 365 days")),
+ ( "8d", _("The last 8 days")),
+ ( "35d", _("The last 35 days")),
+ ( "400d", _("The last 400 days")),
( "d0", _("Today") ),
( "d1", _("Yesterday") ),
@@ -2520,9 +2520,9 @@ class Timerange(CascadingDropdown):
rangespec = {
1: "4h",
2: "25h",
- 3: "7d",
- 4: "31d",
- 5: "365d"
+ 3: "8d",
+ 4: "35d",
+ 5: "400d"
}.get(rangespec[1], "4h")
now = time.time()
@@ -2547,7 +2547,7 @@ class Timerange(CascadingDropdown):
else:
until_time = now
- if rangespec[0].isdigit(): # 4h, 365d
+ if rangespec[0].isdigit(): # 4h, 400d
count = int(rangespec[:-1])
from_time = TimeHelper.add(now, count * -1, rangespec[-1])
unit_name = {