WebUI done - To be tested with no LOAD (is it a usecase ?)

This commit is contained in:
nicolargo 2024-01-20 17:53:39 +01:00
parent 0a555866e3
commit e564c21b89
3 changed files with 10 additions and 7 deletions

View File

@ -61,22 +61,22 @@
<div class="table-cell">{{ mem }}%</div>
</div>
<div class="table-row">
<div class="table-cell text-left">SWAP</div>
<div class="table-cell text-left">LOAD</div>
<div class="table-cell">
<div class="progress">
<div
:class="`progress-bar progress-bar-${getDecoration('swap')}`"
:class="`progress-bar progress-bar-${getDecoration('load')}`"
role="progressbar"
:aria-valuenow="swap"
:aria-valuenow="load"
aria-valuemin="0"
aria-valuemax="100"
:style="`width: ${swap}%;`"
:style="`width: ${load}%;`"
>
&nbsp;
</div>
</div>
</div>
<div class="table-cell">{{ swap }}%</div>
<div class="table-cell">{{ load }}%</div>
</div>
</div>
</section>
@ -109,6 +109,9 @@ export default {
mem() {
return this.stats.mem;
},
load() {
return this.stats.load;
},
cpu() {
return this.stats.cpu;
},

File diff suppressed because one or more lines are too long

View File

@ -198,6 +198,6 @@ def get_load_average(percent: bool = False):
pass
if load_average and percent:
return tuple([i / get_nb_log_core() * 100 for i in load_average])
return tuple([round(i / get_nb_log_core() * 100, 1) for i in load_average])
else:
return load_average