Module: check_mk
Branch: master
Commit: 8f3b4a98bd7e1ce1820da794f08ef3385e71f60e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8f3b4a98bd7e1c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 10 11:20:39 2012 +0100
Chrome: Fixed styling problem of foldertree snapin
---
ChangeLog | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1a307a6..c7feb79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* Added several missing localization stringsw
* IE: Fixed problem with clicking SELECT fields in the new wato foldertree snapin
* Fixed problem when trying to visit dashboards from new wato foldertree snapin
+ * Chrome: Fixed styling problem of foldertree snapin
* Views: Only show the commands and row selection options for views where
commands are possible
Module: check_mk
Branch: master
Commit: fa6de55895f58fed7819c8316c88dd3b54eb72e3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fa6de55895f58f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 10 10:46:47 2012 +0100
Views: Only show the commands and row selection options for views where
commands are possible
---
ChangeLog | 2 ++
web/htdocs/views.py | 37 ++++++++++++++++++++++++++-----------
2 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d4d0ee8..1a307a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,8 @@
* Added several missing localization stringsw
* IE: Fixed problem with clicking SELECT fields in the new wato foldertree snapin
* Fixed problem when trying to visit dashboards from new wato foldertree snapin
+ * Views: Only show the commands and row selection options for views where
+ commands are possible
1.1.13i3:
Core, Setup, etc.:
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 899e887..08e1a6e 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1326,8 +1326,11 @@ def render_view(view, rows, datasource, group_painters, painters,
if show_buttons and 'B' in display_options:
show_context_links(view, hide_filters)
+ # Show the command form? Are commands possible?
+ command_form = len(rows) > 0 and display_command_form(display_options, datasource)
+
need_navi = show_buttons and \
- not html.do_actions() and (
+ not html.do_actions() and (
'D' in display_options or
'F' in display_options or
'C' in display_options or
@@ -1353,7 +1356,7 @@ def render_view(view, rows, datasource, group_painters, painters,
html.write("<td class=minigap></td>\n")
# Command-button, open command form if checkboxes are currently shown
- if 'C' in display_options and len(rows) > 0 and config.may("act"):
+ if command_form:
toggle_button("table_actions", False, _("Commands"))
# toggle_button("table_actions", show_checkboxes, _("Commands"))
html.write("<td class=minigap></td>\n")
@@ -1361,7 +1364,7 @@ def render_view(view, rows, datasource, group_painters, painters,
# Buttons for view options
if 'O' in display_options:
# Link for selecting/deselecting all rows
- if 'C' in display_options and config.may("act") and layout["checkboxes"]:
+ if command_form and layout["checkboxes"]:
if show_checkboxes:
addclass = " selected"
title = _("Hide check boxes")
@@ -1423,7 +1426,7 @@ def render_view(view, rows, datasource, group_painters, painters,
show_filter_form(filter_isopen, show_filters)
# Actions
- if len(rows) > 0:
+ if command_form:
# If we are currently within an action (confirming or executing), then
# we display only the selected rows (if checkbox mode is active)
if html.var("selected_rows", "") and html.do_actions():
@@ -1949,11 +1952,16 @@ def collist_of_collection(collection, join_target = []):
# | the other time of "action". Both is the same here... |
# '----------------------------------------------------------------------'
-def show_command_form(is_open, datasource):
+# Checks wether or not this view handles commands for the current user
+# When it does not handle commands the command tab, command form, row
+# selection and processing commands is disabled.
+def display_command_form(display_options, datasource):
+ if not 'C' in display_options:
+ return False
if not config.may("act"):
- return
+ return False
if html.has_var("try"):
- return
+ return False
# What commands are available depends on the Livestatus table we
# deal with. If a data source provides information about more
@@ -1961,6 +1969,17 @@ def show_command_form(is_open, datasource):
# information) then the first info is the primary table. So 'what'
# will be one of "host", "service", "command" or "downtime".
what = datasource["infos"][0]
+ for command in multisite_commands:
+ if what in command["tables"] and config.may(command["permission"]):
+ return True
+
+def show_command_form(is_open, datasource):
+ # What commands are available depends on the Livestatus table we
+ # deal with. If a data source provides information about more
+ # than one table, (like services datasource also provide host
+ # information) then the first info is the primary table. So 'what'
+ # will be one of "host", "service", "command" or "downtime".
+ what = datasource["infos"][0]
html.write("<tr class=form id=table_actions %s><td>" %
(not is_open and 'style="display: none"' or '') )
@@ -1973,16 +1992,12 @@ def show_command_form(is_open, datasource):
# Commands are defined in plugins/views/commands.py. Iterate
# over all command definitions and render HTML input fields.
- one_shown = False
for command in multisite_commands:
if what in command["tables"] and config.may(command["permission"]):
html.write('<tr><td class=legend>%s</td>\n' % command["title"])
html.write('<td class=content>\n')
command["render"]()
html.write('</td></tr>\n')
- one_shown = True
- if not one_shown:
- html.write("<tr><td>"+ _('No commands possible for %ss') % what +"</td></tr>")
html.write("</table></div>\n")
html.end_form()
Module: check_mk
Branch: master
Commit: a4b3075aa6af65735fd329f4c6de47c14669d25f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a4b3075aa6af65…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 9 15:28:49 2012 +0100
Updated bug entries #0649
---
.bugs/649 | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/.bugs/649 b/.bugs/649
new file mode 100644
index 0000000..b53ddce
--- /dev/null
+++ b/.bugs/649
@@ -0,0 +1,9 @@
+Title: Dashboard Zeit im header verwirrt
+Component: multisite
+State: open
+Date: 2012-02-09 15:28:10
+Targetversion: future
+Class: nastiness
+
+Die Zeit zeigt die Render Zeit der Seite an. Die Dashlets selbst laden sich neu
+die Zeit wird aber nicht aktualisiert.