diff --git a/libs/user/utils.js b/libs/user/utils.js
index a0a8f7ce..c79115b7 100644
--- a/libs/user/utils.js
+++ b/libs/user/utils.js
@@ -204,8 +204,8 @@ module.exports = (s,config,lang) => {
}
var storageIndex = theGroup.addStorageUse[storageId]
//run purge command
- const maxSize = (storageIndex.usedSpaceVideos * (theGroup.sizeLimitVideoPercent / 100) * config.cron.deleteOverMaxOffset);
- if(storageIndex.usedSpace > maxSize){
+ const maxSize = (storageIndex.sizeLimit * (theGroup.sizeLimitVideoPercent / 100) * config.cron.deleteOverMaxOffset);
+ if(storageIndex.usedSpaceVideos > maxSize){
s.knexQuery({
action: "select",
columns: "*",
diff --git a/web/assets/js/bs5.dashboard-base.js b/web/assets/js/bs5.dashboard-base.js
index 3ed40b4c..7ba5d49a 100644
--- a/web/assets/js/bs5.dashboard-base.js
+++ b/web/assets/js/bs5.dashboard-base.js
@@ -911,9 +911,13 @@ function drawIndicatorBar(item){
`
diff --git a/web/assets/js/bs5.startup.js b/web/assets/js/bs5.startup.js
index 6da77bc4..87c3b5b2 100644
--- a/web/assets/js/bs5.startup.js
+++ b/web/assets/js/bs5.startup.js
@@ -91,6 +91,7 @@ function loadBoxWrappers() {
function drawAddStorageIndicators(){
$.each(addStorage,function(n,storage){
drawIndicatorBar({
+ multiple: true,
icon: 'hdd-o',
name: storage.name,
label: `${storage.name} : `,
@@ -199,16 +200,25 @@ onWebSocketEvent(function (d){
diskIndicatorBar[2].title = `${lang['FileBin Share']} : ${fileBinPercent}`
if(d.addStorage){
$.each(d.addStorage,function(n,storage){
- var percent = parseInt((storage.usedSpace/storage.sizeLimit)*100)+'%'
+ var diskIndicator = loadedIndicators[storage.name]
+ var diskIndicatorBars = diskIndicator.progressBar
+ var diskLimit = storage.sizeLimit
+ var percent = parseDiskUsePercent(storage.usedSpace,diskLimit);
+ var videosPercent = parseDiskUsePercent(storage.usedSpaceVideos,diskLimit);
+ var timelapsePercent = parseDiskUsePercent(storage.usedSpaceTimelapseFrames,diskLimit);
+ //
var humanValue = parseFloat(storage.usedSpace)
if(humanValue > 1000){
humanValue = (humanValue/1000).toFixed(2)+' GB'
}else{
humanValue = humanValue.toFixed(2)+' MB'
}
- loadedIndicators[storage.name].value.html(humanValue)
- loadedIndicators[storage.name].percent.html(percent)
- loadedIndicators[storage.name].progressBar.css('width',percent)
+ diskIndicator.value.html(humanValue)
+ diskIndicator.percent.html(percent)
+ diskIndicatorBars[0].style.width = videosPercent
+ diskIndicatorBars[0].title = `${lang['Video Share']} : ${videosPercent}`
+ diskIndicatorBars[1].style.width = timelapsePercent
+ diskIndicatorBars[1].title = `${lang['Timelapse Frames Share']} : ${timelapsePercent}`
})
}
break;