Merge "Improving readability for Horizon top module structure"
This commit is contained in:
commit
84aae88057
@ -24,7 +24,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
/* Load angular modules extensions list before we include angular/horizon.js */
|
||||
var angularModuleExtension = {{ HORIZON_CONFIG.angular_modules|default:"[]"|safe }};
|
||||
var horizonPlugInModules = {{ HORIZON_CONFIG.angular_modules|default:"[]"|safe }};
|
||||
</script>
|
||||
|
||||
<!-- source files -->
|
||||
|
@ -12,18 +12,50 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*global angularModuleExtension*/
|
||||
/*global horizonPlugInModules*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module('horizon.app', [
|
||||
/**
|
||||
* Library modules - modules defined in third-party libraries, including
|
||||
* angular's extensions.
|
||||
*/
|
||||
var libraryModules = [
|
||||
'ngCookies'
|
||||
];
|
||||
|
||||
/**
|
||||
* Horizon's built-in modules, including modules from `framework` components
|
||||
* and modules from `openstack_dashboard` application core components.
|
||||
*/
|
||||
var horizonBuiltInModules = [
|
||||
'horizon.auth',
|
||||
'horizon.openstack-service-api',
|
||||
'horizon.framework',
|
||||
'hz.dashboard',
|
||||
'ngCookies'].concat(angularModuleExtension))
|
||||
'horizon.framework',
|
||||
'horizon.openstack-service-api'
|
||||
];
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name horizon.app
|
||||
* @description
|
||||
*
|
||||
* # horizon.app
|
||||
*
|
||||
* Horizon's application level module depends on modules from three
|
||||
* sources:
|
||||
*
|
||||
* 1) Library modules.
|
||||
* 2) Horizon's built-in modules.
|
||||
* 3) Horizon's plug-in modules.
|
||||
*/
|
||||
angular
|
||||
.module('horizon.app', []
|
||||
.concat(libraryModules)
|
||||
.concat(horizonBuiltInModules)
|
||||
.concat(horizonPlugInModules)
|
||||
)
|
||||
|
||||
.constant('horizon.app.conf', {
|
||||
// Placeholders; updated by Django.
|
||||
|
@ -19,7 +19,7 @@
|
||||
horizon.datepickerLocale = '{{ DATEPICKER_LOCALE }}';
|
||||
|
||||
/* Load angular modules extensions list before we include angular/horizon.js */
|
||||
var angularModuleExtension = {{ HORIZON_CONFIG.angular_modules|default:"[]"|safe }};
|
||||
var horizonPlugInModules = {{ HORIZON_CONFIG.angular_modules|default:"[]"|safe }};
|
||||
</script>
|
||||
|
||||
{% compress js %}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Taken from default i18n file provided by Django.
|
||||
*/
|
||||
|
||||
var angularModuleExtension = [];
|
||||
var horizonPlugInModules = [];
|
||||
|
||||
|
||||
(function (globals) {
|
||||
|
Loading…
Reference in New Issue
Block a user