Module: check_mk
Branch: master
Commit: 660f2cba36a4207412d90d0c55c513e0dc62020d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=660f2cba36a420…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 11 11:55:00 2017 +0200
Fixed styling of empty virtual host tree link
Change-Id: I94216e00cc1e5d11e85946abf64b6c36afb751d8
---
web/plugins/sidebar/shipped.py | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 93fd8d9..7c6d636 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -1854,7 +1854,7 @@ class VirtualHostTree(SidebarSnapin):
tree_id = tree_conf["tree"]
# Fallback to first defined tree in case the user selected does not exist anymore
- if tree_id not in self._trees:
+ if tree_id not in self._trees and self._trees:
tree_id = self._tree_choices()[0][0]
self._cwds = tree_conf["cwd"]
@@ -1884,8 +1884,8 @@ class VirtualHostTree(SidebarSnapin):
if not config.virtual_host_trees:
url = 'wato.py?varname=virtual_host_trees&mode=edit_configvar'
multisite = html.render_a("Multisite", href=url, target="main")
- html.write_html(_('You have not defined any virtual host trees. You can do this '
- 'in the global settings for %s.') % multisite)
+ html.p(HTML(_('You have not defined any virtual host trees. You can do this '
+ 'in the global settings for %s.') % multisite))
return
self._show_tree_selection()
@@ -2353,6 +2353,18 @@ function virtual_host_tree_enter(path)
top: 0px;
left: 0px;
}
+
+#snapin_tag_tree p {
+ margin: 0;
+}
+
+#snapin_tag_tree p a {
+ text-decoration: underline;
+}
+
+#snapin_tag_tree p a:hover {
+ text-decoration: none;
+}
"""
register_snapin("tag_tree", VirtualHostTree())
Module: check_mk
Branch: master
Commit: c3672721a862184ab81be80692d6d0fa783a05a7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c3672721a86218…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 11 09:52:36 2017 +0200
4958 FIX Group changes are added only to affected sites
Changes for edited groups (of hosts, services or contacts) are not
added to all sites anymore. Instead only the sites of the associated
customers get the change now.
Change-Id: I6e6d78e45e815f7d1ae432af192f0e9fb3c8778c
---
.werks/4958 | 13 +++++++++++++
web/htdocs/watolib.py | 20 ++++++++++++++------
2 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/.werks/4958 b/.werks/4958
new file mode 100644
index 0000000..bf07120
--- /dev/null
+++ b/.werks/4958
@@ -0,0 +1,13 @@
+Title: Group changes are added only to affected sites
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cme
+State: unknown
+Version: 1.5.0i1
+Date: 1499759323
+
+Changes for edited groups (of hosts, services or contacts) are not
+added to all sites anymore. Instead only the sites of the associated
+customers get the change now.
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index a6ef26a..eab4cbc 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -8251,7 +8251,7 @@ def add_group(name, group_type, extra_info):
raise MKUserError("name", _("Sorry, there is already a group with that name"))
_set_group(all_groups, group_type, name, extra_info)
- add_change("edit-%sgroups" % group_type, _("Create new %s group %s") % (group_type, name))
+ add_group_change(extra_info, "edit-%sgroups" % group_type, _("Create new %s group %s") % (group_type, name))
def edit_group(name, group_type, extra_info):
@@ -8263,7 +8263,7 @@ def edit_group(name, group_type, extra_info):
raise MKUserError("name", _("Unknown group: %s") % name)
_set_group(all_groups, group_type, name, extra_info)
- add_change("edit-%sgroups" % group_type, _("Updated properties of %s group %s") % (group_type, name))
+ add_group_change(extra_info, "edit-%sgroups" % group_type, _("Updated properties of %s group %s") % (group_type, name))
def delete_group(name, group_type):
@@ -8275,17 +8275,25 @@ def delete_group(name, group_type):
if name not in groups:
raise MKUserError(None, _("Unknown %s group: %s") % (group_type, name))
-
# Check if still used
usages = find_usages_of_group(name, group_type)
if usages:
raise MKUserError(None, _("Unable to delete group. It is still in use"))
-
# Delete group
- del groups[name]
+ group = groups.pop(name)
save_group_information(all_groups)
- add_change("edit-%sgroups", _("Deleted %s group %s") % (group_type, name))
+ add_group_change(group, "edit-%sgroups", _("Deleted %s group %s") % (group_type, name))
+
+
+# TODO: Consolidate all group change related functions in a class that can be overriden
+# by the CME code for better encapsulation.
+def add_group_change(group, action_name, text):
+ group_sites = None
+ if cmk.is_managed_edition() and not managed.is_global(group["customer"]):
+ group_sites = managed.get_sites_of_customer(group["customer"])
+
+ add_change(action_name, text, sites=group_sites)
def save_group_information(all_groups, custom_default_config_dir = None):
Module: check_mk
Branch: master
Commit: 237eeca17aeb955553b959ce5e190a13569fa706
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=237eeca17aeb95…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 11 08:24:15 2017 +0200
4957 FIX Group headers of views are now displayed in PDF reports
The often missed group header of view tables has now been added to the
PDF reports. Especially in views that contain performance graphs these
headers are useful with the default report settings.
Change-Id: I68b2a738d3bdf4a55f67edcf60b53805e78125b1
---
.werks/4957 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/4957 b/.werks/4957
new file mode 100644
index 0000000..db4d9b1
--- /dev/null
+++ b/.werks/4957
@@ -0,0 +1,12 @@
+Title: Group headers of views are now displayed in PDF reports
+Level: 1
+Component: reporting
+Compatible: compat
+Edition: cee
+Version: 1.5.0i1
+Date: 1499754184
+Class: fix
+
+The often missed group header of view tables has now been added to the
+PDF reports. Especially in views that contain performance graphs these
+headers are useful with the default report settings.