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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
82 changes: 62 additions & 20 deletions db/fixtures/miq_product_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1402,47 +1402,89 @@
:feature_type: admin
:identifier: host_provide

# Resource Pools
- :name: Resource Pools
:description: Access Everything under Resource Pools
# Cloud Resource Pools
- :name: Cloud Resource Pools
:description: Access Everything under Cloud Resource Pools
:feature_type: node
:identifier: resource_pool
:identifier: resource_pool_cloud
:children:
- :name: View
:description: Display Lists of Resource Pools
:description: Display Lists of Cloud Resource Pools
:feature_type: view
:identifier: resource_pool_view
:identifier: resource_pool_cloud_view
:children:
- :name: List
:description: Display Lists of Resource Pools
:description: Display Lists of Cloud Resource Pools
:feature_type: view
:identifier: resource_pool_show_list
:identifier: resource_pool_cloud_show_list
- :name: Show
:description: Display Individual Resource Pools
:description: Display Individual Cloud Resource Pools
:feature_type: view
:identifier: resource_pool_show
:identifier: resource_pool_cloud_show
- :name: Operate
:description: Perform Operations on Resource Pools
:description: Perform Operations on Cloud Resource Pools
:feature_type: control
:identifier: resource_pool_control
:identifier: resource_pool_cloud_control
:children:
- :name: Edit Tags
:description: Edit Tags of Resource Pools
:description: Edit Tags of Cloud Resource Pools
:feature_type: control
:identifier: resource_pool_tag
:identifier: resource_pool_cloud_tag
- :name: Manage Policies
:description: Manage Policies of Resource Pools
:description: Manage Policies of Cloud Resource Pools
:feature_type: control
:identifier: resource_pool_protect
:identifier: resource_pool_cloud_protect
- :name: Modify
:description: Modify Resource Pools
:description: Modify Cloud Resource Pools
:feature_type: admin
:identifier: resource_pool_admin
:identifier: resource_pool_cloud_admin
:children:
- :name: Remove
:description: Remove Resource Pools
:description: Remove Cloud Resource Pools
:feature_type: admin
:identifier: resource_pool_delete
:identifier: resource_pool_cloud_delete

# Infrastructure Resource Pools
- :name: Infrastructure Resource Pools
:description: Access Everything under Infrastructure Resource Pools
:feature_type: node
:identifier: resource_pool_infra
:children:
- :name: View
:description: Display Lists of Infrastructure Resource Pools
:feature_type: view
:identifier: resource_pool_infra_view
:children:
- :name: List
:description: Display Lists of Infrastructure Resource Pools
:feature_type: view
:identifier: resource_pool_infra_show_list
- :name: Show
:description: Display Individual Infrastructure Resource Pools
:feature_type: view
:identifier: resource_pool_infra_show
- :name: Operate
:description: Perform Operations on Infrastructure Resource Pools
:feature_type: control
:identifier: resource_pool_infra_control
:children:
- :name: Edit Tags
:description: Edit Tags of Infrastructure Resource Pools
:feature_type: control
:identifier: resource_pool_infra_tag
- :name: Manage Policies
:description: Manage Policies of Infrastructure Resource Pools
:feature_type: control
:identifier: resource_pool_infra_protect
- :name: Modify
:description: Modify Infrastructure Resource Pools
:feature_type: admin
:identifier: resource_pool_infra_admin
:children:
- :name: Remove
: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.

# Datastores
- :name: Datastores
Expand Down
13 changes: 9 additions & 4 deletions db/fixtures/miq_shortcuts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,15 @@
:url: /vm_infra/explorer?accordion=templates_filter
:rbac_feature_name: templates_filter_accord
:startup: true
- :name: resource_pools
:description: Compute / Infrastructure / Resource Pools
:url: /resource_pool/show_list
:rbac_feature_name: resource_pool_show_list
- :name: resource_pool_cloud
:description: Compute / Clouds / Cloud Resource Pools
:url: /resource_pool_cloud/show_list
:rbac_feature_name: resource_pool_cloud_show_list
:startup: true
- :name: resource_pool_infra
:description: Compute / Infrastructure / Infrastructure Resource Pools
:url: /resource_pool_infra/show_list
:rbac_feature_name: resource_pool_infra_show_list
:startup: true
- :name: storage
:description: Compute / Infrastructure / Datastores
Expand Down