Commit Graph

7957 Commits

Author SHA1 Message Date
David Kaltschmidt
ae26f7126f Explore: Logging render performance
- moved from grid to flexbox
- calculate Explore results only when query transactions change to prevent expensive re-renders
- split up rendering of graph and log data
- render log results in 2 stages
2018-11-29 17:30:11 +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
David
32511533c3
Merge pull request #14178 from grafana/davkal/explore-scan-log-range
Explore: Scan for older logs
2018-11-28 11:00:51 +01:00
Ryan McKinley
b3e6da0cbd check for null with toLocalString (#14208) 2018-11-28 00:24:59 -08: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 Kaltschmidt
593cc38cfc Added stop scan button 2018-11-27 16:35:37 +01:00
David Kaltschmidt
4803b8f3c0 Explore: Scan for older logs
Sometimes log streams dont return any lines for the given range. Would be great to automate the search until some logs are found.

- Allow Explore to drive TimePicker via ref
- Show `Scan` link in Logs when there is no data
- Click on `Scan` sets Explore into scanning state
- While scanning, tell Timepicker to shift left
- TimePicker change triggers new queries with shifted time range
- Remember if query transaction was started via scan
- keep scanning until something was found
- Manual use of timepicker cancels scanning
2018-11-27 15:56:10 +01: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
92c5755175 minor style fix 2018-11-23 15:10:45 +01:00
Torkel Ödegaard
5038efe09e Merge branch 'master' into davkal/babel-7 2018-11-23 13:44:59 +01:00
Torkel Ödegaard
fd71abc301 fixed issue with babel plugin proposal class properties that initiated
properties to void 0. This breaks angularjs preAssignBinding which
applies bindings to this before constructor is called. Fixed by
using fork of babel plugin.

https://github.com/babel/babel/issues/8417
2018-11-23 13:41:45 +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
flopp999
91d97ab5b5 Fix abbreviations of Litre/min and milliLitre/min (#14114) 2018-11-23 02:48:22 -08: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
Torkel Ödegaard
56d95e7913 tweaks to gf-inline-form style PR #14154 change 2018-11-23 08:06:48 +01:00
Torkel Ödegaard
ec23b4c607
Merge pull request #14154 from bergquist/gf-form-margin
Margin when listing multiple gf-form
2018-11-23 08:05:28 +01:00
David Kaltschmidt
c928c546a3 Sticky footer for all pages
Currently the footer is based on top margins which looks odd on big screen sizes.
Also, the footer shows up on the top of the page on pages take a moment to load (while ng-view is rendering).

- True sticky footer based on flexbox
- Ensure footer stays at bottom while ng-view div does not exist yet
2018-11-22 13:15:29 +01:00
David
377eaa891c
Merge pull request #14147 from grafana/davkal/explore-data-query
Explore: Introduce DataQuery interface for query handling
2018-11-22 12:01:37 +01:00
David Kaltschmidt
9e94d22401 Added comments 2018-11-22 12:00:41 +01:00
David Kaltschmidt
21ee85b1e2 Fix issue with deleting a query (empty string not updating) 2018-11-22 11:14:46 +01:00
David Kaltschmidt
bbaa5b63c8 Fix history rendering for DataQuery 2018-11-22 11:02:53 +01:00
bergquist
dc2ebeb7c0 margin when listing multiple gf-form should be right
when listing multiple gf-form elements this style is
applied to all elements except the first. By having the
margin on the right side there will always be some margin
between all gf-forms
2018-11-22 11:00:27 +01:00
David
1125ca4d79
Merge pull request #14014 from miqh/feat/explore-toggle-series
Add ability to toggle visibility of graph series in explore section
2018-11-21 17:31:46 +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
bergquist
14688766ef updates time range options for alert queries
add some new options for the to value.
removes '1s' option for from since thats unreasonable low

closes #12134
2018-11-21 15:43:37 +01:00
bergquist
60c291c8dc format: remove </input> and align tabs 2018-11-21 15:42:25 +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
Michael Huynh
a333c31ea8
Fix set utilities for explore section
Discovered implementation issues with the set utilities used in the
explore section after adding some tests. Added tests to reinforce the
expected behaviour of the utility functions.

Related: #13522
2018-11-21 21:42:53 +08:00
Torkel Ödegaard
0731b8635b fixed failing graph tests 2018-11-21 13:53:32 +01:00
Torkel Ödegaard
cab92f88af fixed issue with new legend not checking if panel.legend.show 2018-11-21 11:38:15 +01:00
Michael Huynh
c7dc557e91
Add visibility toggle for explore graph series
The implemented toggling UX is similar to how the dashboard graph plugin
behaves. Also incorporates review feedback to persist series visibility
state by means of the alias property, with the limitation it carries
too.

Related: #13522
2018-11-20 21:52:42 +08: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
Erik Sundell
7fc8ed942f stackdriver: make sure object type queries are also checked for vtemplate variables 2018-11-20 12:30:31 +01:00
Roland Dunn
fa2c46edb9
Revert "Update google analytics code to submit full URL not just path" 2018-11-19 18:21:37 +00:00
Marcus Efraimsson
9af5e9a448
Merge pull request #14127 from grafana/team_members_fix
Remove react warning in team members page
2018-11-19 09:03:41 -08:00
Marcus Efraimsson
0aca6f587b
remove react warning 2018-11-19 17:54:17 +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
David Kaltschmidt
4771eaba5b Explore: POC dedup logging rows
- added dedup switches to logs view
- strategy 'exact' matches rows that are exact (except for dates)
- strategy 'numbers' strips all numbers
- strategy 'signature' strips all letters and numbers to that only whitespace and punctuation remains
- added duplication indicator next to log level
2018-11-19 16:26:47 +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
d4e792dccd
Merge pull request #14107 from grafana/davkal/explore-panel
Explore: collapsible result panels
2018-11-19 15:17:05 +00: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
Marcus Efraimsson
0d30f3ba52
update snapshot 2018-11-19 14:57:34 +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
Torkel Ödegaard
c67b55776c
Merge pull request #14123 from grafana/switch-back-from-mixed
fixed issue switching back from mixed data source
2018-11-19 14:40:37 +01:00
Torkel Ödegaard
0053bee886
Merge pull request #14121 from grafana/panel-size-in-edit-mode-fix
fixed issue with panel size when going into edit mode
2018-11-19 14:21:37 +01:00
Torkel Ödegaard
1157a62375 fixed issue switching back from mixed data source, introduced by react panels changes 2018-11-19 14:20:19 +01:00
Marcus Efraimsson
c22e7f4263
fix group sync cta link 2018-11-19 13:23:17 +01:00
Torkel Ödegaard
d81d2f00f6 fixed issue with panel size when going into edit mode 2018-11-19 12:26:15 +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
Carl Bergquist
6049855dc7
Merge pull request #13947 from bergquist/alerting_for
Introduce alert debouncing
2018-11-19 10:38:02 +01:00
bergquist
76cbd7f0de alerting: reduce the length of range queries
since we introduce deboucing the length should matter less.
But going below 5m as default might be weird depending on datasource.
2018-11-19 09:10:19 +01:00
Victor Cinaglia
ba5a002323
Mitigate XSS vulnerabilities in Singlestat panel
Sanitize `prefix` and `postfix` fields. Re-arrange code slightly in order to handle variable
interpolation.
2018-11-18 20:33:36 -05:00
Torkel Ödegaard
435079c6e7
Merge pull request #14102 from grafana/change-tab-in-edit-modefix
fix: dont setViewMode when nothing has changed
2018-11-17 14:46:16 +01:00
David Kaltschmidt
adb2430a1b Explore: collapsible result panels
- replace the Graph/Table buttons with toggle control in a wrapper panel
- moved toggle control to left to be close to the label
- removed panel styles from Logs and Graph viewer
- moved loader animation to panel
2018-11-16 18:21:13 +00: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
2c7dfd74b4
Merge pull request #14100 from grafana/fix-save-redirect-issue
fix for save dashboard redirect issue
2018-11-16 04:03:47 -08:00
Marcus Efraimsson
f528142655
Merge pull request #14089 from grafana/fixed-alert-tab-location
fixed alert tab order and fixed some console logging issues
2018-11-16 03:58:13 -08:00
Torkel Ödegaard
96104e4372 fix: dont setViewMode when nothing has changed 2018-11-16 12:39:26 +01:00
Torkel Ödegaard
e85a3f1d04 fix redirect issue, caused by timing of events between angular location change and redux state changes 2018-11-16 11:29:32 +01:00
Alexander Zobnin
8c7f4ac188
fix datasource testing 2018-11-16 13:17:41 +03:00
Torkel Ödegaard
905ef22075 fixed order of time range tab 2018-11-16 06:53:54 +01:00
Roland Dunn
242ceb6d95 Update google analytics code to submit full URL not just path 2018-11-15 20:12:48 +00:00
Marcus Efraimsson
0810aa2e60
Merge pull request #12371 from marefr/xaxis_thresholds
Time regions support in graph panel
2018-11-15 08:46:39 -08: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
8ce1cc2d52 fixed alert tab order and fixed some console logging issues 2018-11-15 17:33:55 +01:00
Marcus Efraimsson
3b4a224a57
Add tooltip 2018-11-15 17:25:58 +01:00
Marcus Efraimsson
a8e6b241d6
changed time region color modes 2018-11-15 17:07:42 +01:00
Marcus Efraimsson
48905a613d
fix pending alert annotation tooltip icon 2018-11-15 16:29:58 +01:00
Marcus Efraimsson
52a71596eb
fix selected home dashboard should show as selected even though its not starred 2018-11-15 14:43:50 +01:00
bergquist
7ba04466a2 alerting: improve annotations for pending state 2018-11-15 14:30:36 +01:00
Marcus Efraimsson
9606491f6c
reload browser after preferences been updated 2018-11-15 14:29:14 +01:00
Marcus Efraimsson
b8539570d0
fix snapshot tests 2018-11-15 14:16:17 +01:00
Torkel Ödegaard
cf0db51659 Trying to reduce the amount of duplication with preferences 2018-11-15 13:37:29 +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
bergquist
e7260d77b3 adds pending filter for alert list page 2018-11-15 12:46:28 +01:00
bergquist
968bfd0139 adds pending state to alert list panel 2018-11-15 12:42:47 +01:00
David Kaltschmidt
ce59acd141 Extracted language provider variables for readibility 2018-11-15 11:20:27 +00:00
Marcus Efraimsson
116e367e71
fix time regions mutable bug 2018-11-15 11:30:49 +01:00
Torkel Ödegaard
2ff58d5241 Merge branch 'master' into 12550_team_preferences 2018-11-15 11:29:36 +01:00
Marcus Efraimsson
81efc00adf
set default color mode 2018-11-15 11:21:30 +01: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