Skip to content

Commit 9741528

Browse files
committed
[DEBUG]
1 parent 3f62e66 commit 9741528

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/QueryEditor.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ const QueryEditor: React.FC<Props> = ({ datasource, query, range, onChange, onRu
6363
const { nodes = [], instances = [], labels = [] } = summary || {};
6464
const { dimensions, units } = view || {};
6565
setFilters(getFilters(labels));
66-
setGroupingByList(getGroupingByList(labels));
66+
const options = getGroupingByList(labels);
67+
console.log({ labels, options });
68+
setGroupingByList(options);
6769
setAllDimension(getDimensions(dimensions));
6870
setUnits(units);
6971
setTotalNodes(nodes.length);

src/shared/utils/transformations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,7 @@ export const getFilters = (labels: any[]) => {
2626
};
2727

2828
export const getGroupingByList = (labels: any) => {
29+
const groupingByList = { ...GroupByList, ...labels.map((label: any) => ({ value: label.id, label: label.id })) };
30+
console.log({ labels, groupingByList });
2931
return { ...GroupByList, ...labels.map((label: any) => ({ value: label.id, label: label.id })) };
3032
};

0 commit comments

Comments
 (0)