mocks.ts 604 B

12345678910111213141516171819
  1. import { DataSourceSettings } from '@grafana/data';
  2. import { createDatasourceSettings } from '../../../../features/datasources/mocks';
  3. import { ElasticsearchOptions } from '../types';
  4. export function createDefaultConfigOptions(
  5. options?: Partial<ElasticsearchOptions>
  6. ): DataSourceSettings<ElasticsearchOptions> {
  7. return createDatasourceSettings<ElasticsearchOptions>({
  8. timeField: '@time',
  9. esVersion: '7.0.0',
  10. interval: 'Hourly',
  11. timeInterval: '10s',
  12. maxConcurrentShardRequests: 300,
  13. logMessageField: 'test.message',
  14. logLevelField: 'test.level',
  15. ...options,
  16. });
  17. }