mirror of
https://github.com/gethomepage/homepage.git
synced 2025-07-09 03:04:18 -04:00
Change: use glances rss instead of data for process memory reporting (#5392)
This commit is contained in:
parent
5759596a37
commit
34bffe980a
@ -23,7 +23,7 @@ export default function Component({ service }) {
|
||||
const { widget } = service;
|
||||
const { chart, refreshInterval = defaultInterval, version = 3 } = widget;
|
||||
|
||||
const memoryInfoKey = version === 3 ? 0 : "data";
|
||||
const memoryInfoKey = version === 3 ? 0 : "rss";
|
||||
|
||||
const { data, error } = useWidgetAPI(service.widget, `${version}/processlist`, {
|
||||
refreshInterval: Math.max(defaultInterval, refreshInterval),
|
||||
@ -69,7 +69,7 @@ export default function Component({ service }) {
|
||||
<div className="opacity-25 w-14 text-right">{item.cpu_percent.toFixed(1)}%</div>
|
||||
<div className="opacity-25 w-14 text-right">
|
||||
{t("common.bytes", {
|
||||
value: item.memory_info[memoryInfoKey] ?? item.memory_info.wset,
|
||||
value: item.memory_info[memoryInfoKey] ?? item.memory_info.data ?? item.memory_info.wset,
|
||||
maximumFractionDigits: 0,
|
||||
})}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user