From 18db984057b83ca4962c89b6b79bdce6a660b58f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:42:35 +0200 Subject: Adding upstream version 2.4.0. Signed-off-by: Daniel Baumann --- application/views/helpers/RenderStateBadges.php | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 application/views/helpers/RenderStateBadges.php (limited to 'application/views/helpers/RenderStateBadges.php') diff --git a/application/views/helpers/RenderStateBadges.php b/application/views/helpers/RenderStateBadges.php new file mode 100644 index 0000000..70633aa --- /dev/null +++ b/application/views/helpers/RenderStateBadges.php @@ -0,0 +1,33 @@ + $cnt) { + if ($cnt === 0 + || $state === 'OK' + || $state === 'UP' + ) { + continue; + } + + $html .= '' + . $cnt . ''; + } + + if ($html !== '') { + $html = '
' . $html . '
'; + } + + return $html; + } +} -- cgit v1.2.3