Improve the look of boxview headings

This commit is contained in:
Johannes Meyer 2015-06-19 15:12:08 +02:00
parent 5166ede38f
commit 44e7fcf295
6 changed files with 96 additions and 86 deletions

View File

@ -18,10 +18,12 @@ if (count($groupData) === 0) {
<div class="boxview" data-base-target="_next"> <div class="boxview" data-base-target="_next">
<?php foreach ($groupData as $groupName => $groupInfo): ?> <?php foreach ($groupData as $groupName => $groupInfo): ?>
<div class="box contactgroup"> <div class="box contactgroup">
<div class="box header">
<h2><?= $groupInfo['alias']; ?></h2> <h2><?= $groupInfo['alias']; ?></h2>
<?php if ($groupInfo['alias'] !== $groupName): ?> <?php if ($groupInfo['alias'] !== $groupName): ?>
<h2><?= $groupName; ?></h2> <h2><?= $groupName; ?></h2>
<?php endif ?> <?php endif ?>
</div>
<div class="box contents"> <div class="box contents">
<?php foreach ($groupInfo['contacts'] as $c): ?> <?php foreach ($groupInfo['contacts'] as $c): ?>
<div class="box entry"> <div class="box entry">

View File

@ -1,5 +1,7 @@
<div class="box hostservicechecks"> <div class="box hostservicechecks">
<div class="box header">
<h2><?= $this->translate('Host and Service Checks'); ?></h2> <h2><?= $this->translate('Host and Service Checks'); ?></h2>
</div>
<div class="box contents"> <div class="box contents">
<table> <table>
<thead> <thead>

View File

@ -1,5 +1,7 @@
<div class="box monitoringfeatures"> <div class="box monitoringfeatures">
<div class="box header">
<h2><?= $this->translate('Monitoring Features'); ?></h2> <h2><?= $this->translate('Monitoring Features'); ?></h2>
</div>
<div class="box contents"> <div class="box contents">
<?php if ($this->statusSummary->hosts_without_flap_detection || $this->statusSummary->services_without_flap_detection || <?php if ($this->statusSummary->hosts_without_flap_detection || $this->statusSummary->services_without_flap_detection ||
$this->statusSummary->hosts_flapping || $this->statusSummary->services_flapping): ?> $this->statusSummary->hosts_flapping || $this->statusSummary->services_flapping): ?>

View File

@ -9,7 +9,8 @@ $service_problems = (
); );
?> ?>
<div class="box ok_hosts state_<?= $this->statusSummary->hosts_up ? 'up' : 'pending'; ?>"> <div class="box ok_hosts state_<?= $this->statusSummary->hosts_up ? 'up' : 'pending'; ?>">
<?php if ($this->statusSummary->hosts_up): ?> <div class="box header">
<?php if ($this->statusSummary->hosts_up): ?>
<h2><?= $this->qlink( <h2><?= $this->qlink(
sprintf( sprintf(
$this->translatePlural('%u Host UP', '%u Hosts UP', $this->statusSummary->hosts_up), $this->translatePlural('%u Host UP', '%u Hosts UP', $this->statusSummary->hosts_up),
@ -26,8 +27,8 @@ $service_problems = (
$this->statusSummary->hosts_up $this->statusSummary->hosts_up
)) ))
); ?></h2> ); ?></h2>
<?php endif ?> <?php endif ?>
<?php if ($this->statusSummary->hosts_pending): ?> <?php if ($this->statusSummary->hosts_pending): ?>
<h2><?= $this->qlink( <h2><?= $this->qlink(
sprintf( sprintf(
$this->translatePlural('%u Host PENDING', '%u Hosts PENDING', $this->statusSummary->hosts_pending), $this->translatePlural('%u Host PENDING', '%u Hosts PENDING', $this->statusSummary->hosts_pending),
@ -44,7 +45,8 @@ $service_problems = (
$this->statusSummary->hosts_pending $this->statusSummary->hosts_pending
)) ))
); ?></h2> ); ?></h2>
<?php endif ?> <?php endif ?>
</div>
<?php if ($service_problems || $this->statusSummary->hosts_down || $this->statusSummary->hosts_unreachable): ?> <?php if ($service_problems || $this->statusSummary->hosts_down || $this->statusSummary->hosts_unreachable): ?>
<div class="box contents"> <div class="box contents">
<strong><?= $this->translate('Services'); ?></strong> <strong><?= $this->translate('Services'); ?></strong>

View File

@ -4,7 +4,8 @@
echo ' handled'; echo ' handled';
} }
?>"> ?>">
<?php if ($this->statusSummary->hosts_down): ?> <div class="box header">
<?php if ($this->statusSummary->hosts_down): ?>
<h2><?= $this->qlink( <h2><?= $this->qlink(
sprintf( sprintf(
$this->translatePlural('%u Host DOWN', '%u Hosts DOWN', $this->statusSummary->hosts_down), $this->translatePlural('%u Host DOWN', '%u Hosts DOWN', $this->statusSummary->hosts_down),
@ -21,8 +22,8 @@
$this->statusSummary->hosts_down $this->statusSummary->hosts_down
)) ))
); ?></h2> ); ?></h2>
<?php endif ?> <?php endif ?>
<?php if ($this->statusSummary->hosts_unreachable): ?> <?php if ($this->statusSummary->hosts_unreachable): ?>
<h2><?= $this->qlink( <h2><?= $this->qlink(
sprintf( sprintf(
$this->translatePlural( $this->translatePlural(
@ -43,7 +44,8 @@
$this->statusSummary->hosts_unreachable $this->statusSummary->hosts_unreachable
)) ))
); ?></h2> ); ?></h2>
<?php endif ?> <?php endif ?>
</div>
<div class="box contents"> <div class="box contents">
<strong><?= $this->translate('Services'); ?></strong> <strong><?= $this->translate('Services'); ?></strong>
<?= $this->partial( <?= $this->partial(

View File

@ -531,39 +531,39 @@ a.critical {
background: #eee; background: #eee;
} }
/* Box caption */ /* Box header */
.boxview div.box h2 { .boxview div.box.header {
margin-top: 0; padding-bottom: 0.5em;
margin-bottom: 0.6em; margin-bottom: 0.5em;
border-bottom: 1px solid #888;
}
.boxview div.box.header h2 {
margin-top: 0.1em;
margin-bottom: 0;
font-size: 0.8em; font-size: 0.8em;
border-bottom: none;
color: @colorTextDefault; color: @colorTextDefault;
} }
.boxview div.box h2:first-child { .boxview div.box.header h2:first-child {
margin-top: 0.2em; margin-top: 0.2em;
padding-bottom: 0.5em;
font-size: inherit; font-size: inherit;
color: @colorTextDefault; color: @colorTextDefault;
border-bottom: 1px solid #d9d9d9;
} }
.boxview div.box h2 > a { .boxview div.box.header h2 > a {
color: inherit; color: inherit;
margin-bottom: 0.2em;
} }
.boxview div.box h2 > a:hover { .boxview div.box.header h2 > a:hover {
text-decoration: underline; text-decoration: underline;
} }
.boxview div.box h2:first-child > a:hover { .boxview div.box.header h3 {
}
.boxview div.box h3 {
line-height: 1.5em; line-height: 1.5em;
font-size: 0.9em; font-size: 0.9em;
color: #555; color: #555;
border-bottom: 1px solid #d9d9d9;
} }
/* Box body of contents */ /* Box body of contents */