~zulcss/horizon/horizon-cloud-g2

« back to all changes in this revision

Viewing changes to horizon/dashboards/settings/dashboard.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2012-10-09 09:59:55 UTC
  • Revision ID: package-import@ubuntu.com-20121009095955-p56z2pt4a8xnzzyy
Tags: 2012.2-0ubuntu2
* debian/control: Set strict version requirements between python-django-horizon,
  openstack-dashboard, and openstack-ubuntu-theme. (LP: #1061961)
* debian/theme/css/ubuntu.css: Refreshed against Folsom. (LP: #1064420)
* debian/patches/add_juju_panel.patch: Update and refresh for Folsom
  compatability. (LP: #1064605)
* debian/patches/allow_alternate_css.patch: Remove unapplied, obsolete
  patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#    under the License.
17
17
 
18
18
from django.utils.translation import ugettext_lazy as _
 
19
from django.conf import settings
19
20
 
20
21
import horizon
21
22
 
23
24
class Settings(horizon.Dashboard):
24
25
    name = _("Settings")
25
26
    slug = "settings"
26
 
    panels = ('user', 'project', 'ec2')
 
27
    try:
 
28
        juju_panel = getattr(settings, 'ENABLE_JUJU_PANEL')
 
29
        if juju_panel == True:
 
30
            panels = ('user', 'project', 'ec2', 'juju')
 
31
        else:
 
32
            panels = ('user', 'project', 'ec2')
 
33
    except AttributeError:
 
34
            panels = ('user', 'project', 'ec2')
 
35
 
27
36
    default_panel = 'user'
28
37
    nav = False
29
38