monitoring: Re-indent the list/services view script

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-23 14:02:39 +02:00
parent cf2fe8433a
commit 59599916b0
1 changed files with 98 additions and 90 deletions

View File

@ -5,7 +5,7 @@ use Icinga\Module\Monitoring\Object\Service;
$services->peekAhead($this->compact);
if (! $this->compact): ?>
<div class="controls separated">
<div class="controls separated">
<?= $this->tabs ?>
<div class="dontprint">
<?= $this->render('list/components/selectioninfo.phtml') ?>
@ -17,16 +17,16 @@ if (! $this->compact): ?>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->filterEditor ?>
</div>
</div>
<?php endif ?>
<div class="content">
<table data-base-target="_next"
class="action multiselect <?php if ($this->compact): ?> compact<?php endif ?>" style="table-layout: auto;"
data-icinga-multiselect-url="<?= $this->href("monitoring/services/show") ?>"
data-icinga-multiselect-controllers="<?= $this->href("monitoring/services") ?>"
<table data-base-target="_next"
class="action multiselect<?php if ($this->compact): ?> compact<?php endif ?>" style="table-layout: auto;"
data-icinga-multiselect-url="<?= $this->href('monitoring/services/show') ?>"
data-icinga-multiselect-controllers="<?= $this->href('monitoring/services') ?>"
data-icinga-multiselect-data="service,host">
<tbody>
<?php foreach ($services as $service):
<?php foreach ($services as $service):
$serviceLink = $this->href(
'monitoring/service/show',
array(
@ -41,7 +41,7 @@ if (! $this->compact): ?>
)
);
$serviceStateName = Service::getStateText($service->service_state);
?>
?>
<tr class="state <?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
<td class="state">
<p>
@ -60,13 +60,19 @@ if (! $this->compact): ?>
<td>
<?= $this->iconImage()->service($service) ?>
<span class="objectflags"><?= implode(' ', $this->serviceFlags($service)) ?></span>
<?php if ($this->showHost): ?><?= $this->qlink(
$service->host_display_name . ($service->host_state != 0 ? ' (' . Host::getStateText($service->host_state, true) . ')' : ''),
<?php if ($this->showHost): ?><?= $this->qlink(
$service->host_display_name
. ($service->host_state != 0 ? ' (' . Host::getStateText($service->host_state, true) . ')' : ''),
$hostLink,
null,
array('title' => sprintf($this->translate('Show detailed information for host %s'), $service->host_display_name))
array(
'title' => sprintf(
$this->translate('Show detailed information for host %s'),
$service->host_display_name
)
)
) ?>:
<?php endif ?><?= $this->qlink(
<?php endif ?><?= $this->qlink(
$service->service_display_name,
$serviceLink,
null,
@ -78,20 +84,22 @@ if (! $this->compact): ?>
),
'class' => 'rowaction'
)
) ?><br />
) ?><br />
<div class="sparkline-box"><?= $this->perfdata($service->service_perfdata, true, 5) ?> </div>
<p class="plugin-output"><?= $this->pluginOutput($this->ellipsis($service->service_output, 10000), true) ?></p>
<p class="plugin-output">
<?= $this->pluginOutput($this->ellipsis($service->service_output, 10000), true) ?>
</p>
</td>
<?php foreach($this->addColumns as $col): ?>
<?php foreach($this->addColumns as $col): ?>
<td><?= $this->escape($service->$col) ?></td>
<?php endforeach ?>
<?php endforeach ?>
</tr>
<?php endforeach ?>
<?php endforeach ?>
</tbody>
</table>
<?php if (! $services->hasResult()): ?>
</table>
<?php if (! $services->hasResult()): ?>
<?= $this->translate('No services found matching the filter'); ?>
<?php elseif ($services->hasMore()): ?>
<?php elseif ($services->hasMore()): ?>
<?= $this->qlink(
$this->translate('Show More'),
$this->url()->without(array('view', 'limit')),
@ -100,6 +108,6 @@ if (! $this->compact): ?>
'data-base-target' => '_next',
'class' => 'pull-right show-more'
)
); ?>
<?php endif ?>
) ?>
<?php endif ?>
</div>