[ZBX-8863] host not identified in ad-hoc graphs Created: 2014 Oct 08  Updated: 2017 May 30  Resolved: 2014 Oct 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.4.1rc1, 2.5.0
Fix Version/s: 2.4.3rc1, 2.5.0

Type: Incident report Priority: Minor
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: graphs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

open a simple graph - host is shown in the graph title.
open ad-hoc graph with items from multiple hosts - host is shown in the legend.

open ad-hoc graph with items from the same host - host is not identified in any way.

it should probably be shown in the graph title.



 Comments   
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 20 ]

In case multiple items from the same hosts are selected, we should display the title "%hostname%: Item values".

Comment by Arvids Godjuks (Inactive) [ 2014 Oct 21 ]

Fixed in dev branch svn://svn.zabbix.com/branches/dev/ZBX-8863

Comment by Arvids Godjuks (Inactive) [ 2014 Oct 21 ]

(1) No translation changes

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Oct 27 ]

(2) Issue is not fixed, graph title still displays only "Item values" without host.

arvids.godjuks RESOLVED in r50204

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Oct 27 ]

(3) Selecting items from multiple hosts, left header now displays one of the selected host names.

arvids.godjuks RESOLVED in r50204

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Nov 04 ]

(4) monitoring.history.php:
line 33: Don't use underscores in varible names, use camelCase.
line 58: Use space after elseif.
line 34: Don't use in_array. Use associative array with isset. Same thing on chart.php: 68
line 32: Variable holds only host names, so it should be named $hostNames. Same thing on chart.php: 64. You could use such example:

$hostName = $item['hosts'][0]['name'];
$hostNames[$hostName] = $hostName;

and for chart.php:

$hostNames[$item['hostname']] = $item['hostname'];

chart.php:
line 94: don't use spaces before and after .
line 65: comment might be misleading, because it no longer applies to foreach loop

arvids.godjuks RESOLVED in r50522. Only didn't change in_array - it does not make sense for an array of this small size and has no performance difference, but the code looks cleaner this way
Edit 10.11.2014: Changed the in_array to array_key_exists after discussing it with sasha

iivs I made some minor changes in r50843, please review.

arvids.godjuks Changes look good, proceding with the merge.
CLOSED

Comment by Ivo Kurzemnieks [ 2014 Nov 26 ]

TESTED,

but don't forget to close (4) before merging.

Comment by Arvids Godjuks (Inactive) [ 2014 Nov 26 ]

Merged to 2.4.3rc1 in r50860 and 2.5.0 (trunk) in r50861

Generated at Fri Mar 29 09:33:05 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.