Module: check_mk
Branch: master
Commit: 2b3aebcac894e6e726a462455b7bbe830845d35f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2b3aebcac894e6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 20 08:53:13 2012 +0100
Windows agent: Added dmi_sysinfo.bat plugin (Thanks to Housecrew for sharing)
---
ChangeLog | 1 +
agents/windows/plugins/dmi_sysinfo.bat | 15 +++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 075ce76..2ca8e95 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@
* Windows agent: output eventlog texts in UTF-8 encoding. This
should fix problems with german umlauts in message texts.
* Windows agent: Added installer for the windows agent (install_agent.exe)
+ * Windows agent: Added dmi_sysinfo.bat plugin (Thanks to Housecrew for sharing)
* Disabled obsolete checks fc_brocade_port and fc_brocade_port_detailed.
Please use brocade_fcport instead.
* aironet_errors, statgrab_disk, statgrab_net: Performance data has
diff --git a/agents/windows/plugins/dmi_sysinfo.bat b/agents/windows/plugins/dmi_sysinfo.bat
new file mode 100644
index 0000000..6b566b6
--- /dev/null
+++ b/agents/windows/plugins/dmi_sysinfo.bat
@@ -0,0 +1,15 @@
+@echo off
+
+REM ***
+REM * To be able to run this check you need to install dmidecode
+REM * on your windows client.
+REM *
+REM * You can download dmidecode for windows from
+REM * <http://gnuwin32.sourceforge.net/packages/dmidecode.htm>
+REM *
+REM * This plugin should work out of the box if you install dmidecode
+REM * to the default location.
+REM ***
+
+echo ^<^<^<dmi_sysinfo^>^>^>
+C:\Programme\GnuWin32\sbin\dmidecode.exe -t 1 -q
Module: check_mk
Branch: master
Commit: 173cc747c968a5f2c243d19e47695ff63b7ccd7e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=173cc747c968a5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 20 08:54:12 2012 +0100
Windows agent: Added dmi_sysinfo.bat plugin (Thanks to Arne-Nils Kromer for sharing)
---
ChangeLog | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2ca8e95..08d4744 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,7 +15,7 @@
* Windows agent: output eventlog texts in UTF-8 encoding. This
should fix problems with german umlauts in message texts.
* Windows agent: Added installer for the windows agent (install_agent.exe)
- * Windows agent: Added dmi_sysinfo.bat plugin (Thanks to Housecrew for sharing)
+ * Windows agent: Added dmi_sysinfo.bat plugin (Thanks to Arne-Nils Kromer for sharing)
* Disabled obsolete checks fc_brocade_port and fc_brocade_port_detailed.
Please use brocade_fcport instead.
* aironet_errors, statgrab_disk, statgrab_net: Performance data has
Module: check_mk
Branch: master
Commit: b908ec6840e66fca062d1f44029719e94df85afc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b908ec6840e66f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 19 16:03:06 2012 +0100
WATO: Fixed text in rule edit dialog when no tags defined
---
.bugs/623 | 7 +++++--
web/htdocs/wato.py | 4 +---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/.bugs/623 b/.bugs/623
index e7b4e39..10decd4 100644
--- a/.bugs/623
+++ b/.bugs/623
@@ -1,8 +1,11 @@
Title: Plugin Permissions sind doppelt registriert (bei i18n)
Component: wato
-State: open
+Class: bug
+State: done
Date: 2012-01-18 13:45:56
Targetversion: 1.2.0
-Class: bug
Die Permissions werden bei Umschaltung der Sprache doppelt registriert.
+
+2012-01-19 15:57:58: changed state open -> done
+Has been fixed yesterday.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 0bbefc9..67496bb 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8717,9 +8717,7 @@ def mode_edit_rule(phase):
html.write("</i></td>")
html.write("<td class=content>")
if len(config.wato_host_tags) == 0:
- html.write(_("You have not configured any host tags. If you work with rules "
- "you should better do so and add a <tt>wato_host_tags = ..</tt> "
- "to your <tt>multisite.mk</tt>. You will find an example there."))
+ html.write(_("You have not configured any <a href=\"wato.py?mode=hosttags\">host tags</a>."))
else:
html.write("<table>")
for entry in config.wato_host_tags:
Module: check_mk
Branch: master
Commit: f788a4b9394ba2873082ad4a9ae0aba672eeafb5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f788a4b9394ba2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 19 16:19:16 2012 +0100
Snapshot/Factory Reset is possible even with a broken config
---
.bugs/596 | 7 +++++--
ChangeLog | 1 +
web/htdocs/wato.py | 16 +++++++++++++---
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/.bugs/596 b/.bugs/596
index a1898f3..9373209 100644
--- a/.bugs/596
+++ b/.bugs/596
@@ -1,8 +1,11 @@
Title: Wato verweist für die Hostag Konfiguration noch in die multisite.mk
Component: wato
-State: open
+Class: nastiness
+State: done
Date: 2012-01-13 18:21:44
Targetversion: 1.2.0
-Class: nastiness
Anstelle eines Links in die Multisite Einstellungen zu Host Tags, wird via Text auf die multisite.mk verwiesen um hostags anzulegen
+
+2012-01-19 16:03:34: changed state open -> done
+Updated the text.
diff --git a/ChangeLog b/ChangeLog
index 63d5e2d..075ce76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -55,6 +55,7 @@
* Removed IP-Address attribute from folders
* Supporting localized tag titles
* Using Username as default value for full names when editing users
+ * Snapshot/Factory Reset is possible even with a broken config
* FIX: Fixed missing folders in "move to" dropdown fields
* FIX: Fixed "move to target folders" after CSV import
* FIX: Fixed problem with duplicate extra_buttons when using the i18n of multiisite
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 67496bb..3c9f5bb 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -210,10 +210,20 @@ def page_handler():
if not config.may("wato.use"):
raise MKAuthException(_("You are not allowed to use WATO."))
- # Make information about current folder and hosts available
- prepare_folder_info()
-
current_mode = html.var("mode") or "main"
+
+ try:
+ # Make information about current folder and hosts available
+ # To be able to perform a "factory reset" or a snapshot restore
+ # even with a broken config ignore exceptions in this function
+ # when running in "snapshot" mode
+ prepare_folder_info()
+ except:
+ if current_mode == 'snapshot':
+ pass
+ else:
+ raise
+
modeperms, modefunc = modes.get(current_mode, ([], None))
if modefunc == None:
html.header(_("Sorry"), stylesheets=wato_styles)
Module: check_mk
Branch: master
Commit: 026cfcead42f788b746b18a9776b583e9320abbf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=026cfcead42f78…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 19 16:35:27 2012 +0100
Added links to contactgroups in the host/folder permissions columns
---
.bugs/590 | 7 +++++--
web/htdocs/wato.py | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.bugs/590 b/.bugs/590
index 4152af7..061d98f 100644
--- a/.bugs/590
+++ b/.bugs/590
@@ -1,8 +1,11 @@
Title: WATO: factory reset nicht erreichbar bei defekter hosts.mk
Component: wato
-State: open
+Class: bug
+State: done
Date: 2012-01-12 12:20:44
Targetversion: 1.2.0
-Class: bug
Man kommt nicht ins Backup/Restore, wenn beim Einlesen der hosts.mk ein Fehler auftritt
+
+2012-01-19 16:19:32: changed state open -> done
+Has just been implemented
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 3c9f5bb..e177317 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3648,7 +3648,8 @@ class ContactGroupsAttribute(Attribute):
items.sort(cmp = lambda a,b: cmp(a[1], b[1]))
for name, alias in items:
if name in cgs:
- texts.append(alias and alias or name)
+ display_name = alias and alias or name
+ texts.append('<a href="wato.py?mode=edit_contact_group&edit=%s">%s</a>' % (name, display_name))
result = ", ".join(texts)
if texts:
result += "<span title='%s'><b>*</b></span>" % \
Module: check_mk
Branch: master
Commit: 4c8c7efd6d23c9ab629a05110f1a11834492375e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c8c7efd6d23c9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 19 09:38:02 2012 +0100
FIX: Fixed not up-to-date role permission data in roles_saved hook
---
ChangeLog | 1 +
web/htdocs/config.py | 15 ++++++++++-----
web/htdocs/wato.py | 11 +++++++++++
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b448b08..fb499f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,7 @@
* FIX: Writing single host_contactgroups rules for each selected
contactgroup in host edit dialog
* FIX: Fixed wrong folder contacgroup related permissions in auth.php api
+ * FIX: Fixed not up-to-date role permission data in roles_saved hook
BI:
* improve doc/treasures/check_bi_local.py: local check that creates
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index ab1c968..f0d1362 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -375,12 +375,17 @@ def need_permission(pname):
def get_role_permissions():
role_permissions = {}
+ # Loop all permissions
+ # and for each permission loop all roles
+ # and check wether it has the permission or not
+ roleids = roles.keys()
for perm in permissions_by_order:
- for role in perm['defaults']:
- if not role in role_permissions:
- role_permissions[role] = [ perm['name'] ]
- else:
- role_permissions[role].append(perm['name'])
+ for role_id in roleids:
+ if not role_id in role_permissions:
+ role_permissions[role_id] = []
+
+ if may_with_roles([role_id], perm['name']):
+ role_permissions[role_id].append(perm['name'])
return role_permissions
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 3d9375e..0bbefc9 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7269,6 +7269,11 @@ def load_roles():
try:
vars = { "roles" : roles }
execfile(filename, vars, vars)
+ # Reflect the data in the roles dict kept in the config module Needed
+ # for instant changes in current page while saving modified roles.
+ # Otherwise the hooks would work with old data when using helper
+ # functions from the config module
+ config.roles.update(vars['roles'])
return vars["roles"]
except Exception, e:
@@ -7279,6 +7284,12 @@ def load_roles():
def save_roles(roles):
+ # Reflect the data in the roles dict kept in the config module Needed
+ # for instant changes in current page while saving modified roles.
+ # Otherwise the hooks would work with old data when using helper
+ # functions from the config module
+ config.roles.update(roles)
+
make_nagios_directory(multisite_dir)
filename = multisite_dir + "roles.mk"
out = file(filename, "w")