diff --git a/application/views/helpers/RenderStateBadges.php b/application/views/helpers/RenderStateBadges.php
new file mode 100644
index 0000000..1ee80cc
--- /dev/null
+++ b/application/views/helpers/RenderStateBadges.php
@@ -0,0 +1,32 @@
+ 'OK',
+ 1 => 'WARNING',
+ 2 => 'CRITICAL',
+ 3 => 'UNKNOWN',
+ 99 => 'PENDING',
+ );
+
+ public function renderStateBadges($summary)
+ {
+ $html = '';
+
+ foreach ($summary as $state => $cnt) {
+ if ($cnt === 0) continue;
+ if ($state === 0) continue;
+ $stateName = $this->stateNames[$state];
+ $html .= ''
+ . $cnt . '';
+ }
+
+ if ($html !== '') {
+ $html = '
' . $html . '
';
+ }
+
+ return $html;
+ }
+}
diff --git a/application/views/scripts/process/toplevel.phtml b/application/views/scripts/process/toplevel.phtml
index 0f8046a..f9e08f6 100644
--- a/application/views/scripts/process/toplevel.phtml
+++ b/application/views/scripts/process/toplevel.phtml
@@ -27,10 +27,17 @@ if ($count < 20) {
bp->getChildren() as $name => $node): ?>
diff --git a/public/css/module.less b/public/css/module.less
index fd52c9a..d532904 100644
--- a/public/css/module.less
+++ b/public/css/module.less
@@ -451,3 +451,13 @@ table.sourcecode {
}
}
+.badges {
+ display: block;
+ padding: 0.5em;
+
+ .badge {
+ border: 1px solid white;
+ margin: 0;
+ margin-right: 1px;
+ }
+}