Module: check_mk
Branch: master
Commit: 3382452c32c9c5015940575dff2017ce3d11fa2c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3382452c32c9c5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 2 15:10:58 2015 +0100
#2084 FIX Disabled notification for a user is now shown on profile page even when not permitted to edit
When all notifications have been disabled for a user this is shown on the user profile page
and user edit page even when the user is not able to edit this value.
The locking / disabled notification state is shown in the WATOs user list as icons now.
---
.werks/2084 | 13 +++++++++++
ChangeLog | 1 +
web/htdocs/images/icon_user_locked.png | Bin 0 -> 4520 bytes
web/htdocs/wato.py | 39 ++++++++++++++++++--------------
4 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/.werks/2084 b/.werks/2084
new file mode 100644
index 0000000..2a12942
--- /dev/null
+++ b/.werks/2084
@@ -0,0 +1,13 @@
+Title: Disabled notification for a user is now shown on profile page even when not permitted to edit
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1425305351
+
+When all notifications have been disabled for a user this is shown on the user profile page
+and user edit page even when the user is not able to edit this value.
+
+The locking / disabled notification state is shown in the WATOs user list as icons now.
diff --git a/ChangeLog b/ChangeLog
index 7426576..75306f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -303,6 +303,7 @@
* 2026 FIX: Fixed exception when using umlauts in notification plugin descriptions...
* 2078 FIX: Fixed exception with some snapshots when using a localized GUI...
* 2080 FIX: Fixed UnicodeDecodeError when using a localized GUI on notification configuration page
+ * 2084 FIX: Disabled notification for a user is now shown on profile page even when not permitted to edit...
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host notications
diff --git a/web/htdocs/images/icon_user_locked.png b/web/htdocs/images/icon_user_locked.png
new file mode 100644
index 0000000..67f53d8
Binary files /dev/null and b/web/htdocs/images/icon_user_locked.png differ
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index e350dac..4f96048 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -11787,9 +11787,12 @@ def mode_users(phase):
auth_method = "<i>%s</i>" % _("none")
table.cell(_("Authentication"), auth_method)
- # Locked
+ table.cell(_("State"))
locked = user.get("locked", False)
- table.cell(_("Locked"), (locked and ("<b>" + _("yes") + "</b>") or _("no")))
+ if user.get("locked", False):
+ html.icon(_('The login is currently locked'), 'user_locked')
+ if user.get("disable_notifications", False):
+ html.icon(_('Notifications are disabled'), 'notif_disabled')
# Full name / Alias
table.cell(_("Alias"), user.get("alias", ""))
@@ -11894,18 +11897,17 @@ def mode_edit_user(phase):
if topic is not None and topic != attr['topic']:
continue # skip attrs of other topics
- if not userid or not attr.get("permission") or config.user_may(userid, attr["permission"]):
- vs = attr['valuespec']
- forms.section(_u(vs.title()))
- if attr['user_editable'] and not is_locked(name):
- vs.render_input("ua_" + name, user.get(name, vs.default_value()))
- else:
- html.write(vs.value_to_text(user.get(name, vs.default_value())))
- # Render hidden to have the values kept after saving
- html.write('<div style="display:none">')
- vs.render_input("ua_" + name, user.get(name, vs.default_value()))
- html.write('</div>')
- html.help(_u(vs.help()))
+ vs = attr['valuespec']
+ forms.section(_u(vs.title()))
+ if attr['user_editable'] and not is_locked(name):
+ vs.render_input("ua_" + name, user.get(name, vs.default_value()))
+ else:
+ html.write(vs.value_to_text(user.get(name, vs.default_value())))
+ # Render hidden to have the values kept after saving
+ html.write('<div style="display:none">')
+ vs.render_input("ua_" + name, user.get(name, vs.default_value()))
+ html.write('</div>')
+ html.help(_u(vs.help()))
# Load data that is referenced - in order to display dropdown
# boxes and to check for validity.
@@ -15959,11 +15961,14 @@ def page_user_profile(change_pw=False):
if config.may('general.edit_user_attributes'):
for name, attr in userdb.get_user_attributes():
if attr['user_editable']:
+ vs = attr['valuespec']
+ forms.section(_u(vs.title()))
+ value = user.get(name, vs.default_value())
if not attr.get("permission") or config.may(attr["permission"]):
- vs = attr['valuespec']
- forms.section(_u(vs.title()))
- vs.render_input("ua_" + name, user.get(name, vs.default_value()))
+ vs.render_input("ua_" + name, value)
html.help(_u(vs.help()))
+ else:
+ html.write(vs.value_to_text(value))
# Save button
forms.end()
Module: check_mk
Branch: master
Commit: aba866e4ec86c10626aff983f07a8afdcae02c77
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aba866e4ec86c1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 2 12:33:40 2015 +0100
Fixed wording
---
mkeventd/web/plugins/wato/mkeventd.py | 4 ++--
web/plugins/wato/active_checks.py | 2 +-
web/plugins/wato/datasource_programs.py | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/mkeventd/web/plugins/wato/mkeventd.py b/mkeventd/web/plugins/wato/mkeventd.py
index 4d81d70..99cf63a 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -1733,8 +1733,8 @@ if mkeventd_enabled:
),
( "connect_timeout",
Integer(
- title = _("Connection timeout"),
- help = _("TCP connection timeout for connecting to the master"),
+ title = _("Connect Timeout"),
+ help = _("TCP connect timeout for connecting to the master"),
label = _("Try bringing up TCP connection for"),
unit = _("sec"),
minvalue = 1,
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 6cee65a..70e42a6 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -188,7 +188,7 @@ register_rule(group,
),
("timeout",
Integer(
- title = _("Connection timeout"),
+ title = _("Connect Timeout"),
help = _("Seconds before connection times out"),
default_value = 10),
),
diff --git a/web/plugins/wato/datasource_programs.py b/web/plugins/wato/datasource_programs.py
index e40dc36..2a32e6d 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -72,7 +72,7 @@ register_rule(group,
),
( "timeout",
Integer(
- title = _("Connection timeout"),
+ title = _("Connect Timeout"),
help = _("The network timeout in seconds when communicating with vSphere or "
"to the Check_MK Agent. The default is 60 seconds. Please note that this "
"is not a total timeout but is applied to each individual network transation."),
@@ -367,7 +367,7 @@ register_rule(group,
elements = [
( "timeout",
Integer(
- title = _("Connection timeout"),
+ title = _("Connect Timeout"),
help = _("The network timeout in seconds when communicating via UPNP. "
"The default is 10 seconds. Please note that this "
"is not a total timeout, instead it is applied to each API call."),
@@ -426,7 +426,7 @@ register_rule(group,
elements = [
( "timeout",
Integer(
- title = _("Connection timeout"),
+ title = _("Connect Timeout"),
help = _("The network timeout in seconds when communicating via HTTP. "
"The default is 10 seconds."),
default_value = 10,
@@ -496,7 +496,7 @@ register_rule(group,
maxvalue = 65535,
)),
("timeout", Integer(
- title = _("Connection timeout"),
+ title = _("Connect Timeout"),
help = _("The connect timeout in seconds when establishing a connection "
"with the PLC."),
default_value = 60,
Module: check_mk
Branch: master
Commit: 516de739da79feb0d3d0f39869fc5ea9fa0526f4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=516de739da79fe…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 2 12:27:18 2015 +0100
#2083 Added Siemens PLC (SPS) monitoring
We added a special agent {agent_siemens_plc} which is using SNAP7 to fetch
data from a Siemens PLC (SPS) device. You can use it do read memory areas
from the agent, parse and interpret them, for example you can configure
to read and integer from memory location X and handle it as temperature
value in celsius.
For the moment we added a temperature check, others will follow.
---
.werks/2083 | 15 +++
ChangeLog | 1 +
agents/special/agent_siemens_plc | 162 +++++++++++++++++++++++++++++++
checkman/siemens_plc | 23 +++++
checks/agent_siemens_plc | 43 ++++++++
checks/siemens_plc | 67 +++++++++++++
web/plugins/wato/datasource_programs.py | 85 ++++++++++++++++
7 files changed, 396 insertions(+)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=516de739da…