Branch: refs/heads/master
Home:
https://github.com/Checkmk/checkmk
Commit: e1d9ef5e89e5743cd4ff3e4a75d8a3bf103ecf3e
https://github.com/Checkmk/checkmk/commit/e1d9ef5e89e5743cd4ff3e4a75d8a3bf1…
Author: Gav <gavin.mcguigan(a)checkmk.com>
Date: 2024-01-18 (Thu, 18 Jan 2024)
Changed paths:
A .werks/16384.md
M cmk/gui/fields/__init__.py
M cmk/gui/fields/custom_fields.py
M cmk/gui/openapi/endpoints/notification_rules/common_schemas.py
M cmk/gui/rest_api_types/notifications_rule_types.py
M cmk/utils/notify_types.py
M tests/unit/cmk/gui/openapi/test_notification_rules.py
Log Message:
-----------
16384 FIX notification rule: allow for non builtin service levels
When configuring a notification rule via the Rest API, you could not
set the value for "match_service_levels" to anything but the default
service levels. This werk addresses this issue by now allowing any
of the service levels configured to be used. This change mean that
there is a change to the request schema. Previously, we accepeted
the service level string value, whereas now we accept the integer
value.
Previous schema
C+:
{"match_service_levels": {"state": "enabled",
"value": {"from_level": "silver", "to_level":
"gold"}}}
C-:
New schema
C+:
{"match_service_levels: {"state": "enabled", "value":
{"from_level" 10, "to_level": 20}}}
C-:
SUP-17080
Change-Id: I2661d03f48e699054b89291f2b94affa10841910