Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(UI): correct comments date in host and svc detail pages (#7194)
Browse files Browse the repository at this point in the history
  • Loading branch information
sc979 committed Feb 15, 2019
1 parent ee908a9 commit d3ed46f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions www/include/monitoring/objectDetails/hostDetails.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2005-2015 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -352,7 +352,7 @@
* Get comments for hosts
*/
$tabCommentHosts = array();
$rq2 = " SELECT FROM_UNIXTIME(cmt.entry_time) as comment_time, cmt.comment_id, cmt.author AS author_name,
$rq2 = " SELECT cmt.entry_time as comment_time, cmt.comment_id, cmt.author AS author_name,
cmt.data AS comment_data, cmt.persistent AS is_persistent, h.name AS host_name " .
" FROM comments cmt, hosts h " .
" WHERE cmt.host_id = '" . $host_id . "'
Expand Down
6 changes: 3 additions & 3 deletions www/include/monitoring/objectDetails/serviceDetails.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2005-2015 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -291,7 +291,7 @@
*/
$tabCommentServices = array();
if (isset($host_id) && isset($service_id)) {
$rq2 = " SELECT DISTINCT FROM_UNIXTIME(cmt.entry_time) as entry_time, cmt.comment_id, " .
$rq2 = " SELECT DISTINCT cmt.entry_time as entry_time, cmt.comment_id, " .
"cmt.author AS author_name, cmt.data AS comment_data, cmt.persistent AS is_persistent, " .
"h.name AS host_name, s.description AS service_description " .
" FROM comments cmt, hosts h, services s " .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,15 @@
<table class="ListTable">
<tr class='list_lvl_1'>
<td class="ListColHeaderCenter FormHeader">{$cmt_host_name}</td>
<td class="ListColHeaderCenter FormHeader" width="120">{$cmt_entry_time}</td>
<td class="ListColHeaderCenter FormHeader" width="180">{$cmt_entry_time}</td>
<td class="ListColHeaderCenter FormHeader" width="120">{$cmt_author}</td>
<td class="ListColHeaderCenter FormHeader">{$cmt_comment}</td>
<td class="ListColHeaderCenter FormHeader" width="50">{$cmt_persistent}</td>
</tr>
{foreach item=tch from=$tab_comments_host}
<tr class={cycle values="list_two, list_one"}>
<td class="ListColLeft">{$tch.host_name}</td>
<td class="ListColRight">{$tch.comment_time}</td>
<td class="ListColRight isTimestamp">{$tch.comment_time}</td>
<td class="ListColCenter">{$tch.author_name}</td>
<td class="ListColLeft containsURI">{$tch.comment_data}</td>
<td class="ListColCenter">{$tch.is_persistent}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@
<tr class={cycle values="list_two, list_one"}>
<td class="ListColLeft ColPopup" width="120">{$tcs.host_name}</td>
<td class="ListColLeft ColPopup" width="120">{$tcs.service_description}</td>
<td class="ListColRight" width="150" style="white-space:nowrap;">{$tcs.entry_time}</td>
<td class="ListColRight isTimestamp" width="150" style="white-space:nowrap;">{$tcs.entry_time}</td>
<td class="ListColCenter" width="100">{$tcs.author_name}</td>
<td class="ListColNoWrap containsURI">{$tcs.comment_data}</td>
<td class="ListColCenter" width="50">{$tcs.is_persistent}</td>
Expand Down

0 comments on commit d3ed46f

Please sign in to comment.