RAID plugin not showing up in Glances web UI (Docker install) #2716

This commit is contained in:
nicolargo 2024-04-13 10:40:29 +02:00
parent 7430b6b2b4
commit 1de207e2fd
5 changed files with 8 additions and 7 deletions

View File

@ -294,7 +294,7 @@ disable=True
[raid]
# Documentation: https://glances.readthedocs.io/en/latest/aoa/raid.html
# This plugin is disabled by default
disable=True
disable=False
[smart]
# Documentation: https://glances.readthedocs.io/en/latest/aoa/smart.html

View File

@ -106,6 +106,7 @@ class _GlancesCurses(object):
# Define left sidebar
# This default list is also defined in the glances/outputs/static/js/uiconfig.json
# file for the web interface
# Both can be overwritten by the configuration file ([outputs] left_menu option)
_left_sidebar = [
'network',
'wifi',

View File

@ -7,7 +7,7 @@
</div>
<div class="table-row" v-for="(disk, diskId) in disks" :key="diskId">
<div class="table-cell text-left">
{{ disk.type.toUppercase() }} {{ disk.name }}
{{ disk.type.toUpperCase() }} {{ disk.name }}
<div class="warning" v-show="disk.degraded"> Degraded mode</div>
<div v-show="disk.degraded">&nbsp; &nbsp; {{ disk.config }}</div>
<div class="critical" v-show="disk.inactive"> Status {{ disk.status }}</div>
@ -20,10 +20,10 @@
</div>
</template>
</div>
<div class="table-cell" v-show="!disk.inactive" :class="getAlert(disk)">
<div class="table-cell" v-show="disk.status == 'active'" :class="getAlert(disk)">
{{ disk.used }}
</div>
<div class="table-cell" v-show="!disk.inactive" :class="getAlert(disk)">
<div class="table-cell" v-show="disk.status == 'active'" :class="getAlert(disk)">
{{ disk.available }}
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -49,9 +49,9 @@ class PluginModel(GlancesPluginModel):
if self.input_method == 'local':
# Update stats using the PyMDstat lib (https://github.com/nicolargo/pymdstat)
try:
# Just for test
# mds = MdStat(path='/home/nicolargo/dev/pymdstat/tests/mdstat.10')
mds = MdStat()
# Just for test: uncomment the following line to use a local file
# mds = MdStat(path='/home/nicolargo/dev/pymdstat/tests/mdstat.10')
stats = mds.get_stats()['arrays']
except Exception as e:
logger.debug("Can not grab RAID stats (%s)" % e)