Merge branch 'fix-disk-percentage' into 'dev'

Dashboard: Fix disk percentage

See merge request Shinobi-Systems/Shinobi!370
ejs-templating-update
Moe 2022-07-26 17:45:39 +00:00
commit 3acb212bbe
2 changed files with 16 additions and 14 deletions

View File

@ -828,21 +828,23 @@ function convertKbToHumanSize(theNumber){
return `${number} ${unit}`
}
function drawIndicatorBar(item){
var html = `<div id="indicator-${item.name}" class="mb-2">
<div class="d-flex flex-row text-white mb-1">
<div class="pr-2">
<i class="fa fa-${item.icon}"></i>
</div>
<div class="flex-grow-1">
<small>${item.label}</small>
var html = `<div class="box-wrapper " style>
<div id="indicator-${item.name}" class="mb-2">
<div class="d-flex flex-row text-white mb-1">
<div class="pr-2">
<i class="fa fa-${item.icon}"></i>
</div>
<div class="flex-grow-1">
<small>${item.label}</small>
</div>
<div>
<small class="indicator-percent">0%</small>
</div>
</div>
<div>
<small class="indicator-percent">0%</small>
</div>
</div>
<div>
<div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" style="width: 0%;"></div>
<div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" style="width: 0%;"></div>
</div>
</div>
</div>
</div>`

View File

@ -95,7 +95,7 @@ function drawAddStorageIndicators(){
var el = $(`#indicator-${storage.name}`)
loadedIndicators[storage.name] = {
value: el.find('.value'),
percent: el.find('.percent'),
percent: el.find('.indicator-percent'),
progressBar: el.find('.progress-bar'),
}
})