Improve timeline style

refs #4190
This commit is contained in:
Johannes Meyer 2014-03-28 15:25:23 +01:00
parent 6d8199e7df
commit 8e7d1dd8f6
3 changed files with 12 additions and 9 deletions

View File

@ -63,7 +63,7 @@ class Monitoring_TimelineController extends ActionController
) )
); );
$timeline->setMaximumCircleWidth('6em'); $timeline->setMaximumCircleWidth('6em');
$timeline->setMinimumCircleWidth('0.15em'); $timeline->setMinimumCircleWidth('0.3em');
$timeline->setDisplayRange($displayRange); $timeline->setDisplayRange($displayRange);
$timeline->setForecastRange($forecastRange); $timeline->setForecastRange($forecastRange);
$timeline->setSession($this->getWindowSession('timeline', $this->getRequest()->getParam('extend') != 1)); $timeline->setSession($this->getWindowSession('timeline', $this->getRequest()->getParam('extend') != 1));

View File

@ -44,9 +44,10 @@ $extrapolatedCircleWidth = $timeline->getExtrapolatedCircleWidth($timeInfo[1][$g
<?php if ($firstRow && $extrapolatedCircleWidth !== $circleWidth): ?> <?php if ($firstRow && $extrapolatedCircleWidth !== $circleWidth): ?>
<?php <?php
$inlineStyle = sprintf( $inlineStyle = sprintf(
'width: %3$s; height: %3$s; background-color: %1$s; margin-top: -%2$s; margin-left: -%2$s;', 'width: %4$s; height: %4$s; margin-top: -%2$s; margin-left: -%2$s; border-color: %3$s; background-color: %1$s;',
Color::changeBrightness($timeInfo[1][$groupName]->getColor(), 0.25), Color::changeBrightness($timeInfo[1][$groupName]->getColor(), 0.7),
((float) substr($extrapolatedCircleWidth, 0, -2) / 2) . 'em', ((float) substr($extrapolatedCircleWidth, 0, -2) / 2) . 'em',
$timeInfo[1][$groupName]->getColor(),
$extrapolatedCircleWidth $extrapolatedCircleWidth
); );
?> ?>

View File

@ -664,6 +664,7 @@ table.timeline {
clear: left; clear: left;
th { th {
width: 8em;
padding-right: 1.5em; padding-right: 1.5em;
a { a {
@ -694,11 +695,13 @@ table.timeline {
&.extrapolated { &.extrapolated {
// width: inline-style; // width: inline-style;
// height: inline-style; // height: inline-style;
top: 49%; // Compensate border top: 48%; // Compensate border
left: 49%; // Compensate border left: 48%; // Compensate border
// margin-top: inline-style; // margin-top: inline-style;
// margin-left: inline-style; // margin-left: inline-style;
border: 1px dashed #666; border-width: 2px;
border-style: dotted;
//border-color: inline-style;
border-radius: 100%; border-radius: 100%;
// background-color: inline-style; // background-color: inline-style;
} }
@ -708,11 +711,10 @@ table.timeline {
// height: inline-style; // height: inline-style;
display: block; display: block;
position: absolute; position: absolute;
top: 49%; // Compensate border top: 50%;
left: 49%; // Compensate border left: 50%;
// margin-top: inline-style; // margin-top: inline-style;
// margin-left: inline-style; // margin-left: inline-style;
border: 1px solid black;
border-radius: 100%; border-radius: 100%;
// background-color: inline-style; // background-color: inline-style;
} }