-
Notifications
You must be signed in to change notification settings - Fork 58
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 branch parameter to generate intended config view #871
base: develop
Are you sure you want to change the base?
Conversation
docs/user/app_feature_intended.md
Outdated
@@ -47,7 +47,9 @@ curl -s -X GET \ | |||
|
|||
The returned response will contain the rendered configuration for the specified device, the GraphQL data that was used, and if applicable, a diff of the most recent intended config that was generated by the **Intended Configuration** job. The web UI provides a simple form to interact with this REST API. You can access the web UI by clicking on "Generate Intended Config" in the "Tools" section of the Golden Config navigation menu. | |||
|
|||
For more advanced use cases, the REST API and web UI also accept a `graphql_query_id` parameter to specify a custom GraphQL query to use when rendering the configuration. If a `graphql_query_id` is not provided, the default query configured in the Device's Golden Config settings will be used. | |||
For more advanced use cases, the REST API and web UI also accept an optional `graphql_query_id` parameter to specify a custom GraphQL query to use when rendering the configuration. If a `graphql_query_id` is not provided, the default query configured in the Device's Golden Config settings will be used. |
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.
For this whole docs section (Developing Intended Configuration Templates), could you please make a small change and flip the order? You start talking about the feature and how to use it via the API, but given we're in the "User Guide" let's start with the screenshot of the UI and what they can do there (what inputs they can provide, the 3 panels, what's shown there, noting the git pull as well etc.)
And then at the end provide the option of using the REST API endpoints (I'd even have that info under developer guide, but I don't see any of that in GC's docs so nevermind).
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.
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.
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.
Looks great, thank you!
…m:nautobot/nautobot-app-golden-config into u/gas-828-generate-intended-config-branch
if not filesystem_path.is_file(): | ||
msg = f"Jinja template {filesystem_path} not found in git repository {git_repository}" | ||
msg = f"Jinja template {rendered_path} not found in git repository {git_repository}" |
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 like this change, should be easier for the user to understand.
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.
This looks good to me, I am unsure why there was so much introduced javascript code in the html file, but the code looks necessary.
Closes: #828
This cannot be released until Nautobot v2.4.2 is released with nautobot/nautobot#6746
What's Changed
This PR implements the FR in #828 to add the
branch
parameter to the generate intended config UI. It also implements one of the UI enhancements requested in #862Render the graphql data tab when the graphql query select2 changes
.Screen.Recording.2025-01-29.114118.mp4
To Do