Module: check_mk
Branch: master
Commit: fa1add12154ca7c1daa5532f37b204e2896215d4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fa1add12154ca7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Jan 31 11:00:08 2014 +0100
FIX Fixed exceptions when modifying / cloning views
This werk fixes several view related problems<br>
<ul>
<li>Modified views no longer vanish in the "Views" sidebar
snapin</li>
<li>Fixed attribute inheritance of views</li>
<li>Changing a views name no longer causes exception in the view editor</li>
<li>Nagstamon and dashboards views are now hidden for real</li>
</ul>
---
.werks/273 | 16 ++++++++++++++++
ChangeLog | 1 +
web/htdocs/views.py | 3 ++-
web/plugins/sidebar/shipped.py | 2 +-
web/plugins/views/builtin.py | 4 ++--
web/plugins/views/dashboard.py | 6 +++---
6 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/.werks/273 b/.werks/273
new file mode 100644
index 0000000..fba1ff7
--- /dev/null
+++ b/.werks/273
@@ -0,0 +1,16 @@
+Title: Fixed exceptions when modifying / cloning views
+Level: 2
+Component: multisite
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1391162049
+
+This werk fixes several view related problems<br>
+
+<ul>
+<li>Modified views no longer vanish in the "Views" sidebar
snapin</li>
+<li>Fixed attribute inheritance of views</li>
+<li>Changing a views name no longer causes exception in the view editor</li>
+<li>Nagstamon and dashboard views are now hidden for real</li>
+</ul>
diff --git a/ChangeLog b/ChangeLog
index 116dc46..a38fd13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -188,6 +188,7 @@
* 0569 FIX: recurring updates of serial numbers of disabled ldap users fixed...
* 0676 FIX: Move view "Stale services" to Problems folder
* 0270 FIX: Multisite host tag filter: Now uses exact match...
+ * 0273 FIX: Fixed exceptions when modifying / cloning views...
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index fc90a00..8085e88 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -987,7 +987,8 @@ def create_view(vs):
base_view = html.multisite_views.get(('', oldname)) # load
builtin view
elif mode == 'edit' and ('', oldname) in html.multisite_views:
base_view = html.multisite_views.get(('', oldname)) # load builtin view
- override = True
+ if oldname == name:
+ override = True
view = {}
for key, (opt_edit, valuespec) in vs.items():
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index f7b047e..833b17f 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -69,7 +69,7 @@ sidebar_snapins["about"] = {
visible_views = [ "allhosts", "searchsvc" ]
def views_by_topic():
- s = [ (view.get("topic", _("Other")), view["title"],
name)
+ s = [ (view.get("topic") or _("Other"),
view.get("title"), name)
for name, view
in html.available_views.items()
if not view["hidden"] and not view.get("mobile")]
diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py
index cc1436d..6737a5f 100644
--- a/web/plugins/views/builtin.py
+++ b/web/plugins/views/builtin.py
@@ -2086,7 +2086,7 @@ multisite_builtin_views.update({
('is_host_notifications_enabled',
'-1'),
('is_summary_host', '0')],
- 'hidden': False,
+ 'hidden': True,
'hide_filters': [],
'hidebutton': True,
'layout': 'table',
@@ -2147,7 +2147,7 @@ multisite_builtin_views.update({
('st3', 'on'),
('stp', ''),
('is_in_downtime', '-1')],
- 'hidden': False,
+ 'hidden': True,
'hide_filters': [],
'hidebutton': True,
'layout': 'table',
diff --git a/web/plugins/views/dashboard.py b/web/plugins/views/dashboard.py
index 9579d90..0617bd4 100644
--- a/web/plugins/views/dashboard.py
+++ b/web/plugins/views/dashboard.py
@@ -46,7 +46,7 @@ multisite_builtin_views.update({
('is_host_acknowledged', '0'),
('is_summary_host', '0'),
],
- 'hidden': False,
+ 'hidden': True,
'hidebutton': True,
'hide_filters': [],
'layout': 'table',
@@ -98,7 +98,7 @@ multisite_builtin_views.update({
('hst2', ''),
('hstp', 'on'),
('is_summary_host', '0')],
- 'hidden': False,
+ 'hidden': True,
'hide_filters': [],
'layout': 'table',
'mustsearch': False,
@@ -135,7 +135,7 @@ multisite_builtin_views.update({
('logtime_from_range', '3600'),
('logtime_from', '4'),
],
- 'hidden': False,
+ 'hidden': True,
'hide_filters': [],
'layout': 'table',
'linktitle': 'Events',