openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #22030
new horizon settings panel not recognized
I'm trying to add a new panel to the 'settings' dashboard and am having no luck at all. I've read the docs and verified that things are placed and named correctly, but no matter what, the error is always the same: 'Panel with slug "ec2list" is not registered with Dashboard "settings".
Basically, I copied the entire 'ec2' tree to 'ec2list' and renamed the relevant classes in panels.py, the templates directory, and so on, so that its a complete copy of the (working) ec2 panel, but with unique class names and slugs. However, even after adding it to the list of panels in settings/dashboard.py and restarting apache the Settings dashboard registers and logs an error about the new panel not being registered with the settings panel.
I know this is supposed to be auto discovered since it lives in the same tree as the other settings panels and the permissions are all the same, etc etc.
I have no idea whats wrong, even with debug logging enabled for horizon, there is precious little information about what's wrong or why it is failing to register or get discovered.
Any suggestions ?
Wyllys Ingersoll
The settings dashboard.py Settings class looks like this:
class Settings(horizon.Dashboard):
name = _("Settings")
slug = "settings"
try:
juju_panel = getattr(settings, 'ENABLE_JUJU_PANEL')
if juju_panel == True:
panels = ('user', 'project', 'ec2', 'ec2list', 'juju')
else:
panels = ('user', 'project', 'ec2list', 'ec2')
except Exception as exc:
panels = ('user', 'project', 'ec2', 'ec2list')
default_panel = 'ec2'
nav = False
horizon.register(Settings)