Commit Graph

13846 Commits

Author SHA1 Message Date
Connor Lindsey
9c4e7eb659
Tempo: Run search query with keyboard shortcut from input fields (#39247)
* Tempo: Run query with keyboard shortcut from duration fields
2021-09-16 09:26:34 -06:00
Connor Lindsey
c57ff8beed
Tempo: Format tempo search query history text (#39250)
* Format tempo search query history text
2021-09-16 08:04:15 -06:00
Assaf Dayan
64f898c5f6
Explore: Fixed default data source loading (#37059)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-09-16 12:07:27 +02:00
Levente Balogh
02f9564607
Plugins Catalog: show a confirmation modal when uninstalling a plugin (#39244)
* feat(Plugins/Admin): show a confirmation modal when uninstalling a plugin

* refactor(Plugins/Admin): use a helper function for showing/hiding the modal

* test(Plugins/Admin): test if the modal disappears after an uninstall
2021-09-16 11:27:29 +02:00
kay delaney
35f1d0facb
AdHocFilter: Adds min width to segment input (#39225)
Closes #38937
2021-09-16 09:37:43 +01:00
Peter Holmberg
4f7e1db57c
Graphs: Fix threshold handle being visible in dashboards (#39270) 2021-09-16 08:59:36 +02:00
Ryan McKinley
cde133fe05
Canvas: use grafana datasource to list resource files (#39204) 2021-09-15 14:48:11 -07:00
Leon Sorokin
fb091de2c7
BarChart: Fix legend and tooltip colors off by 1 after data refresh (#39234) 2021-09-15 13:10:26 -05:00
Peter Holmberg
74beb9a64c
Alerting: Edit thresholds by handle in timeseries panel (#38881)
* POC/Thresholds: Allow thresholds modification directly from the time series panel

* Snapshot updates

* Optimize styles memoization

* change threshold from graph

* renames and logging

* using useeffect to update graph

* Fix react worning about setting state on unmounted component

* revert panelrenderer

* using onFieldConfig change

* use a useeffect

* simplied fieldConfig state

* Do not use plot context in ThresholdControlsPlugin

* Do not throw setState warnings when drag handle is dropped

* Update thresholds position on the graph when updating threshold drag handle

* fix issues with rerenders

* prevent thresholds on conditions with range

* only edit the first threshold

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-09-15 17:35:12 +02:00
Josh Hunt
b3196621f1
AzureMonitor: Fix template variables being cleared out (#39173)
* AzureMonitor: Fix template variables being cleared out

* fix metric namespace from resetting

* tests :)
2021-09-15 16:31:37 +01:00
Giordano Ricci
f79173c99d
Explore: Reuse Dashboard's QueryRows component (#38942)
* WIP

* Functional without custom wrapper component, needs highlight

* Remove latency from explore

* Sync eventbus

* Some cleanup & removal of unused code

* Avoid clearing queries when running all empty queries

* Run remaining queries when removing one

* Update snapshots

* fix failing tests

* type cleanup

* Refactor QueryRows

* update snapshot

* Remove highlighter expressions

* minor fixes in queryrows

* remove unwanted change

* fix failing e2e test

* Persist refId in explore url state

* make traces test slightly more robust

* add test for query duplication
2021-09-15 16:26:23 +01:00
Domas
e251863085
Alerting: validate recording rule name (#39136) 2021-09-15 18:24:26 +03:00
Andrej Ocenas
515d6afec3
CloudWatch Logs: Disable query path using websockets (Live) feature (#39231)
* Use only non live branch for querying logs.

* Update tests

* fix lint
2021-09-15 16:28:34 +02:00
Domas
264946f37f
Graph: make old graph panel thresholds work even if ngalert is enabled (#38918) 2021-09-15 16:15:50 +03:00
Erik Sundell
9d3f4f5983
Analytics: Instrument Azure Application Insights (#38553)
* add backend

* read config and pass to backend

* update config docs

* change var name

* use connection string instead of instrumentation key

* add config for endpoint url. update docs

* update default ini

* add spaces

* remove space

* Update docs/sources/administration/configuration.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-15 13:00:38 +02:00
Erik Sundell
c621131fff
remove code that was duplicated by accident (#39212) 2021-09-15 10:32:01 +02:00
Alexander Emelin
15e278e9e1
Live: search for pipeline files in data folder (#39198)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-14 22:27:51 +02:00
Leon Sorokin
df6b6e7a98
BarChart: fix stale bar values and x axis labels (#39188) 2021-09-14 12:16:43 -05:00
Andrej Ocenas
fb1c31e1b6
CloudWatch Logs: Add link to Xray data source for trace IDs in logs (#39135)
* Refactor log query handling

* Add link to config page

* Change message about missing xray to alert

* Add xrayTraceLinks

* Fix typo in field name

* Fix tests and lint

* Move test

* Add test for trace id link

* lint
2021-09-14 17:02:41 +02:00
Levente Balogh
3c433dc36d
Plugins Catalog: refactor the mocking for our tests (#39165)
* refactor(Plugins/Admin): add a type for version coming back from the API

* refactor(Plugins/Admin): only add necessary version information to the state

* test(Plugins/Admin): add a mock for a CatalogPlugin

* test(Plugins/ADmin): add a mock for a LocalPlugin

* test(Plugins/Admin): add a test for a RemotePlugin

* test(Plugins/Admin): add helpers for mocking plugin states

* refactor(Plugins/Admin): mock the Redux state instead of the API responses

This makes it simpler to add new test cases and also makes
the tests easier to reason about.

* refactor(Plugins/Admin): mock the Redux state instead of the API responses
2021-09-14 16:44:13 +02:00
Gábor Farkas
bff3d91b0d
prometheus: monaco: better popup-font-size (#39181) 2021-09-14 16:40:44 +02:00
Todd Treece
9b20a24989
Handle enterprise data source tab refreshes (#37567) 2021-09-14 09:24:18 -04:00
Gábor Farkas
27e3fda7ce
influxdb: influxql query editor: fix escaping problematic characters (#39170) 2021-09-14 12:55:43 +02:00
Ryan McKinley
98cca6317d
Options: expose a dashboard picker element (#38955) 2021-09-13 23:30:46 -07:00
An
45e67630e8
Live: admin config UI (#39103)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Atif Ali <atifshoukatali@yahoo.com>
2021-09-13 21:09:55 -07:00
Piotr Jamróz
26bb08e1e6
Graphite: Fix drag and drop queries (#39130)
* Do not use "select metric" segment when rendering target

* Use better names for tests
2021-09-13 20:10:35 +02:00
Piotr Jamróz
0026162845
Add handlers to handle time range changes to Explore graphs (#39142) 2021-09-13 18:04:46 +02:00
Ashley Harrison
ca53f5c8da
Navigation: Implement active state for items in the Sidemenu (#39030)
* Navigation: Implement active state for items in the Sidemenu

* Navigation: Improve logic for when link is active and extract isSearchActive into a util function

* Navigation: Implement custom rule for dashboards under /d/ and fix minor bugs

* Navigation: only show first matching active state + strip query params from link urls
2021-09-13 16:49:27 +01:00
Maria Alexandra
04e7736cba
Variables: Fix not updating inside a Panel when the preceding Row uses "Repeat For" (#38935)
Added a condition to the `repeatRow` function to only update GridPos if we actually rendered more than 1 repeated row.
2021-09-13 16:47:01 +02:00
Domas
f38c8a2b2b
Chore: infer combined reducer state types (#39118) 2021-09-13 16:00:41 +03:00
Gábor Farkas
e055ba3525
prometheus: monaco: improved suggestion-displaying (icons, help-text) (#38977)
* prometheus: monaco: better icons in popup

* prometheus: monaco: add help-text to functions

* prometheus: monaco: add help-text to metrics

* better help-text
2021-09-13 12:36:18 +02:00
Piotr Jamróz
88ad9aad42
Explore: Ensure logs volume bar colors match legend colors (#39072)
* Ensure logs volume bar colors match legend colors

* Fix tests
2021-09-13 11:11:49 +02:00
Piotr Jamróz
15b8b738f3
Graphite: Fix Graphite Editor not loading (#39116) 2021-09-13 10:04:52 +02:00
shuotli
b49045794c
remove untitled file (#39060) 2021-09-13 09:39:06 +02:00
sam boyer
f8d79d301c
Rename Family to Panel in models.cue (#39111) 2021-09-12 14:34:33 -04:00
Zoltán Bedi
94f1173824
Explore: Refactor graph component to use PanelRenderer (#38914)
* Move SplitOpenFn type to grafana-data

* Use panel renderer instead of Timeseries panel for graph in Explore

* rename splitopen props on panel context
2021-09-10 18:18:22 +02:00
Ryan McKinley
ddd110d0b2
Geomap: include sample geojson files (#39057) 2021-09-10 09:05:03 -07:00
Jack Westbrook
c9620b2202
Catalog: Add update text to PluginListCard (#39087)
* feat(catalog): add update info to PluginListCard

* refactor(catalog): use IconName enum and minor styling changes to PluginHeaderDependencies

* fix(catalog): add a semver range to grafanaVersion for dependency checks in InstallControls
2021-09-10 17:17:57 +02:00
Ryan McKinley
6bda64cb19
Grafana: include a built-in backend datasource (#38571) 2021-09-10 07:44:47 -07:00
Connor Lindsey
b89f8fdfcb
Explore: Trace view now shows trace start time in selected timezone (#39054) 2021-09-10 07:52:59 -06:00
Dominik Prokop
e68bf87de1
GraphNG: Remove plot context (#38928)
* Remove plot ctx usage: Tooltip plugin

* Remove plot ctx usage: Context menu plugin

* Remove plot ctx usage: Annotations plugin

* Remove plot ctx usage: Exemplars plugin

* Remove plot ctx usage: EventsCanvas plugin

* Remove plot ctx usage: EventsCanvas/XYCanvas plugin

* Remove plot ctx usage: AnnotationEditor plugin

* Remove plot ctx usage: AnnotationMarker

* Remove plot context

* Do not throw react warnings from uPlot performed hooks
2021-09-10 13:50:21 +02:00
Dominik Prokop
92d736665a
TimeSrv: Do not update URL multiple times for same, consecutive range updates (#39083) 2021-09-10 13:05:34 +02:00
Levente Balogh
9173898fd6
Plugins Catalog: show Grafana and plugin dependencies (#39062)
* fix(@grafana/data): add a missing optional field to the plugin types

* refactor(Plugins/ADmin): use the type from @grafana/data for plugin dependencies

* fix(Datasources/Graphite): add missing `state` to useEffect dependencies

* refactor(Plugins/Admin): remove unnecessary comment

* feat(Plugins/Admin): add plugin and grafana dependencies to the CatalogPluginDetails

* feat(Plugins/ADmin): show Grafana dependency under plugin details

* feat(Plugins/Admin): show grafana and plugin dependencies for a plugin

* test(Plugins/Admin): add a smoke test for plugin dependencies

* refactor(Plugins/Admin): remove unused style from the header
2021-09-10 11:32:21 +02:00
Ryan McKinley
be2e9d3501
Live: remove the 'canPublish' check from the UI (#39016) 2021-09-09 09:52:01 -07:00
Connor Lindsey
5511383070
Explore: Add more error handling to Tempo trace download (#39045) 2021-09-09 09:49:45 -06:00
Dominik Prokop
1a566bef47
Alerting/Annotations: Bring back metrics and alert state to annotations tooltip (#39035)
* Normalize alert state name for UI descriptor retrieval

* Bring back alert state and metric values to annotation tooltip

* Make sure alert state is only shown when present

* Update test

* Handle Error alerting satte
2021-09-09 16:58:27 +02:00
Connor Lindsey
e3c11d2682
Explore: Add filter by trace and span ID to trace to logs feature (#38943)
* Add filter by trace and span ID to trace to logs feature

* Update settings screenshot
2021-09-09 07:24:08 -06:00
Giordano Ricci
dc36f15fbb
Prometheus: Revert stepMode functionality (#38982)
* Revert "Prometheus: add functionality to specify desired step interval in dashboards panels (#36422)"

This reverts commit ddf5b65c51.
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>

* Revert "Explore: add functionality for supporting different step modes in prometheus (#37829)"

This reverts commit f433cfd8d9.
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>

* Revert stepMode BE implementation from #36796
Co-authored-by: "Ivana Huckova" <ivana.huckova@gmail.com>
2021-09-09 14:05:08 +02:00
Hugo Häggmark
419ead99aa
Annotations: Fixes blank panels for queries with unknown data sources (#39017)
* Annotations: Fixes blank panels for queries with unknown data sources

* Chore: fixes strict typescript error
2021-09-09 13:43:05 +02:00
Levente Balogh
1133e56006
Plugins Catalog: migrate state handling to Redux (#38876)
* feat(Plugins/Catalog): start adding necessary apis

* feat(PLugins/Catalog): add extra helpers for merging local & remote plugins

* feat(Plugins/Catalog): add plugin details as an optional field of CatalogPlugin

* feat(PLugins/Catalog): add scaffolding for the new redux model

* feat(PLugins/Catalog): export reducers based on a feature-flag

* refactor(Plugins/Admin): rename api methods

* feat(Plugin/Catalog): add an api method for fetching a single plugin

* feat(Plugins/Admin): try cleaning stuff around plugin fetching

* ffeat(Plugins/Catalog): return the catalog reducer when the feature flag is set

* refactor(Plugins/Admin): fix typings

* feat(Plugins/Admin): use the new reducer for the browse page

* feat(catalog): introduce selectors to search and filter plugins list

* refactor(Plugins/Details): rename page prop type

* refactor(Plugins/Admin): add a const for a state prefix

* refactor(Plugins/Admin): use the state prefix in the actions

* feat(Plugins/Admin): add types for the requests

* refactor(Plugins/Admin): add request info to the reducer

* refactor(Plugins/Admin): add request handling to the hooks & selectors

* refactor(Plugins/Details): start using the data stored in Redux

* refactor(Plugins/Admin): rename selector to start with "select"

* fix(Plugins/Admin): only fetch plugins once

* refactor(Plugins/Admin): make the tab selection work in details

* refactor(catalog): put back loading and error states in plugin list

* refactor(Plugins/Admin): use CatalogPlugin for <PluginDetailsSignature />

* feat(Plugins/Admin): add an api method for fetching plugin details

* refactor(Plugins/Admin): add action for updating the details

* irefactor(Plugins/Admin): show basic plugin details info

* refactor(Plugin Details): migrate the plugin details header

* refactor(Plugins/Admin): make the config and dashboards tabs work

* refactor(Plugins/Admin): add old reducer state to the new one

* feat(catalog): introduce actions, reducers and hooks for install & uninstall

* refactor(catalog): wire up InstallControls component to redux

* refactor(catalog): move parentUrl inside PluginDetailsHeader and uncomment InstallControls

* feat(catalog): introduce code for plugin updates to install action

* refactor(Plugins/Admin): add backward compatible actions

* test(catalog): update PluginDetails and Browse tests to work with catalog store

* refactor(Plugins/Admin): make the dashboards and panels work again

* refactor(Plugins/Admin): fix linter and typescript errors

* fix(Plugins/Admin): put the local-only plugins to the beginning of the list

* fix(Plugins/Admin): fix the mocks in the tests for PluginDetails

* refactor(Plugins/Admin): remove unecessary hook usePluginsByFilter()

* refactor(Plugins/Admin): extract the useTabs() hook to its own file

* refactor(Plugins/Admin): remove unused helpers and types

* fix(Plugins/Admin): show the first tab when uninstalling an app plugin

This can cause the user to find themselves on a dissappeared tab, as the
config and dashboards tabs are removed.

* fix(catalog): correct logic for checking if activeTabIndex is greater than total tabs

* fix(Plugins/Admin): fix race-condition between fetching plugin details and all plugins

* fix(Plugins): fix strict type errors

* chore(catalog): remove todos

* feat(catalog): render an alert in PluginDetails when a plugin cannot be found

* feat(catalog): use the proper store state

* refactor(Plugins/Admin): fetch local and remote plugins in parallell

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* style(catalog): fix prettier error in api

* fix(catalog): prevent throwing error if InstallControlsButton is unmounted during install

* refactor(Plugins/Admin): add a separate hook for filtering & sorting plugins

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-09 12:20:35 +02:00