[RFE] support component disable
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_
@@ -116,6 +116,8 @@ class IndexView(
+ instances = [i for i in instances
+ if not i.metadata.
# 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/
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.
description: | updated |
description: | updated |
description: | updated |
Changed in horizon: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
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