Commit Graph

108 Commits

Author SHA1 Message Date
Ryan McKinley
fcdc29746f
@grafana/data: export dateMath and rangeUtil (#17971) 2019-07-05 23:43:12 -07:00
Ryan McKinley
3f15170914 Refactor: move some files to @grafana/data (#17952)
* moving to data WIP

* more refactoring

* add missing test

* mock full path

* remove sinon from grafana-ui
2019-07-06 08:05:53 +02:00
Marcus Efraimsson
0833f26b43
Elasticsearch: Fix default max concurrent shard requests (#17770)
Elasticsearch v7.0 changed the behavior of max concurrent shard
requests and the default to 5. v5.6 and before 7.0 the default
is 256. This adds some additional behavior given certain
version is selected when configure the datasource to set
default max concurrent shard requests.
Changing from a version pre-v7.0+ to v7.0+ sets max
concurrent shard requests to 5.
Changing from a version v7.0+ to a pre-v7.0 sets max
concurrent shard requests to 256.

Fixes #17454
2019-06-28 18:38:16 +02:00
Marcus Efraimsson
eecd8d1064 Elasticsearch: Visualize logs in Explore (#17605)
* explore: try to use existing mode when switching datasource

* elasticsearch: initial explore logs support

* Elasticsearch: Adds ElasticsearchOptions type
Updates tests accordingly

* Elasticsearch: Adds typing to query method

* Elasticsearch: Makes maxConcurrentShardRequests optional

* Explore: Allows empty query for elasticsearch datasource

* Elasticsearch: Unifies ElasticsearchQuery interface definition
Removes check for context === 'explore'

* Elasticsearch: Removes context property from ElasticsearchQuery interface
Adds field property
Removes metricAggs property
Adds typing to metrics property

* Elasticsearch: Runs default 'empty' query when 'clear all' button is pressed

* Elasticsearch: Removes index property from ElasticsearchOptions interface

* Elasticsearch: Removes commented code from ElasticsearchQueryField.tsx

* Elasticsearch: Adds comment warning usage of for...in to elastic_response.ts

* Elasticsearch: adds tests related to log queries
2019-06-24 21:15:03 +01:00
Hugo Häggmark
ceb9f0855b
Chore: Replaces moment with Grafanas DateTime (#16919)
* Wip: Initial commit

* Refactor: Replaces moment.utc(

* Refactor: replaces the last isMoment statements

* Refactor: Removes almost all moment imports

* Refactor: Moves moment_wrapper to grafana/ui

* Refactor: Renames momentWrapper

* Refactor: Removes one more moment import

* Refactor: Removes unitOfTime import

* Fix: Fixes Prettier error

* Refactor: Renames DateTimeType to DateTime

* Refactor: Renames isDateTimeType to isDateTime

* Refactor: Renames dateTime to dateTime

* Feature: Bans moment imports and types
2019-05-08 13:51:44 +02:00
Ryan McKinley
d881976c9d Refactor: move datemath to grafana/ui (#16890)
* move datemath to grafana/ui

* don't reference @grafana/ui from its own component
2019-05-06 12:36:42 +02:00
Alcides Viamontes E
cff2be0d66 elasticsearch: add 7.x version support (#16646)
Adds a new version option 7.0+ (70 internally).
Version 7.0+ doesn't include document types in index mappings 
so support for handling this have been added.
Version 7.0+ returns number of hits in a different way so 
support for handling this have been added.
Version 7.0+ doesn't support sending 
max_concurrent_shard_requests in multisearch header so 
support for sending this in query string have been added.
Update elastic6 docker block and dashboards (devenv) to use 
6.7.1 images, filebeat index name is now filebeat-YYYY.MM.DD 
and dashboard include correct tags and links.
Add elastic7 docker block and provisioning (devenv).
Updates documentation regarding new version.

Closes #15622
2019-04-25 09:41:13 +02:00
Igor Ratsuk
930fd8b43a Elasticsearch: Fix view percentiles metric in table without date histogram (#15686)
Fix for properly display percentiles metrics in table panel when 
using a query without date histogram and for example grouping by 
terms.

Fixes #3786
2019-03-29 13:22:04 +07:00
Daniel Lee
462e0d0c6f
Fix: Elasticsearch fix template variables in the alias field (#16629)
Fixes #16040

Fix so that a template variable in the alias field is not interpolated on blur and only the value sent in the query is interpolated. Does a deep clone of the options.targets to avoid changing the original alias field.
2019-03-26 16:15:23 +01:00
Torkel Ödegaard
cfea8bdcae Prettier had not been running as a precommit hook for some time so had to run in on all files again 2019-02-13 11:14:53 +01:00
Marcus Efraimsson
130e4aa666
Merge pull request #14608 from marefr/es_bucket_script
Fix support bucket script pipeline aggregations
2019-01-14 15:58:42 +01:00
SamuelToh
e1f6870fce 4075: Interpolate tempvar on alias 2019-01-10 09:53:06 +10:00
Marcus Efraimsson
b45f72a140
elasticsearch: support bucket script pipeline aggregations 2018-12-20 01:24:36 +01:00
Marcus Efraimsson
9a8ad70013
fix pipeline aggregations on doc count 2018-11-15 19:06:47 +01:00
Marcus Efraimsson
5803bfd2c7
fix terms agg order deprecation warning on es 6+ 2018-11-02 17:53:47 +01:00
Patrick O'Carroll
0f326f18dc changed functions to arrowfunctions for only-arrow-functions rule (#13127) 2018-09-04 15:55:41 +02:00
Patrick O'Carroll
b8d82df97e added no-angle-bracket-type-assertion rule and updatet files to follow rule (#13115) 2018-09-03 11:30:44 +02:00
Patrick O'Carroll
7837ee4466 Updated rules for variable name (#13106)
* updated rules for variable name and fixed files that didn't follow new rules

* fixed test so it uses new rule

* made exceptions to rule in interval_variable
2018-09-03 11:00:46 +02:00
Torkel Ödegaard
36bc8b77fb Merge branch 'tsconfig-no-implicit-this' 2018-08-30 11:46:13 +02:00
Patrick O'Carroll
a8547ae36e added this:any to functions and changed functions to arrowfunctions 2018-08-30 10:49:18 +02:00
Patrick O'Carroll
b494a29e02 changed var to let in last files (#13087) 2018-08-30 08:58:43 +02:00
Torkel Ödegaard
314b645857
tslint: changing vars -> const (#13034) 2018-08-26 18:43:07 +02:00
Torkel Ödegaard
9b978b7203
tslint: autofix of let -> const (#13033) 2018-08-26 17:14:40 +02:00
Tobias Skarhed
a65589a5fb Rename test files 2018-08-14 10:52:41 +02:00
Tobias Skarhed
d3c213973c Basic cleanup 2018-07-04 13:13:06 +02:00
Tobias Skarhed
12d158f391 Add mocks in test file 2018-07-04 13:13:06 +02:00
Tobias Skarhed
8f1bcd9117 Remove q and stub 2018-07-04 13:13:06 +02:00
Tobias Skarhed
80b2f5c756 Add Jest stubs 2018-07-04 13:13:06 +02:00
Tobias Skarhed
69c85e0d7e Remove async 2018-07-04 13:13:06 +02:00
Tobias Skarhed
12e76ad197 Remove logs and comments 2018-07-04 13:13:06 +02:00
Tobias Skarhed
bd417bedb2 Start elastic ds test conversion 2018-07-04 13:13:06 +02:00
Tobias Skarhed
ef0586acab Karma to Jest: query_builder 2018-06-14 14:20:42 +02:00
Tobias Skarhed
2465f53324 Karma to Jest: query_def, index_pattern 2018-06-14 12:18:11 +02:00
Tobias Skarhed
a911d36dea Remove import 2018-06-14 12:00:54 +02:00
Tobias Skarhed
04029a94cd Karma to Jest: elastic_response 2018-06-14 11:56:03 +02:00
Mario Trangoni
e5e6bc56c8 public: fix codespell issues 2018-04-13 20:31:29 +02:00
Torkel Ödegaard
3a1f52d8a2 prettier: ran on all files again, sorry. now settings are defined in package.json 2017-12-21 08:39:31 +01:00
Torkel Ödegaard
85879a7014 prettier: change to single quoting 2017-12-20 12:33:33 +01:00
Torkel Ödegaard
fadfc665e4 tech: ran pretttier on all typescript files 2017-12-19 16:06:54 +01:00
Torkel Ödegaard
e98af1b3fa updated libs and fixed new typescript errors 2017-11-27 12:14:57 +01:00
Torkel Ödegaard
fea741d7c2 shore: minor cleanup 2017-10-01 20:35:01 +02:00
Torkel Ödegaard
0c86241c5b Webpack (#9391)
* webpack poc, this is not going to work for plugins, dam

* tech: webpack and systemjs for plugins starting to work

* tech: webpack and systemjs combo starting to work

* tech: webpack + karma tests progress

* tech: webpack + karma progress

* tech: working on tests

* tech: webpack

* tech: webpack + karma, all tests pass

* tech: webpack + karma, all tests pass

* tech: webpack all tests pass

* webpack: getting closer

* tech: webpack progress

* webpack: further build refinements

* webpack: ng annotate fixes

* webpack: optimized build fix

* tech: minor fix for elasticsearch

* tech: webpack + ace editor

* tech: restored lodash move mixin compatability

* tech: added enzyme react test and upgraded to react v16

* tech: package version fix

* tech: added testdata to built in bundle

* webpack: sass progress

* tech: prod & dev build is working for the sass

* tech: clean up unused grunt stuff and moved to scripts folder

* tech: added vendor and manifest chunks, updated readme and docs

* tech: webpack finishing touches
2017-10-01 20:02:25 +02:00
Torkel Ödegaard
9bfda72a55 tech: reverted to systemjs 2017-09-28 13:06:23 +02:00
Torkel Ödegaard
7aa753a25f tech: migrating elasticsearch to typescript 2017-09-28 12:52:39 +02:00
Torkel Ödegaard
b8d9722b4f tech: removing unused variables from typescript files, and making tslint rules more strict 2017-09-21 16:40:18 +02:00
Torkel Ödegaard
4e387ed47a fix: Elasticsearch and adhoc filters fix, fixes #9165 2017-09-05 10:16:17 +02:00
Torkel Ödegaard
e91cf28f8d elasticsearch: changed ad hoc filters from using term filters to using phrase match queries, closing #9095 2017-08-28 10:52:10 +02:00
Torkel Ödegaard
a5bdfec0de ES: return .raw fields in field lookups, closes #8975 2017-08-02 16:52:43 +02:00
Torkel Ödegaard
a5d5f3d82f feat: add ad hoc filters directly from table panel cells, kibana 3 style, #8052 2017-08-02 16:15:22 +02:00
Torkel Ödegaard
ede827f5c0 feat: Elasticsearch change to how queries without date histogram are transformed into Grafana data stucture, now it is processed into a table structure instead of json structure 2017-08-02 12:15:39 +02:00