Commit Graph

13131 Commits

Author SHA1 Message Date
kay delaney
b2e94d0733
Chore: Migrate yarn from v1 to v2 (#39082)
* Chore: Migrate yarn from v1 to v2

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-10-08 15:19:10 +01:00
sam boyer
0fe200ce41
Do codegen and check no-diff of all (non-blacklisted) CUE->TS codegen during CI (#39922)
* Add file blacklist to `grafana-cli cue gen-ts` cmd

* Add CI step checking all cuetsification is done

* Add dummy command to make the next one fail

* Generate drone bits

* Check diff output failure

* Echo list of untracked files, for failure locality

* Move git cleanness checking into script

* Blacklist of cue files is complete and correct

* Remove news panel plugin from cuetsify blacklist

* Dummy commit, check that untracked gen still fail

* Tie off remaining errors

* Re-add barchart to blacklist
* Remove file left around by earlier pipeline
* Commit generated news models.gen.ts

* Include eslint as part of cuetsified output gen

* Update pkg/cmd/grafana-cli/commands/cuetsify_command.go

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>

* Update drone.yml

* Last fix on .drone.yml

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-10-08 08:47:55 -04:00
idafurjes
e822c8a24d
CloudMonitoring: Migrate to use backend plugin SDK contracts (#38650)
* Use SDK contracts for cloudmonitoring

* Get build running, tests passing and do some refactoring (#38754)

* fix build+tests and refactor

* remove alerting stuff

* remove unused field

* fix plugin fetch

* end to end

* resp rename

* tidy annotations

* reformatting

* update refID

* reformat imports

* fix styling

* clean up unmarshalling

* uncomment + fix tests

* appease linter

* remove spaces

* remove old cruft

* add check for empty queries

* update tests

* remove pm as dep

* adjust proxy route contract

* fix service loading

* use UNIX val

* fix endpoint + resp

* h@ckz for frontend

* fix resp

* fix interval

* always set custom meta

* remove unused param

* fix labels fetch

* fix linter

* fix test + remove unused field

* apply pr feedback

* fix grafana-auto intervals

* fix tests

* resolve conflicts

* fix bad merge

* fix conflicts

* remove bad logger import

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Will Browne <will.browne@grafana.com>
2021-10-08 14:46:35 +02:00
Jack Westbrook
7cf3c84c92
Datasources: Fix deletion of datasource if plugin cannot be found (#40095)
* fix(pluginsettings): reject with error so datasource plugin loading failures still render ui

* feat(pluginpage): handle plugin loading error

* refactor(datasources): separate out datasource and meta loading so store has info for deletion

* fix(datasourcesettings): introduce loading flag to wait for datasource and meta loading

* test(datasourcesettings): fix failing test

* test(datasources): assert loading status of datasource settings

* test(datasources): update action tests for latest changes
2021-10-08 12:31:43 +02:00
Hugo Häggmark
70e759e0c0
Folders: Prevents deletion of General folder (#40192) 2021-10-08 11:15:15 +02:00
Alex Khomenko
b5f39637d4
Admin: Enable extending filters (#39825)
* Setup extensible filters

* Fix test

* Handle filter as array

* Add className

* Abstract getFilters

* Make docs link external

* Use underline for links in tooltips instead of link color

Co-authored-by: Selene <selenepinillos@gmail.com>
2021-10-07 17:41:52 +03:00
Leon Sorokin
d3815a851c
Stat: recompute shared y range during streaming updates (#39485) 2021-10-07 10:48:49 +02:00
Alex Khomenko
5c7e874008
Search: Fix local storage key (#40127)
* Default to 'General' if no folder title is present

* Add bottom padding
2021-10-07 11:35:31 +03:00
Giordano Ricci
95d9722afa
Fix: prevent queryDisplyText in QueryRowHeader from overflowing (#40094)
* Revert "Fix Query Editor Row horizontal overflow (#39419)"

This reverts commit 42b1fa0f62.

* fix: prevent queryDisplyText in QueryRowHeader from overflowing
2021-10-07 09:13:07 +01:00
An
6567462de9
support settings array (#40103) 2021-10-06 15:55:54 -04:00
Ryan McKinley
3db98f417d
Panel Options: support dynamic options editors (#39491) 2021-10-06 21:41:42 +02:00
Connor Lindsey
3a8d04603f
Explore: Add opt-in config for Node Graph in Jaeger, Zipkin, and Tempo (#39958) 2021-10-06 13:39:14 -06:00
Connor Lindsey
3e33330e27
Tempo: Decrease the default Tempo search limit to 20 (#40030) 2021-10-06 08:43:13 -06:00
kay delaney
1ce750471f
A11y: Fix fastpass issues for dashboard management pages (#39940)
* A11y: Fix fastpass issues for dashboard pages
See #39429
2021-10-06 11:58:18 +01:00
Zoltán Bedi
7fd7c98540
MySql: Fix reset button on config page (#39988)
* MySql: Fix reset button on config page

* Use button instead of anchor

* Add aria labels
2021-10-06 12:41:34 +02:00
Ashley Harrison
2f731d42f3
NewsPanel: Prevent Date and title collapsing to single row (#40016) 2021-10-06 11:14:37 +01:00
Ieva
52220b2470
AccessControl: frontend changes for adding FGAC to licensing (#39484)
* refactor licenseURL function to use context and export permission evaluation fction

* remove provisioning file

* refactor licenseURL to take in a bool to avoid circular dependencies

* remove function for appending nav link, as it was only used once and move the function to create admin node

* better argument names

* create a function for permission checking

* extend permission checking when displaying server stats

* enable the use of enterprise access control actions when evaluating permissions

* import ordering

* move licensing FGAC action definitions to models package to allow access from oss

* move evaluatePermissions for routes to context serve

* change permission evaluator to take in more permissions

* move licensing FGAC actions again to appease wire

* avoid index out of bounds issue in case no children are passed in when creating server admin node

* simplify syntax for permission checking

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* update loading state for server stats

* linting

* more linting

* fix test

* fix a frontend test

* update "licensing.reports:read" action naming

* UI doesn't allow reading only licensing reports and not the rest of licensing info

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-10-05 14:54:26 +01:00
Torkel Ödegaard
ead8429210
Annotations: Improve rendering performance of event markers (#39984) 2021-10-05 12:53:25 +02:00
Torkel Ödegaard
e0b576fff4
PanelContext: Adds app property of type CoreApp enum to inform panel about what the outer container/app is (#39952)
* PanelContext: Adds a container enum / string to inform panel about what the outer container/app state is

* Changing to use existing CoreApp

* fixing unified alerting type errors
2021-10-05 08:07:57 +02:00
Ashley Harrison
a3783a4eb7
Navigation: Increase navigation width + make icons a consistent size (#39959)
* Navigation: Increase navigation width + make icons a consistent size

* Navigation: Move style to only apply to headers
2021-10-04 16:18:17 +01:00
dependabot[bot]
03804fb4b9
Bump @sentry/utils from 5.24.2 to 6.13.2 (#39932)
* Bump @sentry/utils from 5.24.2 to 6.13.2

Bumps [@sentry/utils](https://github.com/getsentry/sentry-javascript) from 5.24.2 to 6.13.2.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/5.24.2...6.13.2)

---
updated-dependencies:
- dependency-name: "@sentry/utils"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Chore: fix type checks by updating buffer.add to add a function instead of a promise

* kick drone

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-04 15:43:23 +01:00
Isabella Siu
42d7c32759
AzureMonitor: Remove unused editor component (#39874) 2021-10-04 09:17:59 -04:00
gotjosh
6572017ec7
Alerting: Allow more characters in label names so notifications are sent (#38629)
Remove validation for labels to be accepted in the Alertmanager, This helps with datasources that produce non-compatible labels.

Adds an "object_matchers" to alert manager routers so we can support labels names with extended characters beyond prometheus/openmetrics. It only does this for the internal Grafana managed Alert Manager.

This requires a change to alert manager, so for now we use grafana/alertmanager which is a slight fork, with the intention of going back to upstream.

The frontend handles the migration of "matchers" -> "object_matchers" when the route is edited and saved. Once this is done, downgrades will not work old versions will not recognize the "object_matchers".

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-10-04 15:06:40 +02:00
Guilherme Caulada
706a665240
Auth: add name parameter to auth.saml (#39883)
* add name parameter to auth.saml

* Create constant to store default SAML name
2021-10-04 09:58:16 -03:00
Ashley Harrison
c2c04f218a
Chore(DashboardSearch): Convert to use useTheme2 (#39918) 2021-10-04 10:32:29 +01:00
Alex Khomenko
d6fd17531d
QueryEditor: Add missing keys to extra action components (#39913) 2021-10-04 09:05:43 +03:00
Nathan Rodman
427f75d9b0
Alerting: UI standardization and fixes (#38770)
* Add expand all button for rule list group view

* filter out recording rules by default

* Create rule type filter

* Add placeholder text for inputs

* WIP move Silences to use DynamicTable

* Use dynamic table for silences page

* hide expand all for state list view

* Add placeholders for inputs

* Update selector in receivers test

* Fix strict error for ruleType

* remove redundant placeholder text and cleanup hooks

* add fixed width for schedule

* Rebase with dynamic table for silences

* only show expand/collapse when filters are active
2021-10-01 15:15:55 -07:00
Ryan McKinley
9f93a81bee
Geomap: use panel context editor state (#39920) 2021-10-01 11:06:11 -07:00
kay delaney
816d70a7e5
A11y: Fix fastpass issues for /org/ pages (#39902)
* A11y: Fix fastpass issues for /org/ pages
See #39429
2021-10-01 15:58:18 +01:00
Ashley Harrison
4350f4931d
NavBar: Styling tweaks to tidy up appearance (#39871)
* NavBar: Styling tweaks to tidy up appearance

* NavBar: Add external link icon to external links

* NavBar: Dim the external link icon

* bump drone

* NavBar: Rename variable to better describe what it's doing
2021-10-01 15:53:56 +01:00
Domas
a1d4be0700
Alerting: Alertmanager datasource support for upstream Prometheus AM implementation (#39775) 2021-10-01 16:24:56 +03:00
Piotr Jamróz
a6a3ef74be
Refactor: Decouple logs from DataSourceApi (#39536)
* Decouple logs from DataSourceApi

* Remove unused code

* Mark log context methods as deprecated

* Update jsdocs deprecation message

* Update packages/grafana-data/src/types/logs.ts

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

* Check for undefined in hasLogsContextSupport

* Add release tags

* Change release tag

* Retrigger the build

* Post-merge: revert index.md changes

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-10-01 13:38:16 +02:00
Torkel Ödegaard
962745ff21
PanelEditor: Adds panel instance state and a way to share this between panel & option editors (#39637)
* PanelEditor: Adds panel instance state and a way to share this between panel & option editors

* Refactoring to use PanelContext
2021-10-01 11:08:11 +02:00
Andrej Ocenas
3e47fb1432
CloudWatch Logs: Skip caching for Log queries (#39860)
* Add x-skip-cache header to queries

* Specify caching works for CW metrics
2021-10-01 09:45:37 +02:00
Noah van der Aa
0f42b37e21
Fix folder icons for alert rules (#39873) 2021-10-01 09:52:43 +03:00
Hugo Häggmark
7c7b21b39e
DashboardList/AlertList: Fix for missing All folder value (#39772)
* DashboardList/AlertList: Fix for missing All folder value

* Refactor: Fixes case where folder does not exist in results
2021-10-01 06:20:25 +02:00
An
ecf9733a66
add: rule settings editor (#39875) 2021-09-30 16:37:31 -04:00
Levente Balogh
3ad5ee87a3
Plugins Catalog: fix overflowing text in plugin cards (#39862)
* refactor(Plugins/Admin): add a "badge" for displaying available updates

* refactor(Plugins/Admin): rename component

* refactor(Plugins/Admin): use the PluginListItemBadges component
2021-09-30 17:23:40 +02:00
An
fffbdf4c82
feature: allow delete request to accept body (#39817) 2021-09-30 10:59:53 -04:00
kay delaney
451d023c79
A11y: Fix fastpass issues for /org/teams pages (#39848)
* A11y: Fix fastpass issues for /org/teams pages
See #39429
2021-09-30 15:46:10 +01:00
Gábor Farkas
d363c36853
Prometheus: metrics browser: handle label values with special characters (#39713)
* prometheus: handle label-values with special characters

* added comment
2021-09-30 15:50:02 +02:00
Piotr Jamróz
124e9daf26
Loki: Full range logs volume (#39327)
* Basic implementation of getLogsVolumeQuery method

* Add todos

* Add a switcher to automatically load logs volume

* De-scope dismissing logs volume panel

* De-scope logs volume query cancellation

* Remove todo

* Aggregate logs volume components in single panel

* Show logs volume only when it's available

* Aggregate logs volume by level

* Simplify aggregation

* Handle no logs volume data

* Add error handling

* Do not show auto-load logs volume switcher when loading logs volume is not available

* Remove old logs volume graph

* Clean up

* Make getting data provider more generic

* Provide complete logs volume data (error, isLoading)

* Display more specific error message

* Add missing props to mocks

* Remove setRequest method

* Mark getQueryRelatedDataProviders as internal

* Add missing dataQueryRequest and add a todo

* Remove redundant loading state

* Do not mutate existing queries

* Apply fix for zooming-in from main

* Post-merge fixes

* Create collection for data provider results

* Use more generic names

* Move aggregation logic to Loki logs volume provider

* Move LogsVolume to common types

* Update tests

* Post-merge fixes

* Fix mapping related data values

* Simplify prop mappings

* Add docs

* Fix property name

* Clean-up

* Mark new types as internal

* Reduce number of providers to logs volume only

* Simplify data structure to DataQueryResponse

* Move Logs Volume panel to a separate component

* Test logsVolumeProvider.ts

* Add observable version of datasource mock

* Test getLogsVolumeDataProvider method

* Test LogsVolumePanel

* Test logs volume reducer

* Clean up

* Clean up

* Fix test

* Use sum by to use level field directly

* Fix strict type errors

* Fix strict type errors

* Use "logs" instead of "unknown" if only one level was detected

* Add docs about logs volume

* Rename histogramRequest to logsVolumeRequest

* Use LogsVolumeContentWrapper all content types

* Move `autoLoadLogsVolume` local storage handling

* Fix strict error

* Move getting autoLoadLogsVolume to initial state

* Cancel current logs volume subscription

* Test cancelling subscriptions

* Update docs/sources/datasources/loki.md

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

* Update packages/grafana-data/src/types/explore.ts

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

* Inline container styles

* Ensure logs volume is aggregated per each subscription separately

* Simplify logs volume provider

* Type-guard support for logs volume provider

* Simplify event handlers to avoid casting

* Clean up and docs

* Move auto-load switcher to logs volume panel

* Fix test

* Move DataSourceWithLogsVolumeSupport to avoid cross referencing

* Simplify interface

* Bring back old histogram and hide the new one behind a feature flag

* Add missing props to logs histogram panel

* Clean up the provider when it's not supported

* Simplify storing autoLoadLogsVolume

* Remove docs

* Update packages/grafana-data/src/types/logsVolume.ts

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>

* Skip dataframes without fields (instant queries)

* Revert styles changes

* Revert styles changes

* Add release tag

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-09-30 15:46:11 +02:00
Oscar Kilhed
738d5e499e
Add fiscal years and search to time picker (#39073)
* Add search to time picker

* implement fiscal datemath

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-09-30 09:40:02 +02:00
Piotr Jamróz
787e5e78dd
Graphite: Ensure only valid queries are used for interpolation (#39761)
* Graphite: Ensure only valid queries are used for interpolation

* Add a unit test
2021-09-30 09:26:11 +02:00
Piotr Jamróz
f8ebcaa0d9
Explore: Fix displaying rich history saving error message (#39766)
* Explore: Fix displaying rich history saving error message

* Keep generic error message

* remove testing snippet
2021-09-30 09:22:57 +02:00
Levente Balogh
c2754eb9cc
Plugins Catalog: Make the catalog the default way to interact with plugins (#39779)
* chore(Plugins/Admin): make the Plugins Catalog the default way to interact with plugins

* chore(defaults.ini): change the default value for `plugin_admin_enabled`

* test(Plugins): make the tests pass
2021-09-30 08:34:03 +02:00
Ryan McKinley
4c8c2f6c96
Scatter: support bubble and line charts with out-of-order data (alpha) (#39377)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-09-29 10:14:15 -07:00
Ashley Harrison
ff009bee9f
DashboardRow: Prevent unintended editing of DashboardRow with keyboard shortcut 'e' (#39792) 2021-09-29 16:33:11 +01:00
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