Commit 5ab5736a authored by project's avatar project

--no commit message

--no commit message
parent be36b036
......@@ -25,7 +25,8 @@ exports.getValues = function(dataSet, cb){
if(parseInt(json.xhr.IO.Record) > 0){
if(parseInt(json.xhr.IO.Record) === 1){
getImage(json.xhr.IO.Data.Value).then((data) =>{
values.push({"observeddatetime": json.xhr.IO.Data.IODateTime, "value": data});
dataTemplate.values.push({"observeddatetime": json.xhr.IO.Data.IODateTime, "value": data});
cb(dataTemplate);
}).catch((err) => {
cb(err);
})
......@@ -49,6 +50,7 @@ exports.getValues = function(dataSet, cb){
}, function(err) {
if( err ) {
console.log(err);
cb(err);
}
if(values.length > 0){
dataTemplate.values = values;
......
......@@ -19,8 +19,8 @@ function perform_function(context,request,response){
var dataKeySeries = Object.keys(di_data.data);
// for (var i = 0; i < dataKeySeries.length; i++) {
// console.log(di_data.data[dataKeySeries[i]]);
// for (var k = 0; k < dataKeySeries.length; k++) {
// console.log(di_data.data[dataKeySeries[k]]);
// }
let i = 0;
async.whilst(function() { return i < dataKeySeries.length;}, function(cb) {
......@@ -41,7 +41,7 @@ function perform_function(context,request,response){
let json = parser.toJson(vals[idx].value, {object: true});
//console.log('Type = ' + json.xhr.IO.Type);
agriParser.getParser(json.xhr.IO.Type).getValues(vals[idx].value, function(values) {
//console.log('data = ' + vals[idx].value);
idx++;
if(values !== null){
result.latitude = json.xhr.IO.Latitude;
......@@ -57,6 +57,7 @@ function perform_function(context,request,response){
});
}
else callback();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment