diff --git a/docs/widgets/info/glances.md b/docs/widgets/info/glances.md index e6fc2a61..887fd073 100644 --- a/docs/widgets/info/glances.md +++ b/docs/widgets/info/glances.md @@ -18,6 +18,7 @@ The Glances widget allows you to monitor the resources (CPU, memory, storage, te uptime: true # disabled by default disk: / # disabled by default, use mount point of disk(s) in glances. Can also be a list (see below) expanded: true # show the expanded view + used: false # show used values instead of free label: MyMachine # optional ``` diff --git a/docs/widgets/info/resources.md b/docs/widgets/info/resources.md index 35f2177b..f68250a5 100644 --- a/docs/widgets/info/resources.md +++ b/docs/widgets/info/resources.md @@ -68,4 +68,15 @@ You can additionally supply an optional `expanded` property set to true in order - /disk3 ``` +You can additionally supply an optional `used` property set to true in order to show used capacity instead of free capacity for memory and disk resources. By default the used property is set to false when not supplied. + +```yaml +- resources: + label: Memory Resouces + used: true + memory: true + disk: + - /disk1 +``` + ![194136533-c4238c82-4d67-41a4-b3c8-18bf26d33ac2](https://user-images.githubusercontent.com/3441425/194728642-a9885274-922b-4027-acf5-a746f58fdfce.png) diff --git a/src/components/widgets/glances/glances.jsx b/src/components/widgets/glances/glances.jsx index 0834b775..fc04f0a3 100644 --- a/src/components/widgets/glances/glances.jsx +++ b/src/components/widgets/glances/glances.jsx @@ -113,11 +113,11 @@ export default function Widget({ options }) {
{options.cpu && } - {options.memory && } + {options.memory && } {Array.isArray(options.disk) - ? options.disk.map((disk) => ) - : options.disk && } + ? options.disk.map((disk) => ) + : options.disk && } {options.cputemp && } {options.uptime && }