Commit Graph

13133 Commits

Author SHA1 Message Date
Alex Khomenko
62dc10829a
Admin: Show licensed roles and unit membership in UI (#39773)
* Extend User type

* Render licensed roles and org units

* Combine admin icon with units

* Extract search users to a new service

* Fix wire provider

* remove mock data

* Fix icon margin

* Fix common_test and remove RouteRegister

* Remove old endpoints

* Fix test

* Add indexes to dashboards and orgs tables

* Fix lint

* Revert docs changes

* undo docs formatting

* Change order of input and filters

* Abstract aria-label into a function

* Add accessible info about user's membership

* UI tweaks

Co-authored-by: spinillos <selenepinillos@gmail.com>
2021-09-29 18:26:50 +03:00
kay delaney
75a55379f1
A11y: Fixes some fastpass errors for /datasources/* routes (#39577)
* A11y: Fixes some fastpass errors for /datasources/* routes
See #39429
2021-09-29 16:16:30 +01:00
Giordano Ricci
f61c8d3eed
A11y: Fix fastpass issues for /explore page (#39507)
* Fix(A11y): add label to explore short url button

* Grafana-UI(A11y): Set Selects images alt attribute to their option label

* Update packages/grafana-ui/src/components/Select/SingleValue.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-09-29 16:14:30 +01:00
Ivana Huckova
df81676d9e
Prometheus: Run Explore both queries trough backend (#39462)
* Prometheus: Run Explore both queries trough backend

* Refactor, simplify

* Set default values for query type selector

* Run multiple queries as one query trough backend

* Remove trailing newlines

* Pass utcOffset

* Remove trailing comma

* Add meta to frames only at 1 place

* Set exemplars to falsee if they are disabled

* Revert "Set exemplars to falsee if they are disabled"

This reverts commit e7b697c9f3.
2021-09-29 16:42:31 +02:00
Sofia Papagiannaki
012d4f0905
Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746)
* Remove `ngalert` feature toggle

* Update frontend

Remove all references of ngalert feature toggle

* Update docs

* Disable unified alerting for specific orgs

* Add backend tests

* Apply suggestions from code review

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

* Disabled unified alerting by default

* Ensure backward compatibility with old ngalert feature toggle

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-29 16:16:40 +02:00
Marcus Andersson
2dedbcd3c3
PluginsCatalog: adding support for viewing the plugins list as both table and list (#39466)
* working version but with duplications.

* refactor(Plugins/Admin): use "fr" instead of "repeat" for grid columns

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* fix(Plugins/Admin): use PluginIconName instead of IconName

* refactor(Plugins/Admin): store the display-mode on the state

* refactor(Plugins/Admin): use && for conditional rendering

* refactor(Plugins/Admin): rename variable

* refactor(Plugins/Admin): share code between card and row components

* test(PluginListItemRow): add tests

* test(Plugins/Admin): add a simple test for the display-mode switching

* fix(Plugins/Admin): compose styles with css``

* refactor(Plugins/Admin): rename "table" to "grid" for display modes

* test(Plugins/Browse): follow up on renaming "table" to "grid"

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-29 15:44:57 +02:00
Torkel Ödegaard
bc01c9cdbc
Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
Oscar Kilhed
630a120a15
OrgPage: Minor typo fix (#39764) 2021-09-29 14:05:54 +02:00
sam boyer
c786d22705
Schema: introduce CLI command to convert all CUE files to TS (#39694)
* First pass at cuetsify command

* Update go deps

* Small tweaks to input cue files

* Correct ts import structure, whitespace

* Latest version of cuetsy

* add ordinal option

* upate cue file

* Fix merge garbage

* Remove dead code

* Revert "upate cue file"

This reverts commit e40b1df83e.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-29 04:59:05 -04:00
Erik Sundell
db8c9122aa
add support for interaction events (#39752) 2021-09-29 10:41:16 +02:00
Dominik Prokop
f887576a27
Table panel: Make filter case insensitive (#39746)
* Expose FilterInput from grafana/ui

* Make table filter case insensitive

* Update packages/grafana-ui/src/components/Table/FilterList.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-29 09:35:41 +02:00
Marcus Andersson
b626ba223f
Hooks: Adding possibility to display banner on the top of the page (#39099)
* adding working version of notificaion banner trigger.

* Move it to enterprise

* Fixing csss, none of the pages showed our CustomScrollbar or had double scrollbars

* fixing explore

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-09-29 08:28:07 +02:00
Connor Lindsey
06592410b2
Tempo: Improve search form defaults and validation (#39534)
* Tempo: add default limit, option to hide Loki search, and run query on hotkey in dropdowns
2021-09-28 10:52:57 -06:00
Jack Westbrook
fffcee7c1f
Plugin Catalog: support Grafana instances that cannot communicate with gcom (#39638)
* added possibility to track if remote plugins could be fetched.

* adding hook to detect if remote plugins are available.

* feat(catalog): disable installed/all filter if remote plugins are unavailable

* feat(Plugins/Admin): hide the install controls if GCOM is not available

* refactor(Plugins/Admin): group `@grafana` dependencies

* fix(Plugins/Admin): don't show an error alert if a remote plugin is not available

* feat(Plugins/Admin): prefer to use the local version of the readme

* chore(Plugins/Admin): type the mocked state properly

* test(Plugins/Admin): add tests for the Plugin Details when GCOM is not available

* test(Plugins/Admin): add tests for the Browse when GCOM is not available

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-28 16:46:29 +02:00
Isabella Siu
bf9be975ac
AzureMonitor: move metric deep link code to backend (#39524) 2021-09-28 09:24:18 -04:00
Peter Holmberg
cc94c55e48
Alerting: Prevent preview if no condition is set (#39659)
* prevent preview if no condition is set

* fixes after pr feedback

* watch on type and condition
2021-09-28 11:35:10 +02:00
Ivana Huckova
79c797c232
Loki: Fix creating coontext query for logs with parsed labels (#39648) 2021-09-28 10:42:38 +02:00
Torkel Ödegaard
0bb426ec33
Add orientation prop to Gauge panel (#39682) 2021-09-28 08:21:46 +02:00
Hugo Häggmark
9a178e7ba9
Variables: Prevents enter key from refreshing page or changing focus (#39666) 2021-09-28 06:07:03 +02:00
nikki-kiga
8d92e7ab90
Geomap: Style based on feature property (#39498)
* hardcode styles

* add custom styles and rules

* refactor and test to check feature matches rule

* update types and default style

* format geojsonmapper

* adjust types and reformat tests

* remove unused property

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-27 09:44:19 -07:00
Jack Westbrook
6eceb69d43
Plugins Catalog: Remove notice asking user to refresh browser (#39592) 2021-09-27 18:07:31 +02:00
Jack Westbrook
4dc556445c
Plugin Catalog: Use routing for PluginDetails Tabs (#39555)
* feat(catalog): introduce id and href to PluginDetailsTabs

* feat(catalog): add hrefs and ids to PluginDetails tabs. Pass queryParams to PluginDetailsBody

* feat(catalog): pass queryParams to PluginsDetailsBody and add page param to PluginListCard

* fix(catalog): prevent flicker of content by waiting for fetch details to finish loading

* feat(catalog): add tab icons to PluginDetails page

* feat(catalog): make breadcrumbs in PluginDetailsHeader aware of page queryparam

* fix(catalog): fix deeplinking to PluginDetails by comparing tabs length

* test(catalog): update tests with correct props and wrap in router
2021-09-27 18:06:47 +02:00
Andrew Hackmann
184fa2a227
QueryActionComponent: Add dataSourceRef to ActionComponetProps (#39486)
* Add dataSourceRef to ActionComponetProps

* pass whole datasource instance settings into modal

Co-authored-by: Travis Patterson <travis.patterson@grafana.com>
2021-09-27 07:40:19 -06:00
Hugo Häggmark
80c55ffc83
Annotations: Deprecate AnnotationsSrv (#39631) 2021-09-27 15:23:54 +02:00
Connor Lindsey
24479ff6b0
Tempo: Show warning if search is not available. Add opt-out config (#39489)
* Tempo: Show warning if search is not available. Add opt-out config
2021-09-27 07:22:49 -06:00
Gábor Farkas
9f027e32b7
InfluxDB: Flux: make $__interval and $__interval_ms work in alerting (#38889)
* influxdb: flux: handle $__interval and $__interval_ms in alert-queries

* influxdb: flux: do not handle interval-variable in the frontend

* $__interval should be rounded

* added comment
2021-09-27 12:03:04 +02:00
Zoltán Bedi
24475cfdda
Fix: State timeline panel tooltip error when data is not in sync (#39438)
* Fix: State timeline panel tooltip error when data is not in sync

* Move check from tooltip to panel
2021-09-27 09:46:30 +02:00
Alexander Emelin
1d1da09568
Live: disable centrifuge-js debug mode (#39625) 2021-09-25 15:17:39 -07:00
Ryan McKinley
c9ae46a9ad
PanelOptions: fix array with siblings (#39620) 2021-09-25 08:22:52 -07:00
nikki-kiga
930cf07aba
Geomap: add geojson feature hover and tooltip (#39608) 2021-09-23 19:31:36 -07:00
Ryan McKinley
01deae2105
Options: support array value paths for panel options (#39499) 2021-09-23 09:28:16 -07:00
Connor Lindsey
1865689411
Tempo: Improve how Tempo Search fetches autocomplete values (#39371)
* Improve how tempo search fetches autocomplete values

* Refetch autocomplete options on menu load
2021-09-23 07:00:14 -06:00
Hugo Häggmark
af5296bee7
Variables: Prevents panel from crashing when using adhoc variable in data links (#39546)
* Variables: Prevents panel from crashing when using adhoc variable in data links

* Refactor: uses isAdhoc instead

* Chore: updates after PR feedback
2021-09-23 11:56:33 +02:00
Hugo Häggmark
65d79d9a30
Dashboard: Short url generation works for variables values with spaces (#39552) 2021-09-23 11:50:09 +02:00
Oscar Kilhed
71122930b9
Remove ? as header for piechart table legend (#39521) 2021-09-23 10:41:35 +02:00
Oscar Kilhed
4a6e354497
PieChart: Fix sorting for null values in piechart (#39516)
* Fix sorting for null values in piechart

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-23 10:40:44 +02:00
kay delaney
00dad0f4e8
A11y: Fix fastpass issues for /admin/* pages (#39435)
* A11y: Fix fastpass issues for /admin/* pages
See #39429
2021-09-22 21:23:54 +01:00
Ryan McKinley
1c64f7d3ff
Chore: update typescript and tslib versions (#39389)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-22 21:15:37 +02:00
Ashley Harrison
a4d41d35d0
Chore(Navigation): Rename SideMenu -> NavBar (#39483) 2021-09-22 14:56:15 +01:00
Scott Lepper
593140cfa4
Table: Adds new footer feature that can show Totals or other column calculations (#38653)
* table footer for showing calculations

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-22 09:29:07 -04:00
Uchechukwu Obasi
eb2e1197e9
PlaylistPage: fix search input (#39226)
* PlaylistPage: removes search due to no wildcard support

* PlaylistPage: adds back search input and wildcard search support

* makes banner to appear only when playlist does not exist

* Chore: small refactor

* Chore: some code refactoring to make it readable

* fixes focus leaving input when query is cleared

* adds styling to the emptyQueryList banner

* extracts emptyQueryListBanner component to a separate file

* adds debounce to search

* use new theme for styling

* Chore: some nit fix

* fixes empty list banner showing for a second before the full list is loaded

* Fix: removes search when playlist is empty

Co-authored-by: Ash <ashharrison90@gmail.com>

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-09-22 10:45:29 +01:00
Oscar Kilhed
a1d8d6e95e
PieChart: Filter NaN values from total calculation (#39503)
* Filter NaN values from total calculation

* remove duplicated code, use missing value string for NaN and hidden series
2021-09-22 11:41:40 +02:00
Giordano Ricci
5f48d0641b
Explore: prevent eplore from hiding errors containing refId (#39504)
* Explore: prevent eplore from hiding errors containing refId

* Update public/app/features/explore/ResponseErrorContainer.tsx

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-22 10:33:31 +01:00
Selene
b31316753a
Disable external user's change role in admin (#39172)
* Disable external user's change role in admin

* Missing part of the tooltip text

* Disable change button with the tooltip instead dropdown

* Missing refactor

* Apply suggestion
2021-09-21 17:47:35 +02:00
Gábor Farkas
346a53145c
prometheus: metadata: simplify the metrics-metadata format (#39411)
* prometheus: metadata: simplify the metrics-metadata format

* fixed unit test

* fixed tests
2021-09-21 15:19:52 +02:00
Levente Balogh
660afc6279
Plugins Catalog: add a few more tests (#39433)
* refactor(Plugins/Admin): add an extra line-break between tests

* test(Plugins/Admin): add a couple of more tests for Plugin Details

* fix(Plugins/Admin): fix accidental linting issue
2021-09-21 13:15:37 +02:00
Giordano Ricci
42b1fa0f62
Fix Query Editor Row horizontal overflow (#39419) 2021-09-21 09:14:41 +01:00
Nathan Rodman
d03f75726b
Alerting: Add filtering for Silences (#39109)
* Add filtering for Silences page

* Add tests Silences and SilenceEditor

* pr feedback: add field validation and test refactor

* Add test for checking content

* fix overflow for validation error message

* increase login threshold for pa11y

* Make silence filter state its own type and function
2021-09-20 15:32:25 -07:00
Ryan McKinley
ad3c7529b0
Schema: unify bar/point/etc visibility modes (#39378) 2021-09-20 12:25:56 -07:00
Ryan McKinley
a6fbb8d724
Live: show popup if local changes exist (#36093)
* change tracker

* not needed
2021-09-20 18:28:46 +02:00
Levente Balogh
fef8e646ea
Plugins Catalog: add unit tests for data-munging (#39338)
* test(Plugins/Admin): add tests for the helper functions

* chore(Plugins/Admin): add `error` field to the CatalogPlugin mock

* test(Plugins/Admin): add new properties `error` & `isDisabled` to test expectations

* refactor(Plugins/Admin): make the `errors` param optional everywhere

* fix(Plugins/Admin): fix a rebase bug
2021-09-20 16:59:18 +02:00
Andrew Hackmann
d96a9171ae
Recorded Queries: Adding create and add recorded query buttons to (#38049)
* add create and add buttons that will be linked to enterprise

* wip

* wip

* clean up

* Co-authored-by: Travis Patterson <masslessparticle@gmail.com>
Added Query Modal that can be accessed from enterprise.

* reset docs

* reset docs

* docs changing

* docs

* docs

* unexporting props

* added generic ways to add more query actions and create actions

* cleanup

* adding internal tag

* adding onAddQuery to props so actions can add queries

* created a single query action component

* adding partial to query

* casting dataquery

Co-authored-by: Travis Patterson <travis.patterson@grafana.com>
2021-09-20 09:36:04 -05:00
Ivana Huckova
ffdeb4a57a
Prometheus: Run Explore instant queries trough backend (#39351)
* Prometheus: Add running of instant queries trough backend

* Rename response, keep zero length frames

* Remove debug log

* Simplify and fix value text

* Update duplicated and redundant go test

* Update public/app/plugins/datasource/prometheus/datasource.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Refactor using model to create Promquery

* Fix the response length

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-20 16:05:21 +02:00
Ivana Huckova
46f922fe1a
Prometheus: Remove autocomplete limit for metrics (#39363)
* Remove limit on metrics

* Remove unused variable
2021-09-20 14:58:01 +02:00
Jack Westbrook
4a11d0dab9
Plugins Catalog: Fix a11y issues (#39407)
* refactor(catalog): fix a11y issues in Browse and PluginListCard

* test(catalog): fix failing PluginListCard tests
2021-09-20 14:47:18 +02:00
Gábor Farkas
dc61edc8ac
prometheus: monaco: do not recalculate not-changing function-list (#39406) 2021-09-20 13:24:55 +02:00
Alexander Kubyshkin
8cdc752497
Fix variable input field size (#38850) (#39156) 2021-09-20 12:11:24 +02:00
Levente Balogh
c8e94a2443
Plugins Catalog: update the available panels on install/uninstall (#39293)
* feat(Plugins/Admin): add a function to update panels

* fix(Plugins/Admin): update the available panels on plugin install / uninstall
2021-09-20 11:40:07 +02:00
Hugo Häggmark
2696be49b9
LibraryPanels: Improves export and import of library panels between orgs (#39214)
* Chore: adds tests to reducer

* Refactor: rewrite state

* Refactor: adds library panels to export

* wip

* Refactor: adds import library panels

* Refactor: changes UI

* Chore: pushing drone

* Update public/app/features/manage-dashboards/components/ImportDashboardForm.tsx

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

* Update public/app/features/manage-dashboards/components/ImportDashboardForm.tsx

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

* Chore: reverted unknown merge changes

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-20 10:58:24 +02:00
kay delaney
d5b885f958
A11y/Menu: Add keyboard support to Menu component (#38974) 2021-09-20 09:08:46 +01:00
Ashley Harrison
f3475b864c
Chore: Tidy up emotion css with better theme breakpoint (#39340) 2021-09-20 08:55:31 +01:00
Hugo Häggmark
e696a9ab42
Variables: Prevents unnecessary duplicate requests (#39394) 2021-09-20 09:21:25 +02:00
Marcus Andersson
f3002931f4
PluginsCatalog: adding error information about disabled plugins. (#39171)
* added errors in plugin list.

* added error to details page.

* adding badge on details page.

* added some more tests.

* Renamed to disabled and will handle the scenario in the plugin catalog.

* Update public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* fixing some nits

* added missing isDisabeld to the mock.

* adding tests to verify scenarios when plugin is disabled.

* fixed issue with formatting after file changed on GH.

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-20 09:08:00 +02:00
Leon Sorokin
474461ba15
GraphNG: uPlot 1.6.16 (#39260) 2021-09-17 12:33:39 -05:00
Leon Sorokin
29e8728ef0
BarChart: Fix field enumeration for bar value display and legend items (#39308) 2021-09-17 09:57:57 -05:00
Gábor Farkas
73873f99cd
prometheus: monaco-query-field: fix metrics-list (#39347) 2021-09-17 15:01:39 +02:00
Ivana Huckova
81756cd702
Prometheus: Run Explore range queries trough backend (#39133)
* Run Explore range queries trough backend

* Remove trailing comma

* Add timeRange step alignment to backend

* Remove creation of instant query on backend as it is not supported ATM

* Remove non-related frontend changes

* Pass offset to calculate aligned range trough prom query

* Update order in query error message

* tableRefIds shouldn't contain undefined refIds

* Remove cloning of dataframes when processing

* Don't mutate response

* Remove ordering of processed frames

* Remove df because not needed
2021-09-17 13:39:26 +02:00
Ashley Harrison
06571e0af6
Dashboard: Don't show SectionHeader unless section has a title (#39336)
* Dashboard: Don't show SectionHeader unless section has a title

* Dashboard: Add unit test to prevent regression
2021-09-17 11:59:15 +01:00
Gábor Farkas
d116b2d71b
influxdb: influxql: more robust resultformat-handling (#39330) 2021-09-17 12:33:09 +02:00
Ashley Harrison
52d7358d83
Chore: More TypeScript strict fixes (#39300)
* Chore: More TypeScript strict fixes

* Chore: Use filter instead of reduce to fix TypeScript error

* Chore: Retype AzureResultFormat as string

* Chore: Account for getBlocks() poor typings of reduce

* Chore: Need to explicitly check for undefined here since '' is falsey
2021-09-17 09:47:23 +01:00
Gábor Farkas
8489575c84
prometheus: monaco: handle multiple query fields at the same time (#39286) 2021-09-17 09:50:19 +02:00
Gábor Farkas
f8de33da8d
prometheus: query-editor: better duration-completions (#39284) 2021-09-17 09:05:37 +02:00
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
Ashley Harrison
e4ca6f2445
Sidemenu: Refactor Sidemenu to use emotion (#38995)
* Chore(Sidemenu): Refactor Sidemenu scss into emotion

* Fix unit test

* Sidemenu: use cx instead of template strings
2021-09-09 09:56:08 +01:00
Hugo Häggmark
bfb34b9c1a
LibraryPanels: Prevents changing the folder when saving an existing library panel (#38978) 2021-09-09 06:21:31 +02:00
Ryan McKinley
a960aae4e7
Timeseries: add wide-to-long, and fix the multi-frame output (#38670)
Co-authored-by: Douglas Thrift <dthrift@flexera.com>
2021-09-08 23:44:51 +02:00
Erik Sundell
5e38b02f94
Cloudwatch: Migrate queries that use multiple stats to one query per stat (#36925)
* migrate queries that use multiple stats - squash commits

* fix typo
2021-09-08 16:06:43 +02:00
Ashley Harrison
e639b220ce
Sidemenu: Use <a> instead of <Link> when target is present (#38987) 2021-09-08 14:39:49 +01:00
Connor Lindsey
6a39ac7407
Explore: Download traces as JSON in Explore Inspector (#38614)
* Transform dataframe to jaeger format

* Transform dataframe to Zipkin format

* Add endpoint type and shared to Zipkin

* Transform dataframe to OTLP format

* Add data tab tests and note in inspector docs

* Remove comments and logs

* Resolve typescript strict errors

* Update docs/sources/explore/explore-inspector.md

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

* Update docs

* Improve OTLP conversion to include service info and additional tags

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-08 07:04:27 -06:00
Marcus Andersson
3bb2ee9de6
Plugins: added the possibility to manage field config state outside of the panel renderer. (#38944) 2021-09-08 15:02:44 +02:00
Ashley Harrison
b82fe083d7
Sidemenu: Refactor SignIn to use SideMenuItem (#38882) 2021-09-08 09:48:30 +01:00
Gábor Farkas
cbdba57924
Prometheus: fix popup positioning in monaco-based query-field (#38964)
* prometheus: monaco: fix popup positioning

* added explanation comment
2021-09-08 10:23:59 +02:00
Gabriel MABILLE
e9631fdf7c
AccessControl: "Add data source" button needs create and write rights to be enabled (#38934) 2021-09-08 09:47:55 +02:00
Ryan McKinley
10ffc9a754
Tables: optionally show field type icon in tables (#38855) 2021-09-08 00:44:41 -07:00
Oscar Kilhed
ecf40f0331
PieChart: Display "No data" when there is no data (#38808)
PieChart: Display "No data" when there is no data
2021-09-08 09:07:09 +02:00
An
b14b267bed
Canvas Panel: icon/image select modal (#38844)
* feature: add icon modal

* fix: make apply send on change

* move to resource folder

* allow empty

* type

* icon modal

* fix: edit styles

* fix: edit styles

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-07 19:46:20 +02:00
Ivana Huckova
19d4213df6
Prometheus: Fix validate selector in metrics browser (#38921)
* Fix match[] param in loki and prometheus

* Update loki series match param
2021-09-07 15:44:45 +02:00
Ashley Harrison
9ce5edfa6b
Docs: Update 'Whitelisted' to 'Allowed' per style guide (#38897)
* Docs: Updated 'Whitelisted' to 'Accepted' to match what's shown in the frontend now.

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Docs: Update frontend to match docs

* kick drone

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-09-07 13:30:26 +01:00
Hugo Häggmark
8826540c09
Dashboard: Forces panel re-render when exiting panel edit (#38913) 2021-09-07 12:46:21 +02:00
Hugo Häggmark
058ac6becf
Chore: Bumps Immer, Redux Toolkit, Redux and React Redux (#38872)
* Chore: Bumps immer and redux/toolkit

* WIP: transpile errors

* Chore: bumps redux and react redux

* Chore: removes unused dispatch

* make alerting compile with updated redux toolkit

* Test: Fixes broken test

* Chore: fixes strict errors

Co-authored-by: Domas <domasx2@gmail.com>
2021-09-07 10:44:47 +02:00
ying-jeanne
c989f0fbbe
SQL: Migrate to use SDK contracts (#36635)
* convert SQLs to use sdk contracts

* make draft

* postgres

* intermedia

* get datasourceinfo filled at the beginning of the service

* move the interval into package because of cyclict  import and fix all postgres tests

* fix mysql test

* fix mssql

* fix the test for pr https://github.com/grafana/grafana/issues/35839

* fix some issue about intervalv2 package

* update sql test

* wire migration for SQLs

* add sqls to the background process

* make it register instead of register and start

* revert formatting

* fix tests

* fix linter

* remove integration test

* Postgres test fix

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-09-07 09:35:37 +02:00
sam boyer
269c01ea5c
Chore: fix function name spelling (#38901)
Should be appendTransformerAfter().
2021-09-06 21:15:39 -07:00
Maria Alexandra
98dc925175
Dashboard: Fix UIDs are not preserved when importing/creating dashboards thru importing .json file (#38659)
* Dashboard: Fix UID not preserved on import

* Import Dashboard: add e2e test to verify uid is preserved when importing dashboard

* E2e: Use dynamic uid

* Tests: fixes e2e test

* Chore: adds back waits

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-09-06 15:50:28 +01:00
Gabriel MABILLE
cf7034ee50
AccessControl: add permission to datasource permissions navigation selection (#38758) 2021-09-06 16:18:18 +02:00
Ivana Huckova
d5956ce4b7
Loki: Fix error handling, remove legacy condition (#38633)
* Fix error handling, remove legacy condition

* Fix strict errors in Loki and lower error count

* Update
2021-09-06 15:28:54 +02:00
shuotli
d2f3bb6491
Azure Monitor: Add Azure resource overview dashboard (#38801)
* Add azure resource overview dashboard

* fix width
2021-09-06 09:44:45 +02:00
Hugo Häggmark
3b0910e470
LibraryPanels: Prevents duplicate repeated panels from being created (#38804)
* LibraryPanels: Prevents duplicate repeated panels from being created

* Tests: adds tests

* Chore: updates after PR feedback
2021-09-06 05:57:01 +02:00
nikki-kiga
2a2f10da7e
Transformations: Use fieldMatchers for convertFieldType and add doc (#38769) 2021-09-03 04:18:06 +02:00
Ryan McKinley
9a0040c0ae
Canvas: add alpha canvas panel and initial interfaces (#37279) 2021-09-02 10:01:08 -07:00
Giordano Ricci
7f1327d1ed
Elasticsearch: Prevent pipeline aggregations to show up in terms order by options (#38448)
* Elasticsearch: Prevent pipeline aggregations to show up in terms order by options

* fix optional props

* Refactor & add tests

* Fix & lower strict ts count

* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/SettingsEditor/TermsSettingsEditor.test.tsx

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/SettingsEditor/TermsSettingsEditor.test.tsx

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-09-02 16:00:40 +02:00
Connor Lindsey
fb17f053d3
Explore: Standardize trace query field styling (#38796) 2021-09-02 07:30:11 -06:00
Ashley Harrison
ea65e11c44
Sidemenu: Various accessibility improvements (#38823) 2021-09-02 14:17:57 +01:00
Piotr Jamróz
bd95856ff9
Graphite: Migrate to React (part 6: Remove AngularJS Query Editor) (#37919)
* Add UMLs

* Add rendered diagrams

* Move QueryCtrl to flux

* Remove redundant param in the reducer

* Use named imports for lodash and fix typing for GraphiteTagOperator

* Add missing async/await

* Extract providers to a separate file

* Clean up async await

* Rename controller functions back to main

* Simplify creating actions

* Re-order controller functions

* Separate helpers from actions

* Rename vars

* Simplify helpers

* Move controller methods to state reducers

* Remove docs (they are added in design doc)

* Move actions.ts to state folder

* Add docs

* Add old methods stubs for easier review

* Check how state dependencies will be mapped

* Rename state to store

* Rename state to store

* Rewrite spec tests for Graphite Query Controller

* Update docs

* Update docs

* Add GraphiteTextEditor

* Add play button

* Add AddGraphiteFunction

* Use Segment to simplify AddGraphiteFunction

* Memoize function defs

* Fix useCallback deps

* Update public/app/plugins/datasource/graphite/state/helpers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/helpers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/helpers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Add more type definitions

* Remove submitOnClickAwayOption

This behavior is actually needed to remove parameters in functions

* Load function definitions before parsing the target on initial load

* Add button padding

* Fix loading function definitions

* Change targetChanged to updateQuery to avoid mutating state directly

It's also needed for extra refresh/runQuery execution as handleTargetChanged doesn't handle changing the raw query

* Fix updating query after adding a function

* Simplify updating function params

* Migrate function editor to react

* Simplify setting Segment Select min width

* Remove unnecessary changes to SegmentInput

* Extract view logic to a helper and update types definitions

* Clean up types

* Update FuncDef types and add tests

* Show red border for unknown functions

* Autofocus on new params

* Extract params mapping to a helper

* Split code between params and function editor

* Focus on the first param when a function is added even if it's an optional argument

* Add function editor tests

* Remove todo marker

* Fix adding new functions

* Allow empty value in selects for removing function params

* Add placeholders and fix styling

* Add more docs

* Create basic implementation for metrics and tags

* Post merge fixes

These files are not .ts

* Remove mapping to Angular dropdowns

* Simplify mapping tag names, values and operators

* Simplify mapping metrics

* Fix removing tags and autocomplete

* Simplify debouncing providers

* Ensure options are loaded twice and segment is opened

* Remove focusing new segments logic (not supported by React's segment)

* Clean up

* Move debouncing to components

* Simplify mapping to selectable options

* Add docs

* Group all components

* Remove unused controller methods

* Create Dispatch context

* Group Series and Tags Sections

* Create Functions section

* Create Section component

* use getStyles

* remove redundant async/await

* Remove

* remove redundant async/await

* Remove console.log and silent test console output

* Do not display the name of the selected dropdown option

* Move Section to grafana-ui

* Update storybook

* Simplify SectionLabel

* Fix Influx tests

* Fix API Extractor warnings

* Fix API Extractor warnings

* Do not show hidden functions

* Use block docs for better doc generation

* Handle undefined values provided for autocomplete

* Basic integration

* Move creating state to context.tsx

* Update tests

* Rename test

* Clean up dependencies

panel.targets is not needed for interpolation - it happens in the data source itself. It was used only to show query ref in the the dropdown for the segment.

* Update time range when it changes

* Change action name

* Simplify segments cloning

* Remove redundant variable

* Use styles instead of direct css

* Update docs

* Remove angular wrappers

* Remove redundant tests

* Section -> SegmentSection

* Simplify section styling

* Remove redundant div

* Fix unit tests

* Simplify SegmentSection component

* Use theme.spacing

* Use empty label instead of a single space label

* Remove targetFull

It was used in the past two store the query interpolated with sub-queries inside the model and send both to the backed (interpolated and not interpolated). This has been changed though - the logic has been moved away from model to the data source where interpolation happens and now only interpolated query is passed meaning targetFull is not needed anymore.

* Revert "Remove targetFull"

This reverts commit 499f8b33

* Bring back calculating targetFull

* Clean up

* Add missing dep

* Add missing dep in tests

* Fix time range synchronization

* Fix warning message

* Remove unused type

* Synchronize changes to the query

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-02 10:18:14 +02:00
Piotr Jamróz
f941390631
Deprecate browser access mode for the Graphite data source. (#38783)
* Deprecate browser access mode for Graphite

* Update docs

* Update copy
2021-09-02 10:16:17 +02:00
Ryan McKinley
ae702caec6
Transformer: labels to fields should not also merge frames (#38671) 2021-09-01 20:18:50 +02:00
Ashley Harrison
205c672417
Sidemenu: Refactor TopSectionItem and BottomNavLinks into SideMenuItem (#38755)
* Sidemenu: Refactor TopSectionItem and BottomNavLinks into SideMenuItem

* Update failing snapshot

* BottomSection: Convert tests to RTL + add some extra unit tests
2021-09-01 17:16:50 +01:00
Ryan McKinley
e980f8531a
StateTimeline: merge threshold values (#35073) 2021-09-01 17:43:57 +02:00
Ryan McKinley
7af2d1a629
Dashboards: support merging in new panels and options (#37905) 2021-09-01 08:03:56 -07:00
Alex Khomenko
ea8d9d77f4
Admin: User list tweaks (#38750)
* Setup filter

* Enable filtering users by active in last 30 days

* Add loading state

* Update last active age strings

* Tweak user list

* Use theme spacing

* Improve table's accessibility

* Add more aria-labels
2021-09-01 16:53:58 +03:00
Gabriel MABILLE
9f29241a0c
AccessControl: add one-dimensional permissions to datasources (#38070)
* AccessControl: add one-dimensional permissions to datasources in the backend

* AccessControl: add one-dimensional permissions to datasources in the frontend (#38080)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-01 15:18:17 +02:00
Uchechukwu Obasi
4e8ab0512c
PlayList: add delete functionality to remove playlist (#38120)
* WIP: add delete functionality to playlist

* fixes deleted item to be removed instantly without manual refresh

* update confirmModal to reference playlist name

* refactor confirmModal message to be clear enough

* WIP: some unit tests for the playlistPage

* added more tests and did some cleanup

* some code refactoring

* adds ability for user roles to control playlist delete

* some abstraction to cleanup code

* modified alert message for delete button to correspond with action

* tried a better approach to modify the alert message

* fixes playlist lookup on each render

* update handlers to not use anonymous function

* exposed getBackendSrv().get api to fetch all playlist

* used better naming convention

* removes unecessary async/await construct

* some code refactoring

* used the correct param structure
2021-09-01 13:23:57 +01:00
Dominik Prokop
326455a9b8
Annotation tooltip: Bring back links styles (#38780) 2021-09-01 13:30:30 +02:00
Hugo Häggmark
55e20bbf04
LibraryPanels: Separates name from panel title (#38707)
* LibraryPanels: Separates name from panel title

* WIP

* Chore: fixes update for duplicate lib panels

* Chore: reverts implementation

* Chore: show library options only for library panels

* Chore: ui fixes after PR comments

* Chore: fixes issue when creating library panels
2021-09-01 13:27:43 +02:00
Hugo Häggmark
38ca27428d
LibraryPanels: Removes library panel icon from the panel header (#38749) 2021-09-01 06:14:21 +02:00
Nathan Rodman
ad610a1916
Alerting: Fix bug for default value in silence matcher (#38735) 2021-08-31 20:51:36 -07:00
Jack Westbrook
fec50115b0
Chore: Bump dangerously-set-html-content to 1.0.9 (#38622) 2021-08-31 14:10:56 +02:00
Gábor Farkas
a5d11a3bef
Prometheus: monaco-based query-editor-field, first step (#37251)
* prometheus: add monaco-based query-field

for now it is behind a feature-flag

* added new trigger character

* better separate grafana-specifc and prom-specific code

* better styling

* more styling

* more styling

* simpler monaco-import

* better imports

* simplified code

* simplified type imports

* refactor: group completion-provider files together

* renamed type

* simplify type-import

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* handle no-metric-name autocompletes

* updated comment

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-08-31 13:46:13 +02:00
Jack Westbrook
8d3b31ff23
Build: Upgrade Webpack 5 (#36444)
* build(webpack): bump to v5 and successful yarn start compilation

* build(webpack): update postcss dependencies

* build(webpack): silence warnings about hash renamed to fullhash

* build(webpack): enable persistent cache to store generated webpack modules / chunks

* build(webpack): prefer eslintWebpackPlugin over tschecker so eslint doesn't block typechecking

* chore(yarn): run yarn-deduplicate to clean up dependencies

* chore(yarn): refresh lock file after clean install

* build(webpack): prefer output.clean over CleanWebpackPlugin

* build(webpack): prefer esbuild over babel-loader for dev config

* build(babel): turn off cache compression to improve build performance

* build(webpack): get production builds working

* build(webpack): remove phantomJS (removed from grafana in v7) specific loader

* build(webpack): put back babel for dev builds no performance gain in using esbuild in webpack

* build(webpack): prefer terser and optimise css plugins for prod. slower but smaller bundles

* build(webpack): clean up redundant code. inform postcss about node_modules

* build(webpack): remove deprecation warnings flag

* build(webpack): bump packages, dev performance optimisations, attempt to get hot working

* chore(storybook): use webpack 5 for dev and production builds

* build(storybook): speed up dev build

* chore(yarn): refresh lock file

* chore(webpack): bump webpack and related deps to latest

* refactor(webpack): put back inline-source-map, move start scripts out of grafana toolkit

* feat(webpack): prefer react-refresh over react-hot-loader

* build(webpack): update webpack.hot to use react-refresh

* chore: remove react-hot-loader from codebase

* refactor(queryeditorrow): fix circular dependency causing react-fast-refresh errors

* revert(webpack): remove stats.errorDetails from common config

* build(webpack): bump to v5 and successful yarn start compilation

* build(webpack): update postcss dependencies

* build(webpack): silence warnings about hash renamed to fullhash

* build(webpack): enable persistent cache to store generated webpack modules / chunks

* build(webpack): prefer eslintWebpackPlugin over tschecker so eslint doesn't block typechecking

* chore(yarn): run yarn-deduplicate to clean up dependencies

* chore(yarn): refresh lock file after clean install

* build(webpack): prefer output.clean over CleanWebpackPlugin

* build(webpack): prefer esbuild over babel-loader for dev config

* build(babel): turn off cache compression to improve build performance

* build(webpack): get production builds working

* build(webpack): remove phantomJS (removed from grafana in v7) specific loader

* build(webpack): put back babel for dev builds no performance gain in using esbuild in webpack

* build(webpack): prefer terser and optimise css plugins for prod. slower but smaller bundles

* build(webpack): clean up redundant code. inform postcss about node_modules

* build(webpack): remove deprecation warnings flag

* build(webpack): bump packages, dev performance optimisations, attempt to get hot working

* chore(storybook): use webpack 5 for dev and production builds

* build(storybook): speed up dev build

* chore(yarn): refresh lock file

* chore(webpack): bump webpack and related deps to latest

* refactor(webpack): put back inline-source-map, move start scripts out of grafana toolkit

* feat(webpack): prefer react-refresh over react-hot-loader

* build(webpack): update webpack.hot to use react-refresh

* chore: remove react-hot-loader from codebase

* refactor(queryeditorrow): fix circular dependency causing react-fast-refresh errors

* revert(webpack): remove stats.errorDetails from common config

* revert(webpack): remove include from babel-loader so symlinks (enterprise) work as before

* refactor(webpack): fix deprecation warnings in prod builds

* fix(storybook): fix failing builds due to replacing css-optimise webpack plugin

* fix(storybook): use raw-loader for svg icons

* build(webpack): fix dev script colors error

* chore(webpack): bump css-loader and react-refresh-webpack-plugin to latest versions

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-08-31 12:55:05 +02:00
Ashley Harrison
b40d48258d
Sidemenu: Fix logout button (#38747) 2021-08-31 11:33:38 +01:00
Ashley Harrison
7a242afcd6
Sidemenu: Refactor BottomNavLinks to use SideMenuDropDown (#38598)
* Sidemenu: Attempt to refactor BottomNavLinks to use SideMenuDropDown

* BottomNavLinks: Rewrite existing enzyme tests in RTL

* BottomNavLinks: Use object spreading instead of slicing
2021-08-31 10:37:51 +01:00
shuotli
f1529b83a2
[Azure monitor] Support variables for Azure Resource Group subscription picker (#38620) 2021-08-31 09:15:35 +02:00
Ryan McKinley
f567bef0bf
Geomap: hide legend for markers with single threshold (#38734) 2021-08-30 23:22:19 -07:00
Levente Balogh
82c038bd06
Plugins Catalog: add signature information to details (#38558)
* refaactor: extract the tab labels into a const

* feat: list - show signature badge for enterprise plugins as well

* feat(plugins): add a component for showing plugin signature details

* feat: add a component for showing signature info under details

* feat: add a component for displaying signature info in details header

* feat: extract the plugin details header into a separate component

* feat: show signature information on the plugins details page

* refactor(Plugins): use an enum instead of an object

* refactor(Plugins): use more strict typing for tabs

* refactor(Plugins): use function declaration instead of fat-arrow for components

* fix(Plugins): fix typo

* fix: make installed plugin config an optional param again

* refactor: cache plugin meta requests

* refactor: move PLUGIN_TAB_LABELS to the types module
2021-08-30 14:00:11 +02:00
Peter Holmberg
74afe809af
Alerting: Add DateTimePicker on view rule page (#38592)
* export datetimepicker

* minor fixes to the datetime picker

* correct datetime to picker

* move datetime calc to function

* set maxDate

* set maxDate

* wrap in useCallback
2021-08-30 11:42:37 +02:00
Zoltán Bedi
38b398feb4
Fix: panel crash after esc (#38646) 2021-08-30 09:57:07 +02:00
Alex Khomenko
d90c822e69
Fix key prop when rendering options (#38595) 2021-08-30 06:59:51 +02:00
Oscar Kilhed
b248c119ef
TimeSeries: Use graph min/max for percentage threshold (#38528)
* TimeSeries: Use graph min/max as baseis for percentage threshold calculation.

* respect hard and soft axis limits for % threshold steps

* revert state-timeline changes

* enable by-threshold coloring in histogram and barchart

* revert yMin

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-29 15:46:17 -05:00
sam boyer
96557ecadc
Change cuetsy annotation "targetType" to "kind" (#38564)
Mirrors change made upstream in cuetsy
2021-08-29 14:29:06 -04:00
nikki-kiga
a54a139176
Transformations: Convert field types to time string number or boolean (#38517)
* outline string to time

add stringToTime transformer

start to add format

add type and dateformat

rename stringToTime to fieldConversion

add more type support and use FieldNamePicker

add field conversion transformation

* adjust for performance feedback

rename and adjust labels and widths

shorten labels and null values

rename to convertFieldType

update test

* make updates
2021-08-27 13:49:31 -07:00
Dominik Prokop
1be53b4f3b
TimeSeries: Add per-axis grid visibility toggle (#38502)
* Allow grid lines visibility control to XYChart and TimeSeries

* Move grid lines config to field config (axis)

* Fix merge

* Auto grid mode

* Fix ts

* Align naming

* Update packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.test.ts

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* Update packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.test.ts

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* remove 'grid' from props diff array since field.config.custom.* is handled by structureRev diffing

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-08-27 12:30:42 -05:00
Giordano Ricci
b5e4a0a39a
Elasticsearch: Only show numbers in histogram field autocomplete (#38631) 2021-08-27 17:19:44 +01:00
Olof Bourghardt
8da634f780
Loki: add tests for addAdHocFilters (#38594)
* Loki: add tests for addAdHocFilters

* Change description of test

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Replace ADD_FILTER with "=" operator in test description

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Loki: refafctor test for addAdHocFilter

* Loki: refactor tests for better readability

* Remove comments

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-08-27 17:06:22 +02:00
Giordano Ricci
eaca54a9f2
Elasticsearch: change terms default min_doc_count to 1 (#38632) 2021-08-27 14:22:12 +01:00
Olof Bourghardt
458bced826
Jaeger: fix bug where query is executed twice (#38550)
* Jaeger: add empty callback to QueryField onBlur to stop query from being run twice

* Jaeger: add wait call on 500ms to accomodate for debouncing by the QueryField component
2021-08-27 10:36:18 +02:00
Alex Khomenko
a15e33e693
Admin: remove Redux from ServerStats (#38581)
* Admin: remove Redux from ServerStats

* Admin: Fix import
2021-08-27 11:09:17 +03:00
Jack Westbrook
2cb141d4ec
Plugins: Refactor installation buttons component (#37642)
* refactor(catalog): split out installcontrols into multiple components

* test(catalog): update tests for plugindetails page

* refactor(catalog): rename installcontrols -> index

* refactor(catalog): remove redundant curlies

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* tests(plugindetails): fix assertions and naming of tests

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* refactor(installcontrols): prefer enum over duplicate union type, rename disabled prop

* refactor(installcontrols): use PluginStatus enum for installcontrols pluginStatus

* refactor(installcontrols): remove redundant curlies

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-08-26 17:15:43 +02:00
Domas
2847f25781
Alerting: UI to edit cortex/loki namespace & group names, group eval interval (#38543) 2021-08-26 16:40:27 +03:00
Ashley Harrison
a583f7e160
Sidemenu: Refactor SideMenuDropDown (#38554)
* SideMenuDropDown: Refactor to be more component-ey + rewrite tests in RTL

* SideMenuDropDown: Rename childLinks -> items

* Rename mockChildLinks -> mockItems as well
2021-08-26 14:08:27 +01:00
Torkel Ödegaard
d5ed4e9c8c
Geomap: Minor style fixes (#38532)
* Fixed hover font-weight, option casing, and added simple test dashboard with 3 panels

* Update theme colors

* Style tweaks to legend

* Updated

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-26 10:17:03 +02:00
Ryan McKinley
9267014a45
Schema: export existing types in @grafana/data|ui (#38518) 2021-08-25 09:59:03 -07:00
Connor Lindsey
76ade24f2f
Add catch around JSON trace upload for more error handling (#38520) 2021-08-25 10:08:46 -06:00
Ivana Huckova
d1b6132302
Loki: Fix ad-hoc filter when used with parser (#38542)
* Fix ad hoc filter when used with parser

* Update
2021-08-25 16:08:41 +02:00
Ashley Harrison
b30882bd2b
Sidemenu: Refactor DropDownChild (#38509)
* DropDownChild: Refactor DropDownChild to be more component-like

* Rewrite tests in RTL

* Let's not do this just yet...
2021-08-25 14:27:04 +01:00
sam boyer
e61bc33163
Move dashboard scuemata to grafana-schema (#38470)
* Relocate dashboard scuemata to grafana-schema

* Update assorted tests, vars with dashboard path

* Remove crufty commented var

* Not sure...why that failed

* Remove prefix from base dashboard path var

* Move cue/ui remnants into grafana-schema

* Update import paths in plugin models

* Remove mudball, add package statements

* Remove cuegen.sh

Wooooo we ain't got no codegen

* Revert "Remove mudball, add package statements"

This reverts commit 9bed3098f1.

* Tidy up all the cue files

* Move dashboard scuemata into scuemata/ subdir

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-25 06:55:04 -04:00
Olof Bourghardt
a19ad25eaa
Jaeger: support running queries with keyboard shortcut (#37958)
* Jaeger: add QueryField component

* Remove unused imports

* Fix e2e test so that it checks for QueryField component

* Remove comments

* Fix failing e2e test
2021-08-25 11:30:32 +02:00
Ashley Harrison
7c97b9d03f
QueryEditor: Don't use _.defaults as it mutates the query prop directly (#37965)
* QueryEditor: Don't use _.defaults as it mutates the query prop directly

* QueryEditor: Update the query type on mount if none exists

* QueryEditor: Mutate in the constructor instead of render

* Apply defaults immutably in render
2021-08-25 10:19:02 +01:00
Alex Khomenko
6e639f3c72
Admin: Update stats page UI (#38014)
* Add StatCard

* Style cards

* Update types

* Add tests

* Move stats tab into licencing

* Prevent UI jumps when loading stats

* Fix merge conflicts

* Revert docs format
2021-08-24 19:13:48 +03:00
Ryan McKinley
fcceb5716d
Schema: move existing grafana/ui models into schema (#38469) 2021-08-24 08:22:34 -07:00
Domas
9d8f61c738
Alerting: allow creating/editing recording rules for Loki and Cortex (#38064) 2021-08-24 10:31:56 +02:00
Vicky Lee
c5f384c654
docs: update cloud data sources README links (#37820)
* docs: update cloud data sources README links

* Update public/app/plugins/datasource/cloudwatch/README.md

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

* Apply suggestions from code review

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

* Update public/app/plugins/datasource/grafana-azure-monitor-datasource/README.md

* Update public/app/plugins/datasource/cloud-monitoring/README.md

Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-24 10:11:07 +02:00
Olof Bourghardt
05b0df2254
Zipkin: support running queries with keyboard shortcut (#37960)
* Zipkin: replace input field with QueryField component

* Fix failing tests

* Remove console.log

* Partially migrate test to react

* Zipkin: finish migration from enzyme to react

* Remove comments
2021-08-24 09:52:34 +02:00
Villena Guillaume
4cb87b6b60
Annotations Panel: Show annotations end time if present (#38425)
* Annotation Panel: Show annotation end time if present

* Added hyphen between dates
2021-08-23 20:57:44 -07:00
Ryan McKinley
425ec7ca9e
Schema: create a new schema package for basic models (#38409) 2021-08-23 13:03:41 -07:00
Tharun Rajendran
2156980edb
Datasource: add button to navigate to explore from settings (#36119)
Fixes #13737
2021-08-23 09:23:49 -06:00
Connor Lindsey
a2525005e5
Manually set query type in Tempo explore on component mount (#38408)
* Manually set query type in Tempo explore on component mount
2021-08-23 07:51:45 -06:00
Peter Holmberg
eba21f3145
Alerting: Append appSubUrl to links if present (#38069)
* append appSubUrl if present

* remove null check
2021-08-23 14:57:30 +02:00
Villena Guillaume
1b3eecddcd
Annotation Panel: Fix annotation with end time not being centered (#38423)
* Annotation Panel: Fix annotation with end time not being centered

* Update public/app/plugins/panel/annolist/AnnoListPanel.tsx

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-23 12:03:27 +01:00
Ryan McKinley
8c4c05493b
Dashboard: keep live timeseries moving left (v2) (#37769) 2021-08-20 14:48:55 -07:00
Ryan McKinley
b88f8bacf3
DataFrame: add frame type key to DataFrame structure (#38092) 2021-08-20 09:26:40 -07:00
Will Browne
ae17cce316
Plugins: Add Hide OAuth Forward config option (#36306)
* add prop

* add angular conf

* invert naming

* undo md changes

* fix wording

* y u fail 4 me

* refactor(datasourcesettings): rename hideForwardOAuthIdentityOption prop

* refactor(datasourcesettings): rename scope.hideForwardOAuthIdentityOption

* Update contribute/style-guides/e2e.md

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

* feat(datasourcehttpsettings): add showForwardOAuthIdentityOption to angular wrappers & template

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-08-20 15:53:54 +02:00
Olof Bourghardt
5231660627
Explore: use GrafanaTheme2 (LiveLogs component) (#37452)
* Explore: use GrafanaTheme2

* Explore: add correct style values. Add theme.v1 to the styles that were uncertain

* Logs: add use of GrafanaTheme2 in varioius log components

* Styles: add some of the correct values recieved via feedback

* Add correct style values

* Update public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Update public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Update public/app/plugins/panel/dashlist/styles.ts

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Explore: fix failing tests

* Explore: add styling values from v2

* Fix small type error

* Replace v1 styles with v2 styles

* Remove forgotten v1 values

* Remove more v1 style values

* Apply correct style value to LogRowMessage

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-08-20 14:53:03 +02:00
Hugo Häggmark
a0773b290b
Dashboard: Prevents folder change when navigating to general settings (#38103)
* Dashboard: Prevents folder change when navigating to general settings

* Tests: fixes broken tests

* Chore: changes from PR feedback
2021-08-20 11:53:48 +02:00
Nathan Rodman
df791ae2af
Alerting: Add custom grouping for alert groups (#37378)
* Group alertmangaer alerts by custom grouping

* Filter am groups

* Style filter components

* Style filter bar and add clear functionality

* rename components to alert group

* use query params for group filters

* filter style improvements

* add tests for group by

* Add grouping banner to better highlight groupings

* clean up hook logic
2021-08-19 09:22:52 -07:00
Connor Lindsey
6ed60c0bec
Tempo: Use echo endpoint when testing Tempo datasource (#38018)
* Use echo endpoint when testing Tempo datasource

* Remove unreachable error message

* Null check response
2021-08-19 09:56:03 -06:00
Connor Lindsey
76b891b001
Tempo: Add Tempo search behind feature flag (#37765)
* Add Tempo search behind feature flag

* Add query fields for Tempo search

* Only show loki search if a logs-to-traces datasource is set up

* Refactor tempo search to use separate fields for service name, span name, and tags

* Add tests to buildSearchQuery

* Move search to separate component and rename type to native search

* Improve Tempo tokenizer syntax
2021-08-19 09:15:46 -06:00
Josh Hunt
17306217aa
AzureMonitor: Support PostgreSQL and MySQL Flexible Servers (#38075) 2021-08-19 16:56:58 +02:00
Tobias Skarhed
1f091c448f
Template variables: Keyboard navigation improvements (#38001)
* Fix variable labels

* Add proper labeling for input

* Add ids to PickerRenderer

* Fix tests

* Update PR feedback

* OptionsPicker: Change to id

* Inherit aria attributes

* Add checkbox role

* Fix typo

* Add proper label reference

* Update role and label

* Prevent spreadng non-DOM attributes

* Move form layout to other component

* Remove haspopup

* Add testid to selector

* Add HTMLProps extension

* Use list

* Move styles outside of class

* Add cx
2021-08-19 16:28:25 +02:00
Olof Bourghardt
28cf93e42c
Explore: use GrafanaTheme2 (LiveTailButton component) (#37516)
* Explore: use GrafanaTheme2 in LiveTailsButton

* Remove unused theme
2021-08-19 16:17:28 +02:00
Ivana Huckova
7f8576ee37
Postgres: For template queries return [] and not error (#38060)
* Postgres: For template queries return [] and not error

* remove the console error

* update mssql and mysql

Co-authored-by: Ying WANG <ying.wang@grafana.com>
2021-08-19 13:43:41 +02:00
Leon Sorokin
ecfa32c8cb
AnnotationEditor: simplify plugin (#37463) 2021-08-19 06:40:40 -05:00
Hugo Häggmark
4ba2636aba
Dashboard: Fix so panels are rendered correctly on SoloPanelPage (#38050)
* Dashboard: Fix so panels are rendered correctly on SoloPanelPage

* Refactor: narrows down the path
2021-08-19 08:47:37 +02:00
Hugo Häggmark
dba15190af
Chore: Upgrades rxjs to 7.3.0 (#37913)
* Chore: upgrades rxjs to 7.3.0

* Chore: replaces toPromise with lastValueFrom

* Chore: removes unused mock that caused test error

* Chore: fixes build error in PieChartPanel

* Chore: fixed build error in requestAllIndices

* Chore: fixes comment

* Chore: trying to reduce docs errors

* Chore: searches for explicit api extractor warnings

* Chore: updates rxjs-spy to 8.0.0

* Chore: reverts to main

* Chore: upgrade rxjs and rxjs-spy
2021-08-19 06:38:31 +02:00
Villena Guillaume
646d95b8fb
TimeSeries: Support Ctrl key for marking annotations (#38034) 2021-08-18 16:38:02 -05:00
Leon Sorokin
49b129b110
GraphNG: fix mem leaks & avoid plot re-inits (#38017)
* State timeline: fix mem leak caused by excessive plot re-init

* Update PlotTooltipInterpolator type

* Do not reference config object in the setCursor hook

* fix excessive BarChart re-init caused by shallow diff of text config

* one less error

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-18 13:43:53 -05:00
Ole Ernst
c0d6fc0255
avoid duplicate log in development environment (#36609)
avoid logging performance metrics in production environment
2021-08-18 19:45:54 +02:00
Oscar Kilhed
21f45d4927
Postgres UUID group issue (#37999)
* Add UUID to types that can be grouped by

* Remove noop switch
2021-08-18 16:17:30 +02:00
Peter Holmberg
a7b22a73b6
Alerting: Add Copy link to Alert on View rule page (#37967)
* add button to page

* add url to getText

* reorder imports

* build url function

* remove log

* encode
2021-08-18 14:25:56 +02:00
Domas
cb9912ec0a
Alerting: button to test contact point (#37475) 2021-08-18 10:16:35 +03:00
Ryan McKinley
16b1922cdc
Devenv: remove unused options from timeseries panel (#37980) 2021-08-17 16:29:15 -07:00
Nathan Rodman
b153bb6101
Alerting: Add alertmanager notifications panel (#37078)
* Add filter parsing to rule list filters

* Add unit tests for label parsing

* Make label operators an enum

* add example for parsing function

* Update labels operator regex

* Use tooltip for query syntax example

* refactor to use Matchers for filtering

* wip: initial alertmanager notifications panel

* Panel for alertmanager notificaitons

* add filtering for notifications list

* remove icon

* rename am notifications to alert groups

* naming fixes

* Feature toggle

* Add toggle for expand all

* add pluralize

* add action buttons

* test work in progress

* Tests for alert groups panel

* Add useEffect for expandAll prop change

* Set panel to alpha state

* Fix colors

* fix polling interval callback

Co-authored-by: Domas <domas.lapinskas@grafana.com>

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-08-17 15:02:03 -07:00
Nathan Rodman
6579872122
Alerting: update matchers field operators to Select (#37809)
* Alerting: update matchers field operators to Select

* Add matcher field to routes

* fix default values

* min-width for matcher operator

* dry up matcher field options

* change MatcherField name to MatcherValue
2021-08-17 14:48:39 -07:00
Ryan McKinley
2ff4b028c8
Core: move dimensions out of geomap into app/features (#37946) 2021-08-17 13:43:54 -07:00
Piotr Jamróz
d93d989a5a
Graphite: Migrate to React (part 4 & 5: group all components) (#37590)
* Add UMLs

* Add rendered diagrams

* Move QueryCtrl to flux

* Remove redundant param in the reducer

* Use named imports for lodash and fix typing for GraphiteTagOperator

* Add missing async/await

* Extract providers to a separate file

* Clean up async await

* Rename controller functions back to main

* Simplify creating actions

* Re-order controller functions

* Separate helpers from actions

* Rename vars

* Simplify helpers

* Move controller methods to state reducers

* Remove docs (they are added in design doc)

* Move actions.ts to state folder

* Add docs

* Add old methods stubs for easier review

* Check how state dependencies will be mapped

* Rename state to store

* Rename state to store

* Rewrite spec tests for Graphite Query Controller

* Update docs

* Update docs

* Add GraphiteTextEditor

* Add play button

* Add AddGraphiteFunction

* Use Segment to simplify AddGraphiteFunction

* Memoize function defs

* Fix useCallback deps

* Update public/app/plugins/datasource/graphite/state/helpers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/helpers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/helpers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/plugins/datasource/graphite/state/providers.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Add more type definitions

* Remove submitOnClickAwayOption

This behavior is actually needed to remove parameters in functions

* Load function definitions before parsing the target on initial load

* Add button padding

* Fix loading function definitions

* Change targetChanged to updateQuery to avoid mutating state directly

It's also needed for extra refresh/runQuery execution as handleTargetChanged doesn't handle changing the raw query

* Fix updating query after adding a function

* Simplify updating function params

* Migrate function editor to react

* Simplify setting Segment Select min width

* Remove unnecessary changes to SegmentInput

* Extract view logic to a helper and update types definitions

* Clean up types

* Update FuncDef types and add tests

* Show red border for unknown functions

* Autofocus on new params

* Extract params mapping to a helper

* Split code between params and function editor

* Focus on the first param when a function is added even if it's an optional argument

* Add function editor tests

* Remove todo marker

* Fix adding new functions

* Allow empty value in selects for removing function params

* Add placeholders and fix styling

* Add more docs

* Create basic implementation for metrics and tags

* Post merge fixes

These files are not .ts

* Remove mapping to Angular dropdowns

* Simplify mapping tag names, values and operators

* Simplify mapping metrics

* Fix removing tags and autocomplete

* Simplify debouncing providers

* Ensure options are loaded twice and segment is opened

* Remove focusing new segments logic (not supported by React's segment)

* Clean up

* Move debouncing to components

* Simplify mapping to selectable options

* Add docs

* Group all components

* Remove unused controller methods

* Create Dispatch context

* Group Series and Tags Sections

* Create Functions section

* Create Section component

* use getStyles

* remove redundant async/await

* Remove

* remove redundant async/await

* Remove console.log and silent test console output

* Do not display the name of the selected dropdown option

* Move Section to grafana-ui

* Update storybook

* Simplify SectionLabel

* Fix Influx tests

* Fix API Extractor warnings

* Fix API Extractor warnings

* Do not show hidden functions

* Use block docs for better doc generation

* Handle undefined values provided for autocomplete

* Section -> SegmentSection

* Simplify section styling

* Remove redundant div

* Simplify SegmentSection component

* Use theme.spacing

* Use empty label instead of a single space label

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-08-17 18:50:31 +02:00
Ashley Harrison
f8d7726187
DashboardGrid: compare window width against theme breakpoints (#37868) 2021-08-17 16:53:25 +01:00
Josh Hunt
1e221b6452
AzureMonitor: Show error message when subscriptions request fails in ConfigEditor (#37837)
* Fix jsdoc description for datasourceRequest

* Align default subscription width with other fields

* AzureMonitor: Show error message when requesting default subscriptions in ConfigEditor

* update snapshots:
2021-08-17 16:46:15 +01:00
Andrej Ocenas
11c848f00d
Tempo: Service map (#37661)
* Add prometheus queries

* Add stats

* Refactor transform

* Fix stat format

* Refactor transform

* Hide behind feature flag

* Better linking error messages

* Add test

* Add test for datasource

* Fix lint

* Make optionality checking more explicit
2021-08-17 15:48:29 +02:00
Hugo Häggmark
0d2aaed3e8
Annotations: Fixes so alert annotations are visible in the correct Panel (#37959) 2021-08-17 15:14:11 +02:00
Josh Hunt
afabc617ed
AzureMonitor: Apply query migrations in QueryEditor (#37704)
* move query migrations out of the angular controller

* Migrate queries in QueryEditor

* finish up migrations

* update deprecated comment

* remove comment
2021-08-17 14:03:18 +02:00
sam boyer
6aba592741
Schema: get all devenv dashboards passing validation (#37857)
* Strip nulls (again)

* Add stripnulls script

* Add transformations field

* Close FieldConfig struct; proper plugin validating

* s/graph/viz/ field in histogram dashboard

* Use ui.GraphFieldConfig in histogram model

* Add models for stat, gauge, barguage panel plugins

Also toss necessary shared types into cue/ui/gen.cue, with TODOs to move
them appropriately later.

* Add required license headers

* Heap of updates to cue UI components

* Fix barchart types and one old devenv input

* Use the GraphFieldConfig directly for timeseries

* Add models.cue for a few panel plugins

Barchart, state-timeline, and status-history

* Enable the test validating all devenv dashboards!!

* Fix effects of not checking after making comments

* Update packages/grafana-ui/src/options/models.gen.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Realign and unalign cue with ts types

* Update devenv test to sniff for null errors

Best option we have right now for helping people to know they need to
strip nulls from devenv dashboards.

* Add speculative default for barchart stacking

* Fixup some dated devenv dashboards

timeline-modes needed to be regenerated with the appropriate tooltip
values included, per typing requirements, and timeline-demo needed to
have the `mode` field removed, as it is not intended to be persisted.

* Add necessary missing options for various panels

* Regenerate devenv dashboards

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-17 07:11:57 -04:00
Josh Hunt
368da73ac4
AzureMonitor: Fix crash from infinite render loop (#37924) 2021-08-17 11:50:37 +01:00
Olof Bourghardt
f433cfd8d9
Explore: add functionality for supporting different step modes in prometheus (#37829) 2021-08-17 07:48:45 +02:00
Atif Shoukat Ali
f6c9c196ba
Live: No connection warning for user with no org (#37943) 2021-08-16 22:11:39 -07:00
Ashley Harrison
344c43f2e8
PanelEdit: Fix 'Actual' size by passing the correct panel size to DashboardPanel (#37885) 2021-08-16 16:01:54 +01:00
Tobias Skarhed
89572926c3
Search: Make search icon keyboard navigable (#37865)
* Make search icon keyboard navigable

* Update text

* Update test

* Remove unused line

* Add global focus-visible styles for button
2021-08-16 15:51:44 +02:00
Maria Alexandra
1735f9a56b
Navigation: Add aria-label to top section links to improve a11y for screen readers (#36953) 2021-08-16 15:10:57 +02:00
Olof Bourghardt
d26f3cdd03
Loki: add support for resolution (#36710)
* Add input to specify min step

* Add stepInterval to as input to component

* Add onBlur to Input component

* Loki: add functionality for min step

* Loki: change name on props to step to make it more clear

* Loki: add resolution as a query option

* Loki: Add min,max,exact as step options

* Loki: add functionality for different step modes

* Loki: fix bug where step function isn't working

* Loki: fix bug where exact step isn't working

* Loki: change width of step input field

* Loki: add tests for adjustInterval function

* Loki: add check for max step oprio to make sure it's not below the safe interval

* Loki: fix bug with some tests

* Loki: fix bug with tests

* Explore: add tooltip to loki step function

* Loki: remove resolution as a logs option

* Loki: update snapshots

* Fix failing tests

* Loki: add select component for choosing resolution

* Loki: add functionality for calculating correct interval with resolution applied

* Loki: remove functionality for step mode

* Loki: remove tests for step mode

* Loki: add tooltip to line limit and resolution

* Loki: add backend support for resolution

* Loki: fixed backend bug where resolution was undefined

* Loki: add check for resolution
2021-08-16 14:02:13 +02:00
Domas
5ab8d6a3b9
remove guideliens form rule list state table (#37839) 2021-08-16 10:12:07 +03:00
Ivana Huckova
15edaa5837
Add pattern parser to syntax (#37824) 2021-08-15 21:20:37 +02:00
Ikko Ashimine
1a5529d244
Annotations: Fix typo in types.ts (#37910) 2021-08-15 09:22:38 -07:00
Leon Sorokin
6a77cd43ae
GraphNG: refactor by-value color schemes (#37670)
* GraphNG: account for top canvas padding in gradient gen for color scheme/thresholds-by-value

* Updated test dashboard

* Added fix for issue when scaleMin was same as threshold

* fixed firefox issue

* revert docs changes

* update gdev dash for easier comparisons & regression spotting

* refactor

* optimize gradient re-gen/re-use and color more tinycolor.setAlpha() -> alpha(). update uPlot to dev build.

* fix percentage steps

* implement % threshold region rendering

* crisp threshold line rendering

* simplify

* WIP: hoverpoint dynamic color interpolation

* fix hover point color interp

* re-use gradient gen to draw threshold areas

* re-implement by-value color scales

* tweak comment

* mimic tinycolor behavior in colorManipulator.alpha() for empty colors

* explicitly disable hover points for BarChart and Histogram

* reduce test failures and required changes to tests

* fix barchart tests

* uPlot 1.6.15

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-08-13 09:38:04 -05:00
Uchechukwu Obasi
4e98ade2af
Annotations: fixes variable values not displaying in annotations. (#37883)
* Fixes wrong annotation when opening dashboard with URL encoded variable
Co-authored-by: Ashley Harrison, Hugo Haggmark, and Tobias Skarhed.

* added a more descriptive comment
2021-08-13 14:38:57 +01:00