File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " netdatacloud-netdata-datasource" ,
3- "version" : " 3.0.1 " ,
3+ "version" : " 3.0.2 " ,
44 "description" : " netdata datasource plugin" ,
55 "scripts" : {
66 "build" : " webpack -c ./.config/webpack/webpack.config.ts --env production" ,
Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ export const useGetChartData = async ({
8383 break ;
8484 }
8585
86+ const defaultScopeValue = [ ] ;
87+ const defaultSelectorValue = [ '*' ] ;
88+ const labels = filterBy && filterValue ? [ `${ filterBy } :${ filterValue } ` ] : null ;
89+
8690 return await Post ( {
8791 path : `/v3/spaces/${ spaceId } /rooms/${ roomId } /data` ,
8892 baseUrl,
@@ -93,13 +97,14 @@ export const useGetChartData = async ({
9397 contexts : [ contextId ] ,
9498 nodes,
9599 dimensions,
100+ labels : labels || defaultScopeValue ,
96101 } ,
97102 selectors : {
98103 contexts : [ '*' ] ,
99104 nodes : [ '*' ] ,
100105 instances : [ '*' ] ,
101- dimensions : [ '*' ] ,
102- labels : [ '*' ] ,
106+ dimensions : dimensions . length ? dimensions : defaultSelectorValue ,
107+ labels : labels || defaultSelectorValue ,
103108 } ,
104109 aggregations : {
105110 metrics,
You can’t perform that action at this time.
0 commit comments