diff --git a/.gitignore b/.gitignore index 86fceae7af4fb5a8de2c3c125e7f9a64c3ffbe0c..eca6c38b084168afc3ce5f1c919a8b50139fe3d7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ /libpeerconnection.log npm-debug.log testem.log +makefile +.idea/ diff --git a/app/adapters/application.js b/app/adapters/application.js index 2b129b188845e5315c5c2dec8dcf92dd38583ec1..965c6d7cdad7e2d8119d03c8b69b74579683d02b 100644 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -1,6 +1,7 @@ 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' }); diff --git a/app/controllers/reconstruction.js b/app/controllers/reconstruction.js index b7bf3d99cc275000425043eb2675ff8c9d0d18cf..448f6ca5f2930a011237b291219110fb0ccc0f03 100644 --- a/app/controllers/reconstruction.js +++ b/app/controllers/reconstruction.js @@ -1,4 +1,5 @@ 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); diff --git a/app/router.js b/app/router.js index b1d0e174dce7c8f27402026b2055cb9927105707..931713e3527cfe27e9609bc1bac9abcf1673e351 100644 --- a/app/router.js +++ b/app/router.js @@ -6,6 +6,7 @@ const Router = Ember.Router.extend({ }); Router.map(function() { + this.route('index', { path: '/' }); this.route('reconstruction'); }); diff --git a/app/templates/index.hbs b/app/templates/index.hbs new file mode 100644 index 0000000000000000000000000000000000000000..bba476cf7546bba57d504754d6c8773cd2463b67 --- /dev/null +++ b/app/templates/index.hbs @@ -0,0 +1,11 @@ +
+
+
+ {{#link-to "reconstruction" class="btn white bg-silver border p4 py2"}} + Reconstruction + {{/link-to}} +
+
+
+ +{{outlet}} diff --git a/config/environment.js b/config/environment.js index 2e11e4422400cddfa162487b55d5284afafd029a..32b9949cb8e44e7e2691a647431fbc77b99cd27b 100644 --- a/config/environment.js +++ b/config/environment.js @@ -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; diff --git a/ember-cli-build.js b/ember-cli-build.js index 04c1573eda67a2b06bb483feea8e2c50fd8a6717..ddb6211b1ddfbeba2af692a8da51502b3ae2dbca 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -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'); diff --git a/package.json b/package.json index be687de19a34f88d9ab35d5cd2957357af5a5cfb..bff4eabddb1513a5738d406502a033379a0dc0c7 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "devDependencies": { "basscss-responsive-margin": "^1.1.0", "broccoli-asset-rev": "^2.4.2", + "dat-gui": "^0.5.0", "ember-ajax": "^2.0.1", "ember-browserify": "1.1.10", "ember-cli": "2.6.2",