From dc0359f5b244324e45b38cdf7c97882952e11fc3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Sat, 27 Feb 2016 21:57:02 +0100 Subject: [PATCH] Fix icon_image size and provide a CSS class for theming fixes #11032 --- .../application/views/helpers/IconImage.php | 18 ++++++++++-------- modules/monitoring/public/css/tables.less | 7 +++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/application/views/helpers/IconImage.php b/modules/monitoring/application/views/helpers/IconImage.php index a9437156e..3fee8e3a7 100644 --- a/modules/monitoring/application/views/helpers/IconImage.php +++ b/modules/monitoring/application/views/helpers/IconImage.php @@ -27,13 +27,14 @@ class Zend_View_Helper_IconImage extends Zend_View_Helper_Abstract public function host($object) { if ($object->host_icon_image && ! preg_match('/[\'"]/', $object->host_icon_image)) { - return $this->view->icon( + return $this->view->img( Macro::resolveMacros($object->host_icon_image, $object), null, array( - 'alt' => $object->host_icon_image_alt, - 'title' => $object->host_icon_image_alt, - 'data-tooltip-delay' => 0 + 'alt' => $object->host_icon_image_alt, + 'data-tooltip-delay' => 0, + 'class' => 'host-icon-image', + 'title' => $object->host_icon_image_alt ) ); } @@ -49,13 +50,14 @@ class Zend_View_Helper_IconImage extends Zend_View_Helper_Abstract public function service($object) { if ($object->service_icon_image && ! preg_match('/[\'"]/', $object->service_icon_image)) { - return $this->view->icon( + return $this->view->img( Macro::resolveMacros($object->service_icon_image, $object), null, array( - 'alt' => $object->service_icon_image_alt, - 'title' => $object->service_icon_image_alt, - 'data-tooltip-delay' => 0 + 'alt' => $object->service_icon_image_alt, + 'class' => 'service-icon-image', + 'data-tooltip-delay' => 0, + 'title' => $object->service_icon_image_alt ) ); } diff --git a/modules/monitoring/public/css/tables.less b/modules/monitoring/public/css/tables.less index bb2027c95..276f9f130 100644 --- a/modules/monitoring/public/css/tables.less +++ b/modules/monitoring/public/css/tables.less @@ -2,6 +2,13 @@ @border-left-width: 6px; +// Icon images in list and detail views +.host-icon-image, +.service-icon-image { + max-width: 2em; + vertical-align: middle; +} + // Check source reachable information in the host and service detail views .check-source-meta { font-size: @font-size-small;