mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-13 16:30:31 +00:00
Enhancement: support for glances v4 (#3196)
This commit is contained in:
parent
4fe4ae9622
commit
def9b27006
14 changed files with 38 additions and 18 deletions
|
@ -17,12 +17,13 @@ export default function Component({ service }) {
|
|||
const { t } = useTranslation();
|
||||
const { widget } = service;
|
||||
const { chart } = widget;
|
||||
const { refreshInterval = defaultInterval(chart), pointsLimit = defaultPointsLimit } = widget;
|
||||
const { refreshInterval = defaultInterval(chart), pointsLimit = defaultPointsLimit, version = 3 } = widget;
|
||||
|
||||
const [dataPoints, setDataPoints] = useState(new Array(pointsLimit).fill({ value: 0 }, 0, pointsLimit));
|
||||
|
||||
const { data, error } = useWidgetAPI(service.widget, "mem", {
|
||||
refreshInterval: Math.max(defaultInterval(chart), refreshInterval),
|
||||
version,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue