Skip to content

Commit 31a8d33

Browse files
committed
fix: getGraphDataFrame
* [bugfix] No longer skip first requested column * [bugfix] Remove type: number for non-time fields which breaks string responses * Detect timestamp column in request
1 parent b866496 commit 31a8d33

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/features/log/queryResponseBuilder.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,20 @@ export const getGraphDataFrame = (data: any, target: MyQuery, app: string) => {
4949
}
5050
}
5151

52+
for (let i = 0; i < fields.length; i++) {
53+
if (fields[i] === '_timestamp') {
5254
graphData.addField({
5355
config: {
5456
filterable: true,
5557
},
5658
name: 'Time',
5759
type: FieldType.time,
5860
});
59-
60-
for (let i = 1; i < fields.length; i++) {
61+
} else {
6162
graphData.addField({
6263
name: fields[i],
63-
type: FieldType.number,
6464
});
65+
}
6566
}
6667

6768
if (!data.length) {

0 commit comments

Comments
 (0)