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",
"field": lang.Indifference,
"description": "This can mean multiple things depending on the detector used. Built-In Motion Detection defines this as \"Percentage Changed in View or Region\"",
"field": lang['Minimum Change'],
"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",
"example": "10",
"possible": ""
},
{
"name": "detail=detector_max_sensitivity",
"field": lang["Max Indifference"],
"description": "An upperbound to indifference. Any value over this amount will be ignored.",
"field": lang["Maximum Change"],
"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": "",
"example": "75",
"possible": ""
@ -2706,7 +2706,7 @@ module.exports = function(s,config,lang){
{
"name": "detail=detector_frame",
"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",
"example": "",
"fieldType": "select",

View File

@ -254,6 +254,8 @@
"Live Stream Toggle": "Live Stream Toggle",
"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>",
"Minimum Change": "Minimum Change",
"Maximum Change": "Maximum Change",
"Indifference": "Indifference",
"Max Indifference": "Max Indifference",
"Trigger Threshold": "Trigger Threshold",

View File

@ -1877,14 +1877,22 @@ module.exports = function(s,config,lang){
//start drawing files
delete(activeMonitor.childNode)
//validate port
if(
e.type !== 'socket' &&
e.type !== 'dashcam' &&
e.protocol !== 'udp' &&
e.type !== 'local' &&
e.details.skip_ping !== '1'
){
e.port = e.port ? e.port : e.protocol === 'https' ? '443' : '80'
if(!e.port){
switch(e.protocol){
case'http':
e.port = '80'
break;
case'rtmps':
case'https':
e.port = '443'
break;
case'rtmp':
e.port = '1935'
break;
case'rtsp':
e.port = '554'
break;
}
}
launchMonitorProcesses(e)
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 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}
@media screen and (max-width: 600px){
.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.blue{border-color:#375182}
.form-group-group.blue > h4{background:#375182;color:#fff}
.form-group-group.navy{border-color:#31708f}
.form-group-group.navy > h4{background:#31708f;color:#fff}
.form-group-group.navy{border-color:#0858ab}
.form-group-group.navy > h4{background:#0858ab;color:#fff}
.form-group-group.green{border-color:#449d44}
.form-group-group.green > h4{background:#449d44;color:#fff}
.form-group-group.forestgreen{border-color:#1e4046}

View File

@ -367,7 +367,10 @@ var getMonitorEditFormFields = function(){
return response
}
var addSection = function(section){
sections[section.name] = section.id
sections[section.name] = {
id: section.id,
color: section.color
}
if(section.info){
$.each(section.info,function(m,block){
if(block.isFormGroupGroup === true){
@ -389,10 +392,11 @@ $.each($.ccio.definitions['Monitor Settings'].blocks,function(n,section){
var drawList = function(){
var list = monitorEditorWindow.find('.follow-list ul')
var html = ''
$.each(sections,function(sectionName,sectionId){
$.each(sections,function(sectionName,section){
var sectionId = section.id
var el = $('#' + sectionId + ':visible')
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)

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, '')
section.id = userSettingsId
}
$.sM.sections[section.name] = section.id
$.sM.sections[section.name] = {
id: section.id,
color: section.color
}
if(section.info){
$.each(section.info,function(m,block){
if(block.isFormGroupGroup === true){
@ -35,10 +38,11 @@ $.each($.ccio.definitions['Account Settings'].blocks,function(n,section){
$.sM.drawList = function(){
var list = $.sM.e.find('.follow-list ul')
var html = ''
$.each($.sM.sections,function(sectionName,sectionId){
$.each($.sM.sections,function(sectionName,section){
var sectionId = section.id
var el = $('#' + sectionId)
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)

View File

@ -244,7 +244,7 @@
</div>
<div class="modal-footer">
<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">
<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>

View File

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

View File

@ -32,7 +32,8 @@
<link rel="stylesheet" href="<%-window.libURL%>libs/css/<%-lib%>">
<% }) %>
<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 id="custom_css">
<%= details.css %>