Module: check_mk
Branch: master
Commit: 239fdc97f4c423cdf1b5d6f5cfcd781bb6f23428
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=239fdc97f4c423…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Sep 11 12:33:27 2015 +0200
Minor code cleanup
---
web/htdocs/valuespec.py | 12 +++++++-----
web/htdocs/visuals.py | 4 ++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 89d6363..616d225 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3328,11 +3328,13 @@ class IconSelector(ValueSpec):
content = self.render_icon(value, '', _('Choose another
Icon'), id = varprefix + '_img')
else:
content = _('Select an Icon')
- html.popup_trigger(content, varprefix+'_icon_selector',
'icon_selector',
- params=[('value', value),
- ('varprefix', varprefix),
- ('allow_empty', self._allow_empty and
'1' or '0'),
- ('back', html.makeuri([]))])
+ html.popup_trigger(content, varprefix + '_icon_selector',
'icon_selector',
+ url_vars = [
+ ('value', value),
+ ('varprefix', varprefix),
+ ('allow_empty', self._allow_empty and '1'
or '0'),
+ ('back', html.makeuri([])),
+ ])
def render_popup_input(self, varprefix, value):
html.write('<div class="icons">')
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 7b9a7d8..e0c2bb3 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -1396,8 +1396,8 @@ def ajax_popup_add():
def ajax_add_visual():
- visual_type = html.var('visual_type') # dashboards / views / ...
- visual_type = visual_types[visual_type]
+ visual_type_name = html.var('visual_type') # dashboards / views / ...
+ visual_type = visual_types[visual_type_name]
module_name = visual_type["module_name"]
visual_module = __import__(module_name)
handler = visual_module.__dict__[visual_type["add_visual_handler"]]