Module: check_mk
Branch: master
Commit: 55312accd136dbc296ec61188279ba7a0fdb005d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=55312accd136db…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 25 11:30:49 2011 +0200
Added display_option "L" to enable/disable column title sortings
---
ChangeLog | 1 +
web/htdocs/dashboard.py | 2 +-
web/htdocs/views.py | 6 ++++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 99db10a..44f1a52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
* Views are not reloaded completely anymore. The data tables are reloaded
on their own.
* Open tabs in views do not prevent reloading the displayed data anymore
+ * Added display_option "L" to enable/disable column title sortings
1.1.11i3:
Core, Setup, etc.:
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index f3fce81..ba91148 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -182,7 +182,7 @@ def render_dashlet(nr, dashlet, filename):
# The method "view" is a shortcut for "iframe" with a certain
url
if "view" in dashlet:
- dashlet["iframe"] =
"view.py?view_name=%s&display_options=SIXHR&_body_class=dashlet" %
dashlet["view"]
+ dashlet["iframe"] =
"view.py?view_name=%s&display_options=SIXHRL&_body_class=dashlet" %
dashlet["view"]
# The content is rendered only if it is fixed. In the
# other cases the initial (re)-size will paint the content.
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 56efde2..79d4049 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1059,7 +1059,7 @@ def get_needed_columns(painters):
# Display view with real data. This is *the* function everying
# is about.
def show_view(view, show_heading = False, show_buttons = True, show_footer = True):
- all_display_options = "HTBFCEOZRSIXDM"
+ all_display_options = "HTBFCEOZRSIXDML"
# Parse display options and
if html.output_format == "html":
@@ -2315,7 +2315,9 @@ def paint_header(view, p):
# - Add the display options (Keeping the same display options as current)
# - Link to _self (Always link to the current frame)
# - Keep the _body_class variable (e.g. for dashlets)
- if view.get('user_sortable', True) and get_sorter_name_of_painter(painter) is
not None:
+ if 'L' in html.display_options \
+ and view.get('user_sortable', True) \
+ and get_sorter_name_of_painter(painter) is not None:
params = [
('sort', sort_url(view, painter)),
]