mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-19 02:59:50 +00:00
Enhancement: Add configurable refresh interval and max points for glances services (#2363)
--------- Co-authored-by: Quentin de Grandmaison <quentin.degrandmaison@7speaking.com> Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
e98b5e2233
commit
c2729e302d
10 changed files with 120 additions and 63 deletions
|
@ -17,13 +17,15 @@ const statusMap = {
|
|||
X: <ResolvedIcon icon="mdi-rhombus-outline" width={32} height={32} />, // dead
|
||||
};
|
||||
|
||||
const defaultInterval = 1000;
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { t } = useTranslation();
|
||||
const { widget } = service;
|
||||
const { chart } = widget;
|
||||
const { chart, refreshInterval = defaultInterval } = widget;
|
||||
|
||||
const { data, error } = useWidgetAPI(service.widget, "processlist", {
|
||||
refreshInterval: 1000,
|
||||
refreshInterval: Math.max(defaultInterval, refreshInterval),
|
||||
});
|
||||
|
||||
if (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue