- after mounting with an initial value, the onChange of a query field is triggered
- even though the slate documents are not the same, their text values are identical, hence the change propagation is useless
- added check to propagate text change only when text has actually changed
- The "missing" action was triggered unless the number of datasource >1 🤦
- Made datasource preselection more robust in case the requested datasource is already gone
- moved ActionTypes to `./state/actionTypes`
- renamed click-related actions
- added comments to actions and state types
- prefixed Explore actions with `explore/`
- fixed query override issue when row was added
Caused by the return and loading spinner icons having different widths. Used fa-fw helper class to ensure fixed width on icons. Also, made the spacing between icon and button label slightly smaller, as the rotated level-down icon used as return icon has significantly smaller width compared to the loading spinner and it looked oddly far from the label as compared to timepicker's icon
- changed log parser API to be more semantic: getting fields, getting values
- regexps become an implementation detail of parser and are no longer part of the API
- improved JSON parser to not be tripped by nested quotation marks
- improved JSON parser to support numbers
- added more tests
- 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
- 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
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
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
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)
- 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
- 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)
- 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
- 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
- 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
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
- 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
- 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
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
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
- 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
- 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
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
Datasource selection triggers a connection test, on success
the DS is set in the Explore state. If the test takes long and user
selects a different DS, and just after that the first test succeeds,
then the first DS overwrites the state.
* when test returns check if datasource is still the requested one
- Logging gets a graph for log distribution (currently per stream, but I
think I'll change that to per log-level)
- added grid columns for timestamp and unique labels
- show common labels of streams
- View options to show/hide time columns, label columns
- created `--small` modifier for Switch CSS classes
- merging of streams is now a datasource responsibility
this is a fix-up PR that cleans up Explore Logging after the recent
restructuring.
- log results need to be merged since query transactions have been
introduced
- logging DS has its own language provider, query field, and start page
(some of them based on prometheus components)
- added loader animation to log viewer
- removed logging logic from prometheus components
- when instantiating a datasource, the datasource service checks if the
plugin module exports Explore components, and if so, attaches them to
the datasource
- Explore component makes all major internal pluggable from a datasource
`exploreComponents` property
- Moved Prometheus query field to promehteus datasource and registered
it as an exported Explore component
- Added new Start page for Explore, also exported from the datasource
Implements rudimentary support for placeholder values inside a string
with the `PlaceholdersBuffer` class. The latter helps the newly added
sum aggregation query suggestion to automatically focus on the label
so users can easily choose from the available typeahead options.
Related: #13615
- use global range types
- add ErrorBoundary around individual Explore components
- fix table merge on empty results
- fix TimePicker date parsing on ISO dates
- fix TimePicker range string after relative move
Existing querying was grouped together before handed over to the
datasource. This slowed down result display to however long the slowest
query took.
- create one query transaction per result viewer (graph, table, etc.)
and query row
- track latencies for each transaction
- show results as soon as they are being received
- loading indicator on graph and query button to indicate that queries
are still running and that results are incomplete
- properly discard transactions when removing or changing queries
In short, the underlying problem appears to be the `onChange()` handler
being triggered after handling the blur event. Since the contents have
not actually changed this forces the typeahead state to reset which
undesirably puts a stop to propagating the selected suggestion back up
to get set.
Related: #13604
- Extracted table panel's merge logic to combine multiple tables into one
- Put the merge logic into the table model as it merges multiple table
models
- make use of merge in Explore's table query response handler
- copied tests over to table model spec, kept essential tests in
transformer spec
These changes were originally intended to address a bug whereby a
suggestion for an already selected label value continues to appear.
However, they also appear to fix several other problems in the area:
- Wrong suggestions when using negated label matching operators
- Misaligned label value suggestion replacements
Related: #13484
- adds react-table as dependency
- replaces custom table component in Explore
- vendors react-table styles and overrides them (currently in
explore.scss)