[ZBXNEXT-1735] Hide history hyperlink in 'Latest data' if history is disabled Created: 2013 May 06  Updated: 2014 Mar 24  Resolved: 2014 Mar 24

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: 2.0.6
Fix Version/s: 2.3.0

Type: Change Request Priority: Trivial
Reporter: Marc Assignee: Ivo Kurzemnieks
Resolution: Fixed Votes: 0
Labels: history, latestdata, patch, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, CentOS-6.4, PostgreSQL 9.1.9, Apache HTTPD-2.2.15, PHP-5.3.3


Attachments: Text File ZBXNEXT-1735-2.0.9-1-latest.php.patch     PNG File ZBXNEXT-1735-2.0.9-latest.png     File zabbix-2.2.0-ZBXNEXT-1735-Hide-history-hyperlink-in-Latest-data-i.patch    
Issue Links:
Duplicate
duplicates ZBX-7505 Hide history hyperlink in 'Latest eve... Closed

 Description   

Would be nice if the history hyper link is hidden for items with disabled history or 'Keep history (in days)' set to 0.



 Comments   
Comment by Marc [ 2013 Oct 20 ]

Attached patch ZBXNEXT-1735-2.0.9-latest.patch hides history hyperlink if history and trends are disabled.

Comment by Volker Fröhlich [ 2013 Nov 27 ]

2.2.0 version attached

Comment by Marc [ 2013 Dec 01 ]

Similar to ZBX-7467

Comment by Marc [ 2013 Dec 07 ]

Similar to ZBX-7505

Comment by Oleg Egorov (Inactive) [ 2014 Feb 14 ]

FIXED IN svn://svn.zabbix.com/branches/dev/ZBXNEXT-1735 r42649

Comment by Ivo Kurzemnieks [ 2014 Feb 14 ]

(1) Use constant UNKNOWN_VALUE instead of hardcoded hyphen. Aslo correct this for latest.php: 573

oleg.egorov RESOLVED IN r42706

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Feb 14 ]

(2) items in unsupported state have black hyphen in actions column. Hyphen should also be colored in gray.

oleg.egorov RESOLVED IN r42706

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Feb 14 ]

(3) Coding style:

  • ? and : should be each on separate lines;
  • closing bracket ); should be on new line;
  • remove extra space before new CLink...;
  • few redundant brackets in latest.php: 577;

The code piece

((($config['hk_history_global'] && $config['hk_history'] == 0) || $item['history'] == 0)
		&& (($config['hk_trends_global'] && $config['hk_trends'] == 0) || $item['trends'] == 0))

is not depended on item value. You can create a boolean variable instead. For example:

$showLink = ((($config['hk_history_global'] && $config['hk_history'] == 0) || $item['history'] == 0)
		&& (($config['hk_trends_global'] && $config['hk_trends'] == 0) || $item['trends'] == 0)
);
$actions = $showLink ? UNKNOWN_VALUE : new CLink(_('History'), 'history.php?action=showvalues&itemid='.$item['itemid']);

oleg.egorov RESOLVED IN r42706

iivs See minor changes in r42707

oleg.egorov CLOSED

Comment by Ivo Kurzemnieks [ 2014 Feb 14 ]

TESTED.

Close (3) before merging.

Comment by Oleg Egorov (Inactive) [ 2014 Feb 14 ]

FIXED IN 2.3.0(trunk) r42708

CLOSED

Comment by richlv [ 2014 Feb 14 ]

(4) throwable item - docs

martins-v Listed in:

https://www.zabbix.com/documentation/2.4/manual/introduction/whatsnew240#miscellaneous_improvements

Please review.

iivs REVIEWED.
Looks OK.
CLOSED.

Generated at Thu Apr 25 13:53:29 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.