mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-23 01:01:31 +03:00
WebUI done - To be tested with no LOAD (is it a usecase ?)
This commit is contained in:
parent
0a555866e3
commit
e564c21b89
@ -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}%;`"
|
||||
>
|
||||
|
||||
</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;
|
||||
},
|
||||
|
2
glances/outputs/static/public/glances.js
vendored
2
glances/outputs/static/public/glances.js
vendored
File diff suppressed because one or more lines are too long
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user