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 #38160 - Update hosts link to new hosts URL #11296

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

pavanshekar
Copy link
Contributor

@pavanshekar pavanshekar commented Jan 30, 2025

What are the changes introduced in this pull request?

Updated the hosts link to use the new hosts URL instead of the old hardcoded UI link to dynamically determine the correct hosts page URL, improving maintainability and consistency.

Considerations taken when implementing this change?

The new hosts page URL was used to ensure consistency. Care was taken to maintain existing functionality while improving accuracy and maintainability.

What are the testing steps for this pull request?

  1. Go to Lifecycle -> Content Views
  2. Expand any of the cv details
  3. Click on the hosts count
  4. You should be redirected to the hosts page

Comment on lines 10 to 13
const activationKeyCount = activationKeys.length;
const hostCount = hosts.length;
const uniqueActivationKeys = Array.from(new Map(activationKeys.map(activationKey =>
[activationKey.id, activationKey])).values());
const uniqueHosts = Array.from(new Map(hosts.map(host => [host.id, host])).values());
Copy link
Member

Choose a reason for hiding this comment

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

Were there duplicate hosts or activation keys before? Where were they coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to multi-cv hosts and activation keys the hosts and activationKeys were giving duplicate entries.

@pavanshekar pavanshekar changed the title Update hosts link to new hosts URL Fixes #38160 - Update hosts link to new hosts URL Jan 30, 2025
@pavanshekar pavanshekar force-pushed the issue-38160 branch 2 times, most recently from 2541cbb to eb3a5f9 Compare January 30, 2025 21:03
Copy link
Member

@jeremylenz jeremylenz left a comment

Choose a reason for hiding this comment

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

Thanks @pavanshekar!

Works well and tests are green. Ack 👍

@jeremylenz jeremylenz merged commit 412e7f9 into Katello:master Jan 31, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants