* Refactor: Removes replaceUrl from actions
* Refactor: Moves saveState thunk to epic
* Refactor: Moves thunks to epics
* Wip: removes resulttype and queries once
* Refactor: LiveTailing uses observer in query
* Refactor: Creates epics folder for epics and move back actioncreators
* Tests: Adds tests for epics and reducer
* Fix: Checks for undefined as well
* Refactor: Cleans up previous live tailing implementation
* Chore: merge with master
* Fix: Fixes url issuses and prom graph in Panels
* Refactor: Removes supportsStreaming and adds sockets to DataSourcePluginMeta instead
* Refactor: Changes the way we create TimeSeries
* Refactor: Renames sockets to streaming
* Refactor: Changes the way Explore does incremental updates
* Refactor: Removes unused method
* Refactor: Adds back Loading indication
With live tailing introduced in Explore we now have a lot of actions dispatching and the Redux Dev Tools doesn't cope with the amount and rate of actions and crashes. This PR turns on redux action logging when you add logActions=true in the url and turns it off if you refresh the page or add logActions=false in the url.
* Refactor: Adds better error message and removes chromium download progess
* Test: Adds e2e tests to pr builds for testing purpose
* Tests: Changes path to screenshots
* Tests: Adds failing test just to test message and artifacts
* Tests: Removes failing test
* should be 'Tags' not 'All'
* fix poor wording in 'Match any' tooltip
* add tooltip for 'Tags' input (untested! and can probably be worded
better, i just don't know enough about the implementation)
* mitigate https://www.owasp.org/index.php/CSV_Injection
- prepend csv cell values that begin with -, +, = or @ with '
- trim trailing whitespace from all csv values
* test for csv formula injection mitigation
When accessing the `series` property of query results, if a query is
hidden, an exception is thrown. This is caused by lack of checks to
verify that the query result exists before accessing the `series`
property.
Closes#17112
* Fix: change and to and so not clashing with grafana vars (#16365)
* Fix: change and to and so not clashing with grafana vars (#16365)
* Fix: update now to datetime (#16365)
* Fix: test should look for datetime instead of now (#16365)
* Fix: _az suffix to datasource convention (#16365)
* Fix: convert vars to macro, update doc (#16365)
* Fix: convert vars to macro, update doc (#16365)
* Fix: remove support for time vars (#16365)
* Fix: confilct from master
* add migration on editor open
* fix migration var name
If a field or a label named level is returned from datasource that is
used as log level for the logs result instead of parsing the log level
from the message.
Closes#17122
* Move log's typings into grafana/ui
* Update the way context is retrieved for Loki
Major changes:
1. getLogRowContext expects row to be of LogRowModel type
2. getLogRowContext accepts generic options object, specific to a datasource of interest. limit option has been removed, and now it's a part of Loki's context query options (see below)
3. LogRowContextProvider performs two queries now. Before, it was Loki ds that performed queries in both directions when getLogRowContext.
4. Loki's getLogRowContext accepts options object of a type:
interface LokiContextQueryOptions {
direction?: 'BACKWARD' | 'FORWARD';
limit?: number;
}
This will enable querying in either direction independently and also slightly simplifies the way query errors are handled.
LogRowContextProvider maps the results to a Loki specific context types, basically string[][], as raw log lines are displayed in first version.
* azuremonitor: revert to clearing chained dropdowns
After feedback from users, changing back to clearing
dropdowns to the right in the chain. E.g. if the user
changes the subscription dropdown which is first in
the chain then all the dependent dropdowns to the right
should be cleared (reset to default values).
Also, now triggers getting subscriptions every time the
dropdown menu is shown rather than just the first time.
It is apparently common to add subscriptions while
building queries.
* Apply panel options defaults on panel init and on save model retrieval
* Remove unnecessary argument, added tests
* Make FieldPropertiesEditor statefull to enable onBlur changes
* Remove unnecessary import
* Post-review updates
Fixes#17154
* fix: azuremonitor adds multi-sub support to alerting
* fix: AzureMonitor missing parameter in metadata func
getMetricMetadata function when called in the query ctrl
was missing a parameter for Subscription Id.
Also, made some tweaks to what happens when a chained
dropdown is changed to not reset all the fields that
are dependent on it.
Adds logs scenario which is quite basic and not that smart
to begin with. This will hopefully ease development of
Explore and support for logs in Grafana.
* Fix: the type is not set so can check for columns and rows to validate is table (#16996)
* Fix: the type is not set so can check for columns and rows to validate is table (#16996)
* Fix: fix no table check and tests (#16996)
* Wip: Initial commit
* Refactor: Adds support in Loki datasource for streaming
* Refactor: Adds Live option to RefreshInterval
* Refactor: Adds styles to logrows
* Style: Reverses the order of Explore layout on Live
* Refactor: Adds LiveLogs component
* Tests: Adds tests for epics
* Style: Adds animation to Live in RefreshPicker
* Refactor: Adds ElapsedTime and progress line to LiveLogs
* Style: Adds specific colors to each theme
* Refactor: Adds support for Lokis new API
* Fix: Adds null to resulting empty array
* Refactor: Limits the rate of incoming messages from websockets
* Refactor: Throttles messages instead for simplicity
* Refactor: Optimizes row processing performance
* Refactor: Adds stop live button
* Fix: Fixes so that RefreshPicker shows the correct value when called programmatically
* Refactor: Merges with master and removes a console.log
* Refactor: Sorts rows in correct order and fixes minor UI issues
* Refactor: Adds minor improvments to sorting and container size
This adds some logic to identify if the user is selecting
text and if so disables parsing of log messages on hover.
This should resolve the issue of selecting log lines to be
copied and the selection is truncated.
Fixes#17072
* Extend DataSourceAPI to enable log row context retrieval
* Add react-use package
* Display log row context in UI
* Make Loki datasource return "after" log context in correct order
* Don't show Load more context links when there are no more new results
* Update getLogRowContext to return DataQueryResponse
* Use DataQueryResponse in log row context provider, filter out original row being duplicated in context
Removes the functionality of being able to collapse/expand the logs
container.
When both graph and table are collapsed and you reload the page
then the start page should not be displayed.
When both graph and table are collapsed and you reload the page
then the graph and table panels should be displayed.
Fix so that reducer tests are run. On of the test used fit() instead of
it() which had the consequence of only 1 reducer test was executed
and the rest skipped. There was some failing tests that now is
updated and now passes.
Fixes#17098
Fixes a regression introduced in #16959 which removed datasource
property from changed query for angular query editors having the
result of loading explore URL's without datasource loaded the
default query in query editor and Explore.
Ref #16808
* Fix: if current sort key is not active column, do not use for sort and select next available active (#16980)
* Fix: only sort if sortkey is active column and table is active (#16980)
* Fix: sorting stacked series as legend. current descending order test (#16980)
* Fix: existing sort tests and added additional to prevent bug from resurfacing (#16980)
Adds basic support for switching between Metrics and Logs in Explore.
Currently only test datasource that supports both Metrics and Logs.
Summary of changes:
* Moves mode (Metric, Logs) selection to the left of datasource
picker and add some quick styling.
* Only trigger change in ToggleButton if not selected
* Set correct mode if datasource only supports logs
Closes#16808