Document the event and alert type hierarchy #2297
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The only complete "documentation" of NAV's event and alert type hierarchy exists in the SQL schema definitions (and this once-generated Wiki page ).
This information needs to be out there in the Sphinx-based user documentation, as part of the reference material. The simplest way to get it there is to just generate this documentation source text as necessary, when the event and alert type hierarchy changes (which is a rare event).
This PR sets out to do that.
A more viable solution for the future might be to actually define the hierarchy as Python code and use that to both seed the initial SQL database and to generate documentation. Why? Because the generator introduced in this PR needs access to an operational PostgreSQL database with the NAV schema - which usually requires a fully integrated NAV environment.