Lots of updates to webserver.

Make ssl keys consistent (and write to the correct location)
Make sessions keyed by connection id
Clean up logging frameworks
Add new static files, and make firmware update work
Make sensors work again
Add better json handling

Change-Id: I531a0fd7d583e049949cf27aa71544808fd7642d
diff --git a/static/CMakeLists.txt b/static/CMakeLists.txt
index 6e5bc2b..a99abc7 100644
--- a/static/CMakeLists.txt
+++ b/static/CMakeLists.txt
@@ -70,6 +70,7 @@
 
 set(STATIC_ASSETS_OUT "")
 set(MINIFIED_ASSETS_OUT "")
+
 find_program(UGLIFY_MINIFIER uglifyjs)
 if(NOT UGLIFY_MINIFIER)
     message("uglifyjs not found")
diff --git a/static/index.html b/static/index.html
index 61e779b..c2b5c98 100644
--- a/static/index.html
+++ b/static/index.html
@@ -136,7 +136,7 @@
                                 <li><a href="#">Security Settings</a></li>
                                 <li><a href="#">SOL</a></li>
                                 <li><a href="#">SDR Configuration</a></li>
-                                <li><a href="#">Firmware Update</a></li>
+                                <li><a ui-sref="fwupdate">Firmware Update</a></li>
                             </ul>
                         </li>
                         <li class="dropdown" uib-dropdown dropdown-append-to-body>
diff --git a/static/js/fwupdateController.js b/static/js/fwupdateController.js
index ceacd8a..d5eab07 100644
--- a/static/js/fwupdateController.js
+++ b/static/js/fwupdateController.js
@@ -1,5 +1,5 @@
 angular.module('bmcApp').controller('fwupdateController', [
-  '$scope', '$http', '$uibModal',
+  '$scope', '$http', '$uibModal', '$state',
   function($scope, $http, $uibModal, $state) {
     $scope.upload = function(files) {
       r = new FileReader();
@@ -48,10 +48,13 @@
             $scope.okModal = function() {
               // Closing the model with result
               objectSelectionModal.close($scope.selection);
-              $http
-                  .post(
-                      '/intel/firmwareupload', data = e.target.result,
-                      {headers : {'Content-Type' : 'application/octet-stream'}})
+              $http({
+                method : 'POST',
+                url : '/intel/firmwareupload',
+                data : e.target.result,
+                transformRequest : [],
+                headers : {'Content-Type' : 'application/octet-stream'}
+              })
                   .then(
                       function successCallback(response) {
                         console.log('Success uploaded. Response: ' +
diff --git a/static/js/fwupdateconfirmController.js b/static/js/fwupdateconfirmController.js
index 2da1cb2..845e73d 100644
--- a/static/js/fwupdateconfirmController.js
+++ b/static/js/fwupdateconfirmController.js
@@ -1,5 +1,5 @@
 angular.module('bmcApp').controller('fwupdateconfirmController', [
-  '$scope', '$stateParams',{
+  '$scope', '$stateParams',function($scope, $stateParams) {
     $scope.filename = $stateParams.filename;
   }
 ]);
\ No newline at end of file
diff --git a/static/js/sensorController.js b/static/js/sensorController.js
index bcfb1c9..3943192 100644
--- a/static/js/sensorController.js
+++ b/static/js/sensorController.js
@@ -6,7 +6,7 @@
           function($scope, $http, $location, websocketService) {
             $scope.smartTablePageSize = 10;
             $scope.next_id = 0;
-            websocketService.start('/sensorws', function(evt) {
+            websocketService.start('/dbus_monitor', function(evt) {
               var obj = JSON.parse(evt.data);
 
               $scope.$apply(function() {