From 60a48195a10b4bb07f120949d3083cbec82d583c Mon Sep 17 00:00:00 2001 From: novykh Date: Wed, 28 Jan 2026 15:26:24 +0200 Subject: [PATCH 1/2] Fix group by params. --- src/datasource.ts | 16 +++++++++++++++- src/shared/hooks/useGetChartData.ts | 6 +++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/datasource.ts b/src/datasource.ts index abde297..d692675 100644 --- a/src/datasource.ts +++ b/src/datasource.ts @@ -25,7 +25,20 @@ export class DataSource extends DataSourceApi { const to = range!.to.valueOf(); const promises = options.targets.map( - ({ spaceId, roomId, contextId, nodes, groupBy, method, refId, dimensions, filterBy, filterValue, hide }) => { + ({ + spaceId, + roomId, + contextId, + nodes, + groupBy, + method, + refId, + dimensions, + filterBy, + filterValue, + group, + hide, + }) => { if (hide) { return null; } @@ -48,6 +61,7 @@ export class DataSource extends DataSourceApi { nodes, contextId, groupBy, + group, filterBy, filterValue, method, diff --git a/src/shared/hooks/useGetChartData.ts b/src/shared/hooks/useGetChartData.ts index 9f483ba..89b289e 100644 --- a/src/shared/hooks/useGetChartData.ts +++ b/src/shared/hooks/useGetChartData.ts @@ -36,16 +36,16 @@ export const useGetChartData = async ({ switch (groupBy) { case 'node': - metrics = [{ aggregation: method, groupBy: ['node'], group_by_label: [] }]; + metrics = [{ aggregation: method, group_by: ['node'], group_by_label: [] }]; break; case 'dimension': metrics = [{ group_by: ['dimension'], group_by_label: [], aggregation: method }]; break; case 'instance': - metrics = [{ aggregation: method, groupBy: ['instance'], group_by_label: [] }]; + metrics = [{ aggregation: method, group_by: ['instance'], group_by_label: [] }]; break; default: - metrics = [{ aggregation: method, groupBy: ['label'], group_by_label: [groupBy] }]; + metrics = [{ aggregation: method, group_by: ['label'], group_by_label: [groupBy] }]; break; } From a44a9a30e329fd9c93eee8a525f4955fc94ed76a Mon Sep 17 00:00:00 2001 From: novykh Date: Thu, 29 Jan 2026 08:16:43 +0200 Subject: [PATCH 2/2] Bump version. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a119b53..2476af3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "netdatacloud-netdata-datasource", - "version": "3.0.3", + "version": "3.0.4", "description": "netdata datasource plugin", "scripts": { "build": "webpack -c ./.config/webpack/webpack.config.ts --env production",