diff options
author | Matthias Runge <mrunge@redhat.com> | 2014-11-11 14:47:47 +0100 |
---|---|---|
committer | Matthias Runge <mrunge@redhat.com> | 2014-12-01 10:28:37 +0100 |
commit | 91447384e8cdd2767ddf64b4699cce6dc5ca03b3 (patch) | |
tree | 1da3bea675bd7d5ae6067b29bc4fdc18b6d79743 | |
parent | d9f336b7fc5fcbd9d9925e953cbe539f63299bf7 (diff) | |
download | horizon-91447384e8cdd2767ddf64b4699cce6dc5ca03b3.tar.gz |
Fix dashboard nav, when panelgroup empty
The identity dashboard breaks with a common pattern
and doesn't use a panel group to group panels. When not
using accordion navigation, the last level of navigation is
not shown at all.
Change-Id: Ic76611009eac30658d0af082b0e46cd8f2da1832
Closes-Bug: #1391524
(cherry picked from commit 8e3950a19c244cbb253b34ef1cd46c86b952cc14)
-rw-r--r-- | horizon/templatetags/horizon.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/horizon/templatetags/horizon.py b/horizon/templatetags/horizon.py index f798b4a13..76b13fd87 100644 --- a/horizon/templatetags/horizon.py +++ b/horizon/templatetags/horizon.py @@ -116,7 +116,10 @@ def horizon_dashboard_nav(context): panel.can_access(context)): allowed_panels.append(panel) if allowed_panels: - non_empty_groups.append((group.name, allowed_panels)) + if group.name is None: + non_empty_groups.append((dashboard.name, allowed_panels)) + else: + non_empty_groups.append((group.name, allowed_panels)) return {'components': SortedDict(non_empty_groups), 'user': context['request'].user, |