Hosts/All Hosts view - add new custom column, parameter or fact

In the Hosts/All hosts view you can select predefined list of columns to be displayed:

However, this functionalty is limited as it is not possible to add new, custom column of my choice to a view.

Expected outcome:
I would like to display custom column in Hosts/All view. It can be either a host fact or host parameter or just a custom value.
Is it possible?

Foreman and Proxy versions:
Latest, Foreman 3.8-rc2

Foreman and Proxy plugin versions:
Latest, Foreman 3.8-rc2

Distribution and version:
Ubuntu 20.04

currently there’s no option to add custom columns, but you’re not the first to ask about that.

Is it possible to add this functionalty by creating a custom foreman plugin?
If yes, can you please share some code examples?

Yes, that should be possible. I can’t help much with creating a new plugin, but here is one example of adding a new column in Katello:

There was a plugin that offered this functionality (foreman_column_view) but when the host details page was redesigned, they sunset the plugin as the functionality was supposedly being integrated into Foreman itself:
Support #36377

The issue is that the integration didn’t offer the same functionality as the plugin and was limited to a small preconfigured set of configurable columns and limiting the ability to truly customize the details page.

I found the ability to customize the page quite useful. We populated it with information that was important to us and allowed us to easily identify hosts that needed attention without having to go into each host page or generate a report or fact list.

Hopefully they are able to re-enable the customization the plugin offered in a future release. Until then, it may just require us modifying files manually to get it back to what we had previously.

A few other references:
Sunsetting foreman_column_view
New host detail page feedback (Foreman 3.0+) (see end of discussion)

1 Like