[RFE] support component disable

Bug #1842377 reported by Yang Youseok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Expired
Wishlist
Unassigned

Bug Description

Although horizon support most of building blocks to extend, we has some requirements to change core codebase. Major of what we have done for customized code in horizon is 'disabling' UI components.

For example,

1. Since we do not provide that end-user make network, we commented out 'SetNetwork' in default_steps.

2. Since we want to block Trove instance deletion in instance view, we add custom filtering logic to instances view like below.

+++ b/openstack_dashboard/dashboards/project/instances/views.py
@@ -116,6 +116,8 @@ class IndexView(tables.DataTableView):
             image_map = OrderedDict([(str(image.id), image)
                                     for image in images])

+ instances = [i for i in instances
+ if not i.metadata.has_key('trove_instance_id')]
             # Loop through instances to get flavor info.
             for instance in instances:
                 if hasattr(instance, 'image'):

3. Since we does not provide create/delete VM instances in specific projects which is controlled by upper orchestrator API (Kubernetes/DCOS...), we set some member role policy for the projects.

I think if policy in horizon support to disable some UI components (and provide reasons), we happily use the functionality without change the core.

Currently, horizon policy check whether the components can be rendered or not (which is different from 'disabled' used by 'Quota exceed'), user does not notice the policy and it results in end user complaints.

Any other idea to provide our would be appreciated.

Thanks.

Yang Youseok (ileixe)
description: updated
description: updated
description: updated
Ivan Kolodyazhny (e0ne)
Changed in horizon:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Akihiro Motoki (amotoki) wrote :

First, mixing multiple things into a single bug is not a good idea. Please pick up ONLY ONE to be addressed in this bug and file the others as separate bugs.
I mark this as Incomplete until this bug focuses on a single topic.

Regarding 1, it sounds reasonable. Feel free to propose a change if you have time. (Horizon team sufffers from the development resource, so you cannot expect when someone other can implement it.)

Regarding 2, this is debatale in several points.
- it requests to filter some resources based on a condition. This does not match the bug title "component disable". "Component" (in GUI context) measn usually GUI pieces, so "instances" is not "component".
- What happens if a user request instance deletion via CLI? Hiding them only in GUI is a partial solution. How do you handle this situation?
- Why can't you use the approach #3? Trove can be considered as kind of orchestrators.

Regarding 3, most actions in the instance table now honor policies, for example [1]. In policy definition (policy.yaml, policy.json and policy-in-code), we have no information on reasons, so what we can do is that you are rejected by a policy (we may add infomration on which policy rule rejects you but perhaps it is what you want). I am not sure what you really think horizon can. Could you provide your proposal more concretely?

[1] https://opendev.org/openstack/horizon/src/branch/master/openstack_dashboard/dashboards/project/instances/tables.py#L85

Changed in horizon:
status: Confirmed → Incomplete
importance: Medium → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Dashboard (Horizon) because there has been no activity for 60 days.]

Changed in horizon:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.