diff --git a/modules/monitoring/application/controllers/HostsController.php b/modules/monitoring/application/controllers/HostsController.php index ac55ade9b..78c8eaa7e 100644 --- a/modules/monitoring/application/controllers/HostsController.php +++ b/modules/monitoring/application/controllers/HostsController.php @@ -54,6 +54,7 @@ class Monitoring_HostsController extends Controller { $this->hostList->setColumns(array( 'host_icon_image', + 'host_icon_image_alt', 'host_name', 'host_state', 'host_problem', @@ -96,6 +97,7 @@ class Monitoring_HostsController extends Controller $this->view->checkNowForm = $checkNowForm; $this->hostList->setColumns(array( 'host_icon_image', + 'host_icon_image_alt', 'host_name', 'host_state', 'host_problem', diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 92c42d4ad..6b864be24 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -70,6 +70,7 @@ class Monitoring_ListController extends Controller $this->setAutorefreshInterval(10); $query = $this->backend->select()->from('hostStatus', array_merge(array( 'host_icon_image', + 'host_icon_image_alt', 'host_name', 'host_display_name', 'host_state' => $stateColumn, @@ -162,6 +163,7 @@ class Monitoring_ListController extends Controller 'service_attempt', 'service_last_state_change' => $stateChangeColumn, 'service_icon_image', + 'service_icon_image_alt', 'service_is_flapping', 'service_state_type', 'service_handled', diff --git a/modules/monitoring/application/controllers/ServicesController.php b/modules/monitoring/application/controllers/ServicesController.php index 6877aca02..1a8ec9a58 100644 --- a/modules/monitoring/application/controllers/ServicesController.php +++ b/modules/monitoring/application/controllers/ServicesController.php @@ -51,12 +51,14 @@ class Monitoring_ServicesController extends Controller { $this->serviceList->setColumns(array( 'host_icon_image', + 'host_icon_image_alt', 'host_name', 'host_output', 'host_state', 'host_problem', 'host_handled', 'service_icon_image', + 'service_icon_image_alt', 'service_description', 'service_state', 'service_problem', @@ -96,12 +98,14 @@ class Monitoring_ServicesController extends Controller $this->view->checkNowForm = $checkNowForm; $this->serviceList->setColumns(array( 'host_icon_image', + 'host_icon_image_alt', 'host_name', 'host_output', 'host_state', 'host_problem', 'host_handled', 'service_icon_image', + 'service_icon_image_alt', 'service_output', 'service_description', 'service_state', diff --git a/modules/monitoring/application/views/helpers/IconImage.php b/modules/monitoring/application/views/helpers/IconImage.php index 2ed3b1d25..416a4f335 100644 --- a/modules/monitoring/application/views/helpers/IconImage.php +++ b/modules/monitoring/application/views/helpers/IconImage.php @@ -25,7 +25,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($this->view->resolveMacros($object->host_icon_image, $object)); + return $this->view->img( + 'img/icons/' . $this->view->resolveMacros($object->host_icon_image, $object), + null, + array( + 'alt' => $object->host_icon_image_alt, + 'title' => $object->host_icon_image_alt + ) + ); } return ''; } @@ -39,7 +46,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($this->view->resolveMacros($object->service_icon_image, $object)); + return $this->view->img( + 'img/icons/' . $this->view->resolveMacros($object->service_icon_image, $object), + null, + array( + 'alt' => $object->service_icon_image_alt, + 'title' => $object->service_icon_image_alt + ) + ); } return ''; } diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php index 17a12259e..14ffb438b 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php @@ -41,6 +41,7 @@ class StatusQuery extends IdoQuery 'host_address' => 'h.address', 'host_ipv4' => 'INET_ATON(h.address)', 'host_icon_image' => 'h.icon_image', + 'host_icon_image_alt' => 'h.icon_image_alt', 'host_action_url' => 'h.action_url', 'host_notes_url' => 'h.notes_url' ), @@ -176,6 +177,7 @@ class StatusQuery extends IdoQuery 'service_description' => 'so.name2', 'service_display_name' => 's.display_name', 'service_icon_image' => 's.icon_image', + 'service_icon_image_alt' => 's.icon_image_alt', 'service_action_url' => 's.action_url', 'service_notes_url' => 's.notes_url', 'object_type' => '(\'service\')' diff --git a/modules/monitoring/library/Monitoring/DataView/ServiceStatus.php b/modules/monitoring/library/Monitoring/DataView/ServiceStatus.php index b4f1038da..18bf1aa80 100644 --- a/modules/monitoring/library/Monitoring/DataView/ServiceStatus.php +++ b/modules/monitoring/library/Monitoring/DataView/ServiceStatus.php @@ -40,7 +40,6 @@ class ServiceStatus extends DataView 'service_unhandled', 'service_output', 'service_last_state_change', - 'service_icon_image', 'service_long_output', 'service_is_flapping', 'service_state_type', @@ -60,7 +59,6 @@ class ServiceStatus extends DataView 'service_last_notification', 'service_check_command', 'service_current_notification_number', - 'host_icon_image', 'host_acknowledged', 'host_output', 'host_long_output', diff --git a/modules/monitoring/library/Monitoring/Object/Host.php b/modules/monitoring/library/Monitoring/Object/Host.php index 2c01fe0eb..a158625b5 100644 --- a/modules/monitoring/library/Monitoring/Object/Host.php +++ b/modules/monitoring/library/Monitoring/Object/Host.php @@ -90,6 +90,7 @@ class Host extends MonitoredObject { $columns = array( 'host_icon_image', + 'host_icon_image_alt', 'host_acknowledged', 'host_action_url', 'host_active_checks_enabled', diff --git a/modules/monitoring/library/Monitoring/Object/Service.php b/modules/monitoring/library/Monitoring/Object/Service.php index fec5de238..0e8c975f2 100644 --- a/modules/monitoring/library/Monitoring/Object/Service.php +++ b/modules/monitoring/library/Monitoring/Object/Service.php @@ -107,6 +107,7 @@ class Service extends MonitoredObject { return $this->backend->select()->from('serviceStatus', array( 'host_icon_image', + 'host_icon_image_alt', 'host_acknowledged', 'host_active_checks_enabled', 'host_address', @@ -120,6 +121,7 @@ class Service extends MonitoredObject 'host_passive_checks_enabled', 'host_state', 'service_icon_image', + 'service_icon_image_alt', 'service_acknowledged', 'service_action_url', 'service_active_checks_enabled',