From e82398ec381543bc59ff2d3e4aa366c4e3d9de03 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..1d755219c 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 these objects.') + ) ]; } }