Commit Graph

127 Commits

Author SHA1 Message Date
Torkel Ödegaard
837a621502
Merge pull request #14410 from grafana/davkal/explore-logging-dedup-description
Explore: Logging dedup tooltips
2018-12-09 17:44:45 +01:00
David Kaltschmidt
61924e9130 Explore: dont pass all rows to all rows, fixes profiler
- react profiler seems to evaluate all props of all components down the tree
- this becomes slow when 1000 rows are passed to 1000 rows and their labels
- use getter function instead to ask for rows on demand
2018-12-09 13:23:44 +01:00
David Kaltschmidt
487de2b832 Explore: Logging dedup tooltips
- use title attribute of toggle button group
- add descriptions for all dedup options
2018-12-09 13:06:34 +01:00
David Kaltschmidt
60ee4499e7 Explore: Fix timepicker inputs for absolute dates
- Timepicker needs to keep from and to internally as strings
for the fully controlled inputs
- make sure from and to are strings when time is reset
2018-12-09 07:05:27 +01:00
Daniel Lee
687cf013bd
Merge pull request #14385 from grafana/davkal/fix-explore-date-parsing
Explore: Parse initial dates
2018-12-07 14:10:36 +01:00
Torkel Ödegaard
619b4b4872
Merge pull request #14336 from grafana/davkal/explore-line-parsing
Explore: Logging line parsing and field stats
2018-12-07 13:24:43 +01:00
Torkel Ödegaard
ef08b9cd2b graphInterval needs to update after query execution, fixes #14364 2018-12-07 13:07:08 +01:00
David Kaltschmidt
a990b69baa Explore: Parse initial dates
- parse dates passed from URL
- keep everything local time for now
2018-12-07 12:41:47 +01:00
Torkel Ödegaard
7cb456ea23 Aligned styling of stats popover/box with rest of grafana & minor css refactoring 2018-12-07 11:28:22 +01:00
David Kaltschmidt
fb4925a8c2 Rebase fixes 2018-12-07 10:22:52 +01:00
David Kaltschmidt
acd52e6a93 Explore: Logging line parsing and field stats
Lazily parse lines and display stats for field when clicked on.

- log line parsers for JSON (basic), and logfmt
- delayed parsing in case user moves to other line
- reuse label stats for field stats
2018-12-07 09:59:55 +01:00
David
be2d9edd1f
Merge pull request #14353 from grafana/14249-multi-button-group
Multi button group
2018-12-06 21:27:34 +01:00
David Kaltschmidt
15eb3bb2f8 Explore: improve error handling 2018-12-06 16:47:36 +01:00
Erik Sundell
b74c099773 use render props instead of cloneElement 2018-12-06 16:38:50 +01:00
Erik Sundell
6f8293af4e sort of a hacky way to figure if the small variation should be used for the label
improve light theme look

use new toggle button group in logs

stop propagation on click event

clean up styles

improve support for small when a label is present

refactoring - move toggle button to the group file. turn it into a stateless component

improve support for light theme

rename dedupe to dedup

use radius variable
2018-12-06 16:37:23 +01:00
Torkel Ödegaard
9a06fad24d
Merge pull request #14352 from grafana/explore-logs-css-refactor
Explore logs css refactor
2018-12-06 15:52:25 +01:00
Torkel Ödegaard
2e6690428f fixed logs to time series calculation issue, increased bucket size, fixes #14248 2018-12-06 12:12:43 +01:00
Torkel Ödegaard
afd7580598 explore logs css refactoring, step1 2018-12-06 10:53:01 +01:00
Torkel Ödegaard
c7d701c8fa explore logs styling poc, WIP 2018-12-06 10:53:01 +01:00
David Kaltschmidt
6980d2e142 Explore: Display duplicate row count as number
- the pips were hard to see
- make it really clear which rows are duplicates by allocating a column to show number
2018-12-04 16:21:27 +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
David
34b8c5bb61
Merge pull request #14278 from grafana/14272-scan-old-logs
only make it possible to scan for older logs if there is at least one…
2018-12-04 15:44:55 +01:00
Erik Sundell
9c8bd34787 remove all query empty related code. root cause of the problem was to fix hasNonEmptyQuery 2018-12-04 14:55:56 +01:00
Erik Sundell
4e591653bd Set query empty condition in render function. Also clear query transactions when no valid query is present 2018-12-04 13:26:26 +01:00
David Kaltschmidt
9f0b1e533f Tests for label stats calculation 2018-12-04 12:41:32 +01:00
David Kaltschmidt
5916cb3e7c Explore: Logging label stats
- added filter and stats icons to log stream labels
- removed click handler from label itself
- click on stats icon calculates label value distribution across loaded logs lines
- show stats in hover
- stats have indicator which value is the current one
- showing top 5 values for the given label
- if selected value is not among top 5, it is added
- summing up remaining label value distribution as Other
2018-12-04 12:41:32 +01:00
David
a69ab2fb3a
Merge pull request #14299 from grafana/14273-clear-scanning
Explore: Stop scanning when clear all button is clicked
2018-12-04 12:37:04 +01:00
Erik Sundell
f8cef73b5b stop scanning when clear all button is clicked 2018-12-04 11:28:04 +01:00
Erik Sundell
2be92af456 Use origin meta 2018-12-04 11:13:16 +01:00
Erik Sundell
541a691aca only display scan button if there is at least one existing selector that returned an empty result 2018-12-04 11:00:21 +01:00
David Kaltschmidt
4ce79349a3 Explore: return to grid layout for logs table
- better column control than flexbox
- increased gutter and row spacing
2018-12-04 10:48:28 +01:00
Erik Sundell
e21ca3f545 Revert commit 2018-12-03 17:17:57 +01:00
Erik Sundell
d9d84f45bc only make it possible to scan for older logs if there is at least one non failing selector 2018-12-03 16:58:46 +01:00
David
ba18b470a4
Merge pull request #14260 from grafana/davkal/fix-14258
Explore: Show logging errors from backend
2018-12-03 10:00:22 +01:00
David
fab2597650
Merge pull request #14259 from grafana/14237-prevent-table-crash
change obj order when merging so that correct format is being used
2018-11-30 16:37:50 +01:00
David Kaltschmidt
47468fca68 Explore: Show logging errors from backend
- Logging datasource sends error string directly in the message body
- allowing response body to be an error when query transaction failed
- added throw in case we ever encounter unhandled errors again (forces us to fix the issue)
2018-11-30 16:09:56 +01:00
Erik Sundell
12ba314e24 change obj order when merging so that correct format is being used 2018-11-30 15:58:01 +01:00
David Kaltschmidt
a513130493 Fixed typo in function name 2018-11-30 15:19:09 +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
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
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
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
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
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
331d419d4f Combine query functions 2018-11-21 17:21:13 +01:00