@@ -85,6 +85,7 @@ def update_dashboards(modules, horizon_config, installed_apps):
85
85
applied in alphabetical order of files where it was imported.
86
86
"""
87
87
enabled_dashboards = []
88
+ disabled_dashboards = []
88
89
exceptions = {}
89
90
apps = []
90
91
angular_modules = []
@@ -93,6 +94,8 @@ def update_dashboards(modules, horizon_config, installed_apps):
93
94
update_horizon_config = {}
94
95
for key , config in import_dashboard_config (modules ):
95
96
if config .get ('DISABLED' , False ):
97
+ if config .get ('DASHBOARD' ):
98
+ disabled_dashboards .append (config .get ('DASHBOARD' ))
96
99
continue
97
100
apps .extend (config .get ('ADD_INSTALLED_APPS' , []))
98
101
exceptions .update (config .get ('ADD_EXCEPTIONS' , {}))
@@ -111,7 +114,7 @@ def update_dashboards(modules, horizon_config, installed_apps):
111
114
# Preserve the dashboard order specified in settings
112
115
config_dashboards = horizon_config .get ('dashboards' , [])
113
116
dashboards = ([d for d in config_dashboards
114
- if d in enabled_dashboards ] +
117
+ if d not in disabled_dashboards ] +
115
118
[d for d in enabled_dashboards
116
119
if d not in config_dashboards ])
117
120
0 commit comments