mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +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
|
@ -16,7 +16,7 @@ const defaultInterval = 1000;
|
|||
export default function Component({ service }) {
|
||||
const { t } = useTranslation();
|
||||
const { widget } = service;
|
||||
const { chart, refreshInterval = defaultInterval, pointsLimit = defaultPointsLimit } = widget;
|
||||
const { chart, refreshInterval = defaultInterval, pointsLimit = defaultPointsLimit, version = 3 } = widget;
|
||||
const [, diskName] = widget.metric.split(":");
|
||||
|
||||
const [dataPoints, setDataPoints] = useState(
|
||||
|
@ -26,6 +26,7 @@ export default function Component({ service }) {
|
|||
|
||||
const { data, error } = useWidgetAPI(service.widget, "diskio", {
|
||||
refreshInterval: Math.max(defaultInterval, refreshInterval),
|
||||
version,
|
||||
});
|
||||
|
||||
const calculateRates = (d) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue