Enhancement: support for glances v4 (#3196)

This commit is contained in:
shamoon 2024-03-28 11:16:00 -05:00 committed by GitHub
parent 4fe4ae9622
commit def9b27006
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 38 additions and 18 deletions

View file

@ -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) =>