Commit Graph

100 Commits

Author SHA1 Message Date
David Kaltschmidt
757d6f322e s/initialDatasourceId/initialDatasource/ 2019-01-02 11:32:12 +00:00
David Kaltschmidt
67ebdcbcc3 Explore: Remember last use datasource
- use local storage to store last used database
- renamed `datasourceName` property to `initialDatasourceId` for consistency
- adapted tests
2018-12-31 18:30:32 +00:00
Torkel Ödegaard
a02b4b47b6 Moving a couple of types to @grafana/ui 2018-12-23 09:15:32 +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
ad3d36e6b7 Make sure panel id is unique since some datasources (Graphite) will cancel ongoing requests with the same panel id 2018-12-18 09:44:51 +01:00
Torkel Ödegaard
72b9cb9b9f Switched to react-select fork 2018-12-16 09:58:37 +01:00
Torkel Ödegaard
ae76ddcc3b explore using data source picker 2018-12-14 14:05:47 +01:00
Torkel Ödegaard
24825dc899 renamed folder to select 2018-12-14 12:59:45 +01:00
Torkel Ödegaard
f9110f7902 Merge branch 'master' into develop 2018-12-11 10:00:29 +01:00
Torkel Ödegaard
7e0bc8f30d fixed max height issue not being respected by react select dropdown 2018-12-10 12:02:27 +01:00
David Kaltschmidt
1bcc866341 Explore: Hide scanning again after result was found
- when query result was found, stop scanning
- this hides the scan status again
2018-12-09 11:42:35 +01:00
Torkel Ödegaard
79933299c7 Merge branch 'develop' of github.com:grafana/grafana into develop 2018-12-07 15:09:09 +01:00
Torkel Ödegaard
eb6d0e9f51 Merge branch 'master' into develop 2018-12-07 14:59:38 +01:00
Erik Sundell
569f5e8d5e remove result format. might add this later 2018-12-07 14:13:05 +01:00
Erik Sundell
68c2d2631e filter out build in datasources. add unit test 2018-12-07 14:11:40 +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
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
Erik Sundell
97180d5106 add scoped vars to query options 2018-12-07 10:28:51 +01:00
David Kaltschmidt
15eb3bb2f8 Explore: improve error handling 2018-12-06 16:47:36 +01:00
Mario Trangoni
ab9f65a4cf public/app/features/*: Fix some misspell issues 2018-12-05 13:08:00 +01:00
Torkel Ödegaard
5f8001689b explore data source selector fix 2018-12-05 10:22:26 +01:00
Torkel Ödegaard
180ca021b5 Merge branch 'master' into develop 2018-12-05 10:17:22 +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
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
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
Erik Sundell
be85944d84 add an error alert component that will be displayed when there was an error loading ds in explore 2018-11-30 13:51:49 +01:00
Erik Sundell
c40bfb8eda make sure target obj is not destructured so that angular copy of objected can be mutated 2018-11-30 12:49:05 +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
Erik Sundell
3d45b5ba73 make getAll return array instead of object 2018-11-30 09:48:59 +01:00
Erik Sundell
df75fb0e6d remove obsolete test 2018-11-30 09:32:36 +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
Erik Sundell
d1a2488392 pass data correctly to event handler 2018-11-29 14:20:15 +01:00
Erik Sundell
3162dda088 remove explore check - make it possible to load all datasources 2018-11-29 10:46:50 +01:00
Erik Sundell
6f85fa6b35 add new flag in order to be able to indicate whether the datasource has native support for tables 2018-11-28 15:06:22 +01:00
Erik Sundell
18abd987bb prevent explore from crashing when table is not present in response 2018-11-28 14:31:20 +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