Show unused environments and allow matching nodes to other environments #146
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.
Fixes #140
This is my first attempt to solve #140. It determines environments both from puppetdb and the file system, shows all environments but marks the ones only found in the file system as "unused":
Nodes can be selected from any environment, but a switch allows to only display the ones from the selected environment:
Note how I display the node's environment in parentheses directly following the name. I initially made this only for development purposes but left it in, because for now there is no other way to determine what environment a node is in.
I wonder if we should mark it more prominently, if the selected node is from a different environment and thus the whole view is more of an "what if" scenario. Maybe even using a red (or orange) alert.
Note that this includes severe changes to test data. See the discussion in #140 for details.