Module: check_mk
Branch: master
Commit: 815575638b747324a04a5e6661087867c03ea6ff
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=815575638b7473…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Apr 8 08:58:07 2016 +0200
3332 FIX Avoid falling back to annotation edit form when reloading page directly after
editing
---
.werks/3332 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/views/availability.py | 3 +++
3 files changed, 14 insertions(+)
diff --git a/.werks/3332 b/.werks/3332
new file mode 100644
index 0000000..91d4bbe
--- /dev/null
+++ b/.werks/3332
@@ -0,0 +1,10 @@
+Title: Avoid falling back to annotation edit form when reloading page directly after
editing
+Level: 1
+Component: reporting
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1460098667
+
+
diff --git a/ChangeLog b/ChangeLog
index 591e254..464a98c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -260,6 +260,7 @@
* 3268 FIX: Availability options were invalid after resetting them...
* 3269 FIX: Fix rendering of floating point values < 1 in graphs (e.g. CPU load)
* 3331 FIX: Availability: avoid duplication of annotation when changing time while
editing
+ * 3332 FIX: Avoid falling back to annotation edit form when reloading page directly
after editing
Event Console:
* 2999 The contact name is now included in Event Console notifications...
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index 46e7863..4780b80 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -746,6 +746,9 @@ def handle_delete_annotations():
availability.save_annotations(annotations)
def handle_edit_annotations():
+ # Avoid reshowing edit form after edit and reload
+ if html.is_transaction() and not html.transaction_valid():
+ return False
if html.var("anno_host") and not html.var("_delete_annotation"):
finished = edit_annotation()
else: