Skip to content

Commit

Permalink
monitoring: No longer render last problem column in the host groups o…
Browse files Browse the repository at this point in the history
…verview

I doubt that this column had any real value. If there's a "problem" on a host group, the state badges help you.

refs #5543
  • Loading branch information
lippserd committed Sep 25, 2015
1 parent 231bee0 commit 1a4c1a5
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions modules/monitoring/application/views/scripts/list/hostgroups.phtml
Expand Up @@ -18,7 +18,6 @@ if (! $this->compact): ?>
<table class="groupview action" data-base-target="_next">
<thead>
<tr>
<th><?= $this->translate('Last Problem') ?></th>
<th><?= $this->translate('Host Group') ?></th>
<th><?= $this->translate('Total Hosts') ?></th>
<th><?= $this->translate('Host States') ?></th>
Expand All @@ -27,41 +26,8 @@ if (! $this->compact): ?>
</tr>
</thead>
<tbody>
<?php foreach ($hostgroups as $hostgroup):
if ($hostgroup->hosts_down_unhandled) {
$handled = false;
$state = Host::STATE_DOWN;
$lastStateChange = $hostgroup->hosts_down_last_state_change_unhandled;
} elseif ($hostgroup->hosts_unreachable_unhandled) {
$handled = false;
$state = Host::STATE_UNREACHABLE;
$lastStateChange = $hostgroup->hosts_unreachable_last_state_change_unhandled;
} else {
$handled = true;
if ($hostgroup->hosts_down_handled) {
$state = Host::STATE_DOWN;
$lastStateChange = $hostgroup->hosts_down_last_state_change_handled;
} elseif ($hostgroup->hosts_unreachable_handled) {
$state = Host::STATE_UNREACHABLE;
$lastStateChange = $hostgroup->hosts_unreachable_last_state_change_handled;
} elseif ($hostgroup->hosts_up) {
$state = Host::STATE_UP;
$lastStateChange = $hostgroup->hosts_up_last_state_change;
} else {
$state = Host::STATE_PENDING;
$lastStateChange = $hostgroup->hosts_pending_last_state_change;
}
}

?>
<tr class="state <?= Host::getStateText($state) ?><?= $handled ? ' handled' : '' ?>" href="<?=
$this->href('monitoring/list/hosts', array('hostgroup_name' => $hostgroup->hostgroup_name))
?>">
<td class="state">
<strong><?= Host::getStateText($state, true) ?></strong>
<br>
<?= $this->timeSince($lastStateChange, $this->compact) ?>
</td>
<?php foreach ($hostgroups as $hostgroup): ?>
<tr href="<?= $this->href('monitoring/list/hosts', array('hostgroup_name' => $hostgroup->hostgroup_name)) ?>">
<td class="groupname">
<?= $this->qlink(
$hostgroup->hostgroup_alias,
Expand Down

0 comments on commit 1a4c1a5

Please sign in to comment.