mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* elastic: removed reference to obsolete esVersion value * removed unused code * cleaned up tests
21 lines
599 B
TypeScript
21 lines
599 B
TypeScript
import { DataSourceSettings } from '@grafana/data';
|
|
import { getMockDataSource } from 'app/features/datasources/__mocks__';
|
|
|
|
import { ElasticsearchOptions } from '../types';
|
|
|
|
export function createDefaultConfigOptions(
|
|
options?: Partial<ElasticsearchOptions>
|
|
): DataSourceSettings<ElasticsearchOptions> {
|
|
return getMockDataSource<ElasticsearchOptions>({
|
|
jsonData: {
|
|
timeField: '@time',
|
|
interval: 'Hourly',
|
|
timeInterval: '10s',
|
|
maxConcurrentShardRequests: 300,
|
|
logMessageField: 'test.message',
|
|
logLevelField: 'test.level',
|
|
...options,
|
|
},
|
|
});
|
|
}
|