Issue with new foreman UI facts page

Foreman version: 3.17.1

when I try to look at facts from hosts –> some host –> facts, I land on Page below:

look at structured facts like “os“, I’m unable to view child facts from there, I get “no child facts found“
But when I sort the facts via “Name“ on the same page I can then see structured facts laid out and their values.

After sorting the values by clicking on “Name“:

Looks like a BUG :frowning:

Works for me with 3.18.2.

1 Like

I just upgraded to 3.19.1, it shows more facts but not all facts still:
like OS facts:

after clicking on “Name“ to sort I can see the facts:

I don’t understand the difference between your first and second screenshot. It looks like the same page for the same host, only once with an empty list and once with the normal list.

The first screenshot is fully functional. It shows the facts grouped. If you want to open a group you have to select it. That’s the standard sort order.

Looks to me as if it is working.

it ain’t working, The 1st screen shots shows “os“ is a structured fact. Then in 2nd screenshot it shows what I see when I click on “os“ from the 1st screenshot.

in 3rd screenshot it shows os > {keys} > {more keys}: {values}, which is what we need to see without doing any tricks :slight_smile: in this case “clicking on Name“ to sort and then look at facts.

Well, it works fine on my foreman server.

Looks like a broken script to me. Did you clear the browser cache, cookies etc after the upgrade?

There should be an error message on the browser console if the whole view remains empty.

Not sure what is wrong but to see what is in the database do this:

foreman-rake console

> Host.find_by(name: "myhost.example.com").facts_hash

That will display all the facts as hash, this is how this UI should see it.

Actually I see there is some filtering in place, get us also:

  host = Host.find_by(name: "myhost.example.com")

  host.fact_values.count                    # everything (what facts_hash sees)
  host.fact_values.root_only.count          # what the default UI page lists
  host.fact_values.no_timestamp_facts.root_only.count

when I go into a via hosts → {host}→{facts}
I see this page:

look at “os“ and the count of facts at bottom. I click on “os“ to see its child facts, then I see this:

I thought only “os“ was not showing its child facts, so I clicked on “networking“, then I see empty page as well. Both those root facts have child facts. Now to see those child facts in UI, I should be, in the facts page and then I have to click on “Name“ to sort the facts and then I see these details:

look at facts count at bottom, (maybe now its shows all child facts as well so count increased? cool) but when I click on “os“ or “networking“ on facts page without sorting, shouldn’t a user see child facts for those ? instead of empty page?

This is just a UI issue, when I do a api call, I see all facts, so this is rather a UI render problem :slight_smile: