New object detail snippets

This commit is contained in:
Thomas Gelf 2014-03-06 18:36:26 +00:00
parent 1ffea41bed
commit 25f1034c15
4 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<tr>
<th><?= $this->translate('Last check') ?></th>
<td><a href="#"><?= $this->img('img/icons/refresh_petrol.png') ?> <?= $this->translate('Check now') ?></a> <?= $this->timeSince($object->last_check) ?></td>
</tr>
<tr>
<th><?= $this->translate('Next check') ?></th>
<td><!--<input type="submit" value="Reschedule" style="width: 7em;" /> --><a href="<?= $this->href(
'monitoring/command/reschedulenextcheck',
array(
'host' => $object->host_name,
'service' => $object->service_description
)
) ?>"><?= $this->img('img/icons/reschedule_petrol.png') ?> <?= $this->translate('Reschedule') ?></a> <?= $this->timeUnless($object->next_check) ?></td>
</tr>
<?php if ($object->check_execution_time): ?>
<tr>
<th><?= $this->translate('Check execution time') ?></th>
<td><?= $object->check_execution_time ?>s</td>
</tr>
<?php endif ?>
<?php if ($object->check_latency): ?>
<tr>
<th><?= $this->translate('Check latency') ?></th>
<td><?= $object->check_latency ?>s</td>
</tr>
<?php endif ?>

View File

@ -0,0 +1,14 @@
<?php
if ($object->is_flapping) {
printf(
"<tr><th>%s</th><td>%s %s</td></tr>\n",
'Flapping',
$this->icon('flapping.png', 'Flapping'),
sprintf(
'Currently flapping witgh a %.2f%% state change rate',
$object->percent_state_change
)
);
}

View File

@ -0,0 +1,2 @@
<?= $this->pluginOutput($object->output) ?>
<?= $this->pluginOutput($object->long_output) ?>

View File

@ -0,0 +1,7 @@
<?php if (! $object->perfdata) return ?>
<tr>
<th><?= $this->translate('Performance data') ?></th>
<td>
<?= $this->perfdata($object->perfdata) ?>
</td>
</tr>