diff options
| author | Ed Tanous <ed.tanous@intel.com> | 2017-10-24 17:04:52 -0700 |
|---|---|---|
| committer | Ed Tanous <ed.tanous@intel.com> | 2017-10-24 17:10:33 -0700 |
| commit | 710adfcf07d73b00a9bb6f8bf977cdb0897fa4b8 (patch) | |
| tree | 15b50e4a242788ad4d6ce385cf2e7111c477535c /static/js/sensorController.js | |
| parent | ba9f9a6cebfbb7a12ecf869afa0cdc5aef9c8372 (diff) | |
| download | bmcweb-710adfcf07d73b00a9bb6f8bf977cdb0897fa4b8.tar.gz bmcweb-710adfcf07d73b00a9bb6f8bf977cdb0897fa4b8.zip | |
Add the redfish static files to the build
...And delete the old webserver static files from the repo.
Move $metadata to a static file, as that's really where it belongs.
Change-Id: I2caeee7cd779b7c07cfc10cd693459105656671f
Diffstat (limited to 'static/js/sensorController.js')
| -rw-r--r-- | static/js/sensorController.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/static/js/sensorController.js b/static/js/sensorController.js deleted file mode 100644 index 272dfee..0000000 --- a/static/js/sensorController.js +++ /dev/null @@ -1,37 +0,0 @@ -angular.module('bmcApp').controller('sensorController', [ - '$scope', '$http', '$location', 'dbusWebsocketService', - function($scope, $http, $location, dbusWebsocketService) { - $scope.smartTablePageSize = 10; - $scope.next_id = 0; - dbusWebsocketService.start('/xyz/openbmc_project/sensors', function(evt) { - var obj = JSON.parse(evt.data); - - $scope.$apply(function() { - for (var sensor_name in obj) { - var found = false; - for (var sensor_index in $scope.rowCollection) { - var sensor_object = $scope.rowCollection[sensor_index]; - if (sensor_object.name === sensor_name) { - sensor_object.value = obj[sensor_name]; - found = true; - break; - } - } - if (!found) { - console.log(sensor_name + ' -> ' + obj[sensor_name]); - $scope.next_id = $scope.next_id + 1; - - $scope.rowCollection.push({ - id : $scope.next_id, - name : sensor_name, - value : obj[sensor_name], - }); - } - }; - }); - }); - - $scope.rowCollection = []; - - } -]); |

