From b18bc644404e02b57635bfcc8258e85abb141146 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:44:46 +0200 Subject: Adding upstream version 1.1.1. Signed-off-by: Daniel Baumann --- library/Icingadb/Common/ServiceLink.php | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 library/Icingadb/Common/ServiceLink.php (limited to 'library/Icingadb/Common/ServiceLink.php') diff --git a/library/Icingadb/Common/ServiceLink.php b/library/Icingadb/Common/ServiceLink.php new file mode 100644 index 0000000..75ac6c6 --- /dev/null +++ b/library/Icingadb/Common/ServiceLink.php @@ -0,0 +1,40 @@ +state->getStateText(), StateBall::SIZE_MEDIUM); + $content[] = ' '; + } + + $content[] = $service->display_name; + + return Html::sprintf( + t('%s on %s', ' on '), + Html::tag('a', ['href' => Links::service($service, $host), 'class' => 'subject'], $content), + Html::tag( + 'a', + ['href' => Links::host($host), 'class' => 'subject'], + [ + new StateBall($host->state->getStateText(), StateBall::SIZE_MEDIUM), + ' ', + $host->display_name + ] + ) + ); + } +} -- cgit v1.2.3