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

25 lines
626 B
PHTML

<?php
$object = null;
if (isset($this->service)) {
$object = $this->service;
} elseif (isset($this->host)) {
$object = $this->host;
}
$flags = $this->monitoringFlags($object);
?>
<table class="flag-container">
<?php foreach ($flags as $name => $value): ?>
<tr>
<th><?= $name; ?></th>
<td>
<?php if ($value === true): ?>
<span class="flag flag-enabled">ENABLED</span>
<?php else: ?>
<span class="flag flag-disabled">DISABLED</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</table>