-
-
- {formatBytes(data.drive.freeGb * 1024 * 1024 * 1024)} Free
+
+
+ {formatBytes(data.drive.freeGb * 1024 * 1024 * 1024, 0)} Free
-
- {formatBytes(data.drive.usedGb * 1024 * 1024 * 1024)} Used
+
+ {formatBytes(data.drive.totalGb * 1024 * 1024 * 1024, 0)} Total
+
);
diff --git a/src/components/widgets/resources/memory.jsx b/src/components/widgets/resources/memory.jsx
index e8d60ccc..4224785e 100644
--- a/src/components/widgets/resources/memory.jsx
+++ b/src/components/widgets/resources/memory.jsx
@@ -14,8 +14,7 @@ export default function Memory() {
- Resources
- Error
+ API Error
);
@@ -26,23 +25,32 @@ export default function Memory() {
- - GB Used
- - GB Free
+ -
);
}
+ const percent = Math.round((data.memory.usedMemMb / data.memory.totalMemMb) * 100);
+
return (
-
+
-
- {formatBytes(data.memory.usedMemMb * 1024 * 1024)} Used
-
-
+
{formatBytes(data.memory.freeMemMb * 1024 * 1024)} Free
+
+ {formatBytes(data.memory.usedMemMb * 1024 * 1024)} Used
+
+
);
diff --git a/src/components/widgets/resources/resources.jsx b/src/components/widgets/resources/resources.jsx
index 711e97fb..4275cf26 100644
--- a/src/components/widgets/resources/resources.jsx
+++ b/src/components/widgets/resources/resources.jsx
@@ -11,9 +11,7 @@ export default function Resources({ options }) {
{options.disk &&
}
{options.label && (
-
- {options.label}
-
+
{options.label}
)}