theforeman / foreman_statistics

Foreman plugin to present statistics and trends
https://theforeman.org/plugins/foreman_statistics/
GNU General Public License v3.0
0 stars 6 forks source link

use `render template`, not `render file` to render the base layout #51

Closed evgeni closed 1 year ago

evgeni commented 1 year ago

render file is only to be used with absolute paths and raises the following error:

Started GET "/foreman_statistics/statistics" for 192.168.122.1 at 2023-11-14 08:14:30 +0000
Processing by ForemanStatistics::ReactController#index as HTML
  Rendered html template within foreman_statistics/layouts/application_react (Duration: 0.0ms | Allocations: 3)
  Rendered layout /usr/share/gems/gems/foreman_statistics-2.0.1/app/views/foreman_statistics/layouts/application_react.html.erb (Duration: 1.7ms | Allocations: 1936)
`render file:` should be given the absolute path to a file. 'layouts/base' was given instead
Backtrace for '`render file:` should be given the absolute path to a file. 'layouts/base' was given instead' error (ActionView::Template::Error): `render file:` should be given the absolute path
 to a file. 'layouts/base' was given instead