← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1842377] [NEW] [RFE] support component disable

 

Public bug reported:

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.

** Affects: horizon
     Importance: Undecided
         Status: New

** Description changed:

  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])
+              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'):
+              # 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.
  
- 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.
  
- 
- 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 or not (which is
- different from 'disabled' used by 'Quota exceed'), user does not notice
- the policy and it results in end user complains.
+ 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 complains.
  
  Any other idea to provide our purpose would be appreciated.
  
  Thanks.

** Description changed:

  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 complains.
+ does not notice the policy and it results in end user complaints.
  
  Any other idea to provide our purpose would be appreciated.
  
  Thanks.

** Description changed:

  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 purpose would be appreciated.
+ Any other idea to provide our  would be appreciated.
  
  Thanks.

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1842377

Title:
  [RFE] support component disable

Status in OpenStack Dashboard (Horizon):
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1842377/+subscriptions


Follow ups