Skip to content

Commit

Permalink
fix(MAJOR): metric equality check fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
amunchet committed Sep 16, 2023
1 parent d812e2e commit c0538cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backend/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def find_children(key, fields):
if service["comparison"] == "equals":
logger.debug("In equals comparison")
try:
return found == service["value"]
output = (str(found).strip() == str(service["value"]).strip())
return output
except TypeError: # pragma: no cover
try:
return float(found) == float(service["value"])
Expand Down
2 changes: 1 addition & 1 deletion frontend/labyrinth/src/views/Checks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default {
type: "check",
},
services: [],
comparison_types: ["greater", "less", "equal", "time"],
comparison_types: ["greater", "less", "equals", "time"],
service_fields: [
"display_name",
"name",
Expand Down

0 comments on commit c0538cf

Please sign in to comment.