[ZBX-4009] {HOSTNAME} and {IPADDRESS} macros are not resolved in custom labels on network maps in the edit mode Created: 2011 Aug 03  Updated: 2017 May 30  Resolved: 2011 Dec 27

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.9.5 (alpha)
Fix Version/s: 1.9.9 (beta)

Type: Incident report Priority: Blocker
Reporter: Sergey Syreskin Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: maps, regression, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL 5 derivative, PostgreSQL 8.4, PHP 5.1.6



 Description   

I'm not sure whether this is a bug or feature.

To reproduce:
1) go to Configuration of network maps menu;
2) click the Edit link of a map;
3) set Host label type to Custom label;
4) in the below text area enter

{HOSTNAME} {IPADDRESS};
5) save;
6) open the map in the editor, see that host label is shown as "{HOSTNAME}

{IPADDRESS}";
6) go to network maps monitoring, open the map, see that {HOSTNAME} {IPADDRESS}

are substituted with the respective values as expected.



 Comments   
Comment by richlv [ 2011 Aug 03 ]

that was sort of a planned change, but it has regressions - most notably, makes map editing much harder as identifying map elements now is impossible without opening their properties individually. same goes for all other macros, as before it was possible to simply add a macro to reference item value and immediately see whether it was correct - not possible anymore.

possible solution would be a "resolve macros" mode - by default they would not be resolved (improves performance), but could be easily enabled.

this functionality was lost during development of ZBXNEXT-674

Comment by Alexei Vladishev [ 2011 Oct 12 ]

That's the difference between Monitoring and Configuration sections. In Configuration we tend to display configuration parameters as they are without substitution of macros. That's the general approach we applied to maps as well.

I agree that a special "Preview" button would be a nice touch though.

Comment by richlv [ 2011 Oct 12 ]

after some discussion this was decided to be a serious enough regression in the editing mode to warrant a blocker priority

Comment by richlv [ 2011 Dec 15 ]

rough initial specification at https://zabbix.org/wiki/Docs/specs/ZBX-4009

<pavels> I think it should affect everything in the map configuration, not just the map itself. Should we resolve all of the macros, or just some of them, e.g HOST.NAME or IPADDRESS? Someone also had a nice idea, that the resolved macros should be highlighted with some color to separate them from plain text.

Comment by Alexey Fukalov [ 2011 Dec 23 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-4009

Comment by Alexander Vladishev [ 2011 Dec 23 ]

Successfully tested!

Comment by Alexey Fukalov [ 2011 Dec 23 ]

MERGED: svn://svn.zabbix.com/trunk 24241

Comment by Oleksii Zagorskyi [ 2011 Dec 24 ]

Just for case - do not forget to update http://www.zabbix.com/documentation/2.0/manual/introduction/whatsnew200 with this feature.

Comment by Alexey Fukalov [ 2011 Dec 27 ]

Added note to What's new.

Generated at Sat Apr 27 05:29:31 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.