mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elastic: Fix parsing for millisecond number timestamps (#20290)
* Stop parsing 'field' * Remove time field from query for docs queries * Test refactor to test all versions * Fix tests
This commit is contained in:
@@ -58,7 +58,7 @@ describe('Apending DataFrame', () => {
|
||||
]);
|
||||
|
||||
// Add a time value that has an array type
|
||||
frame.add({ time: [300] });
|
||||
frame.add({ time: 300 });
|
||||
expect(frame.toArray()).toEqual([
|
||||
{ time: 100, name: 'a', value: 1, value2: null }, // 1
|
||||
{ time: 200, name: 'BB', value: 20, value2: null }, // 2
|
||||
|
@@ -231,11 +231,6 @@ export class MutableDataFrame<T = any> implements DataFrame, MutableVector<T> {
|
||||
field.parse = makeFieldParser(val, field);
|
||||
}
|
||||
val = field.parse(val);
|
||||
} else if (field.type === FieldType.time && isArray(val)) {
|
||||
if (!field.parse) {
|
||||
field.parse = (val: any[]) => val[0] || undefined;
|
||||
}
|
||||
val = field.parse(val);
|
||||
}
|
||||
|
||||
if (val === undefined) {
|
||||
|
Reference in New Issue
Block a user