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

Add configurable node info section to page headers #498

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Add configurable node info section to page headers #498

merged 2 commits into from
Feb 13, 2025

Conversation

oneiros
Copy link
Collaborator

@oneiros oneiros commented Dec 30, 2024

Possibly fixes #473

This adds a "header" to all node-related pages:

image

The heading with the node's name will now appear on all node-related pages (key list and selected key). The box with the facts will only appear if configured in config/hdm.yml.

Note that I opted for node_info as a shorter key.

So the information above results from the following configuration:

  node_info:
    - facts.fqdn
    - trusted.certname
    - facts.role
    - facts.environment
    - facts.zone

Up to 6 facts will be displayed.

Please note that trusted.certname really was not available in my test data. But I also do not know if it would be available as a value returned by the facts API 🤷‍♂️

In `config/hdm.yml` set

```yaml
node_info:
  - facts.name1
  - facts.name2
  - # ...
```

and include up to 6 fact names. These names and their
respective values will be shown at the top of a node's
pages to help provide more context.

The info box is hidden if `node_info` is not set.

This also adds a headline with the node's name to
all node pages irrespective of whether `node_info` is
set or not.

Signed-off-by: David Roetzel <[email protected]>
@oneiros oneiros requested a review from a team as a code owner December 30, 2024 12:02
@tuxmea
Copy link
Member

tuxmea commented Dec 30, 2024

Trusted is available from PuppetDB API endpoint.
Please use the modern structured facts:

 node_info:
    - facts.networking.fqdn
    - trusted.certname
    - facts.external_facts.role
    - trusted.environment
    - facts.external_facts.zone
    - facts.os.family

@tuxmea tuxmea enabled auto-merge (squash) February 13, 2025 15:59
@tuxmea tuxmea added the enhancement New feature or request label Feb 13, 2025
@tuxmea tuxmea merged commit dce626c into main Feb 13, 2025
11 checks passed
@tuxmea tuxmea deleted the node_info branch February 13, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name-aliases for displaying nodes
2 participants