Skip to content
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

feature: improve os detection for inventory page #712

Merged
merged 2 commits into from
Sep 24, 2022

Conversation

melck
Copy link
Contributor

@melck melck commented Sep 12, 2022

Hello,

I wanted to use inventory page but it only works with few linux OS. Here is my proposal to support many OS. I have introduced a new parameter named INVENTORY_FACT_TEMPLATES to keep customization. This parameter is used to customize cell display using jinja. Default INVENTORY_FACTS has been changed to use trusted and os facts.

It has been tested with Puppet agent >= 5 to 7:

  • Windows (Pro, Server 2012/2016/2019)
  • MacOS
  • Debian Family (Debian, Ubunut, Linux Mint, etc.)
  • Redhat Family (RedHat Enterprise, Oracle Linux, CentOS)
  • Suze Family (SUZE Enterprise)

With puppet agent 4, windows os will display nothing.

It should fix #485.

What do you think about this changes ?

@codecov
Copy link

codecov bot commented Sep 12, 2022

Codecov Report

Base: 85.45% // Head: 85.58% // Increases project coverage by +0.12% 🎉

Coverage data is based on head (21cce15) compared to base (54b7e18).
Patch coverage: 92.59% of modified lines in pull request are covered.

❗ Current head 21cce15 differs from pull request most recent head 228582f. Consider uploading reports for the commit 228582f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #712      +/-   ##
==========================================
+ Coverage   85.45%   85.58%   +0.12%     
==========================================
  Files          19       19              
  Lines        1059     1082      +23     
==========================================
+ Hits          905      926      +21     
- Misses        154      156       +2     
Impacted Files Coverage Δ
puppetboard/app.py 84.12% <84.61%> (-0.19%) ⬇️
puppetboard/default_settings.py 100.00% <100.00%> (ø)
puppetboard/docker_settings.py 100.00% <100.00%> (ø)
puppetboard/views/inventory.py 91.48% <100.00%> (+1.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gdubicki
Copy link
Member

Hey, sorry for a slow response @melck. I've been busy lately. Perhaps @bastelfreak has a little bit more time to review this PR?

Copy link
Member

@bastelfreak bastelfreak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me the change looks fine, but someone with more Python knowledge should take a look as well. @sebastianrakel could you take a look?

Copy link
Member

@gdubicki gdubicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some time. :) The MR looks good to me except one minor comment about the docs.

README.md Outdated Show resolved Hide resolved
@gdubicki gdubicki merged commit 9f79847 into voxpupuli:master Sep 24, 2022
@gdubicki
Copy link
Member

I have pre-released this in v4.1.0rc3. It would be great if we could add a screenshot of the Inventory view showing nodes with various OSes for the final v4.1.0 release that I would like to do in a few days. Can you provide such screenshot, @melck? I don't have nodes with other OS than Linux in my infrastructure...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inventory OS column blank on all nodes running Centos 7
3 participants