[icinga-checkins] icinga.org: icingaweb2/bugfix/correct-duration-formatting-6778: Use `dateTimeRenderer' helper in hostgroups list view

git at icinga.org git at icinga.org
Thu Nov 27 18:29:30 CET 2014


Module: icingaweb2
Branch: bugfix/correct-duration-formatting-6778
Commit: 86d36c1024855d9b4a1188649cb04508ae225b56
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=86d36c1024855d9b4a1188649cb04508ae225b56

Author: Alexander Klimov <alexander.klimov at netways.de>
Date:   Thu Nov 27 13:59:12 2014 +0100

Use `dateTimeRenderer' helper in hostgroups list view

refs #6778

---

 .../monitoring/application/views/scripts/list/hostgroups.phtml   |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/monitoring/application/views/scripts/list/hostgroups.phtml b/modules/monitoring/application/views/scripts/list/hostgroups.phtml
index 6a8eb15..4b16092 100644
--- a/modules/monitoring/application/views/scripts/list/hostgroups.phtml
+++ b/modules/monitoring/application/views/scripts/list/hostgroups.phtml
@@ -46,7 +46,11 @@
         <td class="state change <?= $state . $combinations[2] ?>">
           <strong><?= $combinations[3] ?></strong>
           <br>
-          <?= $this->prefixedTimeSince($time) ?>
+          <?= $this->dateTimeRenderer($time)->render(
+              $this->translate('since %s', 'datetime'),
+              $this->translate('since %s', 'time'),
+              $this->translate('for %s', 'timespan')
+          ) ?>
         </td>
                <?php
                break;



More information about the icinga-checkins mailing list