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
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
November 2016
----- 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
9 participants
299 discussions
Start a n
N
ew thread
3984 Permissions can now be filtered by providing a search term on the " edit role" page
by Lars Michelsen
Module: check_mk Branch: master Commit: d6cf6bd7604d37d8a287591f105ae7d924ff5fd8 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d6cf6bd7604d37…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Nov 14 11:09:05 2016 +0100 3984 Permissions can now be filtered by providing a search term on the "edit role" page The search is, just like the other quick search functionalities in WATO, a case insensitive infix search. --- .werks/3984 | 10 ++++++++++ ChangeLog | 1 + web/htdocs/wato.py | 50 ++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/.werks/3984 b/.werks/3984 new file mode 100644 index 0000000..0f4f146 --- /dev/null +++ b/.werks/3984 @@ -0,0 +1,10 @@ +Title: Permissions can now be filtered by providing a search term on the "edit role" page +Level: 1 +Component: wato +Compatible: compat +Version: 1.4.0i3 +Date: 1479118054 +Class: feature + +The search is, just like the other quick search functionalities in WATO, a case insensitive +infix search. diff --git a/ChangeLog b/ChangeLog index 67a55b4..0f0c02a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ * 3981 FIX: Views: Fixed context button displaying depending on usage WATO: + * 3984 Permissions can now be filtered by providing a search term on the "edit role" page... * 4039 FIX: Fix UnicodeEncodeError exception in WATO folder display... * 4041 FIX: Fix exception when editing global configuration settings... * 3975 FIX: Improved error handling when trying to edit not existing global setting diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 0087151..40bd57a 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -10808,7 +10808,12 @@ def mode_edit_role(phase): except KeyError: raise MKGeneralException(_("This role does not exist.")) + search = get_search_expression() + if phase == "action": + if html.form_submitted("search"): + return + alias = html.get_unicode_input("alias") unique, info = is_alias_used("roles", role_id, alias) @@ -10834,15 +10839,24 @@ def mode_edit_role(phase): role["basedon"] = basedon # Permissions - permissions = {} - for perm in config.permissions_by_order: - pname = perm["name"] - value = html.var("perm_" + pname) + permissions = role["permissions"] + for var_name in html.all_varnames_with_prefix("perm_"): + try: + perm = config.permissions_by_name[var_name[5:]] + except KeyError: + continue + + perm_name = perm["name"] + value = html.var(var_name) if value == "yes": - permissions[pname] = True + permissions[perm_name] = True elif value == "no": - permissions[pname] = False - role["permissions"] = permissions + permissions[perm_name] = False + elif value == "default": + try: + del permissions[perm_name] + except KeyError: + pass # Already at defaults if role_id != new_id: roles[new_id] = role @@ -10853,7 +10867,7 @@ def mode_edit_role(phase): add_change("edit-roles", _("Modified user role '%s'") % new_id, sites=get_login_sites()) return "roles" - search_form(_("Search for permissions: "), "permissions") + search_form(_("Search for permissions: "), "edit_role") html.begin_form("role", method="POST") @@ -10884,6 +10898,10 @@ def mode_edit_role(phase): html.sorted_select("basedon", choices, role.get("basedon", "user")) + forms.end() + + html.h2(_("Permissions")) + # Permissions base_role_id = role.get("basedon", role_id) @@ -10897,19 +10915,31 @@ def mode_edit_role(phase): # Loop all permission sections, but sorted plz for section, (prio, section_title, do_sort) in sorted(config.permission_sections.iteritems(), key = lambda x: x[1][0], reverse = True): - forms.header(section_title, False) - # Loop all permissions permlist = config.permissions_by_order[:] if do_sort: permlist.sort(cmp = lambda a,b: cmp(a["title"], b["title"])) + # Now filter by permission section and the optional search term + filtered_perms = [] for perm in permlist: pname = perm["name"] this_section = pname.split(".")[0] if section != this_section: continue # Skip permissions of other sections + if search and (search not in perm["title"].lower() and search not in pname.lower()): + continue + + filtered_perms.append(perm) + + if not filtered_perms: + continue + + forms.header(section_title, isopen=search != None) + for perm in filtered_perms: + pname = perm["name"] + forms.section(perm["title"]) pvalue = role["permissions"].get(pname)
7 years, 10 months
1
0
0
0
Fixed background of audit log view in dashlet
by Lars Michelsen
Module: check_mk Branch: master Commit: 1960ccd9374ac525b26b2a284b5e3ed628c2b032 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1960ccd9374ac5…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Nov 14 09:59:24 2016 +0100 Fixed background of audit log view in dashlet --- web/htdocs/pages.css | 1 + 1 file changed, 1 insertion(+) diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css index 308b77a..6167dcd 100644 --- a/web/htdocs/pages.css +++ b/web/htdocs/pages.css @@ -73,6 +73,7 @@ body.main { /* Can be toggled with N/n display option */ body.main.inline { padding: 0; + background: none; } /* Special mode for creating screenshots of single elements. Omit background.
7 years, 10 months
1
0
0
0
Do not log comment during snapshot creation
by Lars Michelsen
Module: check_mk Branch: master Commit: d79494889b91aa978686db99e027d9270e647a82 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d79494889b91aa…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Nov 14 09:43:45 2016 +0100 Do not log comment during snapshot creation --- web/htdocs/watolib.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py index 5fc409d..d4d77e1 100644 --- a/web/htdocs/watolib.py +++ b/web/htdocs/watolib.py @@ -4732,8 +4732,6 @@ def create_snapshot(comment): do_create_snapshot(data) log_msg = _("Created snapshot %s") % snapshot_name - if comment: - log_msg += " (%s: %s)" % (_("Comment"), comment) log_audit(None, "snapshot-created", log_msg) do_snapshot_maintenance()
7 years, 10 months
1
0
0
0
Cleaned up unused code and removed another subprocess with shell execution
by Lars Michelsen
Module: check_mk Branch: master Commit: 3d68cb79e5b7bd41ce4ae4e4663b5e39b2f0cb48 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d68cb79e5b7bd…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Nov 11 17:35:04 2016 +0100 Cleaned up unused code and removed another subprocess with shell execution --- web/htdocs/multitar.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/web/htdocs/multitar.py b/web/htdocs/multitar.py index 37b6dcb..f9c874f 100644 --- a/web/htdocs/multitar.py +++ b/web/htdocs/multitar.py @@ -71,12 +71,6 @@ def extract_from_buffer(buffer, elements): elif type(elements) == dict: extract_domains(tarfile.open(None, "r", stream), elements) -def extract_from_file(filename, elements): - if type(elements) == list: - extract(tarfile.open(filename, "r"), elements) - elif type(elements) == dict: - extract_domains(tarfile.open(filename, "r"), elements) - def list_tar_content(the_tarfile): files = {} try: @@ -100,7 +94,6 @@ def get_file_content(the_tarfile, filename): def extract_domains(tar, domains): - import subprocess tar_domains = {} for member in tar.getmembers(): try: @@ -193,15 +186,9 @@ def extract_domains(tar, domains): # The complete tar.gz file never fits in stringIO buffer.. tar.extract(tar_member, restore_dir) - if domain.get("restore_command"): - path_subtar = "%s/%s" % (restore_dir, tar_member.name) - command = domain.get("restore_command") % { "prefix" : target_dir, - "restore_dir" : restore_dir, - "path_subtar" : path_subtar } - else: - command = "tar xzf %s/%s -C %s" % (restore_dir, tar_member.name, target_dir) - - p = subprocess.Popen(command, shell = True, stdout = subprocess.PIPE, stderr = subprocess.PIPE) + command = [ "tar", "xzf", "%s/%s" % (restore_dir, tar_member.name), + "-C", target_dir ] + p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() exit_code = p.wait() if exit_code:
7 years, 10 months
1
0
0
0
Fixed processing of multiline comments in WATO audit log
by Lars Michelsen
Module: check_mk Branch: master Commit: ab693e8a4453e4af0ae7e7eeafe98972552f10fe URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab693e8a4453e4…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Nov 14 09:48:30 2016 +0100 Fixed processing of multiline comments in WATO audit log --- web/htdocs/wato.py | 2 +- web/htdocs/watolib.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index cf42c3d..3061c5e 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -4450,7 +4450,7 @@ class ModeAuditLog(WatoMode): table.cell(_("User"), html.attrencode(user), css="nobreak") # This must not be attrencoded: The entries are encoded when writing to the log. - table.cell(_("Change"), text, css="fill") + table.cell(_("Change"), text.replace("\\n", "<br>\n"), css="fill") table.end() diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py index d4d77e1..f12a878 100644 --- a/web/htdocs/watolib.py +++ b/web/htdocs/watolib.py @@ -175,7 +175,7 @@ def log_entry(linkinfo, action, message, user_id=None): make_nagios_directory(os.path.dirname(audit_log_path)) with create_user_file(audit_log_path, "ab") as f: f.write("%d %s %s %s %s\n" % (int(time.time()), link, user_id, - action, message)) + action, message.replace("\n", "\\n"))) def log_audit(linkinfo, action, message, user_id = None):
7 years, 10 months
1
0
0
0
Audit log: Do not break date/time anymore
by Lars Michelsen
Module: check_mk Branch: master Commit: d97ac50947970838395c4c173259db51fbb1d8cc URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d97ac509479708…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Nov 14 09:58:36 2016 +0100 Audit log: Do not break date/time anymore --- web/htdocs/wato.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 3061c5e..81bd746 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -4445,7 +4445,7 @@ class ModeAuditLog(WatoMode): for t, linkinfo, user, action, text in log: table.row() table.cell(_("Object"), self._render_logfile_linkinfo(linkinfo)) - table.cell(_("Time"), render.date_and_time(float(t))) + table.cell(_("Time"), html.render_nobr(render.date_and_time(float(t)))) user = user == '-' and ('<i>%s</i>' % _('internal')) or user table.cell(_("User"), html.attrencode(user), css="nobreak")
7 years, 10 months
1
0
0
0
Revert "WIP"
by Lars Michelsen
Module: check_mk Branch: master Commit: 7eb2325f0b75ecb5c863af162270f287240da879 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7eb2325f0b75ec…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Nov 11 17:09:56 2016 +0100 Revert "WIP" This reverts commit 9523b5d724d45e65a21c01aad2530a75dda9ad35. --- ChangeLog | 3 --- Makefile | 14 -------------- 2 files changed, 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6b701e..67a55b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,9 +35,6 @@ Livestatus: * 3651 FIX: Fixed potential segfault with Nagios core when accessing log/commands table via Livestatus.... -Testcommit 123213 sd asd asd - -Da fehlt noch etwas 1.4.0i2: Core & Setup: diff --git a/Makefile b/Makefile index 709bf40..11e9a68 100644 --- a/Makefile +++ b/Makefile @@ -22,20 +22,6 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. - - - - - - - - - - - - - - SHELL := /bin/bash VERSION := 1.4.0i3 NAME := check_mk
7 years, 10 months
1
0
0
0
WIP
by Lars Michelsen
Module: check_mk Branch: master Commit: 9523b5d724d45e65a21c01aad2530a75dda9ad35 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9523b5d724d45e…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Nov 11 17:01:34 2016 +0100 WIP Summary: Ich teste gerade mal etwas Test Plan: Muss man so und so machen Reviewers: lmtest Reviewed By: lmtest Subscribers: lmtest Differential Revision:
https://review.mathias-kettner.de/D1
--- ChangeLog | 3 +++ Makefile | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 67a55b4..a6b701e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,9 @@ Livestatus: * 3651 FIX: Fixed potential segfault with Nagios core when accessing log/commands table via Livestatus.... +Testcommit 123213 sd asd asd + +Da fehlt noch etwas 1.4.0i2: Core & Setup: diff --git a/Makefile b/Makefile index 11e9a68..709bf40 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,20 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. + + + + + + + + + + + + + + SHELL := /bin/bash VERSION := 1.4.0i3 NAME := check_mk
7 years, 10 months
1
0
0
0
Ignore mkeventd directory when switching branches between 1.2.8 and newer
by Lars Michelsen
Module: check_mk Branch: master Commit: 7acc70f701792a3dea52bddab08de525a49025a8 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7acc70f701792a…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Nov 11 16:13:46 2016 +0100 Ignore mkeventd directory when switching branches between 1.2.8 and newer Summary: Test Plan: Reviewers: Subscribers: --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fbe4307..286015b 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,5 @@ RemoteSystemsTempFiles .DS_Store .cache tags - +mkeventd tests/web/data/*
7 years, 10 months
1
0
0
0
Fixed recently introduced issue when installing mkps
by Lars Michelsen
Module: check_mk Branch: master Commit: 8e3bd8d6182326a47c04ec061288db2bf4a916ce URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8e3bd8d6182326…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Nov 11 16:01:07 2016 +0100 Fixed recently introduced issue when installing mkps --- cmk_base/packaging.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cmk_base/packaging.py b/cmk_base/packaging.py index c556e0b..abe089c 100644 --- a/cmk_base/packaging.py +++ b/cmk_base/packaging.py @@ -508,6 +508,7 @@ def install_package(file_name=None, file_object=None): tardest.stdin.write(data) tardest.stdin.close() + tardest.wait() # Fix permissions of extracted files for filename in filenames:
7 years, 10 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
30
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
Results per page:
10
25
50
100
200