Commit ea57e916 authored by Porter Libby's avatar Porter Libby
Browse files

add hostid to subqueries of host

parent 583d0902
......@@ -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 = [];
......
......@@ -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);
......
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