mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
Fix glances service widgets handling of default version
This commit is contained in:
parent
97d193faf1
commit
b0d57866a0
10 changed files with 13 additions and 23 deletions
|
@ -26,9 +26,8 @@ export default function Component({ service }) {
|
|||
|
||||
const [dataPoints, setDataPoints] = useState(new Array(pointsLimit).fill({ value: 0 }, 0, pointsLimit));
|
||||
|
||||
const { data, error } = useWidgetAPI(widget, "network", {
|
||||
const { data, error } = useWidgetAPI(widget, `${version}/network`, {
|
||||
refreshInterval: Math.max(defaultInterval(chart), refreshInterval),
|
||||
version,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -51,7 +50,7 @@ export default function Component({ service }) {
|
|||
});
|
||||
}
|
||||
}
|
||||
}, [data, interfaceName, pointsLimit]);
|
||||
}, [data, interfaceName, pointsLimit, rxKey, txKey]);
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue