Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Field Science
datavis
Commits
9d8d3f1a
Commit
9d8d3f1a
authored
Feb 28, 2020
by
Porter Libby
Browse files
Merge branch 'master' of
https://github.com/probably-not-porter/datavis
parents
e0e719c8
ea57e916
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/js/data.js
View file @
9d8d3f1a
...
...
@@ -366,7 +366,7 @@ function getStreamingsDates(platformid){
$
.
ajax
({
type
:
'
GET
'
,
url
:
'
/streamingsdates
'
,
data
:
{
platformid
:
platformid
,
sectorid
:
query_selection
[
2
],
siteid
:
query_selection
[
1
],
tripid
:
query_selection
[
0
]},
data
:
{
platformid
:
platformid
,
hostid
:
query_selection
[
3
]
,
sectorid
:
query_selection
[
2
],
siteid
:
query_selection
[
1
],
tripid
:
query_selection
[
0
]},
success
:
function
(
response
)
{
var
dates
=
[];
for
(
x
=
0
;
x
<
response
.
length
;
x
++
){
...
...
@@ -393,7 +393,7 @@ function getStreamings(date){
$
.
ajax
({
type
:
'
GET
'
,
url
:
'
/streamings
'
,
data
:
{
date
:
date
,
platformid
:
query_selection
[
4
],
sectorid
:
query_selection
[
2
],
siteid
:
query_selection
[
1
],
tripid
:
query_selection
[
0
]},
data
:
{
date
:
date
,
platformid
:
query_selection
[
4
],
hostid
:
query_selection
[
3
],
sectorid
:
query_selection
[
2
],
siteid
:
query_selection
[
1
],
tripid
:
query_selection
[
0
]},
success
:
function
(
response
)
{
var
streamings
=
[];
...
...
queries.js
View file @
9d8d3f1a
...
...
@@ -164,7 +164,8 @@ const getStreamingsDates = (request, response) => {
var
query
=
'
SELECT DISTINCT recordtime FROM fieldday_streaming where tripid=
'
+
(
request
.
query
.
tripid
)
+
'
and siteid=
'
+
(
request
.
query
.
siteid
)
+
'
and sectorid=
'
+
request
.
query
.
sectorid
+
"
and platformid='
"
+
request
.
query
.
platformid
+
"
';
"
;
+
"
and platformid='
"
+
request
.
query
.
platformid
+
"
'
"
+
"
and hostid='
"
+
request
.
query
.
hostid
+
"
';
"
;
serverOut
(
query
);
pool
.
query
(
query
,
(
error
,
results
)
=>
{
...
...
@@ -183,6 +184,7 @@ const getStreamings = (request, response) => {
+
'
and siteid=
'
+
(
request
.
query
.
siteid
)
+
'
and sectorid=
'
+
request
.
query
.
sectorid
+
'
and platformid=
'
+
"
'
"
+
request
.
query
.
platformid
+
"
'
"
+
"
and hostid='
"
+
request
.
query
.
hostid
+
"
'
"
+
"
and substr(recordtime::text, 0, 11) like '
"
+
request
.
query
.
date
+
"
'
"
+
'
;
'
;
serverOut
(
query
);
...
...
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