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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

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.

Name-aliases for displaying nodes
2 participants