remove frame limit on timelapse frame retrieval

montage-api
Moe 2021-12-03 10:20:56 -08:00
parent 4b418ed8a3
commit 80f5225191
3 changed files with 8 additions and 2 deletions

View File

@ -177,6 +177,7 @@ module.exports = function(s,config){
]
const monitorRestrictions = options.monitorRestrictions
var frameLimit = options.limit
const noLimit = options.noLimit === '1'
const endIsStartTo = options.endIsStartTo
const chosenDate = options.date
const startDate = options.startDate ? stringToSqlTime(options.startDate) : null
@ -226,7 +227,7 @@ module.exports = function(s,config){
where: whereQuery,
orderBy: options.orderBy,
groupBy: options.groupBy,
limit: frameLimit || '500'
limit: noLimit ? undefined : frameLimit || '500'
},(err,r) => {
if(err){
callback({

View File

@ -203,6 +203,7 @@ module.exports = function(s,config,lang,app,io){
startOperator: req.query.startOperator,
endOperator: req.query.endOperator,
limit: req.query.limit,
noLimit: req.query.noLimit,
archived: req.query.archived,
rowType: 'frames',
endIsStartTo: true

View File

@ -70,7 +70,11 @@ $(document).ready(function(e){
if(!startDate)startDate = dateRange.startDate
if(!endDate)endDate = dateRange.endDate
if(!selectedMonitor)selectedMonitor = monitorsList.val()
var queryString = ['start=' + startDate,'end=' + endDate]
var queryString = [
'start=' + startDate,
'end=' + endDate,
'noLimit=1'
]
var frameIconsHtml = ''
var apiURL = apiBaseUrl + '/timelapse/' + $user.ke + '/' + selectedMonitor
$.getJSON(apiURL + '?' + queryString.join('&'),function(data){