-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add graph_facts variable to enable graphing (pie/bar) of Puppet facts #377
base: master
Are you sure you want to change the base?
Conversation
REFERENCE.md
Outdated
|
||
Data type: `Optional[Variant[String[1], Array[String[1]]]]` | ||
|
||
A list of the puppet facts to graph. See ''https://github.com/voxpupuli/puppetboard'' |
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.
This file needs to be regenerated since it doesn't match the documentation comment.
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.
Pardon my ignorance but I don't know what you mean by "needs to be regenerated." How does one regenerate this file?
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.
bundle exec rake reference
b8bfc09
to
6a4c27b
Compare
@@ -63,6 +63,9 @@ DEFAULT_ENVIRONMENT = '<%= @default_environment %>' | |||
<% if @reports_count -%> | |||
REPORTS_COUNT = <%= @reports_count %> | |||
<% end -%> | |||
<% if @graph_facts -%> | |||
GRAPH_FACTS = '<%= @graph_facts.sort.uniq.join(',') %>' |
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.
please add a unit test for the change with a string as input and one with an array. We need to ensure the sort.uniq.join construct works with strings as well.
Pull Request (PR) description
The extra_settings is somewhat cumbersome to use for GRAPH_FACTS in the settings.py file because it necessitates escaping the single quote character around the facts to be graphed. This PR adds the graph_facts variable as an array, sorts and unique-ifies the array and wraps the result in a set of single quotes:
GRAPH_FACTS = 'kernel,operatingsystem,operatingsystemmajrelease'