[ZBX-5273] Frontend does not allow to edit hosts Created: 2012 Jul 05 Updated: 2017 May 30 Resolved: 2012 Jul 11 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.1 |
Fix Version/s: | 2.0.2rc1, 2.1.0 |
Type: | Incident report | Priority: | Major |
Reporter: | Aristarkh Zagorodnikov | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | hostinterfaces, hosts, sqlite | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
IE 9, Firefox 13 |
Attachments: | zabbix-1.png |
Description |
This is entirely a client-side problem. When you attempt to edit an existing host, the "Unknown host interface type." is thrown. This is due to getDomIdForRowInsert function (include/views/js/configuration.host.edit.js.php) being passed an integer instead of a string (this happens on initial form load only when editing existing host, because interface table is populated with numbers, and not their string representations), which leads to switch-based compare to a string representation of host interface numeric type (a result of getHostInterfaceNumericType function call). |
Comments |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jul 05 ] |
I cannot reproduce this problem. Does it happen with all of the hosts, or only some of them? |
Comment by Aristarkh Zagorodnikov [ 2012 Jul 05 ] |
Clean installation from sources (2.0.1 from official site). Skipping configuration of server itself, zabbix frontend and Apache. Now operating on empty default database. |
Comment by Aristarkh Zagorodnikov [ 2012 Jul 05 ] |
I would like to note JavaScript switches do not behave as equality operators. |
Comment by Aristarkh Zagorodnikov [ 2012 Jul 05 ] |
It also occured to me that this might be the sqlite-specific problem – it may be that hostInterfaceType is string in all other drivers, but a number when read from sqlite. The callstack is as follows: The anonymous function (that actually populates hosts) contains the following data: Here the "type" field is a number 1, not string "1". I believe that here lies the problem. |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jul 10 ] |
Thank you for the information. It is indeed an SQLite specific problem. |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jul 10 ] |
RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-5273. |
Comment by Toms (Inactive) [ 2012 Jul 10 ] |
(1) typo - unset($value) instead of unset($values); <pavels> RESOLVED. <Toms> CLOSED |
Comment by Toms (Inactive) [ 2012 Jul 11 ] |
TESTED |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jul 13 ] |
Fixed in 2.0.2rc1 r28839 and 2.1.0 r28840. CLOSED. |