Merge branch 'dev' into 'master'

An Early Merge for a Critical Fix

See merge request Shinobi-Systems/Shinobi!200
merge-requests/256/head
Moe 2020-06-05 22:26:45 +00:00
commit 3f536cc1c6
10 changed files with 74 additions and 27 deletions

View File

@ -2673,16 +2673,16 @@ module.exports = function(s,config,lang){
// }, // },
{ {
"name": "detail=detector_sensitivity", "name": "detail=detector_sensitivity",
"field": lang.Indifference, "field": lang['Minimum Change'],
"description": "This can mean multiple things depending on the detector used. Built-In Motion Detection defines this as \"Percentage Changed in View or Region\"", "description": "The motion confidence rating must exceed this value to be seen as a trigger. This number correlates directly to the confidence rating returned by the motion detector. This option was previously named \"Indifference\".",
"default": "10", "default": "10",
"example": "10", "example": "10",
"possible": "" "possible": ""
}, },
{ {
"name": "detail=detector_max_sensitivity", "name": "detail=detector_max_sensitivity",
"field": lang["Max Indifference"], "field": lang["Maximum Change"],
"description": "An upperbound to indifference. Any value over this amount will be ignored.", "description": "The motion confidence rating must be lower than this value to be seen as a trigger. Leave blank for no maximum. This option was previously named \"Max Indifference\".",
"default": "", "default": "",
"example": "75", "example": "75",
"possible": "" "possible": ""
@ -2706,7 +2706,7 @@ module.exports = function(s,config,lang){
{ {
"name": "detail=detector_frame", "name": "detail=detector_frame",
"field": lang["Full Frame Detection"], "field": lang["Full Frame Detection"],
"description": "This will read the entire frame for pixel differences.", "description": "This will read the entire frame for pixel differences. This is the same as creating a region that covers the entire screen.",
"default": "1", "default": "1",
"example": "", "example": "",
"fieldType": "select", "fieldType": "select",

View File

@ -254,6 +254,8 @@
"Live Stream Toggle": "Live Stream Toggle", "Live Stream Toggle": "Live Stream Toggle",
"RegionNote": "Points are only saved when you press <b>Save</b> on the <b>Monitor Settings</b> window.", "RegionNote": "Points are only saved when you press <b>Save</b> on the <b>Monitor Settings</b> window.",
"Points": "Points <small>When adding points click on the edge of the polygon.</small>", "Points": "Points <small>When adding points click on the edge of the polygon.</small>",
"Minimum Change": "Minimum Change",
"Maximum Change": "Maximum Change",
"Indifference": "Indifference", "Indifference": "Indifference",
"Max Indifference": "Max Indifference", "Max Indifference": "Max Indifference",
"Trigger Threshold": "Trigger Threshold", "Trigger Threshold": "Trigger Threshold",

View File

@ -1877,14 +1877,22 @@ module.exports = function(s,config,lang){
//start drawing files //start drawing files
delete(activeMonitor.childNode) delete(activeMonitor.childNode)
//validate port //validate port
if( if(!e.port){
e.type !== 'socket' && switch(e.protocol){
e.type !== 'dashcam' && case'http':
e.protocol !== 'udp' && e.port = '80'
e.type !== 'local' && break;
e.details.skip_ping !== '1' case'rtmps':
){ case'https':
e.port = e.port ? e.port : e.protocol === 'https' ? '443' : '80' e.port = '443'
break;
case'rtmp':
e.port = '1935'
break;
case'rtsp':
e.port = '554'
break;
}
} }
launchMonitorProcesses(e) launchMonitorProcesses(e)
break; break;

View File

@ -156,7 +156,35 @@ img{max-width:100%}
.follow-list ul{padding:0;margin:0;font-family:"Roboto","Helvetica","Arial",sans-serif;} .follow-list ul{padding:0;margin:0;font-family:"Roboto","Helvetica","Arial",sans-serif;}
.follow-list ul a:not(.btn){color:#fff} .follow-list ul a:not(.btn){
color:#fff;
font-weight: 300;
}
/* .follow-list .affix,
.follow-list .affix-top
{
width: 100%;
} */
.follow-list .dot {margin-right: 15px;}
.dot {
width:10px;
height:10px;
display:inline-block;
border-radius: 50%;
}
.dot-red {background:#d9534f}
.dot-purple {background:#3f51b5}
.dot-blue {background:#375182}
.dot-navy {background:#0858ab}
.dot-green {background:#449d44}
.dot-forestgreen {background:#1e4046}
.dot-orange {background:#c49a68}
.dot-grey {background:#777}
.os_bars{width:600px;display:inline-block;padding:5px 0 0 10px} .os_bars{width:600px;display:inline-block;padding:5px 0 0 10px}
@media screen and (max-width: 600px){ @media screen and (max-width: 600px){
.os_bars{width:200px;} .os_bars{width:200px;}

View File

@ -44,8 +44,8 @@ form.modal-body{margin:0}
.form-group-group.purple > h4{background:#3f51b5;color:#fff} .form-group-group.purple > h4{background:#3f51b5;color:#fff}
.form-group-group.blue{border-color:#375182} .form-group-group.blue{border-color:#375182}
.form-group-group.blue > h4{background:#375182;color:#fff} .form-group-group.blue > h4{background:#375182;color:#fff}
.form-group-group.navy{border-color:#31708f} .form-group-group.navy{border-color:#0858ab}
.form-group-group.navy > h4{background:#31708f;color:#fff} .form-group-group.navy > h4{background:#0858ab;color:#fff}
.form-group-group.green{border-color:#449d44} .form-group-group.green{border-color:#449d44}
.form-group-group.green > h4{background:#449d44;color:#fff} .form-group-group.green > h4{background:#449d44;color:#fff}
.form-group-group.forestgreen{border-color:#1e4046} .form-group-group.forestgreen{border-color:#1e4046}

View File

@ -367,7 +367,10 @@ var getMonitorEditFormFields = function(){
return response return response
} }
var addSection = function(section){ var addSection = function(section){
sections[section.name] = section.id sections[section.name] = {
id: section.id,
color: section.color
}
if(section.info){ if(section.info){
$.each(section.info,function(m,block){ $.each(section.info,function(m,block){
if(block.isFormGroupGroup === true){ if(block.isFormGroupGroup === true){
@ -389,10 +392,11 @@ $.each($.ccio.definitions['Monitor Settings'].blocks,function(n,section){
var drawList = function(){ var drawList = function(){
var list = monitorEditorWindow.find('.follow-list ul') var list = monitorEditorWindow.find('.follow-list ul')
var html = '' var html = ''
$.each(sections,function(sectionName,sectionId){ $.each(sections,function(sectionName,section){
var sectionId = section.id
var el = $('#' + sectionId + ':visible') var el = $('#' + sectionId + ':visible')
if(el.length > 0){ if(el.length > 0){
html += '<li><a class="scrollTo" href="#' + sectionId + '" scrollToParent="#add_monitor .modal-body">' + sectionName + '</a></li>' html += `<li><a class="scrollTo" href="#${sectionId}" scrollToParent="#add_monitor .modal-body"><span class="dot dot-${section.color}"></span>${sectionName}</a></li>`
} }
}) })
list.html(html) list.html(html)

View File

@ -15,7 +15,10 @@ var addSection = function(section){
var userSettingsId = section.name.replace(/[^a-zA-Z ]/g, '').replace(/[^a-zA-Z ]/g, '').replace(/ /g, '') var userSettingsId = section.name.replace(/[^a-zA-Z ]/g, '').replace(/[^a-zA-Z ]/g, '').replace(/ /g, '')
section.id = userSettingsId section.id = userSettingsId
} }
$.sM.sections[section.name] = section.id $.sM.sections[section.name] = {
id: section.id,
color: section.color
}
if(section.info){ if(section.info){
$.each(section.info,function(m,block){ $.each(section.info,function(m,block){
if(block.isFormGroupGroup === true){ if(block.isFormGroupGroup === true){
@ -35,10 +38,11 @@ $.each($.ccio.definitions['Account Settings'].blocks,function(n,section){
$.sM.drawList = function(){ $.sM.drawList = function(){
var list = $.sM.e.find('.follow-list ul') var list = $.sM.e.find('.follow-list ul')
var html = '' var html = ''
$.each($.sM.sections,function(sectionName,sectionId){ $.each($.sM.sections,function(sectionName,section){
var sectionId = section.id
var el = $('#' + sectionId) var el = $('#' + sectionId)
if(el.length > 0){ if(el.length > 0){
html += '<li><a class="scrollTo" href="#' + sectionId + '" scrollToParent="#settings .modal-body">' + sectionName + '</a></li>' html += `<li><a class="scrollTo" href="#${sectionId}" scrollToParent="#settings .modal-body"><span class="dot dot-${section.color}"></span>${sectionName}</a></li>`
} }
}) })
list.html(html) list.html(html)

View File

@ -244,7 +244,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div class="pull-left"> <div class="pull-left">
<button type="button" id="monedit_bottom_menu" class="btn btn-default"><i class="fa fa-wrench"></i> <%-lang.Options%></button> <button type="button" id="monedit_bottom_menu" style="margin-right:5px" class="btn btn-default"><i class="fa fa-wrench"></i> <%-lang.Options%></button>
<ul class="mdl-menu mdl-menu--top-left mdl-js-menu mdl-js-ripple-effect" data-mdl-for="monedit_bottom_menu"> <ul class="mdl-menu mdl-menu--top-left mdl-js-menu mdl-js-ripple-effect" data-mdl-for="monedit_bottom_menu">
<li class="mdl-menu__item mdl-menu__item--full-bleed-divider" data-dismiss="modal"><i class="fa fa-times"></i> <%-lang.Close%></li> <li class="mdl-menu__item mdl-menu__item--full-bleed-divider" data-dismiss="modal"><i class="fa fa-times"></i> <%-lang.Close%></li>
<li class="mdl-menu__item" monitor="delete"><i class="fa fa-trash-o"></i> <%-lang.Delete%></li> <li class="mdl-menu__item" monitor="delete"><i class="fa fa-trash-o"></i> <%-lang.Delete%></li>

View File

@ -12,7 +12,7 @@
<div class="row"> <div class="row">
<div class="col-md-6 text-left"> <div class="col-md-6 text-left">
<div class="form-group-group orange where"> <div class="form-group-group orange where">
<h4><span class="cord_name"></span> <h4><span class="cord_name">&nbsp;</span>
<div class="pull-right"> <div class="pull-right">
<a class="btn btn-success btn-xs add">&nbsp;<i class="fa fa-plus"></i>&nbsp;</a> <a class="btn btn-success btn-xs add">&nbsp;<i class="fa fa-plus"></i>&nbsp;</a>
<a class="btn btn-danger btn-xs erase">&nbsp;<i class="fa fa-trash-o"></i>&nbsp;</a> <a class="btn btn-danger btn-xs erase">&nbsp;<i class="fa fa-trash-o"></i>&nbsp;</a>
@ -32,13 +32,13 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label> <label>
<div><span><%-lang['Indifference']%></span></div> <div><span><%-lang['Minimum Change']%></span></div>
<div><input class="form-control" name="sensitivity"></div> <div><input class="form-control" name="sensitivity"></div>
</label> </label>
</div> </div>
<div class="form-group"> <div class="form-group">
<label> <label>
<div><span><%-lang['Max Indifference']%></span></div> <div><span><%-lang['Maximum Change']%></span></div>
<div><input class="form-control" name="max_sensitivity"></div> <div><input class="form-control" name="max_sensitivity"></div>
</label> </label>
</div> </div>

View File

@ -32,7 +32,8 @@
<link rel="stylesheet" href="<%-window.libURL%>libs/css/<%-lib%>"> <link rel="stylesheet" href="<%-window.libURL%>libs/css/<%-lib%>">
<% }) %> <% }) %>
<style id="theme"> <style id="theme">
<% if(details.theme&&details.theme!==''){ %><%- include(__dirname+'/web/libs/themes/'+details.theme+'/style.css'); %><% } %> <% details.theme = details.theme || 'Ice' %>
<%- include(__dirname + `/web/libs/themes/${details.theme}/style.css`); %>
</style> </style>
<style id="custom_css"> <style id="custom_css">
<%= details.css %> <%= details.css %>