Module: check_mk
Branch: master
Commit: 2af2c964e30ade9a521c8418b47617f998444178
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2af2c964e30ade…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Jan 11 12:29:49 2013 +0100
Updated bug entries #0868
---
.bugs/868 | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.bugs/868 b/.bugs/868
index 2dc3f25..7ba73b4 100644
--- a/.bugs/868
+++ b/.bugs/868
@@ -1,10 +1,24 @@
Title: Distributed WATO setup - error message during setting up slaves
Component: wato
-State: open
+Class: bug
+State: works4me
Date: 2012-10-26 08:38:47
Targetversion: 1.2.2
-Class: bug
In current version, when setting up the local site and a slave site in the main site,
the main site reports that it is not the "preferred peer" while there is no peer setup.
Seems like the naming of the site is somewhat relevant here.
+
+2013-01-11 12:29:43: changed state open -> works4me
+Just tested - works
+Creating a site setup:
+ - add local site
+ Connection: connect to the local site
+ URL Prefix: http://localhost/heute
+ - add slave site
+ Connection: unixsocket
+ URL Prefix: http://localhost/sklave
+
+ Set slave site replication method to "slave"
+
+-> works like a charm
Module: check_mk
Branch: master
Commit: 8dd4c899e9a0863f62d6d06a38cec5feebd2dd74
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8dd4c899e9a086…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jan 14 09:07:00 2013 +0100
Updated bug entries #0884
---
.bugs/884 | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/.bugs/884 b/.bugs/884
new file mode 100644
index 0000000..d32bd5d
--- /dev/null
+++ b/.bugs/884
@@ -0,0 +1,10 @@
+Title: Rule editor: selection boxes must not be visible on 'ignore'
+Component: wato
+State: open
+Date: 2013-01-14 09:06:06
+Targetversion: 1.2.3
+Class: bug
+
+In the rule editor in the host tag section when the first selection
+box is "ignore", then the second should be hidden, but is visible
+when entering the dialog.
Module: check_mk
Branch: master
Commit: c326aa4efbe31461dcc4a0a84e8d9b887a0b2594
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c326aa4efbe314…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 11 13:47:07 2013 +0100
Fixed some permission and page reload related handling
---
web/htdocs/views.py | 59 +++++++++++++----------------------------
web/plugins/views/layouts.py | 5 ++-
2 files changed, 22 insertions(+), 42 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index e14ad40..c4b7774 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1139,7 +1139,8 @@ def prepare_display_options():
display_options = html.var("_display_options", "")
display_options = apply_display_option_defaults(display_options)
html.display_options = display_options
- html.title_display_options = display_options
+ # Dont do this!! This garbles up the title links after a reload.
+ #html.title_display_options = display_options
# But there is one special case: The sorter links! These links need to know
# about the provided display_option parameter. The links could use
@@ -1355,9 +1356,16 @@ def render_view(view, rows, datasource, group_painters, painters,
# permissions or datasources without commands, the form is not rendered
command_form = should_show_command_form(display_options, datasource)
+ # Is the layout able to display checkboxes?
+ can_display_checkboxes = layout.get('checkboxes', False)
+
if show_buttons:
show_context_links(view, hide_filters, show_filters, display_options,
- painter_options, row_count > 0 and command_form, layout.get('checkboxes', False))
+ painter_options,
+ # Take into account: permissions, display_options
+ row_count > 0 and command_form,
+ # Take into account: layout capabilities
+ can_display_checkboxes)
# User errors in filters
html.show_user_errors()
@@ -1387,7 +1395,7 @@ def render_view(view, rows, datasource, group_painters, painters,
elif 'C' in display_options: # (*not* display open, if checkboxes are currently shown)
show_command_form(False, datasource)
-
+
# Also execute commands in cases without command form (needed for Python-
# web service e.g. for NagStaMon)
elif row_count > 0 and config.may("general.act") \
@@ -1420,7 +1428,11 @@ def render_view(view, rows, datasource, group_painters, painters,
# The number of rows might have changed to enable/disable actions and checkboxes
if show_buttons:
- update_context_links(row_count > 0, layout.get('checkboxes', False))
+ update_context_links(
+ # don't take display_options into account here ('c' is set during reload)
+ row_count > 0 and should_show_command_form('C', datasource),
+ can_display_checkboxes
+ )
# Play alarm sounds, if critical events have been displayed
if 'S' in display_options and view.get("play_sounds"):
@@ -1460,39 +1472,6 @@ def view_options(viewname):
v = vo.get(viewname, {})
must_save = False
- # NEW IMPLEMENTION: Options for columns, refresh and
- # checkboxes are switched via JS/AJAX, no longer via
- # the URL.
- # # Refresh rate
- # if config.may("general.view_option_refresh"):
- # if html.has_var("refresh"):
- # try:
- # v["refresh"] = int(html.var("refresh"))
- # except:
- # v["refresh"] = None
- # must_save = True
- # elif "refresh" in v:
- # del v["refresh"]
-
- # # Number of columns in layout
- # if config.may("general.view_option_columns"):
- # if html.has_var("num_columns"):
- # try:
- # v["num_columns"] = max(1, int(html.var("num_columns")))
- # except:
- # v["num_columns"] = 1
- # must_save = True
- # elif "num_columns" in v:
- # del v["num_columns"]
-
- # # Show checkboxes for commands
- # if config.may("general.act"):
- # if html.has_var("show_checkboxes"):
- # v["show_checkboxes"] = html.var("show_checkboxes", "") != ""
- # must_save = True
- # elif "show_checkboxes" in v:
- # del v["show_checkboxes"]
-
if config.may("general.painter_options"):
for on, opt in multisite_painter_options.items():
if html.has_var(on):
@@ -1754,9 +1733,9 @@ def show_context_links(thisview, active_filters, show_filters, display_options,
html.end_context_buttons()
-def update_context_links(enable_commands, show_checkboxes):
- html.javascript("update_togglebutton('commands', %d);" % enable_commands)
- html.javascript("update_togglebutton('checkbox', %d);" % (enable_commands and show_checkboxes, ))
+def update_context_links(enable_command_toggle, enable_checkbox_toggle):
+ html.javascript("update_togglebutton('commands', %d);" % enable_command_toggle)
+ html.javascript("update_togglebutton('checkbox', %d);" % (enable_command_toggle and enable_checkbox_toggle, ))
# Collect all views that share a context with thisview. For example
# if a view has an active filter variable specifying a host, then
diff --git a/web/plugins/views/layouts.py b/web/plugins/views/layouts.py
index ff397fb..0345739 100644
--- a/web/plugins/views/layouts.py
+++ b/web/plugins/views/layouts.py
@@ -34,8 +34,9 @@ def init_rowselect(view):
# In views do not use the persisted selection on initial rendering
# But use it when:
# a) rendering views for page reloads
- # b) some form has been submitted
- if 'U' in html.display_options and not html.form_submitted():
+ # b) the view is being sorted
+ # c) some form has been submitted
+ if 'U' in html.display_options and not html.has_var('sort') and not html.form_submitted():
weblib.set_rowselection('view-' + view['name'], [])
selected = [] # initial rendering
else: