-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #19369 - reports: show puppet compile master #4485
Conversation
@timogoebel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ohadlevy, @shlomizadok and @domcleal to be potential reviewers. |
[test foreman] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small nit in the code. Is there a PR for foreman-report opened? Since the producer is likely a hostname of a server where smart proxy runs, would it make sense to try to map it to this object? E.g. the producer name could be a link to the proxy if it's matched.
After this gets merged, report format wiki should be updated.
@@ -15,6 +15,10 @@ | |||
<%= render 'output', :logs => @config_report.logs%> | |||
<%= render 'metrics', :status => @config_report.status, :metrics => @config_report.metrics["time"] if @config_report.metrics["time"] %> | |||
|
|||
<% if @config_report.producer.present? %> | |||
<p class='ra'> <%= _("Report generated by %s ") % @config_report.producer %> </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the html should be probably indented
@@ -1,4 +1,4 @@ | |||
// raw data from Foreman's old parsing of reports, with some readable formtting | |||
// raw data from Foreman's old parsing of reports, with some readable formatting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
One more thought, maybe the reported at and generated by could be merged, e.g. "Reported at 2017-04-05 17:33:15 by puppetmaster.example.com" where the "by ..." would be only appended if produced was set. |
Thank you for your contribution, @timogoebel! This PR has been inactive for 6 months, closing for now. |
The commit adds a field
producer
to the report model to identify which server (behind a loadbalancer) compiled a puppet catalog.This is a simple approach that just saves the hostname in a text db field. Other options would be to introduce a new model for that.
To test this, one would need to extend foreman-report_v2.rb by
This is how this looks: