Commit 5ab2f557 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou Committed by Athina Bekakou

Fix several packaging issues

parent 37928f95
......@@ -19,8 +19,7 @@ to your deployment needs.
Project status
==============
As of version `0.17` of Synnefo stack only Pithos UI views are implemented
within the package.
The package only includes the Pithos UI webapp.
Packaging
......
# cloudbar configuration
#CLOUDBAR_ACTIVE = True
#CLOUDBAR_LOCATION = 'https://accounts.example.synnefo.org/static/im/cloudbar/'
#CLOUDBAR_COOKIE_NAME = '_pithos2_a'
#CLOUDBAR_SERVICES_URL = 'https://accounts.example.synnefo.org/im/get_services'
#CLOUDBAR_MENU_URL = 'https://accounts.example.synnefo.org/im/get_menu'
......@@ -18,6 +18,17 @@ var app = new EmberApp({
});
app.project.addons.push(require('./ember-cli-synnefo'));
// hacky workaround to carry out dynamic base url via django
var contentForHead = EmberApp.prototype._contentForHead;
app._contentForHead = function(content, config) {
contentForHead.call(this, content, config);
if (!config.djangoContext) { return; }
content.forEach(function(c, i) {
content[i] = content[i].replace('/__BASE_URL__/', '{{ UI_BASE_URL }}');
content[i] = content[i].replace('__BASE_URL__', '{{ UI_BASE_URL }}');
});
}
app.import('bower_components/moment/moment.js');
app.import('bower_components/foundation/js/foundation/foundation.js');
app.import('bower_components/foundation/js/foundation/foundation.reveal.js');
......
......@@ -170,6 +170,6 @@ export default Ember.Object.extend({
'icon-loader': 'life-ring'
}],
main_theme: 'ui-web',
main_theme: 'snf-ui',
});
......@@ -15,7 +15,7 @@ module.exports = function(environment) {
modulePrefix: 'snf-ui',
environment: environment,
subEnvironment: subEnvironment,
baseURL: 'ui',
baseURL: '__BASE_URL__', // this will be replaced to {{ UI_BASE_URL }}
locationType: 'auto',
contentSecurityPolicy: {
'style-src': "'self' 'unsafe-inline' fonts.gstatic.com *.googleapis.com",
......
module.exports = {
contentFor: function(type, config) {
var django = config.djangoContext;
var prefix = config.assetsPrefix === undefined ? '' : config.assetsPrefix;
......
......@@ -45,7 +45,6 @@
"ember-export-application-global": "^1.0.2",
"express": "^4.8.5",
"glob": "^4.0.5",
"nw": "^0.12.2",
"rimraf": "2.2.8"
},
"main": "dist/index.html",
......
......@@ -40,7 +40,8 @@ def app(request):
context = {
'app_settings': json.dumps(app_settings),
'UI_MEDIA_URL': ui_settings.UI_MEDIA_URL
'UI_MEDIA_URL': ui_settings.UI_MEDIA_URL,
'UI_BASE_URL': ui_settings.BASE_PATH
}
return direct_to_template(request, "snf_ui_index.html",
extra_context=context)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment