[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaHostServiceTable: allow to override title

git at icinga.org git at icinga.org
Thu Jun 16 15:09:52 CEST 2016


Module: icingaweb2-module-director
Branch: master
Commit: c521f1439a58034b54245d70791face6d8376bec
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=c521f1439a58034b54245d70791face6d8376bec

Author: Thomas Gelf <thomas at gelf.net>
Date:   Thu Jun 16 14:50:24 2016 +0200

IcingaHostServiceTable: allow to override title

---

 application/tables/IcingaHostServiceTable.php |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/application/tables/IcingaHostServiceTable.php b/application/tables/IcingaHostServiceTable.php
index 1f68633..3ff80fa 100644
--- a/application/tables/IcingaHostServiceTable.php
+++ b/application/tables/IcingaHostServiceTable.php
@@ -7,6 +7,8 @@ use Icinga\Module\Director\Web\Table\QuickTable;
 
 class IcingaHostServiceTable extends QuickTable
 {
+    protected $title;
+
     protected $host;
 
     protected $searchColumns = array(
@@ -24,6 +26,12 @@ class IcingaHostServiceTable extends QuickTable
         );
     }
 
+    public function setTitle($title)
+    {
+        $this->title = $title;
+        return $this;
+    }
+
     public function setHost(IcingaHost $host)
     {
         $this->host = $host;
@@ -48,7 +56,7 @@ class IcingaHostServiceTable extends QuickTable
     {
         $view = $this->view();
         return array(
-            'service' => $view->translate('Servicename'),
+            'service' => $this->title ?: $view->translate('Servicename'),
         );
     }
 



More information about the icinga-checkins mailing list