Reviewed: https://review.openstack.org/631531 Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a25d6b3312505d015a454bb769b758c9fdd9909c Submitter: Zuul Branch: master
commit a25d6b3312505d015a454bb769b758c9fdd9909c Author: Michal Arbet <[email protected]> Date: Thu Jan 17 16:25:26 2019 +0100 Fix developer panel when debug is set to False When developer panel is enabled in horizon via local enabled files, and in local_settings.py is DEBUG = False,horizon start without whole left side panel because dashboard with slug "developer" is not registered. Correct fix is to register, but set it to not allowed. Change-Id: Icbfc9ba11b07d6dbc33ed60df0dcf84dc4141429 Closes-Bug: 1812230 ** Changed in: horizon Status: In Progress => Fix Released -- 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/1812230 Title: Horizon is broken when developer panel enabled locally and DEBUG is False Status in OpenStack Dashboard (Horizon): Fix Released Bug description: Hi, I found a bug in horizon : When developer panel is enabled in horizon via local enabled files , and in local_settings.py is DEBUG = False , horizon start without left side panel... In log there is warnings : root@openstack-controller:/usr/share/openstack-dashboard# python3 manage.py runserver 0.0.0.0:8081 Performing system checks... WARNING horizon.base Could not process panel theme_preview: Dashboard with slug "developer" is not registered. WARNING horizon.base Could not process panel resource_browser: Dashboard with slug "developer" is not registered. WARNING horizon.base Could not process panel profiler: Dashboard with slug "developer" is not registered. WARNING horizon.base Could not process panel form_builder: Dashboard with slug "developer" is not registered. System check identified no issues (0 silenced). January 17, 2019 - 15:09:06 Django version 1.10.7, using settings 'openstack_dashboard.settings' Starting development server at http://0.0.0.0:8081/ Quit the server with CONTROL-C. This is problem code and diff wich is fixing this bug by clear way : diff --git a/openstack_dashboard/contrib/developer/dashboard.py b/openstack_dashboard/contrib/developer/dashboard.py index 828ebb494..8bbae200b 100644 --- a/openstack_dashboard/contrib/developer/dashboard.py +++ b/openstack_dashboard/contrib/developer/dashboard.py @@ -23,6 +23,10 @@ class Developer(horizon.Dashboard): slug = "developer" default_panel = "theme_preview" + def allowed(self, context): + if getattr(settings, 'DEBUG', False): + return super(Developer, self).allowed(context) + return False + +horizon.register(Developer) -if getattr(settings, 'DEBUG', False): - horizon.register(Developer) What is expected ? Default behaviour should be , that if i have local enabled files in openstack_dashboard , i can turn on and turn off developer panel by editing DEBUG in local_settings.py as it is in original idea from author. To manage notifications about this bug go to: https://bugs.launchpad.net/horizon/+bug/1812230/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

