Open dasaeth opened 7 years ago
In command_center_node\config.json file the setting "deviceConnString" is missed on file and in the documentation.
In command_center_node\public\index.html
The $http legacy promise methods .success and .error have been deprecated and will be removed in v1.6.0. Use the standard .then method instead.
You need update this two methods.
$http({ method: 'GET', url: '/api/alerts' }).then(function (response) { var data = response.data; $scope.latest_alerts = data.reverse(); }); $http({ method: 'GET', url: '/api/temperatures' }).then(function(response) { var result = response.data; if(result.length > 0) { angular.forEach(result, function(x) { var utcSeconds = x.eventtime._; var d = new Date(0); d.setUTCSeconds(utcSeconds); $scope.temperatures.push({ deviceid: x.deviceid._, temperature: x.temperaturereading._, eventtime: d }); }); $scope.temperatures.reverse(); $scope.latest_reading = $scope.temperatures[0]; } });
I tried to incorporate your changes to the Index.html file without success. Could you post your entire Index.html file?
In command_center_node\config.json file the setting "deviceConnString" is missed on file and in the documentation.
In command_center_node\public\index.html
The $http legacy promise methods .success and .error have been deprecated and will be removed in v1.6.0. Use the standard .then method instead.
You need update this two methods.