-
Incident report
-
Resolution: Fixed
-
Major
-
2.0.1
-
IE 9, Firefox 13
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).
A quick fix is forcing hostInterfaceType to be a string (I just concatenate it with an empty string): switch (hostInterfaceType + '').
A proper solution would be either populating the initial object with string representations of numeric interface types (seems easy) or moving to numeric representations everywhere (seems unnecessarily hard and prone to errors).