Commit 7f044682 authored by Richard Torenvliet's avatar Richard Torenvliet

Update to work with production and development

Remove specific references
parent 7d1908fa
......@@ -15,3 +15,5 @@
/libpeerconnection.log
npm-debug.log
testem.log
makefile
.idea/
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import ENV from 'viewer/config/environment';
export default JSONAPIAdapter.extend({
host: 'http://localhost:8888',
host: ENV.APP.APIURL,
namespace: 'api/v1'
});
import Ember from 'ember';
import ENV from 'viewer/config/environment';
const { get, inject } = Ember;
......@@ -19,7 +20,7 @@ export default Ember.Controller.extend({
socketRef: null,
init() {
const socket = get(this, 'websockets').socketFor('ws://localhost:8888/reconstruction');
const socket = get(this, 'websockets').socketFor(ENV.APP.websocketsURL);
socket.on('open', this.openHandler, this);
socket.on('message', this.messageHandler, this);
......
......@@ -6,6 +6,7 @@ const Router = Ember.Router.extend({
});
Router.map(function() {
this.route('index', { path: '/' });
this.route('reconstruction');
});
......
<div class="clearfix mxn2">
<div class="col-8 px2 mx-auto">
<div class="white p4">
{{#link-to "reconstruction" class="btn white bg-silver border p4 py2"}}
<i class="fa fa-terminal" aria-hidden="true"></i> Reconstruction
{{/link-to}}
</div>
</div>
</div>
{{outlet}}
......@@ -7,6 +7,9 @@ module.exports = function(environment) {
baseURL: '/',
locationType: 'auto',
EmberENV: {
EXTEND_PROTOTYPES: {
Date: false,
},
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
......@@ -20,7 +23,10 @@ module.exports = function(environment) {
};
if (environment === 'development') {
ENV.APP.staticURL = 'http://localhost:8888/data/';
ENV.APP.websocketsURL = '';
ENV.APP.staticURL = '';
ENV.APP.APIURL = '';
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
......@@ -41,7 +47,11 @@ module.exports = function(environment) {
}
if (environment === 'production') {
ENV.APP.websocketsURL = '';
ENV.APP.staticURL = ';
ENV.APP.APIURL = '';
ENV.baseURL = '/face-reconstruction/';
ENV.rootURL = '/face-reconstruction/';
}
return ENV;
......
......@@ -4,21 +4,31 @@ var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
sourcemaps: { enabled: true, extensions: ['js']},
minifyJS: {
enabled: false
},
minifyCSS: {
enabled: false
},
fingerprint: {
enabled: true
}
});
// bower compoenents
app.import('bower_components/basscss/modules/align/index.css');
app.import('bower_components/basscss/modules/border/index.css');
app.import('bower_components/basscss/modules/flexbox/index.css');
app.import('bower_components/basscss/modules/grid/index.css');
app.import('bower_components/basscss/modules/hide/index.css');
app.import('bower_components/basscss/modules/layout/index.css');
app.import('bower_components/basscss/modules/margin/index.css');
app.import('bower_components/basscss/modules/padding/index.css');
app.import('bower_components/basscss/modules/position/index.css');
app.import('bower_components/basscss/modules/type-scale/index.css');
app.import('bower_components/basscss/modules/typography/index.css');
// bower components
// TODO: fix loading bascss locally instead of including it in the index.html.
//app.import('bower_components/basscss/modules/align/index.css');
//app.import('bower_components/basscss/modules/border/index.css');
//app.import('bower_components/basscss/modules/flexbox/index.css');
//app.import('bower_components/basscss/modules/grid/index.css');
//app.import('bower_components/basscss/modules/hide/index.css');
//app.import('bower_components/basscss/modules/layout/index.css');
//app.import('bower_components/basscss/modules/margin/index.css');
//app.import('bower_components/basscss/modules/padding/index.css');
//app.import('bower_components/basscss/modules/position/index.css');
//app.import('bower_components/basscss/modules/type-scale/index.css');
//app.import('bower_components/basscss/modules/typography/index.css');
// npm modules
//app.import('node_modules/basscss-responsive-margin/css/responsive-margin.css');
......
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