Hey All,
I'm trying to resolve this problem as its directly affecting me, but I
can't work out what's causing it.
The summary from the bug report says "When looking at any host, there is
the option to limit the days or reports seen - from the install this has
not been visible. There were issues with certain config setting set to 0,
so this may be related to that (Bug #8294: Warning! Infinity - Foreman)
Reports from the last <blank> days - 199 reports found"
So, what I've tried is moving the database and deleting /etc/foreman &
/etc/foreman-proxy folders. Removing the following RPM packages
foreman-proxy-1.7.1-1.el6.noarch
foreman-cli-1.7.1-1.el6.noarch
foreman-selinux-1.7.1-1.el6.noarch
foreman-release-scl-1-1.el6.x86_64
foreman-1.7.1-1.el6.noarch
rubygem-hammer_cli_foreman-0.1.3-1.el6.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2-1.el6.noarch
foreman-installer-1.7.1-1.el6.noarch
foreman-postgresql-1.7.1-1.el6.noarch
ruby193-rubygem-foreman_setup-2.1.1-1.el6.noarch
and running the foreman-installer again so it sets up everything again.
Even once it did this and fresh reports start to come in, the same issue
still exists - so this tells me #1 its not in the database, #2 the issues
were were experience in issue 8294 were not present on the initial install.
So my questions is where does it get the value for the Reports
(/usr/share/foreman/app/helpers/hosts_helper.rb ?) and how does it actually
calculate the value %{days}… does not value not exist in the database?
host.reports.first.reported_a? I'm using foreman as reporting only.
def reports_show
> return unless @host.reports.size > 0
> form_tag @host, :id => 'days_filter', :method => :get, :class => "form
> form-inline" do
> content_tag(:span, (_("Reports from the last %{days} days - %{count}
> reports found") %
> { :days => select(nil, 'range',
> 1…days_ago(@host.reports.first.reported_at),
> {:selected => @range}, {:class=>"col-md-1
> form-control", :style=>"float:none;", :onchange
> =>"$('#days_filter').submit();$(this).disabled();"}),
> :count => @host.reports.recent(@range.days.ago).count
> }).html_safe)
> end
> end
I'm not a Ruby person, but can learn so if someone can give me some
assistance perhaps I can troubleshoot/resolve this myself?
Cheers
David