Skip to content
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

Prepopulates job template form with related resource #13262

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

AlexSCorey
Copy link
Member

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
  • New or Enhanced Feature
COMPONENT NAME
  • UI

Copy link
Member

@vidyanambiar vidyanambiar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

'vault',
'kubernetes',
'cryptography',
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, how is this list determined?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Job templates only support certain types of credentials and the api doesn't have a way of telling the UI, which types are JTs support so the UI has the be the source of truth for that information.

@akus062381 akus062381 merged commit e9a1582 into ansible:devel Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants