From 134e45d6f8f64ccd5b3aac7b9228a2f76c655ea9 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 26 Sep 2024 13:46:56 +0200 Subject: [PATCH] RedundancyGroupState: Add method `getStateText()` --- library/Icingadb/Model/RedundancyGroupState.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/Icingadb/Model/RedundancyGroupState.php b/library/Icingadb/Model/RedundancyGroupState.php index 0128410f..d6507d8e 100644 --- a/library/Icingadb/Model/RedundancyGroupState.php +++ b/library/Icingadb/Model/RedundancyGroupState.php @@ -62,4 +62,9 @@ class RedundancyGroupState extends Model { $relations->belongsTo('redundancy_group', RedundancyGroup::class); } + + public function getStateText(): string + { + return $this->failed ? 'problem' : 'ok'; + } }