theforeman / foreman_column_view

A simple Foreman plugin showcasing Deface for altering the Hosts view
GNU General Public License v3.0
23 stars 15 forks source link

List of possible content ? #15

Closed ponsfrilus closed 9 years ago

ponsfrilus commented 9 years ago

Hi, I'm looking for a way to display in the host list view the "comment" field under the Additional Information tab in the host edition page.

I've tried something like :content: facts_hash['host_comment'] or :content: facts_hash['comment'] but none of these succeed. Does someone can tell me where can I get a list of available facts_hash, or even what's the content for the comment field ?

Thanks in advance, ponsfrilus

EDIT: Ok now I understand that facts_hash are everything possible from facter. Any chance to get foreman content, as the comment field ? Thanks

GregSutcliffe commented 9 years ago

facts_hash refers to the list of Puppet Facts stored by Foreman for the host, so you can check the facts for possible values there. However, you can put any valid method call for a host. Simply using "comment" should work for getting the comment field.

ponsfrilus commented 9 years ago

Hi @GregSutcliffe,

    :comment:
      :title: Comment
      :after: last_report
      :content: comment

does the trick ! Thanks a lot !