Re-work static_settings to clean up

This patch reduces duplication arbitrary directory choices for
xstatic package locations in the static directory.

It moves the xstatic configuration from the library into the
settings file, and the supporting functions move to
the openstack_dashboard.utils.settings module. Having the xstatic
module list in settings allows deployers to add new modules.

It standardises the paths the files are served from, reducing
potential conflicts.

It simplifies the interaction with the xstatic modules, and also uses
the new MAIN variable if present to determine the entry points used.

Since some of the xstatic packages were installed into special
snowflakes directories (not following a pattern) the references to
those (bootstrap_scss and font_awesome) have been fixed.

Change-Id: Ia5be0e96fff1a4ddd6058d6b030ddf96da4b46e7
This commit is contained in:
Richard Jones
2015-07-22 11:15:45 -06:00
committed by Timur Sufiev
parent aacd4fb5b4
commit 348069364c
16 changed files with 235 additions and 304 deletions

View File

@@ -8,24 +8,15 @@
window.STATIC_URL = '/static/';
window.WEBROOT = '/';
</script>
<script src="{% url 'horizon:jsi18n' 'horizon' %}"></script>
<script src="{{ STATIC_URL }}horizon/lib/jasmine/jasmine.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/jasmine/jasmine-html.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/jasmine/boot.js"></script>
<script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.js'></script>
<script src='{{ STATIC_URL }}horizon/lib/spin.js'></script>
<script src='{{ STATIC_URL }}horizon/lib/spin.jquery.js'></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/angular.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/angular-route.js"></script>
{% for file in HORIZON_CONFIG.xstatic_lib_files %}
<script src="{{ STATIC_URL }}{{ file }}"></script>
{% endfor %}
<script src="{{ STATIC_URL }}horizon/lib/angular/angular-mocks.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/angular-cookies.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/angular-bootstrap.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/angular-gettext.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/angular-sanitize.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/smart-table.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/lrdragndrop.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/angular/ng-file-upload-all.js"></script>
<script src="{{ STATIC_URL }}horizon/lib/d3.js"></script>
<script src="{{ STATIC_URL }}horizon/js/horizon.js"></script>
<script type="text/javascript">