Prepopulates job template form with related resource #13262
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.
SUMMARY
This addresses #12429
When in
/credentials/id/job_templates
or in inventories/id/job_templates`. If the user clicks Add they are navigated to the Job Template Add form. This change now prepopulates the resource, from which the user came, in the appropriate field in the form. All of that info about the related resource is passed through to the job template form via a querystring in the url.There is 1 notable change here. Not all credentials can be a part of a job template. Therefore, we now add the Job Templates tab to ONLY those credentials whose
kind
is able to be added to a job template.This functionality already exists for projects.
Users cannot add job templates from /instange_groups/id, or execution_environments/id as those resources do not have a job templates tab.
ISSUE TYPE
COMPONENT NAME