From 40611659edacf6f5fe4232494990461c4209aa29 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Mon, 8 Sep 2014 16:23:14 +0200 Subject: [PATCH] Fix disappearing tooltips on SVG reload Use a unified linebreak in the chart controller, so the tooltip handling will recognize the titles as identical --- library/Icinga/Chart/Graph/Tooltip.php | 2 +- .../monitoring/application/controllers/ChartController.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Chart/Graph/Tooltip.php b/library/Icinga/Chart/Graph/Tooltip.php index b630c7c61..4457e04e2 100644 --- a/library/Icinga/Chart/Graph/Tooltip.php +++ b/library/Icinga/Chart/Graph/Tooltip.php @@ -67,7 +67,7 @@ class Tooltip */ public function __construct ( $data = array(), - $format = '{title}
{value} of {sum} {label}' + $format = '{title}
{value} of {sum} {label}' ) { $this->data = array_merge($this->data, $data); $this->defaultFormat = $format; diff --git a/modules/monitoring/application/controllers/ChartController.php b/modules/monitoring/application/controllers/ChartController.php index 8cf6f8bd4..bc31a90f9 100644 --- a/modules/monitoring/application/controllers/ChartController.php +++ b/modules/monitoring/application/controllers/ChartController.php @@ -154,7 +154,7 @@ class Monitoring_ChartController extends Controller ->setXAxis(new \Icinga\Chart\Unit\StaticAxis()) ->setAxisMin(null, 0); - $tooltip = t('{title}:
{value} of {sum} services are {label}'); + $tooltip = t('{title}:
{value} of {sum} services are {label}'); $this->view->chart->drawBars( array( 'label' => t('Ok'), @@ -206,7 +206,7 @@ class Monitoring_ChartController extends Controller $hostgroup->hosts_unreachable_unhandled ); } - $tooltip = t('{title}:
{value} of {sum} hosts are {label}'); + $tooltip = t('{title}:
{value} of {sum} hosts are {label}'); $this->view->chart = new GridChart(); $this->view->chart->alignTopLeft(); $this->view->chart->setAxisLabel('', t('Hosts'))