From d1b7ee9d86c6974b3e31f9df5fb66d7f40c136b0 Mon Sep 17 00:00:00 2001 From: raviks789 Date: Thu, 24 Oct 2024 13:52:57 +0200 Subject: [PATCH] Set message to show if the root problem list is empty --- library/Icingadb/Widget/Detail/ObjectDetail.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icingadb/Widget/Detail/ObjectDetail.php b/library/Icingadb/Widget/Detail/ObjectDetail.php index 7949814ab..120aebff2 100644 --- a/library/Icingadb/Widget/Detail/ObjectDetail.php +++ b/library/Icingadb/Widget/Detail/ObjectDetail.php @@ -651,7 +651,9 @@ protected function createRootProblems(): ?array return [ HtmlElement::create('h2', null, Text::create(t('Root Problems'))), - new DependencyNodeList($rootProblems) + (new DependencyNodeList($rootProblems))->setEmptyStateMessage( + t('You are not authorized to view the dependencies causing this object to be unreachable.') + ) ]; } }