[icinga-checkins] icinga.org: icingaweb2/feature/responsive-perfdata-table: PerfData: Add respective classes to column elements

git at icinga.org git at icinga.org
Mon Jun 6 13:57:48 CEST 2016


Module: icingaweb2
Branch: feature/responsive-perfdata-table
Commit: 9c123a808b986b6eda888ef4c7d483f75368dfd6
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=9c123a808b986b6eda888ef4c7d483f75368dfd6

Author: Florian Strohmaier <florian.strohmaier at netways.de>
Date:   Mon Jun  6 13:44:14 2016 +0200

PerfData: Add respective classes to column elements

---

 modules/monitoring/application/views/helpers/Perfdata.php |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/monitoring/application/views/helpers/Perfdata.php b/modules/monitoring/application/views/helpers/Perfdata.php
index 6b91138..585f58c 100644
--- a/modules/monitoring/application/views/helpers/Perfdata.php
+++ b/modules/monitoring/application/views/helpers/Perfdata.php
@@ -78,14 +78,15 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract
                             continue;
                         }
                         $text = $this->view->escape(empty($value) ? '-' : $value);
-                        $data []= sprintf(
-                            '<span title="%s">%s</span>',
+                        $data[] = sprintf(
+                            '</td><td class="%s-col"><span title="%s">%s</span>',
+                            $column,
                             $text,
                             $text
                         );
                     }
                 }
-                $table []= '<tr><td class="sparkline-col">' . implode('</td><td>', $data) . '</td></tr>';
+                $table []= '<tr><td class="sparkline-col">' . implode($data) . '</td></tr>';
             }
         }
         $table[] = '</tbody>';



More information about the icinga-checkins mailing list