-
Notifications
You must be signed in to change notification settings - Fork 57
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
Added a web ui to render intended configurations #827
Added a web ui to render intended configurations #827
Conversation
…gurations from templates in an arbitrary git repository.
nautobot_golden_config/forms.py
Outdated
) | ||
git_repository = forms.DynamicModelChoiceField( | ||
queryset=GitRepository.objects.all(), | ||
required=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking out loud.. can we make this not required and if not set figure out what the default git repo is this device is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the majority of cases, I don't think people will need to switch this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because different devices can have different golden config settings, and different golden config settings can have different git repositories, we would have no way of showing the user in this view what repo was used to generate the template.
Either:
- They would have to back-solve which golden config setting applied and then which git repository
- We will have to enhance the API response to provide more information than it does today
Co-authored-by: Ken Celenza <[email protected]>
"""View to generate the intended configuration.""" | ||
|
||
template_name = "nautobot_golden_config/generate_intended_config.html" | ||
permission_required = ["dcim.view_device", "extras.view_gitrepository"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not also check permissions for GoldenConfig? If I am not mistaken, a user would need to have view permissions for Golden Config in order to see the Intended Configuration.
permission_required = ["dcim.view_device", "extras.view_gitrepository"] | |
permission_required = ["dcim.view_device", "extras.view_gitrepository", "nautobot_golden_config.view_goldenconfig"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could see a user wanting to require a permission to use this but I don't think view_goldenconfig
is the correct permission. Perhaps we need to implement a new permission similar to run_job
?
nautobot_golden_config/templates/nautobot_golden_config/generate_intended_config.html
Outdated
Show resolved
Hide resolved
…te_intended_config.html Co-authored-by: Jeff Kala <[email protected]>
Implemented feedback:
|
This is a web ui wrapper for the REST API implemented in #824
UI Light mode
UI Dark mode
Nav menu
Docs