Module: check_mk
Branch: master
Commit: 82e4f7ba2871638a2c4809143043b22468395d20
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=82e4f7ba287163…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 29 11:40:21 2011 +0100
FIX: Fixed view editor redirection to new view after changing the view_name
Conflicts:
ChangeLog
web/htdocs/views.py
---
ChangeLog | 3 +++
web/htdocs/views.py | 12 +++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ecd0f36..f888728 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,6 +78,9 @@
Multisite:
* FIX: sidebar snapin Hostgroups and Servicegroups sometimes
failed with non-existing "available_views".
+ * FIX: Fix host related WATO context button links to point to the hosts site
+ * FIX: Fixed view editor redirection to new view after changing the view_name
+
1.1.12p3:
Core, Setup, etc.:
* FIX: really suppress precompiling on PING-only hosts now
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 0bfc925..8187c43 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -503,9 +503,15 @@ def page_edit_view():
load_views()
html.multisite_views[(config.user_id, view["name"])] =
view
oldname = html.var("old_name")
- # Handle renaming of views -> delete old entry
- if oldname and oldname != view["name"] and (config.user_id,
oldname) in html.multisite_views:
- del html.multisite_views[(config.user_id, oldname)]
+ # Handle renaming of views
+ if oldname and oldname != view["name"]:
+ # -> delete old entry
+ if (config.user_id, oldname) in html.multisite_views:
+ del html.multisite_views[(config.user_id, oldname)]
+ # -> change view_name in back parameter
+ if html.has_var('back'):
+ html.set_var('back', html.var('back',
'').replace('view_name=' + oldname,
+
'view_name=' + view["name"]))
save_views(config.user_id)
return page_message_and_forward(_("Your view has been saved."),
"edit_views.py",
"<script
type='text/javascript'>if(top.frames[0])
top.frames[0].location.reload();</script>\n")