Skip to content

Commit 1b080e5

Browse files
Jenkinsopenstack-gerrit
Jenkins
authored andcommitted
Merge "Preserve dashboard order configured from settings"
2 parents 0403edc + f9432c4 commit 1b080e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

openstack_dashboard/utils/settings.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def update_dashboards(modules, horizon_config, installed_apps):
8585
applied in alphabetical order of files where it was imported.
8686
"""
8787
enabled_dashboards = []
88+
disabled_dashboards = []
8889
exceptions = {}
8990
apps = []
9091
angular_modules = []
@@ -93,6 +94,8 @@ def update_dashboards(modules, horizon_config, installed_apps):
9394
update_horizon_config = {}
9495
for key, config in import_dashboard_config(modules):
9596
if config.get('DISABLED', False):
97+
if config.get('DASHBOARD'):
98+
disabled_dashboards.append(config.get('DASHBOARD'))
9699
continue
97100
apps.extend(config.get('ADD_INSTALLED_APPS', []))
98101
exceptions.update(config.get('ADD_EXCEPTIONS', {}))
@@ -111,7 +114,7 @@ def update_dashboards(modules, horizon_config, installed_apps):
111114
# Preserve the dashboard order specified in settings
112115
config_dashboards = horizon_config.get('dashboards', [])
113116
dashboards = ([d for d in config_dashboards
114-
if d in enabled_dashboards] +
117+
if d not in disabled_dashboards] +
115118
[d for d in enabled_dashboards
116119
if d not in config_dashboards])
117120

0 commit comments

Comments
 (0)