Fixed output of non contact mail recipient address in analyze table
Message-ID: <54b3d53e.rlTRJZFnugtsVtPC%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: f392a59f2b19288594f243ff3d7650c7dbceda9d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f392a59f2b1928…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 12 15:07:51 2015 +0100
#1810 FIX Rule based notifications: Fixed output of non contact mail recipient address in
analyze table
The recipient mail address was shown as "mailto:...", stripping of the prefix
now.
---
.werks/1810 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 6 ++++--
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/1810 b/.werks/1810
new file mode 100644
index 0000000..0ea9cb3
--- /dev/null
+++ b/.werks/1810
@@ -0,0 +1,10 @@
+Title: Rule based notifications: Fixed output of non contact mail recipient address in
analyze table
+Level: 1
+Component: notifications
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1421071639
+
+The recipient mail address was shown as "mailto:...", stripping of the prefix
now.
diff --git a/ChangeLog b/ChangeLog
index 264e4a0..e09bcfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -96,6 +96,7 @@
* 1661 FIX: mknotifyd: improved performance when receiving forwarded notifications
* 1664 FIX: mknotifyd: further performance improvements for notification forwarding
* 1205 FIX: RBN: Fixed match contactgroup condition...
+ * 1810 FIX: Rule based notifications: Fixed output of non contact mail recipient
address in analyze table...
BI:
* 1784 FIX: Fix exception in BI Boxes when parents are being used
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 53b708a..00fefa3 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9016,14 +9016,16 @@ def mode_notifications(phase):
table.begin(table_id = "plugins", title = _("Resulting
notifications"))
for contact, plugin, parameters, bulk in analyse[1]:
table.row()
- table.cell(_("Contact"), contact)
+ if contact.startswith('mailto:'):
+ contact = contact[7:] # strip of fake-contact mailto:-prefix
+ table.cell(_("Recipient"), contact)
table.cell(_("Plugin"),
vs_notification_scripts().value_to_text(plugin))
table.cell(_("Plugin parameters"), ",
".join(parameters))
table.cell(_("Bulking"))
if bulk:
html.write(_("Time horizon") + ": " +
Age().value_to_text(bulk["interval"]))
html.write(", %s: %d" % (_("Maximum count"),
bulk["count"]))
- html.write(", group by %s" %
vs_notification_bulkby().value_to_text(bulk["groupby"]))
+ html.write(", %s %s" % (_("group by"),
vs_notification_bulkby().value_to_text(bulk["groupby"])))
table.end()