icingaweb2-module-director/application/views/scripts/show/activitylog-create.phtml

28 lines
631 B
PHTML

<h2><?= sprintf(
'%s "%s" has been created',
ucfirst(preg_replace('/^icinga_/', '', $entry->object_type)),
$entry->object_name
) ?></h2>
<h3><?= $this->translate('Properties') ?></h3>
<table class="log-properties">
<?php
$new = json_decode($entry->new_properties);
foreach ($new as $key => $value) {
if ($key === 'id') continue;
if ($value === null) continue;
if (is_array($value)) $value = implode(', ', $value);
if (is_object($value)) $value = json_encode($value);
echo ' <tr><th>' . $this->escape($key) . '</th><td>';
echo $this->escape($value);
echo "</td></tr>\n";
}
?>
</table>