Skip to content

Commit 984e558

Browse files
committed
Include labels in scope
1 parent 5ce7b01 commit 984e558

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/shared/hooks/useGetChartData.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export const useGetChartData = async ({
8383
break;
8484
}
8585

86-
const labels = filterBy && filterValue ? [`${filterBy}:${filterValue}`] : ['*'];
86+
const defaultScopeValue = [];
87+
const defaultSelectorValue = ['*'];
88+
const labels = filterBy && filterValue ? [`${filterBy}:${filterValue}`] : null;
8789

8890
return await Post({
8991
path: `/v3/spaces/${spaceId}/rooms/${roomId}/data`,
@@ -95,13 +97,14 @@ export const useGetChartData = async ({
9597
contexts: [contextId],
9698
nodes,
9799
dimensions,
100+
labels: labels : defaultScopeValue,
98101
},
99102
selectors: {
100103
contexts: ['*'],
101104
nodes: ['*'],
102105
instances: ['*'],
103106
dimensions: ['*'],
104-
labels,
107+
labels: labels || defaultSelectorValue,
105108
},
106109
aggregations: {
107110
metrics,

0 commit comments

Comments
 (0)