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

Update Resource Pool Identifiers and UI for Cloud and Infrastructure Categorization #22879

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Guddetisandeep
Copy link

@Guddetisandeep Guddetisandeep commented Feb 6, 2024

Copy link
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

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

This change will require a database migration for any existing resource_pool_* entries in the database. I assume the previous ones would become infra, so for example, the db migration would change resource_pool_view to resource_pool_infra_view.

@Guddetisandeep Can you please also update the PR title to be more descriptive of the change?

Comment on lines 124 to 131
def parent_resource_pool_cloud
parent(:of_type => 'ManageIQ::Providers::CloudManager::ResourcePool')
end

def parent_resource_pool_infra
parent(:of_type => 'ManageIQ::Providers::InfraManager::ResourcePool')
end

Copy link
Member

@agrare agrare Apr 4, 2024

Choose a reason for hiding this comment

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

TODO I'm not sure that we need these, of_type might still be the base name 'ResourcePool'

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, the parent_resource_pool does what I need, hence I'm removing these extras.

:description: Remove Infrastructure Resource Pools
:feature_type: admin
:identifier: resource_pool_infra_delete

Copy link
Author

Choose a reason for hiding this comment

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

To solve the UI navigation issue caused by using the same resource_pool identifier for both cloud and infrastructure menu_section for resource_pools in default_menu.rb, I've created separate identifiers for both infrastructure and cloud resource pools, which resolves the UI navigation problem.

Copy link
Member

Choose a reason for hiding this comment

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

@jeffibm is it expected that the same product feature would cause navigation issues in the UI?

Copy link
Member

@jeffibm jeffibm Apr 30, 2024

Choose a reason for hiding this comment

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

Hey @agrare ,

I think we can reuse them.

For example -

I duplicated an entry in manageiq, the identifiers are the same here (physical_chassis_show_list)
image

and added the corresponding entry in ui-classic -
image

Menu method definition
image

This worked and would redirect to the same URL when clicked on Chassis and Chassis2.
In this case /physical_chassis/show_list#/
image

From the above example in ui-classic, I have used the menu item-id as physical_chassis2.
The only problem I have seen so far is, If we use physical_chassis instead, it is going to complain about duplicate ids.

image

Did I answer your question?

Copy link
Member

Choose a reason for hiding this comment

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

This worked and would redirect to the same URL when clicked on Chassis and Chassis2.

Hm this might be the problem @Guddetisandeep is having though, I don't think we want them redirecting to the same page.

@miq-bot
Copy link
Member

miq-bot commented May 20, 2024

Checked commit Guddetisandeep@40e3b7b with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. ⭐

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

5 participants