* onChangeTab for active tab and pointer mouse
* Add anchor element to tab
* Make a strict 'anchor' mode
* Add short docs
* Apply suggestions from code review
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Fix nits
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Settings: Add setting for hiding version number for anonymous users
Fixes#12925
* Hide version string from footer when unavailable
* Settings: Test frontend settings with hide version for anonymous users
* Settings: Add hide version variable to frontend settings
* Make AnonymousHideVersion non-global
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Settings: Improve test neighbor friendliness, reset state before and after
* Settings: Use T.Cleanup
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Forbid additional redirect urls
* Optionally force login in anonymous mode
* Update LoginCtrl page to ignore redirect parameter
* Modify SignIn to set forceLogin query instead of redirect
* Pass appUrl to frontend and use URL API for updating url query
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix SignIn test
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* wip: added draft of series to rows.
* wip: building dataFrame structure first and then adding data.
* wip: added some refactorings of the seriesToRows transformer.
* did some refactorings to make the code easier to follow.
* added an editor for the transform.
* renamed some of the test data.
* added docs.
* fixed according to feedback.
* renamved files.
* fixed docs according to feedback.
* fixed so we don't keep labels or config values from.
* removed unused field.
* fixed spelling errors.
* fixed docs according to feedback.
* Refactor: initial commit
* Tests: updates tests
* Tests: updates snapshots
* Chore: updates after PR comments
* Chore: renamed initVariablesBatch
* Tests: adds transactionReducer tests
* Chore: updates after PR comments
* Refactor: renames cancelAllDataSourceRequests
* Refactor: reduces cancellation complexity
* Tests: adds tests for cancelAllInFlightRequests
* Tests: adds initVariablesTransaction tests
* Tests: adds tests for cleanUpVariables and cancelVariables
* Always cleanup dashboard on unmount, even if init is in progress. Check if init phase has changed after services init is completed
* fixed failing tests and added some more to test new scenario.
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Updated templating code to support the $__user variable to expose the current
userid, username, email and login.
Fixed the $__org variable as it was returning the user id instead of the ordId.
Updated the documentation to match
* Updated solution to retrieving $__user variables to pull directly from user record (thereby allowing future access to properties that
might not exist in the contextSvr).
Replicated this initialisation in the variables feature
Corrected typo's in documentation.
* Repaired typecheck issues.
* Updated patch to pull entirely from contextSrv without API calls.
* ... And removed the redundant comments.
* Updated documentation.
* Logs: Use result range instead of timepicker range for log histogram
If a logs datasource does not send histogram data for the requested
time range, the logs model computes a timeseries based on the log row
counts, bucketed by an automcatically calculated time interval. Even
when this histogram time series did not span the whole requested time
range it was still rendered in the graph across the whole range, leaving
an empty area at its start. Users find this confusing and are lead to
believe their log data is missing.
This change fixes this by anchoring the start of the timeseries on the
first log row's timestamp from the result, and adds this smaller range
as `visibleRange` to the logs model and passes it through to the logs
component that optionally takes it into account to not render the empty
area.
The interval (bucket size) is also adjusted to account for a potentially
finer resolution on the shorter visible time interval.
The bucketsize multiplier was also changed from 10 to 20 to account for
the space between the chart's bars.
* Aligned visible range with buckets
* Extract bucket size calculation and add test
* add some padding to accommodate for vertical scrollbar
* use theme spacing
* Move padding to inner div and make it use actual scrollbar width
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* fixes so we match the transformer based on name properly.
* changed the signature on the FieldMatcher.
* introduced a names option so you can filter in name specificly.
* changed so the matcher UI uses the new options format.
* moved the exported functions together.
* changing editors a bit.
* made the filter by name work with both regex and name filtering.
* fixed failing tests and make sure we always parse regex the same way.
* removed unused code.
* simplified to make the existing field overrides still working.
* fixed issue reported by hugo.
* added tests for the name matcher.
* added tests for filter by name.
* added more tests.
* Chore: updates getMessageFromError return type
* Chore: updates the position of incorrectly placed bang operator
* Chore: updates typing on dropdown typeahead directive
* Chore: updates QueryOperationAction props to require title
* Revert "Chore: updates QueryOperationAction props to require title"
- log stats for Loki are per query
- this change tracks the query stats by refId, preventing the summing of
the same stats across multiple series of the same response.
* Field: Change getFieldTitle to getFieldDisplayNamne and change the NAME of the title field config from Title to Display name
* Review feedback
* fixed unit tests
* Rename fieldConfig.title to displayName
* Fixed tests
* Added migration
* Renamed getFrameDisplayTitle to getFrameDisplayName
* Chore: adds timeEpochNs to LogRowModel in @grafana/data
* Chore: updates explore utils ResultProcessor getLogsResult and explore utils tests
* Chore: updates core/logs_model to include nanoseconds
* Chore: updates LogRowModel sorting key from milliseconds to nanoseconds and adds timeEpochNs to tests
* Chore: adds timeEpochNs to LogRowModel mock in Explore LiveLogs test
* Chore: fixes logs model timeEpochNs padding
* Chore: updates timeEpochNs padding in tests
* Chore: updates LogRowModel mocks
* Chore: changes isLoki to datasourceId
* Chore: adds hasFieldWithNameAndType method to FieldCache in grafana-data dataframe
* Chore: changes timeEpochNs from number to string as it can overflow Number.MAX_SAFE_INTEGER
* Chore: updates LogRowModel sorting to use milliseconds and nanoseconds
* Chore: removes datasourceId from logSeriesToLogsModel method
* Chore: updates ResultProcessor tests to include nanosecond-level precision log rows sorting
* Search: Do not set items if no results returned
* Search: Simplify canSave logic
* Search: Add initialLoading state
* Search: Add itemsFetching state to folder
* Search: Fix props and tests
* Search: Fix strict null check
* Loki: Show loki datasource stats in panel inspector
- puts the loki query result stats into the query results meta stat API
of Grafana, this allows the display of all backend loki stats in the
panel inspector in the dashboards
- added a hack to also display one of those values in Explore as a meta
label using the dataframe meta `custom` mechanims to point to a single
stat entry for each series which is then added together to show total
bytes processed across all query row results (this should be changed for
7.1 to make full use of the panel inspector in Explore)
* Fix test
* nicer stats labels for loki stats with units