From 3157326291ebc4c7d5e4a56877ac6215f2059266 Mon Sep 17 00:00:00 2001 From: Moe Date: Sat, 10 Jun 2017 17:49:29 -0700 Subject: [PATCH 01/26] delete corrupt files option --- camera.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/camera.js b/camera.js index cbe395d1..5180f1bf 100644 --- a/camera.js +++ b/camera.js @@ -52,6 +52,7 @@ if(!config.autoDropCache){config.autoDropCache=true} if(!config.doSnapshot){config.doSnapshot=true} if(!config.restart){config.restart={}} if(!config.systemLog){config.systemLog=true} +if(!config.deleteCorruptFiles){config.deleteCorruptFiles=true} if(!config.restart.onVideoNotExist){config.restart.onVideoNotExist=true} if(!config.ip||config.ip===''||config.ip.indexOf('0.0.0.0')>-1){config.ip='localhost'}else{config.bindip=config.ip}; if(!config.cron)config.cron={}; @@ -476,7 +477,7 @@ s.video=function(x,e){ e.filesize=k.stat.size; e.filesizeMB=parseFloat((e.filesize/1000000).toFixed(2)); e.end_time=s.moment(k.stat.mtime,'YYYY-MM-DD HH:mm:ss'); - if(e.filesizeMB>0.25){ + if(config.deleteCorruptFiles===false||e.filesizeMB>0.25){ e.save=[e.filesize,1,e.end_time,e.id,e.ke,s.nameToTime(e.filename)]; if(!e.status){e.save.push(0)}else{e.save.push(e.status)} sql.query('UPDATE Videos SET `size`=?,`status`=?,`end`=? WHERE `mid`=? AND `ke`=? AND `time`=? AND `status`=?',e.save) From 612474a7f33f8270e369e4e2fde8bc0511f52b82 Mon Sep 17 00:00:00 2001 From: Moe Date: Sat, 10 Jun 2017 20:17:09 -0700 Subject: [PATCH 02/26] fix condition for corruptfile ignore option --- camera.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/camera.js b/camera.js index 5180f1bf..8854f0cf 100644 --- a/camera.js +++ b/camera.js @@ -477,7 +477,10 @@ s.video=function(x,e){ e.filesize=k.stat.size; e.filesizeMB=parseFloat((e.filesize/1000000).toFixed(2)); e.end_time=s.moment(k.stat.mtime,'YYYY-MM-DD HH:mm:ss'); - if(config.deleteCorruptFiles===false||e.filesizeMB>0.25){ + if(config.deleteCorruptFiles===true&&e.filesizeMB<0.25){ + s.video('delete',e); + s.log(e,{type:'File Corrupt',msg:{ffmpeg:s.group[e.ke].mon[e.mid].ffmpeg,filesize:e.filesizeMB}}) + }else{ e.save=[e.filesize,1,e.end_time,e.id,e.ke,s.nameToTime(e.filename)]; if(!e.status){e.save.push(0)}else{e.save.push(e.status)} sql.query('UPDATE Videos SET `size`=?,`status`=?,`end`=? WHERE `mid`=? AND `ke`=? AND `time`=? AND `status`=?',e.save) @@ -529,9 +532,6 @@ s.video=function(x,e){ s.init('diskUsed',e) } } - }else{ - s.video('delete',e); - s.log(e,{type:'File Corrupt',msg:{ffmpeg:s.group[e.ke].mon[e.mid].ffmpeg,filesize:e.filesizeMB}}) } }else{ s.video('delete',e); From 6d46dc619b1b7a0c0001615ff9b5f3223d490e23 Mon Sep 17 00:00:00 2001 From: Moe Date: Sat, 10 Jun 2017 21:55:40 -0700 Subject: [PATCH 03/26] UI for dragging more apparent --- web/libs/css/main.dash2.css | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/libs/css/main.dash2.css b/web/libs/css/main.dash2.css index 8a470140..854f4a89 100644 --- a/web/libs/css/main.dash2.css +++ b/web/libs/css/main.dash2.css @@ -86,7 +86,8 @@ img{max-width:100%} #region_editor_live iframe,.canvas_holder canvas{border:0;position:absolute;left:0;top:0} .canvas_holder canvas{z-index:11} -.demo-blog .mdl-card__media ~ .mdl-card__supporting-text{position:relative;overflow:hidden} +.demo-blog .mdl-card__media ~ .mdl-card__supporting-text{position:relative;overflow:hidden;cursor:move} +.demo-blog .mdl-card__media ~ .mdl-card__supporting-text .btn-group{cursor: default} .demo-blog .demo-blog__posts.montage{max-width:100%} @media screen and (max-width:1500px){ @@ -177,16 +178,18 @@ img.circle-img,div.circle-img{border-radius:50%;height:50px;width:50px} } .side-menu .monitor_block:hover .icons{opacity:1} .side-menu .monitor_block:hover .title{opacity:1} -.side-menu .monitor_block .icons,.side-menu .monitor_block .title{opacity:0;width:100%;bottom:0;left:0;background:rgba(0,0,0,0.6);position:absolute;padding:2.5px;z-index:11} +.side-menu .monitor_block .icons,.side-menu .monitor_block .title{opacity:0;width:100%;bottom:0;left:0;background:rgba(0,0,0,0.6);position:absolute;padding:2.5px;z-index:11;cursor:move} .side-menu .monitor_block .title{bottom:auto;top:0;color:#fff} .nav-xs.side-menu .monitor_block{width:100%} .side-menu .monitor_block .list-data{display:none} .output_data:empty{display:none} .output_data{max-height:500px;font-family:monospace;padding:10px;border-radius:5px;background:#f3f3f3;overflow:auto} .side-menu.list-blocks .monitor_block .icons,.side-menu.list-blocks .monitor_block .title{position:inherit;opacity:1;background:none} +.side-menu.list-blocks .monitor_block .title{padding:5px;border-radius:5px;background:#222;cursor: n-resize} .side-menu.list-blocks .monitor_block:not(:last-child){border-bottom: 1px solid #54502d;} .side-menu.list-blocks .monitor_block:first-child{border-top: 1px solid #54502d;} -.side-menu.list-blocks .monitor_block{float:none;width:100%;padding: 10px;} +.side-menu.list-blocks .monitor_block{float:none;width:100%;padding: 10px} +.side-menu.list-blocks .monitor_block.ui-sortable-helper{background:rgba(0,0,0,0.6);border-radius:5px;padding:5px;border:0} .side-menu.list-blocks .monitor_block .list-data{display:block} .side-menu.list-blocks .monitor_block img{width:60px;height:60px;cursor:pointer;display:inline-block;margin-right:10px;border-radius:50%;vertical-align:top;border:0} .nav-xs.side-menu.list-blocks .monitor_block img{width:40px;height:40px;} From f0fd92d3015035a1759ffebfd80276a6734d0f62 Mon Sep 17 00:00:00 2001 From: Moe Date: Sat, 10 Jun 2017 22:03:34 -0700 Subject: [PATCH 04/26] fix "false" interpretation error --- camera.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/camera.js b/camera.js index 8854f0cf..06569598 100644 --- a/camera.js +++ b/camera.js @@ -47,18 +47,18 @@ var config = require('./conf.json'); if(config.mail){ var nodemailer = require('nodemailer').createTransport(config.mail); } -if(!config.cpuUsageMarker){config.cpuUsageMarker='%Cpu'} -if(!config.autoDropCache){config.autoDropCache=true} -if(!config.doSnapshot){config.doSnapshot=true} -if(!config.restart){config.restart={}} -if(!config.systemLog){config.systemLog=true} -if(!config.deleteCorruptFiles){config.deleteCorruptFiles=true} -if(!config.restart.onVideoNotExist){config.restart.onVideoNotExist=true} -if(!config.ip||config.ip===''||config.ip.indexOf('0.0.0.0')>-1){config.ip='localhost'}else{config.bindip=config.ip}; -if(!config.cron)config.cron={}; -if(!config.cron.deleteOverMax)config.cron.deleteOverMax=true; -if(!config.cron.deleteOverMaxOffset)config.cron.deleteOverMaxOffset=0.9; -if(!config.pluginKeys)config.pluginKeys={}; +if(config.cpuUsageMarker===undefined){config.cpuUsageMarker='%Cpu'} +if(config.autoDropCache===undefined){config.autoDropCache=true} +if(config.doSnapshot===undefined){config.doSnapshot=true} +if(config.restart===undefined){config.restart={}} +if(config.systemLog===undefined){config.systemLog=true} +if(config.deleteCorruptFiles===undefined){config.deleteCorruptFiles=true} +if(config.restart.onVideoNotExist===undefined){config.restart.onVideoNotExist=true} +if(config.ip===undefined||config.ip===''||config.ip.indexOf('0.0.0.0')>-1){config.ip='localhost'}else{config.bindip=config.ip}; +if(config.cron===undefined)config.cron={}; +if(config.cron.deleteOverMax===undefined)config.cron.deleteOverMax=true; +if(config.cron.deleteOverMaxOffset===undefined)config.cron.deleteOverMaxOffset=0.9; +if(config.pluginKeys===undefined)config.pluginKeys={}; server.listen(config.port,config.bindip); @@ -2506,7 +2506,7 @@ app.get(['/:auth/mjpeg/:ke/:id','/:auth/mjpeg/:ke/:id/:addon'], function(req,res res.write("\r\n"); res.write(content,'binary'); res.write("\r\n"); - if(s.group[req.params.ke]&&s.group[req.params.ke].mon[req.params.id]){ + if(s.group[req.params.ke]&&s.group[req.params.ke].mon[req.params.id]&&s.group[req.params.ke].mon[req.params.id].emitter){ s.group[req.params.ke].mon[req.params.id].emitter.on('data',contentWriter=function(d){ content = d; res.write(content,'binary'); From e644cedc5fcc5d12fff99fe6ed5efada0a929fe5 Mon Sep 17 00:00:00 2001 From: Michael Fischer Date: Sun, 11 Jun 2017 04:08:11 -0500 Subject: [PATCH 05/26] graceful shutdown of ffmpeg --- camera.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/camera.js b/camera.js index 06569598..618441a1 100644 --- a/camera.js +++ b/camera.js @@ -197,7 +197,7 @@ s.kill=function(x,e,p){ if(s.group[e.ke].mon[e.id].child_node){ s.cx({f:'kill',d:s.init('noReference',e)},s.group[e.ke].mon[e.id].child_node_id) }else{ - if(!x||x===1){return};p=x.pid;x.stdin.pause();setTimeout(function(){x.kill('SIGTERM');delete(x);setTimeout(function(){exec('kill -9 '+p,{detached: true})},1000)},1000) + if(!x||x===1){return};x.stdin.setEncoding('utf8');x.stdin.write('q'); } } } @@ -1064,7 +1064,9 @@ s.camera=function(x,e,cn,tx){ e.error_count=0; s.group[e.ke].mon[e.id].error_socket_timeout_count=0; if(!e.details.fatal_max||e.details.fatal_max===''){e.details.fatal_max=10}else{e.details.fatal_max=parseFloat(e.details.fatal_max)} - s.kill(s.group[e.ke].mon[e.id].spawn,e); + if(s.group[e.ke].mon[e.id].spawn !== undefined && s.group[e.ke].mon[e.id].spawn.connected){ + s.kill(s.group[e.ke].mon[e.id].spawn,e); + } e.draw=function(err,o){ if(o.success===true){ e.frames=0; From f6914ab7bbb8df9769636e6763357fb441b6335e Mon Sep 17 00:00:00 2001 From: Michael Fischer Date: Sun, 11 Jun 2017 04:08:57 -0500 Subject: [PATCH 06/26] initialize process.send with noop function --- camera.js | 1 + 1 file changed, 1 insertion(+) diff --git a/camera.js b/camera.js index 618441a1..90115aee 100644 --- a/camera.js +++ b/camera.js @@ -44,6 +44,7 @@ var events = require('events'); var df = require('node-df'); var Cam = require('onvif').Cam; var config = require('./conf.json'); +process.send = process.send || function () {}; if(config.mail){ var nodemailer = require('nodemailer').createTransport(config.mail); } From 372a540365a9e28e3eea58b3b011585fa6f32fc7 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 11 Jun 2017 11:01:24 -0700 Subject: [PATCH 07/26] update kill for ffmpeg with stdin commands disabled --- camera.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/camera.js b/camera.js index 90115aee..e37b5ab7 100644 --- a/camera.js +++ b/camera.js @@ -198,7 +198,12 @@ s.kill=function(x,e,p){ if(s.group[e.ke].mon[e.id].child_node){ s.cx({f:'kill',d:s.init('noReference',e)},s.group[e.ke].mon[e.id].child_node_id) }else{ - if(!x||x===1){return};x.stdin.setEncoding('utf8');x.stdin.write('q'); + if(!x||x===1){return}; + if(s.group[e.ke].mon_conf[e.id]===('socket'||'jpeg'||'pipe')){ + x.stdin.pause();p=x.pid;setTimeout(function(){x.kill('SIGTERM');delete(x);setTimeout(function(){exec('kill -9 '+p,{detached: true})},1000)},1000) + }else{ + x.stdin.setEncoding('utf8');x.stdin.write('q'); + } } } } From 6145651d9a6253b5256e18bc3324a10f099b1728 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 11 Jun 2017 11:46:04 -0700 Subject: [PATCH 08/26] syntax fix --- camera.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/camera.js b/camera.js index e37b5ab7..151c6c27 100644 --- a/camera.js +++ b/camera.js @@ -199,7 +199,7 @@ s.kill=function(x,e,p){ s.cx({f:'kill',d:s.init('noReference',e)},s.group[e.ke].mon[e.id].child_node_id) }else{ if(!x||x===1){return}; - if(s.group[e.ke].mon_conf[e.id]===('socket'||'jpeg'||'pipe')){ + if(s.group[e.ke].mon_conf[e.id].type===('socket'||'jpeg'||'pipe')){ x.stdin.pause();p=x.pid;setTimeout(function(){x.kill('SIGTERM');delete(x);setTimeout(function(){exec('kill -9 '+p,{detached: true})},1000)},1000) }else{ x.stdin.setEncoding('utf8');x.stdin.write('q'); @@ -279,7 +279,6 @@ s.init=function(x,e,k,fn){ if(!s.group[e.ke].mon[e.mid]){s.group[e.ke].mon[e.mid]={}} if(!s.group[e.ke].mon[e.mid].watch){s.group[e.ke].mon[e.mid].watch={}}; if(!s.group[e.ke].mon[e.mid].fixingVideos){s.group[e.ke].mon[e.mid].fixingVideos={}}; - if(e.type==='record'){e.record=1}else{e.record=0} if(!s.group[e.ke].mon[e.mid].record){s.group[e.ke].mon[e.mid].record={yes:e.record}}; if(!s.group[e.ke].mon[e.mid].started){s.group[e.ke].mon[e.mid].started=0}; if(s.group[e.ke].mon[e.mid].delete){clearTimeout(s.group[e.ke].mon[e.mid].delete)} From 96ff8622a930a742707ebf4af71ae8659f5ec182 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 11 Jun 2017 16:47:55 -0700 Subject: [PATCH 09/26] proper video piping to client --- camera.js | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/camera.js b/camera.js index 151c6c27..704192c1 100644 --- a/camera.js +++ b/camera.js @@ -2962,7 +2962,7 @@ app.get(['/libs/:f/:f2','/libs/:f/:f2/:f3'], function (req,res){ }); // Get video file app.get('/:auth/videos/:ke/:id/:file', function (req,res){ - req.fn=function(user){ + s.auth(req.params,function(user){ if(user.permissions.watch_videos==="0"||user.details.sub&&user.details.allmonitors!=='1'&&user.details.monitors.indexOf(req.params.id)===-1){ res.end('Not Permitted') return @@ -2970,16 +2970,33 @@ app.get('/:auth/videos/:ke/:id/:file', function (req,res){ req.dir=s.dir.videos+req.params.ke+'/'+req.params.id+'/'+req.params.file; if (fs.existsSync(req.dir)){ req.ext=req.params.file.split('.')[1]; - res.setHeader('content-type','video/'+req.ext); + var total = fs.statSync(req.dir).size; + if (req.headers['range']) { + var range = req.headers.range; + var parts = range.replace(/bytes=/, "").split("-"); + var partialstart = parts[0]; + var partialend = parts[1]; + + var start = parseInt(partialstart, 10); + var end = partialend ? parseInt(partialend, 10) : total-1; + var chunksize = (end-start)+1; + var file = fs.createReadStream(req.dir, {start: start, end: end}); + req.headerWrite={ 'Content-Range': 'bytes ' + start + '-' + end + '/' + total, 'Accept-Ranges': 'bytes', 'Content-Length': chunksize, 'Content-Type': 'video/'+req.ext } + req.writeCode=206 + } else { + req.headerWrite={ 'Content-Length': total, 'Content-Type': 'video/'+req.ext}; + var file=fs.createReadStream(req.dir) + req.writeCode=200 + } if(req.query.downloadName){ - res.setHeader('content-disposition','attachment; filename="'+req.query.downloadName+'"'); + req.headerWrite['content-disposition']='attachment; filename="'+req.query.downloadName+'"'; } - res.sendFile(req.dir); + res.writeHead(req.writeCode,req.headerWrite); + file.pipe(res); }else{ - res.send('File Not Found') + res.end('File Not Found') } - } - s.auth(req.params,req.fn,res,req); + },res,req); }); //motion trigger app.get('/:auth/motion/:ke/:id', function (req,res){ From 7dc201c53a3171c8d95019b57021e6f06fd3cbe2 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 11 Jun 2017 16:52:39 -0700 Subject: [PATCH 10/26] form layout changes --- web/libs/css/main.dash2.css | 10 +- web/libs/js/main.dash2.js | 3 +- web/pages/admin.ejs | 14 +- web/pages/blocks/api.html | 46 +-- web/pages/blocks/filters.ejs | 46 +-- web/pages/blocks/logs.html | 8 +- web/pages/blocks/monitoredit.ejs | 531 ++++++++++++++-------------- web/pages/blocks/probe.html | 20 +- web/pages/blocks/settings.ejs | 68 ++-- web/pages/blocks/subpermissions.ejs | 30 +- 10 files changed, 397 insertions(+), 379 deletions(-) diff --git a/web/libs/css/main.dash2.css b/web/libs/css/main.dash2.css index 854f4a89..7c4799bf 100644 --- a/web/libs/css/main.dash2.css +++ b/web/libs/css/main.dash2.css @@ -131,9 +131,15 @@ img.circle-img,div.circle-img{border-radius:50%;height:50px;width:50px} #region_editor .cord_element{position:absolute;background:rgba(221, 221, 221, 0.8);z-index:11;padding:5px;} #region_editor .cord_element.selected{z-index:12;} #region_editor .cord_element .controls{margin-bottom:5px;} -.form-group label span{width:35%;padding:5px;font-weight: 400;color: #2d2d2d;display: inline-block;border-bottom: 1px dotted #ddd;font-size: 10pt;} -.form-group label{display: flex} +.form-group label span{padding:5px;font-weight: 400;color: #2d2d2d;display:block;border-bottom: 1px dotted #ddd;font-size: 10pt;} +.form-group label{display:table} +.form-group label>div{display:table-cell} +.form-group label>div:nth-child(2n-1){width:30%} +.form-group label>div:nth-child(2){width:70%;padding:5px;border:1px solid #dedede;border-radius:5px} .form-group label span small{margin-left: 2px;display:block;font-weight: 600;} +.form-group-group blockquote:before,.form-group-group blockquote:after{content:''} +.form-group-group blockquote{letter-spacing:normal;font-style:normal} +.form-group-group blockquote P:last-child{margin-bottom:0} .form-group-group-group>div,.form-group-group-group .h_us_advanced>div{margin-bottom:15px;} .form-group-group{padding:0 10px 10px 10px;overflow:hidden;margin-bottom:15px;border-radius:5px;border:1px solid #ddd;background:#fff} .form-group-group table{width:100%} diff --git a/web/libs/js/main.dash2.js b/web/libs/js/main.dash2.js index 21e4fe82..a6f74f4b 100644 --- a/web/libs/js/main.dash2.js +++ b/web/libs/js/main.dash2.js @@ -1408,12 +1408,11 @@ $.aM.f.find('[selector]').change(function(e){ e.v=$(this).val();e.a=$(this).attr('selector') $.aM.f.find('.'+e.a+'_input').hide() $.aM.f.find('.'+e.a+'_'+e.v).show(); + $.aM.f.find('.'+e.a+'_text').text($(this).find('option:selected').text()) }); $.aM.f.find('[name="type"]').change(function(e){ e.e=$(this); e.v=e.e.val(); - $.aM.f.find('.h_t_input').hide() - $.aM.f.find('.h_t_'+e.v).show(); e.h=$.aM.f.find('[name="path"]'); e.p=e.e.parents('.form-group'); switch(e.v){ diff --git a/web/pages/admin.ejs b/web/pages/admin.ejs index c6c642e7..893614b1 100644 --- a/web/pages/admin.ejs +++ b/web/pages/admin.ejs @@ -65,20 +65,20 @@

Add

-
-
-
+
diff --git a/web/pages/blocks/api.html b/web/pages/blocks/api.html index 326943c0..14e1ff97 100644 --- a/web/pages/blocks/api.html +++ b/web/pages/blocks/api.html @@ -12,64 +12,64 @@
-
-
-
-
-
diff --git a/web/pages/blocks/filters.ejs b/web/pages/blocks/filters.ejs index a43f1b58..ae5a6bfb 100644 --- a/web/pages/blocks/filters.ejs +++ b/web/pages/blocks/filters.ejs @@ -14,14 +14,14 @@

Saved Filters :

-
@@ -38,22 +38,22 @@
@@ -66,42 +66,42 @@

Action for Selected

-
-
-
-
-
diff --git a/web/pages/blocks/logs.html b/web/pages/blocks/logs.html index 7bb5255a..b5103ccd 100644 --- a/web/pages/blocks/logs.html +++ b/web/pages/blocks/logs.html @@ -11,9 +11,11 @@
-
-
-
-
-
-
@@ -545,39 +556,39 @@
-
-
-
-
@@ -616,70 +627,70 @@
-
-
diff --git a/web/pages/blocks/probe.html b/web/pages/blocks/probe.html index b4db9702..41659e5f 100644 --- a/web/pages/blocks/probe.html +++ b/web/pages/blocks/probe.html @@ -14,8 +14,8 @@
-
-
@@ -91,33 +91,33 @@

WebDAV

-
-
-
-
-
@@ -126,13 +126,13 @@ diff --git a/web/pages/blocks/subpermissions.ejs b/web/pages/blocks/subpermissions.ejs index 14d80519..513fb3ad 100644 --- a/web/pages/blocks/subpermissions.ejs +++ b/web/pages/blocks/subpermissions.ejs @@ -11,11 +11,11 @@
@@ -28,11 +28,11 @@ <% $mons.forEach(function(v,n){ %>
-
<% }) %> @@ -47,11 +47,11 @@ <% $mons.forEach(function(v,n){ %>
-
<% }) %> @@ -66,11 +66,11 @@ <% $mons.forEach(function(v,n){ %>
-
<% }) %> @@ -85,11 +85,11 @@ <% $mons.forEach(function(v,n){ %>
-
<% }) %> From 550e0e3dca24bd563645ab9fca60586e1a3f42b2 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 11 Jun 2017 21:39:04 -0700 Subject: [PATCH 11/26] control button execution fix --- web/libs/js/main.dash2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/libs/js/main.dash2.js b/web/libs/js/main.dash2.js index a6f74f4b..bed01886 100644 --- a/web/libs/js/main.dash2.js +++ b/web/libs/js/main.dash2.js @@ -2210,7 +2210,7 @@ $('body') break; case'control_toggle': e.e=e.p.find('.PTZ_controls'); - if(e.e.length>0){e.e.remove()}else{e.p.append('
')} + if(e.e.length>0){e.e.remove()}else{e.p.append('
')} break; case'watch': if($("#monitor_live_"+e.mid).length===0||$.ccio.mon[e.mid].watch!==1){ From 8fb68fe603a6ebbed6f350b040f4708c4884a000 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 11 Jun 2017 21:48:59 -0700 Subject: [PATCH 12/26] fix monitor section UI --- web/pages/blocks/monitoredit.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pages/blocks/monitoredit.ejs b/web/pages/blocks/monitoredit.ejs index c078c757..dceb5c67 100644 --- a/web/pages/blocks/monitoredit.ejs +++ b/web/pages/blocks/monitoredit.ejs @@ -476,7 +476,7 @@
-

Detector : Not Connected

+

Detector : Not Connected

+
+ +
+
+ +
-
-
- -
-
+ +