yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76645
[Bug 1812230] [NEW] Horizon is broken when developer panel enabled locally and DEBUG is False
Public bug reported:
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.
** Affects: horizon
Importance: Undecided
Assignee: Michal Arbet (michalarbet)
Status: New
** Changed in: horizon
Assignee: (unassigned) => Michal Arbet (michalarbet)
--
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):
New
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
Follow ups