Module: check_mk
Branch: master
Commit: 51d8235a86dedb3117c5dddbda7a3621a6f8feee
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=51d8235a86dedb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Jan 8 17:47:48 2011 +0100
Multisite: persist painter options on per-user-base
---
ChangeLog | 1 +
web/htdocs/views.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a7f7bd8..8f880d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
Multisite:
* New reschedule icon now also works for non-local sites.
+ * painter options are now persisted on a per-user-base
Livestatus:
* Check for buffer overflows (replace strcat with strncat, etc.)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index d8a0026..8c5aae5 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1161,7 +1161,6 @@ def view_options(viewname):
if config.user_may(config.user, "painter_options"):
for on, opt in multisite_painter_options.items():
- v[on] = opt["default"]
if html.has_var(on):
must_save = True
# Make sure only allowed values are returned
@@ -1169,6 +1168,8 @@ def view_options(viewname):
for val, title in opt["values"]:
if value == val:
v[on] = value
+ elif on not in v:
+ v[on] = opt["default"]
opt["value"] = v[on]
else: