mirror of
https://gitlab.com/Shinobi-Systems/ShinobiCE.git
synced 2025-03-09 15:40:15 +00:00
Support Shinobi at https://licenses.shinobi.video/subscribe
This commit is contained in:
parent
ef40f3f231
commit
167603dfb0
118 changed files with 16152 additions and 5441 deletions
|
@ -7,6 +7,13 @@ $.ccio.cx=function(x,user){
|
|||
if(!x.uid){x.uid=user.uid;};
|
||||
return user.ws.emit('f',x)
|
||||
}
|
||||
$.diskUsed = {
|
||||
main: $('.diskUsed'),
|
||||
list: {},
|
||||
}
|
||||
$.each(addStorage,function(n,storage){
|
||||
$.diskUsed.list[storage.name] = $(`#diskUsedList [storage="${storage.name}"]`)
|
||||
})
|
||||
$.ccio.globalWebsocket=function(d,user){
|
||||
if(d.f!=='monitor_frame'&&d.f!=='os'&&d.f!=='video_delete'&&d.f!=='detector_trigger'&&d.f!=='detector_record_timeout_start'&&d.f!=='log'){$.ccio.log(d);}
|
||||
if(!user){
|
||||
|
@ -151,12 +158,26 @@ $.ccio.globalWebsocket=function(d,user){
|
|||
break;
|
||||
case'diskUsed':
|
||||
if(!d.limit||d.limit===''){d.limit=10000}
|
||||
d.percent=parseInt((d.size/d.limit)*100)+'%';
|
||||
d.human=parseFloat(d.size)
|
||||
d.percent = parseInt((d.size/d.limit)*100)+'%';
|
||||
d.human = parseFloat(d.size)
|
||||
if(d.human>1000){d.human=(d.human/1000).toFixed(2)+' GB'}else{d.human=d.human.toFixed(2)+' MB'}
|
||||
$('.diskUsed .value').html(d.human)
|
||||
$('.diskUsed .percent').html(d.percent)
|
||||
$('.diskUsed .progress-bar').css('width',d.percent)
|
||||
$.diskUsed.main.find('.value').html(d.human)
|
||||
$.diskUsed.main.find('.percent').html(d.percent)
|
||||
$.diskUsed.main.find('.progress-bar').css('width',d.percent)
|
||||
if(d.addStorage){
|
||||
$.each(d.addStorage,function(n,storage){
|
||||
var percent = parseInt((storage.usedSpace/storage.sizeLimit)*100)+'%'
|
||||
var humanValue = parseFloat(storage.usedSpace)
|
||||
if(humanValue > 1000){
|
||||
humanValue = (humanValue/1000).toFixed(2)+' GB'
|
||||
}else{
|
||||
humanValue = humanValue.toFixed(2)+' MB'
|
||||
}
|
||||
$.diskUsed.list[storage.name].find('.value').html(humanValue)
|
||||
$.diskUsed.list[storage.name].find('.percent').html(percent)
|
||||
$.diskUsed.list[storage.name].find('.progress-bar').css('width',percent)
|
||||
})
|
||||
}
|
||||
break;
|
||||
case'video_fix_success':case'video_fix_start':
|
||||
switch(d.f){
|
||||
|
@ -723,9 +744,14 @@ $.ccio.globalWebsocket=function(d,user){
|
|||
type: "time",
|
||||
display: true,
|
||||
time: {
|
||||
format: timeFormat,
|
||||
// round: 'day'
|
||||
}
|
||||
// format: timeFormat,
|
||||
unit: 'minute',
|
||||
displayFormats: {
|
||||
minute: 'h:mm a',
|
||||
},
|
||||
},
|
||||
categoryPercentage: 0.6,
|
||||
barPercentage: .5,
|
||||
}],
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue