mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: Add support for date_nanos type (#27538)
This commit is contained in:
parent
e86ff52d44
commit
0e34474099
@ -384,6 +384,7 @@ describe('ElasticDatasource', function(this: any) {
|
|||||||
properties: {
|
properties: {
|
||||||
'@timestamp': { type: 'date' },
|
'@timestamp': { type: 'date' },
|
||||||
__timestamp: { type: 'date' },
|
__timestamp: { type: 'date' },
|
||||||
|
'@timestampnano': { type: 'date_nanos' },
|
||||||
beat: {
|
beat: {
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
@ -431,6 +432,7 @@ describe('ElasticDatasource', function(this: any) {
|
|||||||
expect(fields).toEqual([
|
expect(fields).toEqual([
|
||||||
'@timestamp',
|
'@timestamp',
|
||||||
'__timestamp',
|
'__timestamp',
|
||||||
|
'@timestampnano',
|
||||||
'beat.name.raw',
|
'beat.name.raw',
|
||||||
'beat.name',
|
'beat.name',
|
||||||
'beat.hostname',
|
'beat.hostname',
|
||||||
@ -460,7 +462,7 @@ describe('ElasticDatasource', function(this: any) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const fields = _.map(fieldObjects, 'text');
|
const fields = _.map(fieldObjects, 'text');
|
||||||
expect(fields).toEqual(['@timestamp', '__timestamp']);
|
expect(fields).toEqual(['@timestamp', '__timestamp', '@timestampnano']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -453,6 +453,7 @@ export class ElasticDatasource extends DataSourceApi<ElasticsearchQuery, Elastic
|
|||||||
integer: 'number',
|
integer: 'number',
|
||||||
long: 'number',
|
long: 'number',
|
||||||
date: 'date',
|
date: 'date',
|
||||||
|
date_nanos: 'date',
|
||||||
string: 'string',
|
string: 'string',
|
||||||
text: 'string',
|
text: 'string',
|
||||||
scaled_float: 'number',
|
scaled_float: 'number',
|
||||||
|
Loading…
Reference in New Issue
Block a user