Object history cleanup, fix timestamp and others glitches

This commit is contained in:
Thomas Gelf 2014-03-06 19:00:53 +00:00
parent da5f3c191c
commit 8b40413406
1 changed files with 10 additions and 10 deletions

View File

@ -32,21 +32,21 @@ $states = array(
?><div class="controls"> ?><div class="controls">
<?= $this->tabs->render($this); ?> <?= $this->render('show/components/header.phtml') ?>
<a href="<?= $this->href('monitoring/list/eventhistory', $params); ?>">All events for <?= $title ?></a> <a href="<?= $this->href('monitoring/list/eventhistory', $params); ?>">All events for <?= $title ?></a><br />
<h1>History</h1> <?= $this->paginationControl($this->history, null, null, array('preserve' => $this->preserve)); ?>
</div> </div>
<?php if($history->count() === 0): ?> <?php if($this->history->count() === 0): ?>
No History Available For This Object No History Available For This Object
</div> </div>
<?php return; endif ?> <?php return; endif ?>
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
<table class="action"> <table class="action">
<tbody> <tbody>
<?php foreach ($history as $event): <?php foreach ($this->history as $event):
if (array_key_exists($event->state, $states[$event->object_type])) { if (array_key_exists($event->state, $states[$event->object_type])) {
$state_class = $states[$event->object_type][$event->state]; $state_class = $states[$event->object_type][$event->state];
} else { } else {
@ -54,15 +54,15 @@ if (array_key_exists($event->state, $states[$event->object_type])) {
} }
?> ?>
<tr class="state <?= $state_class ?>"> <tr class="state <?= $state_class ?>">
<td class="state"><?= $this->timeSince($event->raw_timestamp) ?></td> <td class="state"><?= $this->timeSince($event->timestamp) ?></td>
<td> <td>
<?php <?php
$output = $this->ticket_pattern ? preg_replace( $output = $this->ticket_pattern ? preg_replace(
$this->ticket_pattern, $this->ticket_pattern,
$ticket_link, $ticket_link,
$this->pluginOutput($event->output) $this->escape($event->output)
) : $this->pluginOutput($event->output); ) : $this->escape($event->output);
switch ($event->type) { switch ($event->type) {
@ -103,7 +103,7 @@ switch ($event->type) {
$title = 'Downtime End'; $title = 'Downtime End';
break; break;
} }
echo $this->img('img/icons/' . $icon . '.png', array('title' => $title)) . ' '; echo $this->icon($icon . '.png', $title) . ' ';
if ($object instanceof Service): ?> if ($object instanceof Service): ?>
<a href="<?= $this->href('monitoring/show/service', array( <a href="<?= $this->href('monitoring/show/service', array(