tinystatesummary: use h1, styling
This commit is contained in:
parent
3844087740
commit
a20fa3201d
|
@ -6,9 +6,9 @@ $selfUrl = 'monitoring/list/hosts';
|
|||
$currentUrl = Url::fromRequest()->getRelativeUrl();
|
||||
|
||||
?>
|
||||
<h3 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<?= $this->qlink(sprintf($this->translate('%s hosts:'), $this->stats->hosts_total), $selfUrl); ?>
|
||||
|
||||
<span class="badges">
|
||||
<?php if($this->stats->hosts_up): ?>
|
||||
<span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('host_state' => 0))->getRelativeUrl() ? ' active' : '' ?>">
|
||||
<?= $this->qlink(
|
||||
|
@ -80,4 +80,5 @@ $currentUrl = Url::fromRequest()->getRelativeUrl();
|
|||
) ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</h3>
|
||||
</span>
|
||||
</h1>
|
||||
|
|
|
@ -4,8 +4,9 @@ use Icinga\Web\Url;
|
|||
$selfUrl = 'monitoring/list/services';
|
||||
$currentUrl = Url::fromRequest()->getRelativeUrl();
|
||||
|
||||
?><h3 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
?><h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<?= $this->qlink(sprintf($this->translate('%s services:'), $this->stats->services_total), $selfUrl) ?>
|
||||
<span class="badges">
|
||||
<?php if ($this->stats->services_ok): ?>
|
||||
<span class="state ok<?= $currentUrl === Url::fromPath($selfUrl, array('service_state' => 0))->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$this->stats->services_ok,
|
||||
|
@ -79,5 +80,6 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
|
|||
array('title' => sprintf($this->translate('Services with state %s'), strtoupper($this->translate('pending'))))
|
||||
) ?></span>
|
||||
<?php endif ?>
|
||||
</h3>
|
||||
</span>
|
||||
</h1>
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@ $selfUrl = Url::fromPath('monitoring/show/services', array('host' => $this->obje
|
|||
$currentUrl = Url::fromRequest()->without('limit')->getRelativeUrl();
|
||||
|
||||
?>
|
||||
<h3 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||
<?php if ($object->stats->services_total > 0): ?>
|
||||
<?= $this->qlink(sprintf($this->translate('%s configured services:'), $object->stats->services_total), $selfUrl) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->translate('No services configured on this host'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="badges">
|
||||
<?php if ($object->stats->services_ok > 0): ?>
|
||||
<span class="state ok<?= $currentUrl === $selfUrl->with('service_state', 0)->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
|
||||
$object->stats->services_ok,
|
||||
|
@ -84,5 +84,6 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $
|
|||
array('title' => sprintf($this->translate('Services with state %s'), strtoupper($this->translate('pending'))))
|
||||
) ?></span>
|
||||
<?php endif ?>
|
||||
</h3>
|
||||
</span>
|
||||
</h1>
|
||||
|
||||
|
|
|
@ -92,36 +92,36 @@ div.contacts div.notification-periods {
|
|||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
h3.tinystatesummary {
|
||||
line-height: 2em;
|
||||
font-size: 0.95em;
|
||||
margin-right: 1em;
|
||||
border-bottom: 2px solid @colorPetrol;
|
||||
h1.tinystatesummary .badges {
|
||||
display: inline-block;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
h3.tinystatesummary a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
padding: 1px 3px;
|
||||
h1.tinystatesummary .state {
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
h3.tinystatesummary a:hover {
|
||||
text-decoration: underline;
|
||||
h1.tinystatesummary .state > a {
|
||||
color: white;
|
||||
font-size: 0.7em;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
h1.tinystatesummary .state.handled a {
|
||||
}
|
||||
|
||||
/* State badges */
|
||||
span.state {
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
padding: 1px 2px;
|
||||
margin-right: 5px;
|
||||
|
||||
}
|
||||
|
||||
span.state.active {
|
||||
border: 2px solid white;
|
||||
border: 2px solid #555;
|
||||
}
|
||||
|
||||
span.state span.state {
|
||||
|
|
Loading…
Reference in New Issue