From a334afbc01f1b293b6c97623a1edd6ca728e72ae Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 9 Feb 2016 11:16:49 -0600 Subject: [PATCH] clean up development config --- client/dashboard/layout/layout.js | 9 +- client/dashboard/layout/layout.rt | 4 +- client/dashboard/layout/layout.rt.js | 4 +- gulpfile.babel.js | 4 +- npm-debug.log | 45 ++++++++ package.json | 3 +- server/app.express.js | 115 ++++++++------------- server/config/controllers.js | 17 +++ server/config/database.js | 8 +- server/config/react_templates.js | 8 +- server/config/webpack/development.js | 13 +-- server/controllers/energy_controller.js | 7 +- server/controllers/houses_controller.js | 7 +- server/controllers/power_controller.js | 7 +- server/lib/tasks/react_template_compile.js | 3 +- server/models/energy_datum.js | 2 +- server/models/house.js | 3 +- server/models/power_datum.js | 4 +- server/routes.js | 10 +- server/views/layout.jade | 8 +- 20 files changed, 170 insertions(+), 111 deletions(-) create mode 100644 npm-debug.log create mode 100644 server/config/controllers.js diff --git a/client/dashboard/layout/layout.js b/client/dashboard/layout/layout.js index 9aa2d94..050df02 100644 --- a/client/dashboard/layout/layout.js +++ b/client/dashboard/layout/layout.js @@ -1,7 +1,11 @@ +import React from 'react'; + import layoutRt from './layout.rt.js'; var Layout = React.createClass({ - getInitialState: function() { + + getInitialState: function(){ + return {view: "????"}; }, handleResize: function(e) { @@ -14,11 +18,12 @@ var Layout = React.createClass({ setView: function(event) { var layout = this; + console.log(event.target.value) layout.setState({view: event.target.value}); }, render: function() { - return layoutRt.bind(this); + return layoutRt.call(this); } }); diff --git a/client/dashboard/layout/layout.rt b/client/dashboard/layout/layout.rt index c7bba6a..fed8186 100644 --- a/client/dashboard/layout/layout.rt +++ b/client/dashboard/layout/layout.rt @@ -1,4 +1,6 @@ -
+ +
+

{this.state.view}