ÿØÿà JFIF ` ` ÿþ
|
Server : Apache System : Linux cloud.heroica.com.br 4.18.0-553.36.1.el8_10.x86_64 #1 SMP Wed Jan 22 03:07:54 EST 2025 x86_64 User : farolpborg ( 1053) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /lib/python3.6/site-packages/glances/outputs/static/js/components/ |
Upload File : |
<template>
<section class="plugin" id="fs">
<div class="table-row">
<div class="table-cell text-left title">FILE SYS</div>
<div class="table-cell">
<span v-show="!args.fs_free_space">Used</span>
<span v-show="args.fs_free_space">Free</span>
</div>
<div class="table-cell">Total</div>
</div>
<div class="table-row" v-for="(fs, fsId) in fileSystems" :key="fsId">
<div class="table-cell text-left">
{{ fs.shortMountPoint }}
<span v-if="fs.shortMountPoint.length <= 12" class="visible-lg-inline">
({{ fs.name }})
</span>
</div>
<div class="table-cell" :class="getDecoration(fs.mountPoint, 'used')">
<span v-show="!args.fs_free_space">
{{ $filters.bytes(fs.used) }}
</span>
<span v-show="args.fs_free_space">
{{ $filters.bytes(fs.free) }}
</span>
</div>
<div class="table-cell">{{ $filters.bytes(fs.size) }}</div>
</div>
</section>
</template>
<script>
import { orderBy } from 'lodash';
import { store } from '../store.js';
export default {
props: {
data: {
type: Object
}
},
data() {
return {
store
};
},
computed: {
args() {
return this.store.args || {};
},
stats() {
return this.data.stats['fs'];
},
view() {
return this.data.views['fs'];
},
fileSystems() {
const fileSystems = this.stats.map((fsData) => {
let shortMountPoint = fsData['mnt_point'];
if (shortMountPoint.length > 22) {
shortMountPoint = '_' + fsData['mnt_point'].slice(-21);
}
return {
name: fsData['device_name'],
mountPoint: fsData['mnt_point'],
shortMountPoint: shortMountPoint,
percent: fsData['percent'],
size: fsData['size'],
used: fsData['used'],
free: fsData['free']
};
});
return orderBy(fileSystems, ['mnt_point']);
}
},
methods: {
getDecoration(mountPoint, field) {
if (this.view[mountPoint][field] == undefined) {
return;
}
return this.view[mountPoint][field].decoration.toLowerCase();
}
}
};
</script>