Module: check_mk
Branch: master
Commit: c13af01f2e2517d9f0bf88672d700f712b1080ef
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c13af01f2e2517…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 25 14:41:20 2011 +0100
WATO: improve order of host attribute topics
---
web/htdocs/wato.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 3781073..00fe13f 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3660,8 +3660,15 @@ def have_folder_attributes():
# This is needed for handling mandatory attributes.
def configure_attributes(hosts, for_what, parent, myself=None, without_attributes = []):
# show attributes grouped by topics, in order of their
- # appearance. If only one topic exists, do not show topics
- topics = []
+ # appearance. If only one topic exists, do not show topics
+ # Make sure, that the topics "Basic settings" and host tags
+ # are always show first.
+ topics = [None]
+ if len(config.wato_host_tags):
+ topics.append(_("Host tags"))
+
+ # The remaining topics are shown in the order of the
+ # appearance of the attribute declarations:
for attr, topic in host_attributes:
if topic not in topics and attr.show_in_form():
topics.append(topic)