Module: check_mk
Branch: master
Commit: e1e73ad8cbe37607cf8889d9ac7aef92d88238d9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e1e73ad8cbe376…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 6 18:39:46 2014 +0200
Updated bug entries #2192
---
.bugs/2192 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.bugs/2192 b/.bugs/2192
new file mode 100644
index 0000000..260442a
--- /dev/null
+++ b/.bugs/2192
@@ -0,0 +1,11 @@
+Title: Back button (abort) while adding view to dashboard leads away
+Component: multisite
+State: open
+Date: 2014-10-06 18:38:23
+Targetversion: future
+Class: bug
+
+When you add a view to a dashboard, and in the process press "Back", then
+you do not get back but to the list of views.
+
+Solution: Either remove the button or make it work as expected.
Module: check_mk
Branch: master
Commit: d815f56d26540075440741d8f12320b3ad94e776
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d815f56d265400…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 6 19:03:02 2014 +0200
Updated bug entries #2193, #2194
---
.bugs/2193 | 10 ++++++++++
.bugs/2194 | 17 +++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/.bugs/2193 b/.bugs/2193
new file mode 100644
index 0000000..943d5a0
--- /dev/null
+++ b/.bugs/2193
@@ -0,0 +1,10 @@
+Title: Dashboard editor: after going to a dashlet detail, edit mode is lost
+Component: multisite
+State: open
+Date: 2014-10-06 19:00:53
+Targetversion: future
+Class: nastiness
+
+When you are in dashboard edit mode and go to the details of a dashlet
+and then got back - either by saving or by the back button - then the
+edit mode of the dashboard is lost. But it should keep in edit mode.
diff --git a/.bugs/2194 b/.bugs/2194
new file mode 100644
index 0000000..9e5b135
--- /dev/null
+++ b/.bugs/2194
@@ -0,0 +1,17 @@
+Title: Exception when editing dashlet details of host stats
+Component: multisite
+State: open
+Date: 2014-10-06 19:02:25
+Targetversion: future
+Class: bug
+
+When you go to the dashlet properties of the host statistics, then you get
+an exception:
+
+Internal error: 'single_infos'
+Traceback (most recent call last):
+ File "/omd/sites/heute/share/check_mk/web/htdocs/index.py", line 241, in handler
+ handler()
+ File "/omd/sites/heute/share/check_mk/web/htdocs/dashboard.py", line 816, in page_edit_dashlet
+ single_infos = dashlet['single_infos']
+KeyError: 'single_infos'
Module: check_mk
Branch: master
Commit: 54770237d7a3a881b3b5ac00785248a64771237a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=54770237d7a3a8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 3 00:03:01 2014 +0200
Allow sub pages on page for editing visuals
---
web/htdocs/visuals.py | 38 ++++++++++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 23e777e..7f987f7 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -480,12 +480,14 @@ def render_context_specs(visual, context_specs):
def page_edit_visual(what, all_visuals, custom_field_handler = None,
create_handler = None, try_handler = None,
- load_handler = None, info_handler = None):
+ load_handler = None, info_handler = None,
+ sub_pages = []):
visual_type = visual_types[what]
- what_s = what[:-1]
+ visual_type = visual_types[what]
if not config.may("general.edit_" + what):
raise MKAuthException(_("You are not allowed to edit %s.") % visual_type["plural_title"])
+ what_s = what[:-1]
visual = {}
@@ -547,6 +549,14 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None,
html.begin_context_buttons()
back_url = html.var("back", "")
html.context_button(_("Back"), back_url or "edit_%s.py" % what, "back")
+
+ # Extra buttons to sub modules. These are used for things to edit about
+ # this visual that are more complex to be done in one value spec.
+ if mode not in [ "clone", "create" ]:
+ for title, pagename, icon in sub_pages:
+ uri = html.makeuri_contextless([(visual_types[what]['ident_attr'], visualname)],
+ filename = pagename + '.py')
+ html.context_button(title, uri, icon)
html.end_context_buttons()
# A few checkboxes concerning the visibility of the visual. These will
@@ -608,7 +618,13 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None,
context_specs = get_context_specs(visual, info_handler)
# handle case of save or try or press on search button
- if html.var("save") or html.var("try") or html.var("search"):
+ save_and_go = None
+ for nr, (title, pagename, icon) in enumerate(sub_pages):
+ if html.var("save%d" % nr):
+ save_and_go = html.makeuri_contextless([(visual_types[what]['ident_attr'], visualname)],
+ filename = pagename + '.py')
+
+ if save_and_go or html.var("save") or html.var("try") or html.var("search"):
try:
general_properties = vs_general.from_html_vars('general')
vs_general.validate_value(general_properties, 'general')
@@ -636,10 +652,13 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None,
visual['context'] = process_context_specs(context_specs)
- if html.var("save"):
- back = html.var('back')
- if not back:
- back = 'edit_%s.py' % what
+ if html.var("save") or save_and_go:
+ if save_and_go:
+ back = save_and_go
+ else:
+ back = html.var('back')
+ if not back:
+ back = 'edit_%s.py' % what
if html.check_transaction():
all_visuals[(config.user_id, visual["name"])] = visual
@@ -650,7 +669,8 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None,
del all_visuals[(config.user_id, oldname)]
# -> change visual_name in back parameter
if back:
- back = back.replace('view_name=' + oldname, 'view_name=' + visual["name"])
+ varstring = visual_type["ident_attr"] + "="
+ back = back.replace(varstring + oldname, varstring + visual["name"])
save(what, all_visuals)
html.immediate_browser_redirect(1, back)
@@ -690,6 +710,8 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None,
"language. You can configure the localizations <a href=\"%s\">in the global settings</a>.") % url)
html.button("save", _("Save"))
+ for nr, (title, pagename, icon) in enumerate(sub_pages):
+ html.button("save%d" % nr, _("Save and go to ") + title)
html.hidden_fields()
if try_handler: