UI for controls.

- Make backend address configurable via env variable
- `BACKEND_HOST=1.2.3.4:4040 npm start` points the frontend to the app on that server. Just for development
- Render control icons
  - removed close x for details panel
  - added control icons in its space
  - closing of panel still works by clicking on same node, or background
- Dont allow control while pending
- Render and auto-dismiss control error
- Make tests pass
This commit is contained in:
David Kaltschmidt
2015-11-06 17:44:28 +00:00
committed by Tom Wilkie
parent 8f957c4f13
commit abcb94b1f1
20 changed files with 267 additions and 69 deletions
+4 -2
View File
@@ -28,9 +28,11 @@ app.get('/app.js', function(req, res) {
// Proxy to backend
var BACKEND_HOST = process.env.BACKEND_HOST || 'localhost:4040';
// HACK need express-http-proxy, because proxy-middleware does
// not proxy to /api itself
app.use(httpProxy('localhost:4040', {
app.use(httpProxy(BACKEND_HOST, {
filter: function(req) {
return url.parse(req.url).path === '/api';
},
@@ -39,7 +41,7 @@ app.use(httpProxy('localhost:4040', {
}
}));
app.use('/api', proxy('http://localhost:4040/api/'));
app.use('/api', proxy('http://' + BACKEND_HOST + '/api/'));
// Serve index page