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
14 changed files with 38 additions and 18 deletions

View File

@@ -74,14 +74,16 @@ const defaultSystemInterval = 30000; // This data (OS, hostname, distribution) i
export default function Component({ service }) {
const { widget } = service;
const { chart, refreshInterval = defaultInterval } = widget;
const { chart, refreshInterval = defaultInterval, version = 3 } = widget;
const { data: quicklookData, errorL: quicklookError } = useWidgetAPI(service.widget, "quicklook", {
refreshInterval,
version,
});
const { data: systemData, errorL: systemError } = useWidgetAPI(service.widget, "system", {
refreshInterval: defaultSystemInterval,
version,
});
if (quicklookError) {