lists.checkmk.com
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
List overview
Download
Checkmk git commits
January 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
checkmk-commits@lists.checkmk.com
2 participants
334 discussions
Start a n
N
ew thread
Check_MK Git: check_mk: Fixed X button styling on "add sidebar" page
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: a00db1df253ba26de13dbbc3ff07178039e3f754 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a00db1df253ba2…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Tue Jan 31 10:47:52 2012 +0100 Fixed X button styling on "add sidebar" page --- web/htdocs/sidebar.css | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/web/htdocs/sidebar.css b/web/htdocs/sidebar.css index 83c57fc..22234b0 100644 --- a/web/htdocs/sidebar.css +++ b/web/htdocs/sidebar.css @@ -338,6 +338,8 @@ div.snapin div.footnotelink a:hover { div.snapin img.iconbutton { margin: 0px 2px 0px 0px; border: none; + width: 10px; + height: 10px; } div.snapin img.iconbutton.bookmark {
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Replaced "wato" sidebar snapin which mixed up WATO and status GUIs with
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 53cfbe90010b91982db3e40508f7133303518bbb URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=53cfbe90010b91…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Tue Jan 31 12:00:31 2012 +0100 Replaced "wato" sidebar snapin which mixed up WATO and status GUIs with the new "wato_foldertree" snapin which only links to the status views filtered by the WATO folder. --- ChangeLog | 3 + web/htdocs/config.py | 1 - web/htdocs/js/sidebar.js | 2 - web/plugins/sidebar/wato.py | 112 +++++++++++++++++++++++++++++++----------- 4 files changed, 85 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7ec9c5..bed1b08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,9 @@ * Site filter shows "(local)" in case of non multi-site setup * Made "wato folder" columns sortable * Hiding site filter in multisite views in single site setups + * Replaced "wato" sidebar snapin which mixed up WATO and status GUIs with + the new "wato_foldertree" snapin which only links to the status views + filtered by the WATO folder. * FIX: Fixed auth problem when following logwatch icon links while using the form based auth * FIX: Fix problem with Umlaut in contact alias diff --git a/web/htdocs/config.py b/web/htdocs/config.py index 51d6825..c3f96ce 100644 --- a/web/htdocs/config.py +++ b/web/htdocs/config.py @@ -453,7 +453,6 @@ def save_site_config(): sidebar = \ [('tactical_overview', 'open'), ('search', 'open'), - ('wato', 'open'), ('views', 'open'), ('bookmarks', 'open'), ('admin', 'open'), diff --git a/web/htdocs/js/sidebar.js b/web/htdocs/js/sidebar.js index 3226d52..6829fe2 100644 --- a/web/htdocs/js/sidebar.js +++ b/web/htdocs/js/sidebar.js @@ -742,8 +742,6 @@ function wato_tree_click(folderpath) { href = add_html_var(href, "wato_folder", folderpath); else if (href.indexOf("/dashboard.py") >= 0) href = add_html_var(href, "wato_folder", folderpath); - else if (href.indexOf("/wato.py") >= 0) - href = "wato.py?mode=folder&folder=" + escape(folderpath); else href = "view.py?view_name=allhosts&wato_folder=" + escape(folderpath); parent.frames[1].location = href; diff --git a/web/plugins/sidebar/wato.py b/web/plugins/sidebar/wato.py index 867678a..185a96c 100644 --- a/web/plugins/sidebar/wato.py +++ b/web/plugins/sidebar/wato.py @@ -69,27 +69,80 @@ def render_wato_folders(): if not config.wato_enabled: html.write(_("WATO is disabled in <tt>multisite.mk</tt>.")) else: - #EE if config.is_multisite(): - #EE sitenames = config.allsites().keys() - #EE sitenames.sort() - #EE for sitename in sitenames: - #EE site = config.sites[sitename] - #EE state = html.site_status[sitename]["state"] - #EE if state != "disabled": - #EE html.write("<h3>%s</h3>\n" % site["alias"]) - #EE ajax_url = site["url_prefix"] + "check_mk/ajax_wato_folders.py" - #EE html.javascript("document.write(get_url_sync('%s'));" % ajax_url) - #EE else: - ajax_wato_folders() - num_pending = wato.api.num_pending_changes() - if num_pending: - footnotelinks([(_("%d changes pending") % num_pending, "wato.py?mode=changelog")]) - -def ajax_wato_folders(): - render_linktree_folder(wato.api.get_folder_tree()) - - -def render_linktree_folder(f): + html.write(_('This snapin is deprecated. Please use the WATO foldertree snapin instead.')) + +sidebar_snapins["wato"] = { + "title" : _("Hosts"), + "description" : _("A foldable tree showing all your WATO folders and files - " + "allowing you to navigate in the tree while using views or being in WATO"), + "author" : "Mathias Kettner", + "render" : render_wato_folders, + "allowed" : [ "admin", "user", "guest" ], +} + +# .----------------------------------------------------------------------. +# | _____ _ _ _ | +# | | ___|__ | | __| | ___ _ __| |_ _ __ ___ ___ | +# | | |_ / _ \| |/ _` |/ _ \ '__| __| '__/ _ \/ _ \ | +# | | _| (_) | | (_| | __/ | | |_| | | __/ __/ | +# | |_| \___/|_|\__,_|\___|_| \__|_| \___|\___| | +# | | +# +----------------------------------------------------------------------+ +# | | +# '----------------------------------------------------------------------' + +def render_wato_foldertree(): + if not config.wato_enabled: + html.write(_("WATO is disabled in <tt>multisite.mk</tt>.")) + else: + render_wato_foldertree() + +def render_wato_foldertree(): + html.live.set_prepend_site(True) + query = "GET hosts\n" \ + "Columns: name host_filename" + hosts = html.live.query(query) + html.live.set_prepend_site(False) + hosts.sort() + + # Get number of hosts by folder + # Count all childs for each folder + user_folders = {} + for site, hostname, wato_folder in hosts: + # Remove leading /wato/ + wato_folder = wato_folder[6:] + + # Loop through all levels of this folder to add the + # host count to all parent levels + folder_parts = wato_folder.split('/') + for num_parts in range(0, len(folder_parts)): + this_folder = '/'.join(folder_parts[:num_parts]) + + if this_folder not in user_folders: + user_folders[this_folder] = wato.api.get_folder(this_folder) + user_folders[this_folder]['.num_hosts'] = 1 + else: + user_folders[this_folder]['.num_hosts'] += 1 + + # Update the WATO folder tree with the user specific permissions + folder_tree = wato.api.get_folder_tree() + def update_foldertree(f): + this_path = f['.path'] + if this_path in user_folders: + f['.num_hosts'] = user_folders[this_path]['.num_hosts'] + + for subfolder_path, subfolder in f.get(".folders", {}).items(): + # Only handle paths which the user is able to see + if subfolder['.path'] in user_folders: + update_foldertree(subfolder) + else: + del f['.folders'][subfolder['.path']] + update_foldertree(folder_tree) + + # Now render the whole tree + render_tree_folder(folder_tree) + +def render_tree_folder(f): subfolders = f.get(".folders", {}) is_leaf = len(subfolders) == 0 @@ -100,23 +153,22 @@ def render_linktree_folder(f): html.write("<ul style='padding-left: 0px;'>") title = '<a href="#" onclick="wato_tree_click(%r);">%s (%d)</a>' % ( - f[".path"], f["title"], f[".total_hosts"]) + f[".path"], f["title"], f[".num_hosts"]) if not is_leaf: html.begin_foldable_container('wato-hosts', "/" + f[".path"], False, title) for sf in wato.api.sort_by_title(subfolders.values()): - render_linktree_folder(sf) + render_tree_folder(sf) html.end_foldable_container() else: html.write("<li>" + title + "</li>") if ".parent" in f or is_leaf: html.write("</ul>") -sidebar_snapins["wato"] = { - "title" : _("Hosts"), - "description" : _("A foldable tree showing all your WATO folders and files - " - "allowing you to navigate in the tree while using views or being in WATO"), - "author" : "Mathias Kettner", - "render" : render_wato_folders, - "allowed" : [ "admin", "user", "guest" ], +sidebar_snapins['wato_foldertree'] = { + 'title' : _('WATO Foldertree'), + 'description' : _(''), + 'author' : 'Lars Michelsen', + 'render' : render_wato_foldertree, + 'allowed' : [ 'admin', 'user', 'guest' ], }
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Merge branch 'master' of ssh://git.mathias-kettner. de/var/www/80/git.mathias-kettner.de/check_mk
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 24b2b9fd790eb7f9e8f67b5cf174e5558fff1321 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=24b2b9fd790eb7…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Tue Jan 31 12:00:44 2012 +0100 Merge branch 'master' of ssh://git.mathias-kettner.de/var/www/80/git.mathias-kettner.de/check_mk ---
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: WATO: fixed syntax error
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 12e5057cf8008d1604b6b93e9b261fec240b350e URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12e5057cf8008d…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Jan 31 11:29:23 2012 +0100 WATO: fixed syntax error --- web/htdocs/wato.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 244b42f..4405224 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -1889,7 +1889,7 @@ def show_service_table(host, firsttime): table = check_mk_automation(host[".siteid"], "try-inventory", cache_options + [hostname]) if len(table) == 0 and cache_options != []: table = check_mk_automation(host[".siteid"], "try-inventory", [hostname]) - html.set_var("_scan", "on") + html.set_var("_scan", "on") except Exception, e: if config.debug: raise
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Merge branch 'master' of ssh://mathias-kettner.de/ check_mk
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 60a0c167587a49c4697388d5fe504a3bf1b1c666 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=60a0c167587a49…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Jan 31 11:22:29 2012 +0100 Merge branch 'master' of ssh://mathias-kettner.de/check_mk ---
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: WATO: fix bug in saving checks
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 6ca05d33a190ddc6f419fd4405a021d11e17dc81 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ca05d33a190dd…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Jan 31 11:22:23 2012 +0100 WATO: fix bug in saving checks --- web/htdocs/wato.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 866144d..244b42f 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -1889,6 +1889,7 @@ def show_service_table(host, firsttime): table = check_mk_automation(host[".siteid"], "try-inventory", cache_options + [hostname]) if len(table) == 0 and cache_options != []: table = check_mk_automation(host[".siteid"], "try-inventory", [hostname]) + html.set_var("_scan", "on") except Exception, e: if config.debug: raise
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Removing tailing spaces from usernames when using web form based login
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 42d55002268899c2b4df10189f159f72a2ce5e11 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=42d55002268899…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Tue Jan 31 10:22:45 2012 +0100 Removing tailing spaces from usernames when using web form based login --- web/htdocs/login.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/web/htdocs/login.py b/web/htdocs/login.py index 439e441..a1a3f8c 100644 --- a/web/htdocs/login.py +++ b/web/htdocs/login.py @@ -147,7 +147,7 @@ def do_login(): err = None if html.var('_login'): try: - username = html.var('_username', '') + username = html.var('_username', '').rstrip() if username == '': raise MKUserError('_username', _('No username given.'))
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Merge branch 'master' of ssh://git.mathias-kettner. de/var/www/80/git.mathias-kettner.de/check_mk
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 2d999f570b038108de4ea0ad3c23b52ea1a520c0 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2d999f570b0381…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Tue Jan 31 10:22:49 2012 +0100 Merge branch 'master' of ssh://git.mathias-kettner.de/var/www/80/git.mathias-kettner.de/check_mk ---
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Merge branch 'master' of ssh://mathias-kettner.de/ check_mk
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 190bb372b18ed47c4256b422442d613b4e8d2f2f URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=190bb372b18ed4…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Jan 31 10:16:30 2012 +0100 Merge branch 'master' of ssh://mathias-kettner.de/check_mk ---
12 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Updated bug entries #0629
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: e4c4a95a31b0b894f3c3ae30ed309b49523fa77f URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e4c4a95a31b0b8…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Jan 31 10:16:25 2012 +0100 Updated bug entries #0629 --- .bugs/629 | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/.bugs/629 b/.bugs/629 new file mode 100644 index 0000000..716eabe --- /dev/null +++ b/.bugs/629 @@ -0,0 +1,10 @@ +Title: About page +Component: multisite +State: open +Date: 2012-01-31 10:15:54 +Targetversion: 1.2.0 +Class: todo + +Create an about page about Multisite, Check_MK and the +copyrights. This page can be reachable via the (C) Mathias Kettner +Link.
12 years, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
34
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Results per page:
10
25
50
100
200