Module: ForemanColumnView::HostsHelper

Defined in:
app/helpers/foreman_column_view/hosts_helper.rb

Instance Method Summary collapse

Instance Method Details

#fcv_content(host, column) ⇒ Object



9
10
11
12
13
14
15
16
# File 'app/helpers/foreman_column_view/hosts_helper.rb', line 9

def fcv_content(host, column)
  content = SETTINGS[:column_view][column.to_sym][:content]
  if content =~ /(.*)\[(.*)\]/
    return host.send($1)[$2.gsub(/['"]/,'')]
  else
    return host.send(content)
  end
end

#fcv_title(column) ⇒ Object



4
5
6
7
# File 'app/helpers/foreman_column_view/hosts_helper.rb', line 4

def fcv_title(column)
  title = SETTINGS[:column_view][column.to_sym][:title]
  return title
end