Commit 909de380 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

fixed snapshot for cameras with unused ports

parent fa73d623
......@@ -775,7 +775,17 @@ function snapshot_find_latest_ts(ptrs){
var total_ports = 0;
for(var i=0;i<ptrs.length;i++){
total_ports += $(ptrs[i]).find('port').length;
let port_counter = 0;
let ports = $(ptrs[i]).find('port');
for(p of ports){
let sensors = $(p).attr("sensor").replace(/\s/g,'').split(",");
if (!sensors.every(v => v==='none')){
port_counter++;
}
}
total_ports += port_counter;
}
var ts = [];
......
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