Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
5ab5736a
Commit
5ab5736a
authored
Mar 13, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
be36b036
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
image_parser.js
plugins/dt/dt-agritronics/parser/image_parser.js
+3
-1
perform.js
plugins/dt/dt-agritronics/perform.js
+4
-3
No files found.
plugins/dt/dt-agritronics/parser/image_parser.js
View file @
5ab5736a
...
@@ -25,7 +25,8 @@ exports.getValues = function(dataSet, cb){
...
@@ -25,7 +25,8 @@ exports.getValues = function(dataSet, cb){
if
(
parseInt
(
json
.
xhr
.
IO
.
Record
)
>
0
){
if
(
parseInt
(
json
.
xhr
.
IO
.
Record
)
>
0
){
if
(
parseInt
(
json
.
xhr
.
IO
.
Record
)
===
1
){
if
(
parseInt
(
json
.
xhr
.
IO
.
Record
)
===
1
){
getImage
(
json
.
xhr
.
IO
.
Data
.
Value
).
then
((
data
)
=>
{
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
)
=>
{
}).
catch
((
err
)
=>
{
cb
(
err
);
cb
(
err
);
})
})
...
@@ -49,6 +50,7 @@ exports.getValues = function(dataSet, cb){
...
@@ -49,6 +50,7 @@ exports.getValues = function(dataSet, cb){
},
function
(
err
)
{
},
function
(
err
)
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
cb
(
err
);
}
}
if
(
values
.
length
>
0
){
if
(
values
.
length
>
0
){
dataTemplate
.
values
=
values
;
dataTemplate
.
values
=
values
;
...
...
plugins/dt/dt-agritronics/perform.js
View file @
5ab5736a
...
@@ -19,8 +19,8 @@ function perform_function(context,request,response){
...
@@ -19,8 +19,8 @@ function perform_function(context,request,response){
var
dataKeySeries
=
Object
.
keys
(
di_data
.
data
);
var
dataKeySeries
=
Object
.
keys
(
di_data
.
data
);
// for (var
i = 0; i < dataKeySeries.length; i
++) {
// for (var
k = 0; k < dataKeySeries.length; k
++) {
// console.log(di_data.data[dataKeySeries[
i
]]);
// console.log(di_data.data[dataKeySeries[
k
]]);
// }
// }
let
i
=
0
;
let
i
=
0
;
async
.
whilst
(
function
()
{
return
i
<
dataKeySeries
.
length
;},
function
(
cb
)
{
async
.
whilst
(
function
()
{
return
i
<
dataKeySeries
.
length
;},
function
(
cb
)
{
...
@@ -41,7 +41,7 @@ function perform_function(context,request,response){
...
@@ -41,7 +41,7 @@ function perform_function(context,request,response){
let
json
=
parser
.
toJson
(
vals
[
idx
].
value
,
{
object
:
true
});
let
json
=
parser
.
toJson
(
vals
[
idx
].
value
,
{
object
:
true
});
//console.log('Type = ' + json.xhr.IO.Type);
//console.log('Type = ' + json.xhr.IO.Type);
agriParser
.
getParser
(
json
.
xhr
.
IO
.
Type
).
getValues
(
vals
[
idx
].
value
,
function
(
values
)
{
agriParser
.
getParser
(
json
.
xhr
.
IO
.
Type
).
getValues
(
vals
[
idx
].
value
,
function
(
values
)
{
//console.log('data = ' + vals[idx].value);
idx
++
;
idx
++
;
if
(
values
!==
null
){
if
(
values
!==
null
){
result
.
latitude
=
json
.
xhr
.
IO
.
Latitude
;
result
.
latitude
=
json
.
xhr
.
IO
.
Latitude
;
...
@@ -57,6 +57,7 @@ function perform_function(context,request,response){
...
@@ -57,6 +57,7 @@ function perform_function(context,request,response){
});
});
}
}
else
callback
();
else
callback
();
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment