mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
This commit is contained in:
parent
d9ca11088f
commit
9c1cde002c
@ -72,6 +72,7 @@ module.exports = function(grunt) {
|
||||
modules: [
|
||||
{
|
||||
name: 'main',
|
||||
excludeShallow: ['addons'],
|
||||
include: ['almond']
|
||||
},
|
||||
{
|
||||
|
3
src/sunstone/public/addons/README
Normal file
3
src/sunstone/public/addons/README
Normal file
@ -0,0 +1,3 @@
|
||||
This directory emulates "app" to maintain consistency with Sunstone.
|
||||
|
||||
In the process of minimizing, this directory is not compiled to add addons dynamically to production environments.
|
3
src/sunstone/public/addons/opennebula/README
Normal file
3
src/sunstone/public/addons/opennebula/README
Normal file
@ -0,0 +1,3 @@
|
||||
This dir emulates 'app/opennebula'.
|
||||
|
||||
From here the ajax requests will be made to the OpenNebula driver.
|
3
src/sunstone/public/addons/tabs/README
Normal file
3
src/sunstone/public/addons/tabs/README
Normal file
@ -0,0 +1,3 @@
|
||||
This dir emulates 'app/tabs'.
|
||||
|
||||
The whole hierarchy is the same as in the Sunstone tabs.
|
13
src/sunstone/public/app/addons.js
Normal file
13
src/sunstone/public/app/addons.js
Normal file
@ -0,0 +1,13 @@
|
||||
siteMap = {
|
||||
addons: [
|
||||
|
||||
]
|
||||
};
|
||||
|
||||
var path = "../addons/tabs/";
|
||||
var deps = [];
|
||||
siteMap.addons.forEach(function (addon) {
|
||||
deps.push(path + addon);
|
||||
});
|
||||
|
||||
require(deps, function (e){});
|
@ -19,6 +19,9 @@ require.config({
|
||||
/* Almond */
|
||||
'almond': '../bower_components/almond/almond',
|
||||
|
||||
/* Addons */
|
||||
'addons': './addons',
|
||||
|
||||
/* jQuery */
|
||||
'jquery': '../bower_components/jquery/dist/jquery',
|
||||
'jquery-ui': '../bower_components/jquery-ui/jquery-ui',
|
||||
@ -357,7 +360,9 @@ require.config({
|
||||
deps: [
|
||||
'spice-spiceconn'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
'addons': {}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -106,7 +106,10 @@
|
||||
<% if $conf[:env] == 'dev' %>
|
||||
<script src="bower_components/requirejs/require.js" data-main="app/main"></script>
|
||||
<% else %>
|
||||
<script src="dist/main.js?v=<%= OpenNebula::VERSION %>"></script>
|
||||
<script src="bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require(["dist/main", "app/addons"]);
|
||||
</script>
|
||||
<% end %>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user