Module: check_mk
Branch: master
Commit: efea1a612844e2b22e5ea30e13f4258c136ec679
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=efea1a612844e2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 13 11:10:51 2015 +0200
#2200 New filter for (de-)selecting preliminary notifications to "check-mk-notify"
When an alert happens then Check_MK lets the core first create a "preliminary" notification.
This is not yet mapped to one or several users but is the starting point for the rule based
notifications. But it is already logged into the monitoring log. After sending out the
actual notifications a further entry for each target user is being logged. A new filter now
allows to select just the final or just the preliminary notifications. It is available in
all log and notification views.
---
.werks/2200 | 14 ++++
ChangeLog | 1 +
web/htdocs/images/alert_cmk_notify.png | Bin 0 -> 3682 bytes
web/plugins/views/builtin.py | 117 +++++++++++++++++++-------------
web/plugins/views/painters.py | 7 +-
web/plugins/visuals/filters.py | 31 +++++++++
6 files changed, 121 insertions(+), 49 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=efea1a6128…
Module: check_mk
Branch: master
Commit: b24d42d04382d848e10929df605e7b8b8a8a312a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b24d42d04382d8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 10 09:38:32 2015 +0200
New global setting for adding custom icons/actions
---
web/plugins/config/builtin.py | 3 ++
web/plugins/wato/check_mk_configuration.py | 42 ++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index ff72a15..5d46543 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -245,6 +245,9 @@ password_policy = {}
user_localizations = default_user_localizations
+# Contains user specified icons and actions for hosts and services
+user_icons_and_actions = {}
+
# Write WATO folder permissions to auth.php file
export_folder_permissions = False
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index f368f48..207d6ff 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -466,6 +466,48 @@ register_configvar(group,
domain = "multisite",
)
+register_configvar(group,
+ "user_icons_and_actions",
+ Transform(
+ ListOf(
+ Tuple(
+ elements = [
+ ID(title = _("Ident")),
+ Dictionary(
+ elements = [
+ ('icon', IconSelector(title = _('Icon'))),
+ ('title', TextUnicode(title = _('Title'))),
+ ('url', TextAscii(
+ title = _('Action URL'),
+ help = _('This URL is opened when clicking on the action / icon. You '
+ 'can use some macros within the URL which are dynamically '
+ 'replaced for each object. These are:<br><br>'
+ '<li><ul>$HOSTNAME$: Contains the name of the host</ul>'
+ '<ul>$SERVICEDESC$: Contains the service description '
+ '(in case this is a service)</ul>'
+ '<ul>$HOSTADDRESS$: Contains the network address of the host</ul>'),
+ )),
+ ('toplevel', FixedValue(True,
+ title = _('Show in column'),
+ totext = _('Directly show the action icon in the column'),
+ help = _('Makes the icon appear in the column instead '
+ 'of the dropdown menu.'),
+ ))
+ ],
+ optional_keys = ['title', 'url', 'toplevel'],
+ ),
+ ],
+ ),
+ title = _("Custom icons and actions"),
+ movable = False,
+ totext = _("%d icons and actions"),
+ ),
+ forth = lambda d: sorted(d.items()),
+ back = lambda l: dict(l),
+ ),
+ domain = "multisite",
+)
+
# Helper that retrieves the list of hostgroups via Livestatus
# use alias by default but fallback to name if no alias defined
def list_hostgroups():
Module: check_mk
Branch: master
Commit: 3602522c75d6f377f75b2e089b1b652c11d82732
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3602522c75d6f3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 13 11:03:40 2015 +0200
#2175 Added icon uploader, unified icon selection
Check_MK makes use of icons in views and dashboards, but it is also possible
to add a custom icon to hosts or services for e.g. showing up the type of
the device in a graphical way. This version also adds the option to register
custom icons and actions to host and services.
This change unifies the handling of icons used in such places. We implemented
an icon selector which is used everywhere were you can select an icon. This
icon selector groups the icons together in categories for more comfortable
selection.
We added an icon upload mechanism which gives you the option to manage your
custom icons using WATO. You can find it in the top level navigation of WATO.
All icons are now loaded from a fixed location, in OMD environments this
is <tt>share/check_mk/web/htdocs/images/icons</tt> for the icons distributed
by us and <tt>local/share/check_mk/web/htdocs/images/icons</tt> for your
custom icons.
Implementation detail: The category of an icon is saved directly in the icon
image. It is stored in the PNG comment metadata.
---
.werks/2175 | 28 ++++++++++++++++++++++++++++
ChangeLog | 1 +
2 files changed, 29 insertions(+)
diff --git a/.werks/2175 b/.werks/2175
new file mode 100644
index 0000000..2a65ee6
--- /dev/null
+++ b/.werks/2175
@@ -0,0 +1,28 @@
+Title: Added icon uploader, unified icon selection
+Level: 2
+Component: multisite
+Compatible: compat
+Version: 1.2.7i1
+Date: 1428915320
+Class: feature
+
+Check_MK makes use of icons in views and dashboards, but it is also possible
+to add a custom icon to hosts or services for e.g. showing up the type of
+the device in a graphical way. This version also adds the option to register
+custom icons and actions to host and services.
+
+This change unifies the handling of icons used in such places. We implemented
+an icon selector which is used everywhere were you can select an icon. This
+icon selector groups the icons together in categories for more comfortable
+selection.
+
+We added an icon upload mechanism which gives you the option to manage your
+custom icons using WATO. You can find it in the top level navigation of WATO.
+
+All icons are now loaded from a fixed location, in OMD environments this
+is <tt>share/check_mk/web/htdocs/images/icons</tt> for the icons distributed
+by us and <tt>local/share/check_mk/web/htdocs/images/icons</tt> for your
+custom icons.
+
+Implementation detail: The category of an icon is saved directly in the icon
+image. It is stored in the PNG comment metadata.
diff --git a/ChangeLog b/ChangeLog
index 67c6bdc..f24b418 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -331,6 +331,7 @@
* 2140 Remove PNP Timeranges from range selection, put these ranges directly into the list...
* 2166 LDAP: Multiple LDAP groups can be configured for assigning single roles to users...
* 2174 Added action popup to host & service views, supporting custom actions now...
+ * 2175 Added icon uploader, unified icon selection...
* 1781 FIX: Fix broken grouping by host/service group in availability
* 1783 FIX: Finish the view "History of Scheduled Downtimes"...
* 1206 FIX: Hostname not longer shown as column in host views