Skip to content

Commit

Permalink
monitoring: Indent the list/hosts view script w/ 4 spaces
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Sep 24, 2015
1 parent 142fc8a commit 3580de6
Showing 1 changed file with 94 additions and 95 deletions.
189 changes: 94 additions & 95 deletions modules/monitoring/application/views/scripts/list/hosts.phtml
Expand Up @@ -5,105 +5,104 @@ $hosts->peekAhead($this->compact);

if (! $this->compact): ?>
<div class="controls separated">
<?= $this->tabs ?>
<div class="dontprint">
<?= $this->render('list/components/selectioninfo.phtml') ?>
<h2 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>
<?= $this->render('list/components/hostssummary.phtml') ?>
</h2>
</div>
<?= $this->sortBox ?>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->filterEditor ?>
<?= $this->tabs ?>
<div class="dontprint">
<?= $this->render('list/components/selectioninfo.phtml') ?>
<h2 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>
<?= $this->render('list/components/hostssummary.phtml') ?>
</h2>
</div>
<?= $this->sortBox ?>
<?= $this->limiter ?>
<?= $this->paginator ?>
<?= $this->filterEditor ?>
</div>
<?php endif ?>
<div class="content">
<table
data-base-target="_next"
class="action multiselect"
data-icinga-multiselect-url="<?= $this->href('monitoring/hosts/show') ?>"
data-icinga-multiselect-controllers="<?= $this->href("monitoring/hosts") ?>"
data-icinga-multiselect-data="host"
>
<tbody>
<?php foreach($hosts as $host):

$hostStateName = Host::getStateText($host->host_state);
$hostLink = $this->href('monitoring/host/show', array('host' => $host->host_name));


?>
<tr class="state <?= $hostStateName ?><?= $host->host_handled ? ' handled' : '' ?>">
<td class="state">
<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) ?>
<?php if ((int) $host->host_state > 0 && (int) $host->host_state_type === 0): ?>
<br />
<strong>Soft <?= $host->host_attempt ?></strong>
<?php endif ?>
<?php endif ?>
</td>
<td>
<?= $this->iconImage()->host($host) ?>
<span class="objectflags"><?= implode(' ', $this->hostFlags($host)) ?></span>
<?= $this->qlink(
$host->host_display_name,
$hostLink,
null,
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(
$this->translatePlural('%u unhandled service', '%u unhandled services', $summary[$host->host_name]),
$summary[$host->host_name]
),
'monitoring/list/services',
array(
'host' => $host->host_name,
'service_problem' => 1,
'service_handled' => 0
),
array(
'style' => 'font-weight: normal',
'title' => sprintf(
$this->translatePlural(
'List %s unhandled service problem on host %s',
'List %s unhandled service problems on host %s',
$summary[$host->host_name]
),
$summary[$host->host_name],
$host->host_name
)
)
) ?>)</span>
<?php endif ?>
<p class="pluginoutput"><?= $this->pluginOutput($this->ellipsis($host->host_output, 10000), true) ?></p>
</td>
<?php foreach($this->addColumns as $col): ?>
<td><?= $this->escape($host->$col) ?></td>
<?php endforeach ?>
</tr>
<?php endforeach ?>
</tbody>
</table>
<table data-base-target="_next"
class="action multiselect"
data-icinga-multiselect-url="<?= $this->href('monitoring/hosts/show') ?>"
data-icinga-multiselect-controllers="<?= $this->href("monitoring/hosts") ?>"
data-icinga-multiselect-data="host">
<tbody>
<?php foreach($hosts as $host):
$hostStateName = Host::getStateText($host->host_state);
$hostLink = $this->href('monitoring/host/show', array('host' => $host->host_name)); ?>
<tr class="state <?= $hostStateName ?><?= $host->host_handled ? ' handled' : '' ?>">
<td class="state">
<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) ?>
<?php if ((int) $host->host_state > 0 && (int) $host->host_state_type === 0): ?>
<br />
<strong>Soft <?= $host->host_attempt ?></strong>
<?php endif ?>
<?php endif ?>
</td>
<td>
<?= $this->iconImage()->host($host) ?>
<span class="objectflags"><?= implode(' ', $this->hostFlags($host)) ?></span>
<?= $this->qlink(
$host->host_display_name,
$hostLink,
null,
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(
$this->translatePlural(
'%u unhandled service', '%u unhandled services', $summary[$host->host_name]
),
$summary[$host->host_name]
),
'monitoring/list/services',
array(
'host' => $host->host_name,
'service_problem' => 1,
'service_handled' => 0
),
array(
'style' => 'font-weight: normal',
'title' => sprintf(
$this->translatePlural(
'List %s unhandled service problem on host %s',
'List %s unhandled service problems on host %s',
$summary[$host->host_name]
),
$summary[$host->host_name],
$host->host_name
)
)
) ?>)</span>
<?php endif ?>
<p class="pluginoutput"><?= $this->pluginOutput($this->ellipsis($host->host_output, 10000), true) ?></p>
</td>
<?php foreach($this->addColumns as $col): ?>
<td><?= $this->escape($host->$col) ?></td>
<?php endforeach ?>
</tr>
<?php endforeach ?>
</tbody>
</table>
<?php if (! $hosts->hasResult()): ?>
<?= $this->translate('No hosts found matching the filter') ?>
<?= $this->translate('No hosts found matching the filter') ?>
<?php elseif ($hosts->hasMore()): ?>
<?= $this->qlink(
$this->translate('Show More'),
$this->url()->without(array('view', 'limit')),
null,
array(
'data-base-target' => '_next',
'class' => 'pull-right show-more'
)
) ?>
<?= $this->qlink(
$this->translate('Show More'),
$this->url()->without(array('view', 'limit')),
null,
array(
'data-base-target' => '_next',
'class' => 'pull-right show-more'
)
) ?>
<?php endif ?>
</div>

0 comments on commit 3580de6

Please sign in to comment.