Commit Graph

2738 Commits

Author SHA1 Message Date
Torkel Ödegaard
4fc9d794ca Moved plugin types to @grafana/ui 2019-01-17 17:37:34 +01:00
Torkel Ödegaard
a6683dd90e Merge branch 'master' into react-query-editor 2019-01-17 14:57:49 +01:00
Torkel Ödegaard
3047579cdd removed unused props from angular query component interface 2019-01-17 13:27:01 +01:00
Torkel Ödegaard
f041928e58 Additional query editor row tweaks 2019-01-17 13:15:25 +01:00
Daniel Lee
44c07eb2e9 azuremonitor: guard for when switching from monaco editor
before it has fully loaded.
2019-01-17 10:55:03 +01:00
Daniel Lee
dd96f2a522 azuremonitor: move files into grafana
Initial port of the code from the plugin - lots of small things to fix.
2019-01-17 10:55:03 +01:00
Johannes Schill
1dfabf498a chore: Replace the deprecated SFC with FC 2019-01-17 09:27:43 +01:00
Daniel Lee
3bdd4a5c33 changelog: adds note for #14795 2019-01-15 17:14:58 +01:00
Daniel Lee
8e771f9a8f
Merge pull request #14876 from grafana/davkal/14795-annotation-step
Prometheus: Fix annotation step calculation
2019-01-15 17:12:07 +01:00
bugficks
7db848f153 [Feature request] MySQL SSL CA in datasource connector
https://github.com/grafana/grafana/issues/8570
2019-01-15 13:29:56 +01:00
Daniel Lee
16881f64dd
Merge pull request #14751 from grafana/reactify-stackdriver
Reactify stackdriver
2019-01-15 00:08:56 +01:00
Daniel Lee
7b1aed6caf stackdriver: converts some variables from any to types 2019-01-14 23:43:31 +01:00
Daniel Lee
18abb87cbb stackdriver: small fixes after reactifying 2019-01-14 18:23:01 +01:00
Daniel Lee
b4a51ad7ce stackdriver: add help text for bucket alias 2019-01-14 17:52:06 +01:00
David Kaltschmidt
ce3117507a Prometheus: Fix annotation step calculation
- since e731c248d7 step calculation for
annotation queries was broken
- this change puts the interval in the correct parameter so it gets
considered in `createQuery`
- added tests
2019-01-14 17:40:47 +01:00
Daniel Lee
d7a3f91b3c stackdriver: fixes space before caret icon in query editor 2019-01-14 17:25:43 +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
Erik Sundell
b6171fa3c7 add feedback to what interval is being used (calculated in the backend) 2019-01-11 15:14:35 +01:00
Erik Sundell
e73d363129 Merge remote-tracking branch 'origin/master' into reactify-stackdriver
# Conflicts:
#	public/app/core/angular_wrappers.ts
#	yarn.lock
2019-01-11 15:12:29 +01:00
Erik Sundell
b596550210 use typings for ds and template srv 2019-01-11 13:53:04 +01:00
Erik Sundell
3871ef29f9 refactoring alias by 2019-01-11 10:29:53 +01:00
Torkel Ödegaard
7e106b0f49
Merge pull request #14805 from SamuelToh/11503_prevent_end_of_regexpr
11503: escape measurement filter regex value
2019-01-10 20:29:07 +01:00
Erik Sundell
b64115e5f5 access scope directly from this. update tests 2019-01-10 17:18:24 +01:00
Erik Sundell
6a2f5eb61e refactoring. fix broken test 2019-01-10 13:49:11 +01:00
Erik Sundell
5fed50713d provide angular directive scope props correctly 2019-01-10 12:02:38 +01:00
SamuelToh
9e3ab71e40 11503: escape measurement filter regex value 2019-01-10 10:47:22 +10:00
SamuelToh
e1f6870fce 4075: Interpolate tempvar on alias 2019-01-10 09:53:06 +10:00
Erik Sundell
23996b364e fix broken test 2019-01-09 14:44:47 +01:00
Erik Sundell
92121cacd1 Merge remote-tracking branch 'origin/master' into reactify-stackdriver
# Conflicts:
#	yarn.lock
2019-01-09 14:33:41 +01:00
Erik Sundell
d51f91f54b unregister event listener correctly 2019-01-09 13:56:15 +01:00
Erik Sundell
ae50d83608 update snapshot 2019-01-08 16:21:38 +01:00
Erik Sundell
6c00f3e511 add form grow 2019-01-08 16:08:09 +01:00
Erik Sundell
b8c2ba3320 add typing for metric descriptor 2019-01-08 14:03:52 +01:00
Erik Sundell
8867d8e99c make templateSrv a prop 2019-01-08 13:52:19 +01:00
Erik Sundell
dc7f98de6a use correct event handler name convention. register directive on startup 2019-01-08 13:37:08 +01:00
Erik Sundell
f9f51d6819 replace fragment with empty jsx tags 2019-01-08 13:00:31 +01:00
Erik Sundell
e71e2b3035 refactoring tests 2019-01-08 12:52:47 +01:00
Erik Sundell
803d546c70 ugly fix. will be removed later on 2019-01-08 12:44:43 +01:00
Daniel Lee
f95b4b3882
Merge pull request #14735 from challengerdeep/14581_fix-stackdriver-series-aggregation-merge
Fix stackdriver aggregation series merge
2019-01-08 10:40:37 +01:00
Erik Sundell
d6e7fccc97 fix more broken tests 2019-01-08 10:00:10 +01:00
Erik Sundell
c964d6d7ef wip: fix broken tests 2019-01-08 08:51:34 +01:00
Erik Sundell
87cb3d4caa ugly temporary fix for scope issue. will be removed later on 2019-01-07 14:52:36 +01:00
Erik Sundell
e75aec9954 refactoring 2019-01-07 14:51:20 +01:00
Erik Sundell
e61fa37db4 fix filter bug 2019-01-07 14:15:53 +01:00
Erik Sundell
49144f07e4 Merge branch '14293-metric-display-names' into reactify-stackdriver
# Conflicts:
#	public/app/plugins/datasource/stackdriver/partials/query.aggregation.html
#	public/app/plugins/datasource/stackdriver/partials/query.editor.html
#	public/app/plugins/datasource/stackdriver/partials/query.filter.html
#	public/app/plugins/datasource/stackdriver/query_aggregation_ctrl.ts
#	public/app/plugins/datasource/stackdriver/query_ctrl.ts
#	public/app/plugins/datasource/stackdriver/query_filter_ctrl.ts
#	public/app/plugins/datasource/stackdriver/specs/query_aggregation_ctrl.test.ts
2019-01-07 13:59:36 +01:00
Erik Sundell
9ec6831713 bind array instead of function 2019-01-07 13:37:39 +01:00
Erik Sundell
7b4b1a4f90 remove not used property 2019-01-07 11:26:06 +01:00
Erik Sundell
899811a934 fix broken tests 2019-01-07 11:26:06 +01:00
Erik Sundell
4928984825 set issearchable default value to true 2019-01-07 11:26:06 +01:00
Erik Sundell
786df7920e remove group name from select component. let the parent set group name instead 2019-01-07 11:26:06 +01:00
Erik Sundell
03856b4e55 move component to components dir. also move directive registration out from datasource 2019-01-07 11:26:06 +01:00
Erik Sundell
58bea1de79 add template variable type 2019-01-07 11:26:06 +01:00
Erik Sundell
96d65b55b6 rename template variables prop 2019-01-07 11:26:06 +01:00
Erik Sundell
ff762c213f rename selected prop 2019-01-07 11:26:06 +01:00
Erik Sundell
3ca5abf5e9 rename searchable prop 2019-01-07 11:26:06 +01:00
Erik Sundell
1e5f2f56e0 improve component performance 2019-01-07 11:26:05 +01:00
Erik Sundell
5eb22388c3 remove debug logging 2019-01-07 11:26:05 +01:00
Erik Sundell
243c4bfe29 rollback test state to before template variables were added 2019-01-07 11:26:05 +01:00
Erik Sundell
2b8185cb80 cleanup 2019-01-07 11:26:05 +01:00
Erik Sundell
02b745f106 move template variable logic to component 2019-01-07 11:26:05 +01:00
Erik Sundell
d42e39a072 remove extra arrow div 2019-01-07 11:26:05 +01:00
Erik Sundell
93bc7e8fa5 align input widths 2019-01-07 11:26:05 +01:00
Erik Sundell
b9b25e766f remove console log 2019-01-07 11:26:05 +01:00
Erik Sundell
a441251cf5 rename directive 2019-01-07 11:26:04 +01:00
Erik Sundell
b385c105fe remove linebreak 2019-01-07 11:26:04 +01:00
Erik Sundell
07f0d90718 use new generic picker 2019-01-07 11:26:04 +01:00
Erik Sundell
1090e0ae2f remove on metric type change 2019-01-07 11:26:04 +01:00
Erik Sundell
de9ace731d fix remove filter bug 2019-01-07 11:26:04 +01:00
Erik Sundell
329d4652fb cleanup query filter 2019-01-07 11:26:03 +01:00
Erik Sundell
b683a19ff6 update failing tests 2019-01-07 11:26:03 +01:00
Erik Sundell
2bc38b7907 remove redundant default value 2019-01-07 11:26:03 +01:00
Erik Sundell
caedbc67b8 use new option group in aggregation directive 2019-01-07 11:26:03 +01:00
Erik Sundell
eea91d2885 remove redundant default value 2019-01-07 11:26:03 +01:00
Erik Sundell
1f3f336352 wip: add option group component 2019-01-07 11:26:02 +01:00
Erik Sundell
ad4f39101a Wrap react select component in angular directive 2019-01-07 11:26:02 +01:00
Simon Podlipsky
c39dc1fb15 Some cleanup 2019-01-05 15:25:07 +01:00
Michael Inthilith
9759ee53ca Add mean on distribution as well 2019-01-04 16:58:27 +01:00
Michael Inthilith
1eca81139b Fix stackdriver aggregation series merge
Fixes #14581
2019-01-04 16:05:17 +01:00
Erik Sundell
0c178f8623 cleanup 2019-01-03 16:21:20 +01:00
Erik Sundell
cc7b754e77 add aggregation tests 2019-01-03 16:00:42 +01:00
Erik Sundell
d23c3d2b64 add tests 2019-01-03 15:12:03 +01:00
Erik Sundell
3ce4287e8c fix template variable bug 2019-01-03 09:15:49 +01:00
Erik Sundell
93d2588c22 remove not used file 2019-01-02 20:58:03 +01:00
Erik Sundell
1ab9fc871c cleanup. remove comments, not used files etc 2019-01-02 15:35:36 +01:00
Erik Sundell
0e49225d1d merge from 14293-metric-display-names 2019-01-02 15:07:38 +01:00
Erik Sundell
b7503407e6 fix broken tests 2019-01-02 13:03:21 +01:00
Erik Sundell
b22bf9359f set issearchable default value to true 2019-01-02 13:03:21 +01:00
Erik Sundell
d741295795 remove group name from select component. let the parent set group name instead 2019-01-02 13:03:21 +01:00
Erik Sundell
e180cf54ce move component to components dir. also move directive registration out from datasource 2019-01-02 13:03:20 +01:00
Erik Sundell
4662335f80 add template variable type 2019-01-02 13:03:20 +01:00
Erik Sundell
70071e5dad rename template variables prop 2019-01-02 13:03:20 +01:00
Erik Sundell
cf50cf167c rename selected prop 2019-01-02 13:03:20 +01:00
Erik Sundell
ed673d35f5 rename searchable prop 2019-01-02 13:03:20 +01:00
Erik Sundell
e4d18a1933 improve component performance 2019-01-02 13:03:20 +01:00
Erik Sundell
53ac3c8fd2 remove debug logging 2019-01-02 13:03:20 +01:00
Erik Sundell
c70e90cb48 rollback test state to before template variables were added 2019-01-02 13:03:20 +01:00
Erik Sundell
01fc950511 cleanup 2019-01-02 13:03:19 +01:00
Erik Sundell
00a763511e move template variable logic to component 2019-01-02 13:03:19 +01:00
Erik Sundell
3f05364eb9 remove extra arrow div 2019-01-02 13:03:19 +01:00
Erik Sundell
9715260151 align input widths 2019-01-02 13:03:19 +01:00
Erik Sundell
3afe8a0763 remove console log 2019-01-02 13:03:18 +01:00
Erik Sundell
55f558cb7c rename directive 2019-01-02 13:03:18 +01:00
Erik Sundell
843e9fb4dc remove linebreak 2019-01-02 13:03:18 +01:00
Erik Sundell
4734788db4 use new generic picker 2019-01-02 13:03:17 +01:00
Erik Sundell
478cfc195a remove on metric type change 2019-01-02 13:03:17 +01:00
Erik Sundell
014457c486 fix remove filter bug 2019-01-02 13:03:17 +01:00
Erik Sundell
f68db4eded cleanup query filter 2019-01-02 13:03:17 +01:00
Erik Sundell
b6c6cc1ff6 update failing tests 2019-01-02 13:03:17 +01:00
Erik Sundell
615fa6fc7d remove redundant default value 2019-01-02 13:03:16 +01:00
Erik Sundell
4d19ac5c02 use new option group in aggregation directive 2019-01-02 13:03:16 +01:00
Erik Sundell
406c0d15a5 remove redundant default value 2019-01-02 13:03:16 +01:00
Erik Sundell
b5d6cd1cc8 wip: add option group component 2019-01-02 13:03:16 +01:00
Erik Sundell
70c2efd711 Wrap react select component in angular directive 2019-01-02 13:03:15 +01:00
Erik Sundell
fd88f637b2 fix filter bug 2019-01-02 09:41:26 +01:00
Erik Sundell
f9380a2634 add help text component 2019-01-02 09:36:32 +01:00
Torkel Ödegaard
9e91d91788
Merge pull request #14689 from grafana/davkal/loki-limit
Loki: query limit configurable in datasource
2019-01-01 15:38:59 +01:00
David Kaltschmidt
f4b4ee3ff8 Review feedback 2018-12-31 14:10:45 +00:00
David Kaltschmidt
32438c4716 Loki: change query row to be single field again
- tried split selector and search for a week, and it did not feel natural
- keeping some of the original modifications in QueryField from splitting PR
- adapted CheatSheet and placeholder text
- added new label selector state: No labels found
2018-12-31 12:38:13 +00:00
David Kaltschmidt
26a5e07737 Loki: query limit configurable in datasource
- Loki queries must contain a limit
- this change makes this limit configurable in the datasource
- keep default at 1000, add tooltip on why inc/dec makes sense
- added tests
2018-12-31 11:25:28 +00:00
Erik Sundell
5ba429387f reactify annotation query editor 2018-12-28 19:45:24 +01:00
Torkel Ödegaard
4bb8249ffc
Merge pull request #14627 from cykl/influxdb-timezone-clause
Add support for InfluxDB's time zone clause
2018-12-23 07:03:48 +01:00
Dan Cech
b8fdacd81f
Update public/app/plugins/datasource/loki/result_transformer.ts
Co-Authored-By: davkal <david.kaltschmidt@gmail.com>
2018-12-22 17:28:51 +01:00
David Kaltschmidt
e694604be5 Loki: fix timestamp field
- timestamp was renamed to `ts` in grafana/loki#152
- renamed here in result transformer and tests
2018-12-22 17:19:58 +01:00
David
b2401e37fa
Merge pull request #14414 from grafana/davkal/explore-logging-search
Explore: Split logging query into selector and search
2018-12-22 17:00:57 +01:00
Erik Sundell
8a916757d7 remove segment srv prop 2018-12-21 23:28:21 +01:00
Erik Sundell
b9cf15786d use ds template srv reference 2018-12-21 23:21:55 +01:00
Erik Sundell
2f342b8917 remove not used stuff 2018-12-21 23:07:46 +01:00
Erik Sundell
31254e1c72 add event handler 2018-12-21 22:04:46 +01:00
Erik Sundell
0515605b9a add help component 2018-12-21 21:38:46 +01:00
Jürgen Kreileder
41eb0ba52e Add support for InfluxDB's time zone clause 2018-12-21 14:37:02 +01:00
Erik Sundell
e2ed163779 add project and help component 2018-12-20 16:55:02 +01:00
Erik Sundell
06f771afd3 add alias by component 2018-12-20 15:59:21 +01:00
Erik Sundell
861f911cda add alignment periods component 2018-12-20 13:36:10 +01:00
Erik Sundell
7a31076f09 cleanup aggregation picker 2018-12-20 13:27:47 +01:00
Erik Sundell
1452bc2e8a move alignment population code to parent component. make alignment a stateless component instead. 2018-12-20 11:26:05 +01:00
Erik Sundell
ec68c65660 flatten target obj 2018-12-20 11:00:16 +01:00
Marcus Efraimsson
b45f72a140
elasticsearch: support bucket script pipeline aggregations 2018-12-20 01:24:36 +01:00
Erik Sundell
095407c8cf on deselect when reducer is set to none 2018-12-19 21:08:38 +01:00
Erik Sundell
945b0aeb86 add alignment component 2018-12-19 17:12:50 +01:00
Erik Sundell
603ef1c37d refactor aggregation picker 2018-12-19 16:08:18 +01:00
Erik Sundell
9b1b4c09f5 use render props pattern 2018-12-19 15:54:45 +01:00
Erik Sundell
07dc9d06d7 use template variable prop 2018-12-19 14:29:00 +01:00
Erik Sundell
a955caa9ac cleanup 2018-12-19 14:19:27 +01:00
Torkel Ödegaard
6542bfb83e Merge branch 'fix-misspell-issues' of https://github.com/mjtrangoni/grafana into mjtrangoni-fix-misspell-issues 2018-12-19 11:21:34 +01:00
Erik Sundell
9e558b70d7 Merge branch '14293-metric-display-names' into reactify-stackdriver
# Conflicts:
#	public/app/plugins/datasource/stackdriver/partials/query.aggregation.html
#	public/app/plugins/datasource/stackdriver/partials/query.editor.html
#	public/app/plugins/datasource/stackdriver/partials/query.filter.html
#	public/app/plugins/datasource/stackdriver/query_aggregation_ctrl.ts
#	public/app/plugins/datasource/stackdriver/query_ctrl.ts
#	public/app/plugins/datasource/stackdriver/query_filter_ctrl.ts
#	public/sass/_grafana.scss
2018-12-19 09:21:35 +01:00
Erik Sundell
8e9cd83ee8 improve component performance 2018-12-18 16:56:16 +01:00
Erik Sundell
74c2b22a77 remove debug logging 2018-12-18 16:27:24 +01:00
Erik Sundell
3c2ab68290 rollback test state to before template variables were added 2018-12-18 16:19:49 +01:00
Erik Sundell
7ef0995257 cleanup 2018-12-18 16:09:32 +01:00
Erik Sundell
9507dfe13c move template variable logic to component 2018-12-18 16:01:12 +01:00
Erik Sundell
5a9dd620a6 remove extra arrow div 2018-12-18 15:58:33 +01:00
Erik Sundell
0c596a0274 align input widths 2018-12-18 13:03:29 +01:00
Erik Sundell
738fd997ce remove console log 2018-12-18 11:46:07 +01:00
Erik Sundell
d23d4c2ca0 rename directive 2018-12-18 11:31:11 +01:00
Erik Sundell
b46be0b638 remove linebreak 2018-12-18 11:28:35 +01:00
Erik Sundell
8430c5a491 use new generic picker 2018-12-18 11:25:13 +01:00
Erik Sundell
47b3901e7d remove on metric type change 2018-12-18 10:37:47 +01:00
Erik Sundell
a5f64a5668 fix remove filter bug 2018-12-18 10:37:47 +01:00
Erik Sundell
15ba05d7ee cleanup query filter 2018-12-18 10:37:47 +01:00
Erik Sundell
5affc55756 update failing tests 2018-12-18 10:37:46 +01:00
Erik Sundell
8afe48bb3e remove redundant default value 2018-12-18 10:37:46 +01:00
Erik Sundell
dcbe12989f use new option group in aggregation directive 2018-12-18 10:37:46 +01:00
Erik Sundell
2ac1fe2a17 remove redundant default value 2018-12-18 10:37:46 +01:00
Erik Sundell
fe4c77a8a4 wip: add option group component 2018-12-18 10:37:46 +01:00
Erik Sundell
73b5bc680f Wrap react select component in angular directive 2018-12-18 10:36:59 +01:00
Torkel Ödegaard
705cbb4095 Minor cleanup now that angular panel edit is no longer 2018-12-17 21:29:25 +01:00
Torkel Ödegaard
b15bb4fb95 Merge remote-tracking branch 'origin/master' into develop 2018-12-14 17:02:08 +01:00
Torkel Ödegaard
9e4547f787 fixed cloudwatch issue 2018-12-14 14:25:35 +01:00
Erik Sundell
146aa7abab wip: convert angular directives to react components 2018-12-13 16:40:14 +01:00
Erik Sundell
ad55be9865 break out metric picker and filter 2018-12-13 00:16:48 +01:00
Daniel Lee
2d2254293b loki: updates the logo 2018-12-12 20:34:33 +01:00
Erik Sundell
7cc42d7c13 remove on metric type change 2018-12-12 14:08:47 +01:00
Erik Sundell
f6109d21d2 fix remove filter bug 2018-12-12 13:59:13 +01:00
Erik Sundell
ac416ba880 cleanup query filter 2018-12-12 13:57:32 +01:00
Marcus Efraimsson
c46d01dc83
Merge pull request #14090 from marefr/8843_pipeline_doc_count
Fix pipeline aggregations on doc count
2018-12-12 13:21:13 +01:00
Erik Sundell
ad9a35198d update failing tests 2018-12-12 12:57:57 +01:00
Erik Sundell
bcb218f57c remove redundant default value 2018-12-12 12:55:23 +01:00
Erik Sundell
ae922747db use new option group in aggregation directive 2018-12-12 09:57:30 +01:00
Erik Sundell
33146b248e remove redundant default value 2018-12-12 09:14:06 +01:00
Torkel Ödegaard
8497c854f6 Adding mixed query 2018-12-12 08:54:12 +01:00
Erik Sundell
ab5e5de814 wip: add option group component 2018-12-11 20:12:33 +01:00
Erik Sundell
847f5491bf Wrap react select component in angular directive 2018-12-11 13:14:55 +01:00
David Kaltschmidt
117adbbe5d Fix search field styles 2018-12-09 14:39:25 -08:00
David Kaltschmidt
9293ff06cd Enable search also after editing 2018-12-09 18:53:03 +01:00
David Kaltschmidt
6b9200a606 Explore: Split logging query into selector and search
- add second query field to logging datasource query component
- second field manages search term, first field manages stream selectors
- improved logging cheat sheet to get started
2018-12-09 18:44:59 +01:00
Torkel Ödegaard
bfbb44af03 transparent toggle style and new button group style 2018-12-07 17:15:46 +01:00
Torkel Ödegaard
eb6d0e9f51 Merge branch 'master' into develop 2018-12-07 14:59:38 +01:00
David Kaltschmidt
c0c06e4dd8 Prometheus: Make result transformer more robust for empty responses
- some prometheus-compatible backends may return `null` instead of empty lists
- test for lists before iterating
- added tests for empty responses
2018-12-07 11:22:55 +01:00
Erik Sundell
260d0189b6 add table support flag in influx config 2018-12-07 10:29:38 +01:00
Marcus Efraimsson
093c9425e9
Merge pull request #14313 from dhenneke/postgres-use-table-not-schema-constraint
Improve PostgreSQL Query Editor if using different Schemas
2018-12-06 17:21:48 +01:00
bergquist
e230827c06 more detailed error message for loki
if grafana tries to access loki without promtail running
it will return an error.
2018-12-06 13:59:19 +01:00
Daniel Lee
40898e1cd6 loki: adds proper error handling for config page
This handles three different error cases for the
config page so that the user gets an error and not
just a blank red error box.
2018-12-06 00:42:31 +01:00
Daniel Lee
721e1d7555 renames Grafana Logging ds to Loki 2018-12-06 00:42:31 +01:00
Mario Trangoni
37bb8840f0 public/app/plugins/*: Fix some misspell issues 2018-12-05 13:13:29 +01:00
Torkel Ödegaard
180ca021b5 Merge branch 'master' into develop 2018-12-05 10:17:22 +01:00
Dominik Henneke
b450b778cb Use buildTableConstraint instead of buildSchemaConstraint to find the datatype of a column if using a table from a different database schema 2018-12-04 19:26:12 +01:00
David Kaltschmidt
6ee7459f22 Explore: Logging query live preview of matches
A logging query has a selector part and a regexp. The regexp matches are highlighted when results return.
This change adds live preview to matches when modifying the regexp in a search field.

- delegate retrieval of match query to datasource
- datasource returns search expressions to be used to highlight a live preview of matches
- logs row now takes preview highlights
- logs row renders preview highlights with dotted line to distinguish from query run matches (solid line)
- fix react-highlight-words version to ensure custom chunk matcher
- custom chunk matcher can now also take incomplete regexps, eg, `(level` without inifinte looping
- perf: debounce of live preview to 500ms
- perf: only top 100 rows get the live preview
- preview is only supported with one query row (multiple rows semantic makes this tricky: regexp for row n should only filter results for query n)
2018-12-04 15:47:51 +01:00
Torkel Ödegaard
401b470ebb added max-widths to explore start pages boxes 2018-12-04 15:06:30 +01:00
Torkel Ödegaard
1fddb6144d fixed promql and loggging syntax so all punctuation chars are treated the same, remove hover move 2018-12-04 14:57:01 +01:00
Torkel Ödegaard
47523f80dd fixed logging start page 2018-12-04 12:59:24 +01:00
Torkel Ödegaard
1283a3292d fixed grabage in markup 2018-12-04 10:16:51 +01:00
Torkel Ödegaard
44414c4346 Misc styling fixes to explore: start page, slate code editor colors, text highlight in auto completeter suggestion 2018-12-03 17:20:02 +01:00
Marcus Efraimsson
acb45867f8
Merge pull request #14179 from mattiarossi/master
Add support for offset in date histogram aggregation
2018-12-03 05:43:42 -08:00
Torkel Ödegaard
d16b348868
Merge pull request #14257 from grafana/davkal/fix-14250
Explore: Fix logging query parser for regex with quantifiers
2018-12-03 12:25:10 +01:00
Torkel Ödegaard
9404d36ab5
Merge pull request #14135 from grafana/panel-edit-in-react
React Panel Editor Mode (For Angular and React Panels)
2018-12-03 11:50:06 +01:00
Torkel Ödegaard
d38a0a0b64
Merge pull request #14106 from grafana/unit-picker
Unit picker
2018-12-03 10:53:48 +01:00
Marcus Efraimsson
901ec01992
Merge pull request #14254 from grafana/14228_mysql_time_from_to
Fix mysql $__timeFrom() and $__timeTo() should respect local time zone
2018-11-30 07:22:34 -08:00
David
c441b9eec3
Merge pull request #14256 from grafana/davkal/fix-14245
Explore: Fix label and history suggestions
2018-11-30 16:16:16 +01:00
David Kaltschmidt
11a53763e2 Explore: Fix logging query parser for regex with quantifiers
- ensure that selectors have to be preceded by whitespace or line beginning
- glacing over the fact that ` {0,1}` could be a valid regexp, but we're using space as query/regexp separators anyway, so I think it's fine for now
2018-11-30 15:49:54 +01:00
David Kaltschmidt
a61c8d23d4 Explore: Fix label and history suggestions
- fork promql's tokenizer (need to specify that labels context can only follow beginning of line or whitespace)
- remove unneeded syntax features
- only present history items when field is empty
2018-11-30 15:13:53 +01:00
Marcus Efraimsson
624e5e5b3d
let each sql datasource handle timeFrom and timeTo macros 2018-11-30 14:30:02 +01:00
David Kaltschmidt
979f3f3e0c Review feedback
- fixed typo
- moved result calculation to explore utils
- use component keys instead of componentWillReceiveProps
- require logs to have and id, to as use as Logs component key
- render delay based on row count
2018-11-30 12:26:57 +01:00
Torkel Ödegaard
93ac4e4717 Fixed styling issues with new checkbox style 2018-11-29 18:39:02 +01:00
Erik Sundell
58931c1316 add table support flag for stackdriver 2018-11-29 10:39:36 +01:00
Erik Sundell
d9236c1081 add table support flag for prometheus 2018-11-29 10:39:24 +01:00
Erik Sundell
e544f2bc74 add table support flag for postgres 2018-11-29 10:39:13 +01:00
Erik Sundell
699f6aecc6 add table support flag for opentsdb 2018-11-29 10:39:00 +01:00
Erik Sundell
e635005626 add table support flag for mysql 2018-11-29 10:38:45 +01:00
Erik Sundell
00d8e1f221 add table support flag for mssql 2018-11-29 10:38:33 +01:00
Erik Sundell
71f6235a8c add table support flag for logging 2018-11-29 10:38:20 +01:00
Erik Sundell
d66d2ae749 add table support flag for graphite 2018-11-29 10:38:04 +01:00
David Kaltschmidt
c3b67f3a13 Explore: Logging label filtering
- adds a custom label renderer to Logs viewer in Explore
- labels are no longer treated as strings, they are passed as parsed objects to the log row
- label renderer supports onClick handler for an action
- renamed Explore's `onClickTableCell` to `onClickLabel` and wired up log label renderers
- reuse Prometheus `addLabelToSelector` to modify Logging queries via click on label
- added tests to `addLabelToSelector`, changed to include the surrounding `{}`
- use label render also for common labels in the controls panel
- logging meta data section has now a custom renderer that can render numbers, strings, and labels
- style adjustments
2018-11-28 14:20:10 +01:00
David Kaltschmidt
9c316b55e9 Logging: fix query parsing for selectors with multiple labels
- simplify selector parsing
- added tests
2018-11-28 14:03:47 +01:00
Torkel Ödegaard
2faf8c722f Fix elastic ng-inject (build issue) (#14195)
fix elastic ng-inject issue in query editor
2018-11-28 00:20:49 -08:00
David
9afb8b64ed
Merge pull request #14176 from grafana/davkal/explore-logging-level-filter
Explore: Filter logs by log level
2018-11-27 12:23:45 +01:00
Mattia Rossi
ce74b1ddc2 Requested Backend changes, removed link in popover description for the offset field 2018-11-27 03:42:20 -05:00
Mattia Rossi
f6fc7f7b64 Requested Backend changes, added details to popover description for the offset field 2018-11-26 08:58:25 -05:00
David Kaltschmidt
91ea8dccf5 Explore: Fix JS error when switching between 2 prometheus datasources
- since the DataQuery rewrite, Explore starts by submitting its queries (Explore cant know if the queries are emtpty)
- The datasource intercepts an empty query and returns an empty list of time series, and also no table for the table query.
- The query hinter then received no series to analyse and was not guarding against this.
- This PR adds this guard.
2018-11-26 13:43:22 +01:00
Mattia Rossi
9825484176 Add support for Offset in elasticsearch datasource, date_histogram aggregation, fixes grafana #12653 2018-11-24 10:48:29 -05:00
Torkel Ödegaard
efcbb92b3f
Merge pull request #14170 from grafana/davkal/explore-prometheus-range-sort
Sort Prometheus range suggestions by length
2018-11-23 19:22:24 +01:00
David Kaltschmidt
575d888472 Fix tests to account for sortText 2018-11-23 16:53:46 +01:00
David Kaltschmidt
ae5ec44171 Fix tests to account for loglevel long names 2018-11-23 16:49:23 +01:00
David Kaltschmidt
4f55a238ed Explore: Filter logs by log level
- add `onToggleSeries` to Explore Graph props
- toggling a Logging Graph series from the legend propagates its hidden series to Logs
- Logs translates hidden series alias to LogLevels
- Logs filters out hidden log levels
2018-11-23 16:29:55 +01:00
Torkel Ödegaard
2dc44f6089 Merge branch 'master' into develop 2018-11-23 13:59:35 +01:00
David Kaltschmidt
f831836fa7 Explore: make query field suggestions more robust
- drop invalid history items
- make highlighter more robust by defaulting to empty string on text to highlight
2018-11-23 12:25:43 +01:00
David Kaltschmidt
ecaee88efe Sort Prometheus range suggestions by length
- add sortText property to range completion items
2018-11-23 11:43:21 +01:00
David Kaltschmidt
b778b5350a Explore: swtiching to logging should keep prometheus labels in case of error
Logging's query importer drops all labels that are not common to both datasources.

- keep labels if label lookup of logging datasource came back empty
- easier to remove labels than having to add them in the first place
2018-11-23 11:15:25 +01:00
Erik Sundell
a5947e820c Merge branch 'master' into develop 2018-11-22 13:43:25 +01:00
David Kaltschmidt
bbaa5b63c8 Fix history rendering for DataQuery 2018-11-22 11:02:53 +01:00
David Kaltschmidt
331d419d4f Combine query functions 2018-11-21 17:21:13 +01:00
David Kaltschmidt
22987ee75f Renamed targets to queries 2018-11-21 16:28:30 +01:00
David Kaltschmidt
b3161bea5a Explore: Introduce DataQuery interface for query handling
- Queries in Explore have been string based
- This PR introduces the use of the DataQuery type to denote all queries handled in Explore
- Within Explore all handling of DataQueries is transparent
- Modifying DataQueries is left to the datasource
- Using `target` as variable names for DataQueries to be consistent with the rest of Grafana
2018-11-21 14:45:57 +01:00
Daniel Lee
4aeea56342
Merge pull request #14007 from grafana/stackdriver-template-query-editor
Stackdriver template query editor
2018-11-20 13:41:18 +01:00
Erik Sundell
7021e07ab2 stackdriver: remove not used variable 2018-11-20 13:22:43 +01:00
Erik Sundell
b200f92710 stackdriver: use angular dropdown so that we can restrict user input 2018-11-20 13:18:00 +01:00
Torkel Ödegaard
649d727805 Merge branch 'master' into develop 2018-11-20 09:47:23 +01:00
Erik Sundell
fa32310f8a stackdriver: add query keyword to service, metric and project since these were the only fields in the editor that was missing it in the whole editor 2018-11-19 16:37:42 +01:00
Erik Sundell
19d1d7f35a stackdriver: add query keyword style to query fields 2018-11-19 16:26:06 +01:00
Erik Sundell
164e9a4f9a stackdriver: fix failing test 2018-11-19 16:19:56 +01:00
David
c20c787b62
Merge pull request #14104 from grafana/davkal/prometheus-rule-expansion
Prometheus: fix rules expansion
2018-11-19 15:11:09 +00:00
Erik Sundell
0ec4491a52 stackdriver: reimplementing service variable query type 2018-11-19 16:06:30 +01:00
Erik Sundell
795af5deed stackdriver: fix failing tests 2018-11-19 14:51:52 +01:00
Erik Sundell
0aeaec1ac6 stackdriver: add support for template variables 2018-11-19 14:44:40 +01:00
Erik Sundell
26b1cc5dcf stackdriver: join resource and metric labels. split them in values and keys 2018-11-19 11:34:40 +01:00
Peter Holmberg
cc7bf31c3e Merge remote-tracking branch 'origin/develop' into unit-picker 2018-11-16 16:54:02 +01:00
David
634d71a657
Merge pull request #14052 from grafana/davkal/explore-query-importer
Explore: POC for datasource query importers
2018-11-16 14:55:19 +00:00
David Kaltschmidt
e3e8be16b3 Prometheus: fix rules expansion
Rules expansion (available via query hints in explore) was broken for expressions that contained selectors.

- fix replacing regexp to recognize `{` and `[` as the end of a rule name
- moved logic to language utils
- added tests
2018-11-16 14:38:20 +00:00
David Kaltschmidt
411719bc70 Explore: POC for datasource query importers
Explore is about keeping context between datasources if possible. When
changing from metrics to logging, some of the filtering can be kept to
narrow down logging streams relevant to the metrics.

- adds `importQueries` function in language providers
- query import dependent on origin datasource
- implemented  prometheus-to-logging import: keeping label selectors
  that are common to both datasources
- added types
2018-11-16 13:52:58 +00:00
Marcus Efraimsson
9a8ad70013
fix pipeline aggregations on doc count 2018-11-15 19:06:47 +01:00
David
fe45cb9aa1
Merge pull request #14032 from grafana/davkal/explore-prevent-term-completion
Explore: Don't suggest term items when text follows
2018-11-15 16:43:15 +00:00
Torkel Ödegaard
f5b63fc65d Merge branch 'master' into develop 2018-11-15 16:56:21 +01:00
Erik Sundell
69137e6774 stackdriver: revert project test stuff 2018-11-15 13:23:42 +01:00
Erik Sundell
b9d5fa1b36 stackdriver: revert test code 2018-11-15 13:20:32 +01:00
David Kaltschmidt
ce59acd141 Extracted language provider variables for readibility 2018-11-15 11:20:27 +00:00
stop-cran
20214b3d6a [elasticsearch] Do not set a placeholder to index name, if it's already specified. 2018-11-14 18:45:18 +02:00
Torkel Ödegaard
0a080149ae
Merge pull request #14054 from marefr/6367_raw_document_reset
Fix switching from es raw document metric breaks query editor
2018-11-14 16:46:47 +01:00
Erik Sundell
2e0cbe75ee stackdriver: use arrow functions 2018-11-13 11:06:08 +01:00
Erik Sundell
e698202fae stackdriver: use new naming convention for query editor all over 2018-11-13 10:57:10 +01:00
David Kaltschmidt
ff0ed06441 Explore: Don't suggest term items when text follows
Tab completion gets in the way when constructing a query from the inside
out:

```
up| => |up => sum(|up)
```

At that point the language provider will not suggest anything.
2018-11-12 17:40:05 +00:00
Torkel Ödegaard
e0feb72637 Merge remote-tracking branch 'origin/data-source-settings-to-react' into develop 2018-11-12 16:17:05 +01:00
Erik Sundell
30f9a324ac stackdriver: remove service query tyhpe 2018-11-09 14:36:50 +01:00
Erik Sundell
3b9eda2561 stackdriver: correct aligner name 2018-11-09 14:36:04 +01:00
Erik Sundell
f307fc4760 stackdriver: typescriptifying props 2018-11-09 14:30:28 +01:00
Erik Sundell
996b470dd0 stackdriver: remove redundant try catch 2018-11-09 14:24:21 +01:00
Erik Sundell
bb1f79ecdc stackdriver: rename query function 2018-11-09 13:55:16 +01:00
Erik Sundell
5424603052 stackdriver: rename query variable 2018-11-09 13:55:16 +01:00
Erik Sundell
f14b3e7fcf stackdriver: remove debug log 2018-11-09 13:55:16 +01:00
Erik Sundell
9c85793dbb stackdriver: test saved variable 2018-11-09 13:55:15 +01:00
Erik Sundell
b262be73e0 stackdriver: fix failing tests 2018-11-09 13:55:15 +01:00
Erik Sundell
45f49c2e5b stackdriver: remove services query type 2018-11-09 13:55:15 +01:00
Erik Sundell
209b1c026e stackdriver: update tests 2018-11-09 13:55:15 +01:00
Erik Sundell
0280179d35 stackdriver: add tests for render snapshop and default query type 2018-11-09 13:55:15 +01:00
Erik Sundell
7bdf97d3e6 stackdriver: remove lodash since object assign will do the trick 2018-11-09 13:55:15 +01:00
Erik Sundell
85ef5c2523 stackdriver: make sure we don't crash when selected service doesnt have a value 2018-11-09 13:55:15 +01:00
Erik Sundell
8333bf0b76 stackdriver: add simple render test 2018-11-09 13:55:15 +01:00
Erik Sundell
2d14bd10f3 stackdriver: add default value for query type 2018-11-09 13:55:14 +01:00
Erik Sundell
588c5c045a stackdriver: pass query definition from react, making it possible to use another definition than the query string only 2018-11-09 13:55:14 +01:00
Erik Sundell
5069f4afc9 stackdriver: make it possible to use alignment period template variable 2018-11-09 13:55:14 +01:00
Erik Sundell
a027a87d50 stackdriver: make it possible to use aligner template variable 2018-11-09 13:55:14 +01:00
Erik Sundell
2a6aec721e stackdriver: make it possible to use aggregation template variable 2018-11-09 13:55:14 +01:00
Erik Sundell
a951e577b7 stackdriver: make it possible to use aggregation template variable 2018-11-09 13:55:14 +01:00
Erik Sundell
20f1956225 stackdriver: make it possible to use metric type template variable 2018-11-09 13:55:13 +01:00
Erik Sundell
40bb3551cf stackdriver: return correct value 2018-11-09 13:55:13 +01:00
Erik Sundell
fcf39a0839 stackdriver: fix default value bug 2018-11-09 13:55:13 +01:00
Erik Sundell
042d156e5f stackdriver: extend label width 2018-11-09 13:55:13 +01:00
Erik Sundell
21940c2ca3 stackdriver: revert refactoring 2018-11-09 13:55:12 +01:00
Erik Sundell
2780ef27fd stackdriver: extract variables for pickers 2018-11-09 13:55:12 +01:00
Erik Sundell
b3c34be648 stackdriver: cleanup 2018-11-09 13:55:12 +01:00
Erik Sundell
a46b9cb0bb stackriver: rename interface 2018-11-09 13:55:12 +01:00
Erik Sundell
e9e20224d4 stackriver: use type for state 2018-11-09 13:55:12 +01:00