adding a new panel to dashboard [closed]
Hi,
I am trying to add a panel to the existing dashboard project.
1) I created a panel alarms using the below command
**./run_tests.sh -m startpanel alarms--dashboard=dashboard.projet
--target=auto**
2) I can see the below folders and file created
> **[root@host1 alarms]# pwd /usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/alarms
> [root@host1 alarms]# ls
> __init__.py models.py panel.py templates tests.py urls.py views.py
> [root@host1 alarms]#**
3) Modified the dasboard.py to add the above panel.
**class BasePanels(horizon.PanelGroup):
slug = "compute"
name = _("Compute")
panels = ('overview',
'instances',
'volumes',
'images',
'access_and_security',
'alarms',)**
4) Restarted the server using the below command
> service httpd restart
I guess these many steps should be enough for the Alarms panel to show up on the dasboard. However when I access the dashboard I get the below error.
>
Internal Server Error
>
> The server encountered an internal
> error or misconfiguration and was
> unable to complete your request.
>
> Please contact the server
> administrator, root@localhost and
> inform them of the time the error
> occurred, and anything you might have
> done that may have caused the error.
More information about this error may be available in the server error log.
Below is the info which we are getting in apache log.
>
[Wed Jun 04 21:56:17 2014] [error]
> [client 10.48.135.100] mod_wsgi
> (pid=17058): Exception occurred
> processing WSGI script
> '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
> [Wed Jun 04 21:56:17 2014] [error]
> [client 10.48.135.100] Traceback (most
> recent call last): [Wed Jun 04
> 21:56:17 2014] [error] [client
> 10.48.135.100] File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py",
> line 241, in __call__ [Wed Jun 04
> 21:56:17 2014] [error] [client
> 10.48.135.100] response = self.get_response(request) [Wed Jun 04
> 21:56:17 2014] [error] [client
> 10.48.135.100] File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py",
> line 177, in get_response [Wed Jun 04
> 21:56:17 2014] [error] [client
> 10.48.135.100] response = self.handle_uncaught_exception(request,
> resolver, sys.exc_info()) [Wed Jun 04
> 21:56:17 2014] [error] [client
> 10.48.135.100] File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py",
> line 222, in handle_uncaught_exception
> [Wed Jun 04 21:56:17 2014] [error]
> [client 10.48.135.100] if
> resolver.urlconf_module is None: [Wed
> Jun 04 21:56:17 2014] [error] [client
> 10.48.135.100] File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py",
> line 342, in urlconf_module [Wed Jun
> 04 21:56:17 2014] [error] [client
> 10.48.135.100] self._urlconf_module =
> import_module(self.urlconf_name) [Wed
> Jun 04 21:56:17 2014] [error] [client
> 10.48.135.100] File "/usr/lib/python2.6/site-packages/django/utils/importlib.py",
> line 35, in import_module [Wed Jun 04
> 21:56:17 2014] [error] [client
> 10.48.135.100] __import__(name) [Wed Jun 04 21:56:17 2014] [error]
> [client 10.48.135.100] File
> "/usr/share/openstack-dashboard/openstack_dashboard/wsgi ...
---edit the question to add details, don't use comments for that
Thanks for your reply, I will try it. Though I don't think that the issue is due to the python library. It works fine if I remove my changes. It has to do something with my changes only. However unable to figure out what is going wrong. There is nothing in the logs. How do I enable the debug to get more comprehensive logs?
There's a "DEBUG = True" option at the top of the local settings, and you probably also want to set the 'console' level from INFO to DEBUG as well, see https://github.com/openstack/horizon/...
If you paste your changes somewhere someone may be able to help you find the issue, too.