summaryrefslogtreecommitdiffstats
path: root/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/monitoring/application/views/scripts/show/components/hostgroups.phtml')
-rw-r--r--modules/monitoring/application/views/scripts/show/components/hostgroups.phtml19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml b/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml
new file mode 100644
index 0000000..377b56f
--- /dev/null
+++ b/modules/monitoring/application/views/scripts/show/components/hostgroups.phtml
@@ -0,0 +1,19 @@
+<?php
+
+if (empty($object->hostgroups)) return;
+
+$list = array();
+foreach ($object->hostgroups as $name => $alias) {
+ $list[] = $this->qlink(
+ $alias,
+ 'monitoring/list/hosts',
+ array('hostgroup_name' => $name),
+ array('title' => sprintf($this->translate('List all hosts in the group "%s"'), $alias))
+ );
+}
+printf(
+ "<tr><th>%s</th><td class=\"go-ahead\">%s</td></tr>\n",
+ $this->translate('Hostgroups'),
+ implode(', ', $list)
+);
+