The search box on the AllHosts page does not work properly for the "model" parameter

Problem:

Hi everyone,

I think on the GUI page “Hosts–>AllHosts” under the section “Model” the information is used mixed with “Hardware Model” and “compute-resource”. That’s why if you do the search with parameter "model ~ xxx " or “model !~ xxx”, you get the wrong host list. The same unwanted result is obtained when searching with “compute_resource ~ yyy” or “compute_resource !~ yyy”.

I have some hosts where model is “VMware Virtual Platform” (for all hosts) and some hosts compute-resource is “vcenter.con…”. have been used.
See Image-1.

If I look at the page “Hosts–>Hardware Models” I don’t see the name “vcenter.con…” there, which is the name of the compute resource.

Could someone please help me if a change or fix with the problem already exists ? If “yes” which foreman version? Please also correct me if I am thinking wrong.

Expected outcome:

Either name of this area should be “Compute-resource” and get only the information about compute-resource or the opposite (name Model and have only info about “Hardware Model”).

Foreman and Proxy versions:

foreman-3.1.3
katello-4.3.1-1
foreman-proxy-3.1.3-1

Foreman and Proxy plugin versions:

Distribution and version:

*Other relevant data:

Image-1

Accompanying issue: Bug #35812: The search box on the AllHosts page does not work properly for the “model” parameter - Foreman

Also, to clarify: To me it looks like the search is behaving consistently when using model <operator> in the search bar. (It is always searching the hardware model value for all hosts). However, the Model column in the UI is displaying the hardware model value for some hosts and the compute resource name for others. This creates the appearance of buggy search behavior since the UI is displaying values in the Model column that cannot be searched for with model =. The solution then would be to fix what the Model column is displaying. I could be wrong (hence this thread)…