allow passing region_name and snap_path in detector_webhook and detector_command

merge-requests/16/head
Moe 2018-07-15 15:44:51 -07:00
parent 9c93c7c777
commit 9dd8c2caf0
1 changed files with 4 additions and 0 deletions

View File

@ -3395,6 +3395,8 @@ s.camera=function(x,e,cn,tx){
if(d.mon.details.detector_webhook=='1'){
var detector_webhook_url = d.mon.details.detector_webhook_url
.replace(/{{TIME}}/g,s.timeObject(new Date).format())
.replace(/{{REGION_NAME}}/g,d.details.name)
.replace(/{{SNAP_PATH}}/g,s.dir.streams+'/'+d.ke+'/'+d.id+'/s.jpg')
.replace(/{{MONITOR_ID}}/g,d.id)
.replace(/{{GROUP_KEY}}/g,d.ke)
.replace(/{{DETAILS}}/g,detailString)
@ -3642,6 +3644,8 @@ s.camera=function(x,e,cn,tx){
},detector_command_timeout);
var detector_command = d.mon.details.detector_command
.replace(/{{TIME}}/g,s.timeObject(new Date).format())
.replace(/{{REGION_NAME}}/g,d.details.name)
.replace(/{{SNAP_PATH}}/g,s.dir.streams+'/'+d.ke+'/'+d.id+'/s.jpg')
.replace(/{{MONITOR_ID}}/g,d.id)
.replace(/{{GROUP_KEY}}/g,d.ke)
.replace(/{{DETAILS}}/g,detailString)