Ask Your Question
0

adding a new panel to dashboard [closed]

asked 2014-06-04 05:06:19 -0500

toby harris gravatar image

updated 2014-06-13 16:41:01 -0500

smaffulli gravatar image

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 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by koolhead17
close date 2014-06-17 07:10:58.823285

Comments

1

---edit the question to add details, don't use comments for that

toby harris gravatar imagetoby harris ( 2014-06-04 05:59:33 -0500 )edit
1

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?

toby harris gravatar imagetoby harris ( 2014-06-04 23:08:03 -0500 )edit

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.

jpichon gravatar imagejpichon ( 2014-06-09 04:59:16 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
3

answered 2014-06-04 10:25:45 -0500

jpichon gravatar image

updated 2014-06-04 10:26:03 -0500

I suspect the real error is being swallowed and hidden by the "NotRegistered" error. I would carefully check that the Python you created is valid, if there's no typo in the files etc.

You can see a similar question for that exact same error here: https://ask.openstack.org/en/question... . Perhaps give a try to was is described in the answer?

edit flag offensive delete link more
0

answered 2014-06-10 01:57:36 -0500

toby harris gravatar image

OK, so the issue was with the panel.py script due to an incorrect path for an import. Fixing that resolved the issue. Thanks alot for your help.

edit flag offensive delete link more

Comments

Glad it's resolved!

jpichon gravatar imagejpichon ( 2014-06-10 03:07:00 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-06-04 05:06:19 -0500

Seen: 413 times

Last updated: Jun 13 '14