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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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?
449f485
to
3b8a982
Compare
3b8a982
to
847299a
Compare
app/models/resource_pool.rb
Outdated
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 | ||
|
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
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.
847299a
to
969e2e1
Compare
:description: Remove Infrastructure Resource Pools | ||
:feature_type: admin | ||
:identifier: resource_pool_infra_delete | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
)
and added the corresponding entry in ui-classic
-
This worked and would redirect to the same URL when clicked on Chassis
and Chassis2
.
In this case /physical_chassis/show_list#/
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.
Did I answer your question?
There was a problem hiding this comment.
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.
969e2e1
to
6126dbc
Compare
6126dbc
to
40e3b7b
Compare
Checked commit Guddetisandeep@40e3b7b with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
Dependent PR for enabling Resource Pool feature under Clouds section(Compute > Clouds > Resource Pools)
manageiq Core changes
Update Resource Pool Identifiers and UI for Cloud and Infrastructure Categorization #22879
manageiq-ui-classic changes
[WIP] Add Resource_pool UI for Cloud managers manageiq-ui-classic#8929
manageiq-schema changes
Update resource pool feature identifiers to infrastructure-specific manageiq-schema#718
manageiq-api changes
Update Resource Pool API to include type attribute manageiq-api#1248