monitoring/CSS: Add state-table where appropriate

refs #5543
This commit is contained in:
Eric Lippmann 2015-11-04 17:48:12 +01:00
parent e67420e8bf
commit 3e77384700
8 changed files with 18 additions and 20 deletions

View File

@ -16,7 +16,7 @@ if (! $this->compact): ?>
<?php endif ?>
<div class="content">
<table data-base-target="_next"
class="table-row-selectable multiselect"
class="table-row-selectable state-table multiselect"
data-icinga-multiselect-url="<?= $this->href('monitoring/downtimes/show'); ?>"
data-icinga-multiselect-controllers="<?= $this->href("monitoring/downtimes") ?>"
data-icinga-multiselect-data="downtime_id">

View File

@ -22,7 +22,7 @@ if (! $this->compact): ?>
</div>
<?php return; endif ?>
<table data-base-target="_next"
class="table-row-selectable multiselect"
class="table-row-selectable state-table multiselect"
data-icinga-multiselect-url="<?= $this->href('monitoring/hosts/show') ?>"
data-icinga-multiselect-controllers="<?= $this->href("monitoring/hosts") ?>"
data-icinga-multiselect-data="host">

View File

@ -18,7 +18,7 @@ if (! $this->compact): ?>
<p><?= $this->translate('No notifications found matching the filter.') ?></p>
</div>
<?php return; endif ?>
<table data-base-target="_next" class="table-row-selectable">
<table data-base-target="_next" class="table-row-selectable state-table">
<tbody>
<?php foreach ($notifications->peekAhead($this->compact) as $notification):
if (isset($notification->service_description)) {

View File

@ -23,7 +23,7 @@ if (! $this->compact): ?>
</div>
<?php return; endif ?>
<table data-base-target="_next"
class="table-row-selectable multiselect<?php if ($this->compact): ?> compact<?php endif ?>"
class="table-row-selectable state-table multiselect<?php if ($this->compact): ?> compact<?php endif ?>"
data-icinga-multiselect-url="<?= $this->href('monitoring/services/show') ?>"
data-icinga-multiselect-controllers="<?= $this->href('monitoring/services') ?>"
data-icinga-multiselect-data="service,host">

View File

@ -31,7 +31,7 @@ $history->limit($limit * $page);
<p><?= $this->translate('No historical events found matching the filter.') ?></p>
</div>
<?php return; endif ?>
<table data-base-target="_next"<?php if (isset($tableCssClass)): ?> class="<?=$tableCssClass ?>"<?php endif ?>>
<table class="state-table" data-base-target="_next"<?php if (isset($tableCssClass)): ?> class="<?=$tableCssClass ?>"<?php endif ?>>
<tbody>
<?php foreach ($history->peekAhead() as $event):
$icon = '';

View File

@ -2,7 +2,7 @@
use Icinga\Module\Monitoring\Object\Host;
/** @var Host $object */
?>
<table>
<table class="state-table">
<tr>
<td class="state-col state-<?= Host::getStateText($object->host_state) ?><?= $object->host_handled ? ' handled' : '' ?>">
<div class="state-header"><?= Host::getStateText($object->host_state, true) ?></div>

View File

@ -3,7 +3,7 @@ use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
?>
<table>
<table class="state-table">
<tr>
<td class="state-col state-<?= Host::getStateText($object->host_state) ?><?= $object->host_handled ? ' handled' : '' ?>">
<div class="state-label"><?= Host::getStateText($object->host_state, true) ?></div>

View File

@ -4,19 +4,17 @@
<?= $this->translate('Check Source') ?>
</th>
<td>
<p>
<?php if ($object->is_reachable !== null) {
if ((bool) $object->is_reachable) {
echo $this->icon('circle', $this->translate('Is reachable'), array('class' => 'fg-color-ok'));
} else {
echo $this->icon('circle', $this->translate('Not reachable'), array('class' => 'fg-color-critical'));
}
} ?>
<?= $this->escape($object->check_source) ?>
<?php if ($object->is_reachable !== null): ?>
<span class="check-source-meta"><?= (bool) $object->is_reachable ? $this->translate('is reachable') : $this->translate('is not reachable') ?></span>
<?php endif ?>
</p>
<?php if ($object->is_reachable !== null) {
if ((bool) $object->is_reachable) {
echo $this->icon('circle', $this->translate('Is reachable'), array('class' => 'fg-color-ok'));
} else {
echo $this->icon('circle', $this->translate('Not reachable'), array('class' => 'fg-color-critical'));
}
} ?>
<?= $this->escape($object->check_source) ?>
<?php if ($object->is_reachable !== null): ?>
<span class="check-source-meta"><?= (bool) $object->is_reachable ? $this->translate('is reachable') : $this->translate('is not reachable') ?></span>
<?php endif ?>
</td>
</tr>
<?php endif ?>