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">
<h2><?= $groupInfo['alias']; ?></h2> <div class="box header">
<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">
<h2><?= $this->translate('Host and Service Checks'); ?></h2> <div class="box header">
<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">
<h2><?= $this->translate('Monitoring Features'); ?></h2> <div class="box header">
<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,42 +9,44 @@ $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">
<h2><?= $this->qlink( <?php if ($this->statusSummary->hosts_up): ?>
sprintf( <h2><?= $this->qlink(
$this->translatePlural('%u Host UP', '%u Hosts UP', $this->statusSummary->hosts_up), sprintf(
$this->statusSummary->hosts_up $this->translatePlural('%u Host UP', '%u Hosts UP', $this->statusSummary->hosts_up),
),
'monitoring/list/hosts',
array('host_state' => 0),
array('title' => sprintf(
$this->translatePlural(
'List %u host that is currently in state UP',
'List %u hosts which are currently in state UP',
$this->statusSummary->hosts_up $this->statusSummary->hosts_up
), ),
$this->statusSummary->hosts_up 'monitoring/list/hosts',
)) array('host_state' => 0),
); ?></h2> array('title' => sprintf(
<?php endif ?> $this->translatePlural(
<?php if ($this->statusSummary->hosts_pending): ?> 'List %u host that is currently in state UP',
<h2><?= $this->qlink( 'List %u hosts which are currently in state UP',
sprintf( $this->statusSummary->hosts_up
$this->translatePlural('%u Host PENDING', '%u Hosts PENDING', $this->statusSummary->hosts_pending), ),
$this->statusSummary->hosts_pending $this->statusSummary->hosts_up
), ))
'monitoring/list/hosts', ); ?></h2>
array('host_state' => 99), <?php endif ?>
array('title' => sprintf( <?php if ($this->statusSummary->hosts_pending): ?>
$this->translatePlural( <h2><?= $this->qlink(
'List %u host that is currently in state PENDING', sprintf(
'List %u hosts which are currently in state PENDING', $this->translatePlural('%u Host PENDING', '%u Hosts PENDING', $this->statusSummary->hosts_pending),
$this->statusSummary->hosts_pending $this->statusSummary->hosts_pending
), ),
$this->statusSummary->hosts_pending 'monitoring/list/hosts',
)) array('host_state' => 99),
); ?></h2> array('title' => sprintf(
<?php endif ?> $this->translatePlural(
'List %u host that is currently in state PENDING',
'List %u hosts which are currently in state PENDING',
$this->statusSummary->hosts_pending
),
$this->statusSummary->hosts_pending
))
); ?></h2>
<?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,46 +4,48 @@
echo ' handled'; echo ' handled';
} }
?>"> ?>">
<?php if ($this->statusSummary->hosts_down): ?> <div class="box header">
<h2><?= $this->qlink( <?php if ($this->statusSummary->hosts_down): ?>
sprintf( <h2><?= $this->qlink(
$this->translatePlural('%u Host DOWN', '%u Hosts DOWN', $this->statusSummary->hosts_down), sprintf(
$this->statusSummary->hosts_down $this->translatePlural('%u Host DOWN', '%u Hosts DOWN', $this->statusSummary->hosts_down),
),
'monitoring/list/hosts',
array('host_state' => 1),
array('title' => sprintf(
$this->translatePlural(
'List %u host that is currently in state DOWN',
'List %u hosts which are currently in state DOWN',
$this->statusSummary->hosts_down $this->statusSummary->hosts_down
), ),
$this->statusSummary->hosts_down 'monitoring/list/hosts',
)) array('host_state' => 1),
); ?></h2> array('title' => sprintf(
<?php endif ?> $this->translatePlural(
<?php if ($this->statusSummary->hosts_unreachable): ?> 'List %u host that is currently in state DOWN',
<h2><?= $this->qlink( 'List %u hosts which are currently in state DOWN',
sprintf( $this->statusSummary->hosts_down
$this->translatePlural( ),
'%u Host UNREACHABLE', $this->statusSummary->hosts_down
'%u Hosts UNREACHABLE', ))
); ?></h2>
<?php endif ?>
<?php if ($this->statusSummary->hosts_unreachable): ?>
<h2><?= $this->qlink(
sprintf(
$this->translatePlural(
'%u Host UNREACHABLE',
'%u Hosts UNREACHABLE',
$this->statusSummary->hosts_unreachable
),
$this->statusSummary->hosts_unreachable $this->statusSummary->hosts_unreachable
), ),
$this->statusSummary->hosts_unreachable 'monitoring/list/hosts',
), array('host_state' => 2),
'monitoring/list/hosts', array('title' => sprintf(
array('host_state' => 2), $this->translatePlural(
array('title' => sprintf( 'List %u host that is currently in state UNREACHABLE',
$this->translatePlural( 'List %u hosts which are currently in state UNREACHABLE',
'List %u host that is currently in state UNREACHABLE', $this->statusSummary->hosts_unreachable
'List %u hosts which are currently in state UNREACHABLE', ),
$this->statusSummary->hosts_unreachable $this->statusSummary->hosts_unreachable
), ))
$this->statusSummary->hosts_unreachable ); ?></h2>
)) <?php endif ?>
); ?></h2> </div>
<?php endif ?>
<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 */