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

Fixes #37798 - Fix AngularJS handling of AK CVEs and add warning banner for multi-env AKs #11148

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

jeremylenz
Copy link
Member

@jeremylenz jeremylenz commented Sep 17, 2024

What are the changes introduced in this pull request?

  1. When you save an activation key, the AngularJS activation key details page has always sent incorrect content_view_id and environment_id params which didn't match the environment and content_view nested params. Example:
"content_view_id"=>3,
 "content_view"=>{"id"=>2, "name"=>"cv2"},
 "environment_id"=>5,
 "environment"=>
  {"library"=>false,
   "registry_name_pattern"=>nil,
   "registry_unauthenticated_pull"=>false,
   "id"=>2,
   "name"=>"dev",

(note the nonmatching IDs)

The API previously compensated for this, until #11135. Now, we compensate for it again.
2. Add a warning banner to the activation key details page:
image

  1. Ensure that you can make other edits to activation keys without overwriting the AK's content view environments.

Considerations taken when implementing this change?

This is somewhat of a stopgap for the UI until we can get true multi-environment display built. The plan is

  1. fix what's broken and warn about known issue <-- you are here
  2. display multi-env AKs in the web UI <-- future
  3. allow you to change CVEs of multi-env AKs in the web UI <-- future

What are the testing steps for this pull request?

Create a multi-CV activation key
Make an edit to the description or other AK fields
Ensure that the AK remains a multi-CV AK (you can check by looking for the banner, or looking at the API response multi_content_view_environment value
Ensure that you can change an AK's single cv/lce with no errors
Ensure that you can change a multi-env AK's cv/lce in the web UI. This will cause it to become a single-env AK; this is expected (you didn't read that banner, did you? ;)

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

Code looks fine, starting to test

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

APJ works fine, left 2 small questions

multiak

  also add warning banner for multi-env AKs
@jeremylenz jeremylenz merged commit c87ef0f into Katello:master Sep 25, 2024
27 checks passed
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.

2 participants