monitoring: Indent the list/hosts view script w/ 4 spaces

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-24 10:44:26 +02:00
parent 142fc8a21d
commit 3580de6c6e
1 changed files with 94 additions and 95 deletions

View File

@ -5,105 +5,104 @@ $hosts->peekAhead($this->compact);
if (! $this->compact): ?> if (! $this->compact): ?>
<div class="controls separated"> <div class="controls separated">
<?= $this->tabs ?> <?= $this->tabs ?>
<div class="dontprint"> <div class="dontprint">
<?= $this->render('list/components/selectioninfo.phtml') ?> <?= $this->render('list/components/selectioninfo.phtml') ?>
<h2 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?> <h2 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>
<?= $this->render('list/components/hostssummary.phtml') ?> <?= $this->render('list/components/hostssummary.phtml') ?>
</h2> </h2>
</div> </div>
<?= $this->sortBox ?> <?= $this->sortBox ?>
<?= $this->limiter ?> <?= $this->limiter ?>
<?= $this->paginator ?> <?= $this->paginator ?>
<?= $this->filterEditor ?> <?= $this->filterEditor ?>
</div> </div>
<?php endif ?> <?php endif ?>
<div class="content"> <div class="content">
<table <table data-base-target="_next"
data-base-target="_next" class="action multiselect"
class="action multiselect" data-icinga-multiselect-url="<?= $this->href('monitoring/hosts/show') ?>"
data-icinga-multiselect-url="<?= $this->href('monitoring/hosts/show') ?>" data-icinga-multiselect-controllers="<?= $this->href("monitoring/hosts") ?>"
data-icinga-multiselect-controllers="<?= $this->href("monitoring/hosts") ?>" data-icinga-multiselect-data="host">
data-icinga-multiselect-data="host" <tbody>
> <?php foreach($hosts as $host):
<tbody> $hostStateName = Host::getStateText($host->host_state);
<?php foreach($hosts as $host): $hostLink = $this->href('monitoring/host/show', array('host' => $host->host_name)); ?>
<tr class="state <?= $hostStateName ?><?= $host->host_handled ? ' handled' : '' ?>">
$hostStateName = Host::getStateText($host->host_state); <td class="state">
$hostLink = $this->href('monitoring/host/show', array('host' => $host->host_name)); <strong><?= Host::getStateText($host->host_state, true) ?></strong>
<?php if ((int) $host->host_state !== 99): ?>
<br />
?> <?= $this->timeSince($host->host_last_state_change, $this->compact) ?>
<tr class="state <?= $hostStateName ?><?= $host->host_handled ? ' handled' : '' ?>"> <?php if ((int) $host->host_state > 0 && (int) $host->host_state_type === 0): ?>
<td class="state"> <br />
<strong><?= Host::getStateText($host->host_state, true) ?></strong> <strong>Soft <?= $host->host_attempt ?></strong>
<?php if ((int) $host->host_state !== 99): ?> <?php endif ?>
<br /> <?php endif ?>
<?= $this->timeSince($host->host_last_state_change, $this->compact) ?> </td>
<?php if ((int) $host->host_state > 0 && (int) $host->host_state_type === 0): ?> <td>
<br /> <?= $this->iconImage()->host($host) ?>
<strong>Soft <?= $host->host_attempt ?></strong> <span class="objectflags"><?= implode(' ', $this->hostFlags($host)) ?></span>
<?php endif ?> <?= $this->qlink(
<?php endif ?> $host->host_display_name,
</td> $hostLink,
<td> null,
<?= $this->iconImage()->host($host) ?> array(
<span class="objectflags"><?= implode(' ', $this->hostFlags($host)) ?></span> 'title' => sprintf(
<?= $this->qlink( $this->translate('Show detailed information for host %s'),
$host->host_display_name, $host->host_display_name
$hostLink, ),
null, 'class' => 'rowaction'
array( )
'title' => sprintf($this->translate('Show detailed information for host %s'), $host->host_display_name), ) ?>
'class' => 'rowaction' <?php if (isset($summary[$host->host_name])): ?>
) <span> (<?= $this->qlink(
) ?> sprintf(
<?php if (isset($summary[$host->host_name])): ?> $this->translatePlural(
<span> (<?= $this->qlink( '%u unhandled service', '%u unhandled services', $summary[$host->host_name]
sprintf( ),
$this->translatePlural('%u unhandled service', '%u unhandled services', $summary[$host->host_name]), $summary[$host->host_name]
$summary[$host->host_name] ),
), 'monitoring/list/services',
'monitoring/list/services', array(
array( 'host' => $host->host_name,
'host' => $host->host_name, 'service_problem' => 1,
'service_problem' => 1, 'service_handled' => 0
'service_handled' => 0 ),
), array(
array( 'style' => 'font-weight: normal',
'style' => 'font-weight: normal', 'title' => sprintf(
'title' => sprintf( $this->translatePlural(
$this->translatePlural( 'List %s unhandled service problem on host %s',
'List %s unhandled service problem on host %s', 'List %s unhandled service problems on host %s',
'List %s unhandled service problems on host %s', $summary[$host->host_name]
$summary[$host->host_name] ),
), $summary[$host->host_name],
$summary[$host->host_name], $host->host_name
$host->host_name )
) )
) ) ?>)</span>
) ?>)</span> <?php endif ?>
<?php endif ?> <p class="pluginoutput"><?= $this->pluginOutput($this->ellipsis($host->host_output, 10000), true) ?></p>
<p class="pluginoutput"><?= $this->pluginOutput($this->ellipsis($host->host_output, 10000), true) ?></p> </td>
</td> <?php foreach($this->addColumns as $col): ?>
<?php foreach($this->addColumns as $col): ?> <td><?= $this->escape($host->$col) ?></td>
<td><?= $this->escape($host->$col) ?></td> <?php endforeach ?>
<?php endforeach ?> </tr>
</tr> <?php endforeach ?>
<?php endforeach ?> </tbody>
</tbody> </table>
</table>
<?php if (! $hosts->hasResult()): ?> <?php if (! $hosts->hasResult()): ?>
<?= $this->translate('No hosts found matching the filter') ?> <?= $this->translate('No hosts found matching the filter') ?>
<?php elseif ($hosts->hasMore()): ?> <?php elseif ($hosts->hasMore()): ?>
<?= $this->qlink( <?= $this->qlink(
$this->translate('Show More'), $this->translate('Show More'),
$this->url()->without(array('view', 'limit')), $this->url()->without(array('view', 'limit')),
null, null,
array( array(
'data-base-target' => '_next', 'data-base-target' => '_next',
'class' => 'pull-right show-more' 'class' => 'pull-right show-more'
) )
) ?> ) ?>
<?php endif ?> <?php endif ?>
</div> </div>