|
@@ -140,7 +140,7 @@ async def getCDR(start=None, end=None, **kwargs):
|
|
|
if end is None:
|
|
if end is None:
|
|
|
end = dt.now()
|
|
end = dt.now()
|
|
|
if start is None:
|
|
if start is None:
|
|
|
- start=(end - td(days=30))
|
|
|
|
|
|
|
+ start=(end - td(hours=24))
|
|
|
async for row in db.iterate(query='''SELECT linkedid,
|
|
async for row in db.iterate(query='''SELECT linkedid,
|
|
|
uniqueid,
|
|
uniqueid,
|
|
|
calldate,
|
|
calldate,
|
|
@@ -179,7 +179,7 @@ async def getCEL(start=None, end=None, **kwargs):
|
|
|
if end is None:
|
|
if end is None:
|
|
|
end = dt.now()
|
|
end = dt.now()
|
|
|
if start is None:
|
|
if start is None:
|
|
|
- start=(end - td(days=30))
|
|
|
|
|
|
|
+ start=(end - td(hours=24))
|
|
|
async for row in db.iterate(query='''SELECT linkedid,
|
|
async for row in db.iterate(query='''SELECT linkedid,
|
|
|
uniqueid,
|
|
uniqueid,
|
|
|
eventtime,
|
|
eventtime,
|
|
@@ -756,7 +756,7 @@ class DeviceUnBind(Resource):
|
|
|
@app.route('/cdr')
|
|
@app.route('/cdr')
|
|
|
class CDR(Resource):
|
|
class CDR(Resource):
|
|
|
@app.param('end', 'End of datetime range. Defaults to now. Allowed formats are: timestamp, ISO 8601 and ddmmyyyyHHMMSS', 'query')
|
|
@app.param('end', 'End of datetime range. Defaults to now. Allowed formats are: timestamp, ISO 8601 and ddmmyyyyHHMMSS', 'query')
|
|
|
- @app.param('start', 'Start of datetime range. Defaults to (start-30 days). Allowed formats are: timestamp, ISO 8601 and ddmmyyyyHHMMSS', 'query')
|
|
|
|
|
|
|
+ @app.param('start', 'Start of datetime range. Defaults to end-24h. Allowed formats are: timestamp, ISO 8601 and ddmmyyyyHHMMSS', 'query')
|
|
|
@app.response(HTTPStatus.OK, 'JSON reply')
|
|
@app.response(HTTPStatus.OK, 'JSON reply')
|
|
|
@app.response(HTTPStatus.UNAUTHORIZED, 'Authorization required')
|
|
@app.response(HTTPStatus.UNAUTHORIZED, 'Authorization required')
|
|
|
async def get(self):
|
|
async def get(self):
|
|
@@ -771,7 +771,7 @@ class CDR(Resource):
|
|
|
@app.route('/cel')
|
|
@app.route('/cel')
|
|
|
class CEL(Resource):
|
|
class CEL(Resource):
|
|
|
@app.param('end', 'End of datetime range. Defaults to now. Allowed formats are: timestamp, ISO 8601 and ddmmyyyyHHMMSS', 'query')
|
|
@app.param('end', 'End of datetime range. Defaults to now. Allowed formats are: timestamp, ISO 8601 and ddmmyyyyHHMMSS', 'query')
|
|
|
- @app.param('start', 'Start of datetime range. Defaults to (start-30 days). Allowed formats are: timestamp, ISO 8601 and ddmmyyyyHHMMSS', 'query')
|
|
|
|
|
|
|
+ @app.param('start', 'Start of datetime range. Defaults to end-24h. Allowed formats are: timestamp, ISO 8601 and ddmmyyyyHHMMSS', 'query')
|
|
|
@app.response(HTTPStatus.OK, 'JSON reply')
|
|
@app.response(HTTPStatus.OK, 'JSON reply')
|
|
|
@app.response(HTTPStatus.UNAUTHORIZED, 'Authorization required')
|
|
@app.response(HTTPStatus.UNAUTHORIZED, 'Authorization required')
|
|
|
async def get(self):
|
|
async def get(self):
|