From 8e7d1dd8f62da9f31a2d754022c607b577c04953 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 28 Mar 2014 15:25:23 +0100 Subject: [PATCH] Improve timeline style refs #4190 --- .../application/controllers/TimelineController.php | 2 +- .../application/views/scripts/timeline/index.phtml | 5 +++-- public/css/icinga/monitoring-colors.less | 14 ++++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/monitoring/application/controllers/TimelineController.php b/modules/monitoring/application/controllers/TimelineController.php index 7bebb6d82..3915a4ecd 100644 --- a/modules/monitoring/application/controllers/TimelineController.php +++ b/modules/monitoring/application/controllers/TimelineController.php @@ -63,7 +63,7 @@ class Monitoring_TimelineController extends ActionController ) ); $timeline->setMaximumCircleWidth('6em'); - $timeline->setMinimumCircleWidth('0.15em'); + $timeline->setMinimumCircleWidth('0.3em'); $timeline->setDisplayRange($displayRange); $timeline->setForecastRange($forecastRange); $timeline->setSession($this->getWindowSession('timeline', $this->getRequest()->getParam('extend') != 1)); diff --git a/modules/monitoring/application/views/scripts/timeline/index.phtml b/modules/monitoring/application/views/scripts/timeline/index.phtml index 9c561031f..c5e57007f 100644 --- a/modules/monitoring/application/views/scripts/timeline/index.phtml +++ b/modules/monitoring/application/views/scripts/timeline/index.phtml @@ -44,9 +44,10 @@ $extrapolatedCircleWidth = $timeline->getExtrapolatedCircleWidth($timeInfo[1][$g getColor(), 0.25), + '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.7), ((float) substr($extrapolatedCircleWidth, 0, -2) / 2) . 'em', + $timeInfo[1][$groupName]->getColor(), $extrapolatedCircleWidth ); ?> diff --git a/public/css/icinga/monitoring-colors.less b/public/css/icinga/monitoring-colors.less index 4728832b0..8f20544cd 100644 --- a/public/css/icinga/monitoring-colors.less +++ b/public/css/icinga/monitoring-colors.less @@ -664,6 +664,7 @@ table.timeline { clear: left; th { + width: 8em; padding-right: 1.5em; a { @@ -694,11 +695,13 @@ table.timeline { &.extrapolated { // width: inline-style; // height: inline-style; - top: 49%; // Compensate border - left: 49%; // Compensate border + top: 48%; // Compensate border + left: 48%; // Compensate border // margin-top: inline-style; // margin-left: inline-style; - border: 1px dashed #666; + border-width: 2px; + border-style: dotted; + //border-color: inline-style; border-radius: 100%; // background-color: inline-style; } @@ -708,11 +711,10 @@ table.timeline { // height: inline-style; display: block; position: absolute; - top: 49%; // Compensate border - left: 49%; // Compensate border + top: 50%; + left: 50%; // margin-top: inline-style; // margin-left: inline-style; - border: 1px solid black; border-radius: 100%; // background-color: inline-style; }