icingaweb2/modules/monitoring/application/views/scripts/show/components/contacts.phtml

66 lines
1.4 KiB
PHTML

<?php
$contacts = array();
foreach ($object->contacts as $contact) {
$contacts[] = '<a href="'
. $this->href(
'monitoring/show/contact',
array(
'contact_name' => $contact->contact_name
)
)
. '">'
. $contact->contact_alias
. '</a>';
}
?>
<div>
<div class="panel-heading">
<div class="panel-hostname">
Contacts
</div>
</div>
<hr class="separator" />
<div class="panel-body">
<?php if (!count($contacts)): ?>
No Contacts
<?php else: ?>
<?= implode(', ', $contacts); ?>
<?php endif; ?>
</div>
</div>
<?php
$contactgroups = array();
foreach ($object->contactgroups as $contactgroup) {
$contactgroups[] = '<a href="'
. $this->href(
'monitoring/show/contactgroup',
array(
'contactgroup_name' => $contactgroup->contactgroup_name
)
)
. '">'
. $contactgroup->contactgroup_alias
. '</a>';
}
?>
<div>
<div class="panel-heading">
<div class="panel-hostname">
Contactgroups
</div>
</div>
<hr class="separator" />
<div class="panel-body">
<?php if (!count($contactgroups)): ?>
No Contactgroups
<?php else: ?>
<?= implode(', ', $contactgroups); ?>
<?php endif; ?>
</div>
</div>