Commit Graph

16306 Commits

Author SHA1 Message Date
Hamas Shafiq
3e209c06f3
Tempo: Fix typo in the tooltip for 'Limit' (#53750) 2022-08-16 06:52:44 -04:00
Ivan Ortega Alba
38c690ecb0
Revert "Analytics: Use Fullstory to get behavioral data (#53732)" (#53762)
This reverts commit 961479b111.
2022-08-16 12:45:14 +02:00
Ivan Ortega Alba
961479b111
Analytics: Use Fullstory to get behavioral data (#53732) 2022-08-16 10:32:00 +02:00
Torkel Ödegaard
c8fc840865
Fix initDashboard bug (#53722)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-08-16 03:24:04 -04:00
sam boyer
4a5afe4fb6
openapi: Use indentations for human-readable JSON (#53707) 2022-08-15 15:39:18 -04:00
Zoltán Bedi
835562bb68
GeoMap: Fix tooltip not showing values (#53738) 2022-08-15 16:39:00 +02:00
Mihály Gyöngyösi
1c0ab501aa
UsersTable: Display Disabled flag in Organizations' Users table (#53656)
* Add disabled column to Org's Users table

* fix typo

* Change column order

* Add test for testing whether GetOrgUsers populates the DTO correctly
* Remove type assertion
2022-08-15 10:58:58 +02:00
Drew Slobodnjak
e9e5c97807
Geomap: Update language to match documentation and remove beta (#53703)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-12 21:33:30 -04:00
Leo
0ce89dbcb6
use dash-db type when searching for dashboard (#53607) 2022-08-12 16:14:04 +02:00
Andreas Christou
d6a0a5c9ed
Set projectName in componentDidMount to ensure GCE project is set (#53652)
- Update componentDidMount to call ensureGCEDefaultProject to correctly set project name for GCE Service Account auth
- Set state appropriately
- Update test
2022-08-12 14:54:19 +01:00
Andreas Christou
cace6f06d1
Fix webpack issue (#53666) 2022-08-12 13:53:35 +00:00
Sonia Aguilar
f416651842
Show alerting availability in data source details (#53391)
* Show alerting availability in data source details

* Show tooltip info in data source dropdown when creating an alert

* return earlier in HeaderExtras component

* Use getDataSourceSrv().getInstanceSettings instead of getDataSourceSrv().get to simplify

* Make information icon clickable and open a new window with documentation url
2022-08-12 15:32:07 +02:00
Ivana Huckova
fde5147d71
Loki, Prometheus: Fix passing of query with defaults to code mode (#53646) 2022-08-12 15:00:55 +02:00
Ivana Huckova
f34a03b2f1
Loki: Rename Labels to Label filter and update placeholders (#53446)
* Loki: Rename Labels to Label filter and update placeholders

* Update label

* Replace Label filter with Label filters based on suggestion
2022-08-12 07:38:34 -04:00
Andreas Christou
d4f382892d
CloudMonitor: Fix to hide queries when used in conjunction with Expressions (#53537)
* Correctly pass all original query parameters on interpolation

* Add datasource tests

- Update props on mock query
- Add mock instance settings
- Add util function to generate template variables
- Add datasource test file
- Correct setting of templateSrv
- Update betterer results

* Simplify test and pass templateSrv appropriately

* Fix lint issue

* Simplify test and add type that supports parital nested objects

* Update test and remove unneeded util function

* Rename to avoid duplicate mock
2022-08-12 11:02:56 +01:00
Karl Persson
7e16d5b4b4
RBAC: Fix various ui issues for role picker (#53589)
* RolePicker: Check if user has permissions to delegate roles

* UserRolePicker: Require both UserRolsAdd and UserRolesRemove for chaning
roles

* RolePicker: Add option for controlling if roles can be updated to
RolePicker

* UserOrgs: Dont try to fetch roles with wrong permission

* RolePicker: make usage consistent with allowed actions

* RolePickerMenu: Remove unused property

* UserOrgs: Check for correct permission

* UserRolePicker: add apply to controll apply behaviour instand of
updateDisabled

* UserOrgs: Check for correct permission when trying to update roles

* RolePicker: Disable button if no roles or org role can be updated

* RolePicker: Always close on update

* RolePicker: Fix issue with updating immutable value

* ServiceAccountsListItem: Pass correct value to RolePicker

* ServiceAccountCreatePage: Pass correct value
2022-08-12 09:16:16 +02:00
Adela Almasan
1f93216f1d
Layers check (#53611) 2022-08-11 17:39:18 -04:00
Gilles De Mey
e9980a9bb8
Alerting: Adds interval and For to alert rule details (#53211) 2022-08-11 18:49:21 +02:00
Matias Chomicki
8d69acb9f8
Chore(loki): remove any from LokiQueryField test (#53548) 2022-08-11 18:08:23 +02:00
Matias Chomicki
df8d1de94f
Chore(loki): remove any from config editor test (#53475) 2022-08-11 18:08:05 +02:00
Giordano Ricci
c1b30c56c9
Correlations: Add GetCorrelation(s) HTTP APIs (#52517)
* Correlations: Get Single correlations

* Correlations: Get all correlations for given source ds

* Correlations: Get all correlations

* add tests

* add DB indices

* fix lint errors

* remove skip from tests

* use DatasourceService in test
2022-08-11 16:58:11 +01:00
Ivana Huckova
8813cbfb62
Loki: Update copy for missing label filter error message (#53449)
* Loki: Update copy for missing label filter

* Update
2022-08-11 17:57:10 +02:00
Hamas Shafiq
6592b03f12
Jaeger: Extract inline CSS into getStyles 2022-08-11 16:41:59 +01:00
Hamas Shafiq
20caed026f
Jaeger: Improve JSON file upload error msg 2022-08-11 16:23:19 +01:00
Andres Martinez Gotor
a31d96d20a
Prometheus: Promote Azure auth flag to configuration (#53447) 2022-08-11 16:12:57 +02:00
timkendrickmw
85dbacafdb
GrafanaUI: improve Prometheus getQueryHints performance (#52148) 2022-08-11 15:47:07 +02:00
Ivan Ortega Alba
6423485061
Preferences: Use search endpoint to get missing dashboard (#53540) 2022-08-11 10:34:01 +02:00
Zoltán Bedi
818bc88242
MSSQL: Don't inject angular dependency (#53546) 2022-08-11 09:43:20 +02:00
Yaelle Chaudy
dfe33a63fb
Datasources: Emit event on dashboard load with queries info (#52052)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Andres Martinez <andres.martinez@grafana.com>
2022-08-11 09:30:14 +02:00
Levente Balogh
d7556bd189
fix: use type instead of uid to get datasource metadata (#53543) 2022-08-11 07:24:39 +02:00
owensmallwood
dc23643bee
Public Dashboards: Usage Insights (#52768) 2022-08-10 14:14:48 -03:00
Josh Hunt
081d6e9d3e
Typed variables pt5: Remove generics from getInstanceState (#53018)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* use typescript/no-redeclare for compatibility with ts overloads

* remove generics from getVariable() and overload it to only return undefined based on arguments

* update usages of getVariable()

* Remove generic from getInstanceState

* update usages of getInstanceState

* fix lint
2022-08-10 16:06:49 +01:00
Josiah (Jay) Goodson
7d7890e23c
Transform: Add a limit transform (#49291)
* Add a limit transform

* Add a limit transform

* Simplify filter code

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-08-10 07:21:11 -07:00
Leo
4926767737
Dashboard: Reverted the changes of hiding multi-select and all variable in the datasource picker (#53521)
* REVERT PanelEdit: Hide multi-/all-select datasource variables in datasource picker, PR 52142

* user essentials mob! 🔱

lastFile:public/app/features/dashboard/dashgrid/PanelChrome.tsx

* user essentials mob! 🔱

lastFile:public/app/features/dashboard/dashgrid/PanelChrome.tsx

* removed todo comments

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
2022-08-10 15:30:00 +02:00
Ashley Harrison
26e81cad21
Add tests for Breadcrumbs (#53514) 2022-08-10 12:56:25 +01:00
Leo
c4984854b6
added dashboard uid when tracing header in browsermode (#53232) 2022-08-10 10:36:19 +02:00
Ashley Harrison
6d495a6a8e
Navigation: Improve breadcrumb accessibility (#53471)
* refactor breadcrumbs into their own folder, add appropriate accessibility

* rename Breadcrumb to BreadcrumbItem
2022-08-10 09:24:21 +01:00
Ivan Ortega Alba
742686bab1
Library Panels: Use UIDs to list Dashboards using a panel (#53477) 2022-08-10 03:43:09 -04:00
Kian Eliasi
e3c50f0cd6
Chore: Remove any from public/app/plugins/datasource/elasticsearch/hooks/useNextId.test.tsx (#53427)
* Remove any from public/app/plugins/datasource/elasticsearch/hooks/useNextId.test.tsx

* Fix lint and update betterer results
2022-08-10 09:25:35 +02:00
Adela Almasan
45750da667
Geomap: Set markers color based on selected color field #53493 2022-08-09 15:42:37 -07:00
Peter Holmberg
509e34cfe7
Alert list panel: Add view mode "Stat" (#53281)
* add stat mode

* remove unused import
2022-08-09 16:37:09 +02:00
Matias Chomicki
27e2953951
Loki: Rewrite getHighlighterExpressionsFromQuery to use Loki parser (#53316)
* refactor(loki): use Loki parser in getHighlighterExpressionsFromQuery

* fix(highlighter): update regex to properly identify term quotes

* refactor(highlighter): determine quote type by string comparison

* Chore: remove empty line
2022-08-09 15:23:14 +02:00
Victor Marin
3893c46976
Histogram: Send proper dataframe to PlotLegend (#53284)
* Send proper dataframe to PlotLegend

* Update dataFrameFieldIndex for multiple frames
2022-08-09 15:39:42 +03:00
Ashley Harrison
8185b6fdf7
refactor component to be more dumb, use LinkButton for icons and fix alignment (#53383) 2022-08-09 11:46:27 +01:00
Alex Ratner
fecf4c41ad
Dashboard: Spelling corrections in end-user visible dialogs (#53340) 2022-08-09 10:19:30 +02:00
Brendan O'Handley
7aeb8b4cdf
Prometheus: Remove metadata endpoint (#53428)
* remove prom metadata endpoint until we have a fix for detecting versions and implementations

* fix linting issue
2022-08-08 18:37:12 -04:00
Seth Falco
a8666370be
fix: add promql placeholder text (#53321) 2022-08-08 19:11:45 +02:00
matt abrams
d69457d5e5
revise to match docs (#53354) 2022-08-08 18:49:54 +02:00
Brendan O'Handley
85db523dd5
Graphite Plugin: fix annotation migration regression with ref-ids (#53361)
* fix regression with ref-ids

* remove duplicate check for annotations in fix
2022-08-08 12:32:35 -04:00
eledobleefe
9930fd522d
Chore: convert DashboardGrid test to RTL (#53405) 2022-08-08 17:43:35 +02:00
kay delaney
1772bd4238
Chore: Reduce usage of v1 theme (#53245) 2022-08-08 16:37:06 +01:00
Gilles De Mey
f0594ebace
Alerting: Fix alert detail layout issue (#53256) 2022-08-08 16:57:34 +02:00
kay delaney
c2d3b45bf4
Chore: Make "why-did-you-render" a dynamic import (#53121) 2022-08-08 15:33:49 +01:00
Ashley Harrison
f1295e4bd0
Chore: Update version of @grafana/eslint-config (#53403)
* use let/const over var

* use new version of @grafana/eslint-config
2022-08-08 15:19:15 +01:00
Matias Chomicki
6f01930e9d
Chore: remove any from test (#53260) 2022-08-08 11:26:12 +02:00
Leo
64967325b2
Search: Migrated impressions to use dashboardUID (#53090)
* used dashboarduid in impressions

* handle scenario to convert all ids saved in storage to uids
2022-08-08 11:13:19 +02:00
ismail simsek
a40c1e227c
Prometheus: Use lezer-promql types instead of hardcoded strings (#53287)
* Prometheus: Use lezer-promql types instead of hardcoded strings

* Update comment line

* Removing more hardcoded values
2022-08-08 10:14:12 +02:00
Teddy Lin
42f9a6e67b
Azure Monitor: Add Network Insights Dashboard (#50362) 2022-08-08 09:38:23 +02:00
Krzysztof Dąbrowski
2dab7ad890
Login: allow basic users to reset password when LDAP or Auth Proxy is enabled (#52331) 2022-08-08 05:12:39 +00:00
Josh Hunt
4b4d546e32
Typed variables pt4: Remove generics from getVariable (#53017)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* use typescript/no-redeclare for compatibility with ts overloads

* remove generics from getVariable() and overload it to only return undefined based on arguments

* update usages of getVariable()

* Fix Interval variable options picker not working
2022-08-05 13:44:52 +01:00
Drew Slobodnjak
64721bfa94
Geomap: Do not show markers with empty coordinates (#53330)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-04 21:17:32 -04:00
lean.dev
e8e7b59bb0
Implementing OpenApi 3 specs (converted from Swagger 2) (#53243)
* Adding OpenApi target to makefile, to covert swagger spec into OpenAPI 3
* Adding endpoint to server swaggerui with new openapi3 specs
* Passing output file as parameter for OpenApi3 specs
* Implement workaround for missing host and prefix domain
2022-08-04 13:51:12 -03:00
Ivana Huckova
bf3fa4a445
Loki: Fix producing correct log volume query for query with comments (#53254)
* Loki: Remove comments from log volume query

* Update, add more tests

* Update based on suggestions

* Update

* Update tests to use it.each
2022-08-04 17:58:39 +02:00
Joao Silva
a84873a52b
i18n: Translates the Share Panel modal (#53297) 2022-08-04 16:43:49 +01:00
Gilles De Mey
ca2b97b095
Alerting: Adds support for editing group details for Grafana managed rules (#53120) 2022-08-04 11:39:28 -04:00
eledobleefe
c65b4c732f
Chore: Convert FolderSettingsPage.test.tsx to RTL (#53307) 2022-08-04 16:00:04 +02:00
Levente Balogh
2bf37a0d35
Data Connections: Remove the placeholder for Recorded Queries (#53230)
* feat(Data Connections): remove the Recorded Queries tab

* chore: remove the Recorded Queries from the nav
2022-08-04 06:39:06 +00:00
Drew Slobodnjak
fe0f193189
Geomap: Add measuring tools (#51608)
* Geomap: add measuring tools

* Add measure type selection

* Add controls and state to measure overlay

* Override tooltip mouse events when menu active

* Move measure tools to top right

* Lay groundwork for units and consolidate measuring

* Create measure vector layer class

* Improve styling to match other overlay controls

* Consolidate styling and use theme2

* Update unit language and add km2

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-03 16:19:30 -07:00
Adela Almasan
6c58ea66a9
Canvas: Fix inconsistent border behavior (#53262) 2022-08-03 16:23:08 -05:00
Adela Almasan
d54e55ea9a
Canvas: Fix duplicated option editors functionality (#53184)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-03 12:49:35 -07:00
Beto Muniz
4c02d072e3
Ensure that tooltip and legend have same parameters to calculate and display label equally (#53176) 2022-08-03 14:47:22 -03:00
gtk-grafana
f8d6730134
Metrics: Refactor use of lezer nodes to reference ID instead of name (parsing.ts) (#53177)
* Update public/app/plugins/datasource/prometheus/querybuilder/shared/parsingUtils.ts

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

* Since loki is still passing in node type strings, update the getAllByType shared function to allow string or number types

* add todo to remove string type when last datasource has migrated

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-03 09:57:29 -05:00
gtk-grafana
7f165729b0
remove string constant and use ids provided in lezer-promql library (#53180) 2022-08-03 09:56:32 -05:00
Sofia Papagiannaki
5fec6cc4f5
API: Fix snapshot responses (#52998)
* API: Fix response status when snapshots are not found

* API: Fix response status when snapshot key is empty

* Apply suggestions from code review
2022-08-03 10:31:23 -04:00
Matias Chomicki
97ce40577b
Loki: Fix types in querybuilder state test (#53223)
* Chore: add missing refId property to LokiQuery type

* Chore: fix types in Loki querybuilder state test

* Chore: remove unnecessary added property to LokiQuery
2022-08-03 15:59:33 +02:00
Ivana Huckova
3877964470
Loki: Remove some of any assertions from tests (#53114)
* Loki: Remove some of any assertions from tests

* Remove unnecessary as assertions
2022-08-03 15:57:38 +02:00
Grafana I18n Bot
1c1f72b1aa
I18n: Crowdin sync (#53222)
* New translations messages.po (French)

* New translations messages.po (French)
2022-08-03 09:49:53 -04:00
ismail simsek
87af08129c
Prometheus: Add tests for new explain section (#53182)
* Prometheus: Add tests for new explain section

* Update public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryBuilder.test.tsx

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

* Mock MonacoQueryFieldWrapper

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-03 15:48:16 +02:00
Jack Westbrook
d87bf30e9e
Build: Introduce ESM and Treeshaking to NPM package builds (#51517)
* Revert "Chore: Bump terser to fix security vulnerability (#53052)"

This reverts commit 7ae74d2a18.

* feat: use tsc and rollup directly with esbuild and publishConfig, files props

* refactor(grafana-data): fix isolatedModules re-export type error

* refactor(grafana-data): import paths from src not package name

* refactor(rollup): fix dts output.file

* chore(grafana-schema): delete dashboard_experimental.gen.ts - cannot work with isolatedModules

* refactor(grafana-e2e-selectors): fix export types isolatedModules error

* refactor(grafana-runtime): fix isolatedModules re-export type error

* refactor(grafana-ui): fix isolatedModules re-export type error

* feat(grafana-ui): use named imports for treeshaking

* refactor(grafana-ui): use named imports for treeshaking

* feat: react and react-dom as peerDeps for packages

* feat(grafana-ui): emotion packages as peerDeps

* feat(grafana-e2e): use tsc, rollup, esbuild for bundling

* chore(packages): clean up redundant dependencies

* chore(toolkit): deprecate unused package:build task

* chore(schema): put back dashboard_experimental and exclude to prevent isolatedModules error

* docs(packages): update readme

* chore(storybook): disable isolatedModules for builds

* chore: relax peerDeps for emotion and react

* revert(grafana-ui): put @emotion dependencies back

* refactor: replace relative package imports with package name

* build(packages): set emitDeclaration false for typecheck scripts to work

* test(publicdashboarddatasource): move test next to implementation. try to appease the betterer gods

* chore(storybook): override ts-node config for storybook compilation

* refactor(grafana-data): use ternary so babel doesnt complain about expecting flow types

* chore(toolkit): prefer files and publishConfig package.json props over copying

* build(npm): remove --contents dist arg from publishing commands

* chore(packages): introduce sideEffects prop to package.json to hint package can be treeshaken

* chore(packages): remove redundant index.js files

* feat(packages): set publishConfig.access to public

* feat(packages): use yarn berry and npm for packaging and publishing

* refactor(packages): simplify rollup configs

* chore(schema): add comment explaining need to exclude dashboard_experimental

* revert(toolkit): put back clean to prevent cli failures

* ci(packages): run packages:pack before a canary publish

* chore(gitignore): add npm-artifacts directory to ignore list

* test(publicdashboarddatasource): fix module mocking

* chore(packages): delete package.tgz when running clean

* chore(grafana-data): move dependencies from devDeps to prevent build resolution errors
2022-08-03 15:47:09 +02:00
Giordano Ricci
09c4dbdb9f
Correlations: Add UpdateCorrelation HTTP API (#52444)
* Correlations: add UpdateCorrelation HTTP API

* handle correlation not found

* add tests

* fix lint errors

* add bad request to API spec

* change casing

* fix casing in docs

* fix tests

* update spec
2022-08-03 14:18:51 +01:00
Artur Wierzbicki
f61a97a0ab
Search: rename remove search constraints (#53190) 2022-08-03 16:44:51 +04:00
Mihály Gyöngyösi
dc775c7577
RolePicker: Fix RolePicker menu positioning (#53201)
Fixes #52800
2022-08-03 14:35:51 +02:00
Josh Hunt
c7d3fec515
Typed variables pt3: Type VariableState with TypedVariableModel (#53015)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* undo whatever changes i did to swagger spec
2022-08-03 12:38:59 +01:00
Josh Hunt
8f81c4d2ce
Chore: reformat swagger specs, again (#53205) 2022-08-03 12:18:52 +01:00
Andrey Smirnov
fc9577b76d
MegaMenu: Fix broken hamburger toggle (#52770)
* MegaMenu: Fix broken hamburger toggle

* oops

* MegaMenu: move NavBarToggle to FocusScope
2022-08-03 12:08:39 +01:00
Matias Chomicki
7cf2b68e0a
Loki: Remove hardcoded values for LokiOperationId (#53168) 2022-08-03 12:50:43 +02:00
Josh Hunt
805203dba9
Chore: Prettier ignore api-merged & api-spec swagger api specs (#53170)
* Prettier ignore api-merged & api-spec swagger api specs

* add enterprise
2022-08-03 11:41:31 +01:00
user10x
fb00a11b5f
rename table_model.ts => TableModel.ts (#51659)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-03 10:33:13 +00:00
J-Loup
2054414d37
Frontend: Make datalinks work with status history and state timeline (#50226)
* fix datalinks for state and status panels

* Add close button on tooltip

* fix links from all series displayed in tooltip

* Allow annotations creation, tweak UI

* Nits

* Remove unused property

* fix returns made from review

* setupUPlotConfig renamed to addTooltipSupport

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
2022-08-03 11:58:01 +03:00
Harry Tennent
c56aae6f63
Docs: update annotations API docs to include required field (#52644)
* Update annotations.md

A minor change to include the required fields when creating a new annotation via the annotations API. The error message when fields are missing is not descriptive and there is no indication in the current documentation (that I can see anyway) that would indicate these fields are required.

* Update annotations.md

Update required json body fields to only include fields that are actually required.

* Add required field in Swagger

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-08-03 08:01:25 +00:00
ismail simsek
920ee16b54
Update LokiQueryCodeEditor test title (#53181)
* Update LokiQueryCodeEditor test title

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryCodeEditor.test.tsx
2022-08-03 09:59:02 +02:00
Gilles De Mey
b7e11358cf
Alerting: Fix crash when viewing alert group without interval (#53166) 2022-08-03 08:22:52 +02:00
Scott Lepper
fe7add0bc6
ref experimental query editor (#53061)
* ref experimental query editor
2022-08-02 11:44:06 -04:00
Ivana Huckova
5009c330ca
Loki: Add tests for explain section in builder and code editor (#53113)
* Loki: Add tests for new explain section

* Update any assertions
2022-08-02 17:20:22 +02:00
idafurjes
fab6c38c95
Chore: Split get user by ID (#52442)
* Remove user from preferences, stars, orguser, team member

* Fix lint

* Add Delete user from org and dashboard acl

* Delete user from user auth

* Add DeleteUser to quota

* Add test files and adjust user auth store

* Rename package in wire for user auth

* Import Quota Service interface in other services

* do the same in tests

* fix lint tests

* Fix tests

* Add some tests

* Rename InsertUser and DeleteUser to InsertOrgUser and DeleteOrgUser

* Rename DeleteUser to DeleteByUser in quota

* changing a method name in few additional places

* Fix in other places

* Fix lint

* Fix tests

* Chore: Split Delete User method

* Add fakes for userauth

* Add mock for access control Delete User permossion, use interface

* Use interface for ream guardian

* Add simple fake for dashboard acl

* Add go routines, clean up, use interfaces

* fix lint

* Update pkg/services/user/userimpl/user_test.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/services/user/userimpl/user_test.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/services/user/userimpl/user_test.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Split get user by ID

* Use new method in api

* Add tests

* Aplly emthod in auth info service

* Fix lint and some tests

* Fix get user by ID

* Fix lint
Remove unused fakes

* Use split get user id in admin users

* Use GetbyID in cli commands

* Clean up after merge

* Remove commented out code

* Clena up imports

* add back )

* Fix wire generation for runner after merge with main

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-08-02 16:58:05 +02:00
Andres Martinez Gotor
43955bdebd
Azure Monitor: Early error if the client secret is not set (#53106) 2022-08-02 16:53:05 +02:00
kay delaney
b9598a08a4
Chore: Enable React strict mode (#53126) 2022-08-02 15:27:49 +01:00
Josh Hunt
1a683e53c5
Typed variables pt2: Use type-accurate mock variables in tests (#52987)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up

* Chore: Use type-accurate mock variables in tests

* make createBaseVariableModel take the variable type
2022-08-02 14:47:41 +01:00
Yuriy Tseretyan
718620c197
Alerting: Update forking request handlers to use the same errors (#52965)
* generalize error handling in forking request handlers
* remove MatchesBackend and change test to test Can
* add 404 to route specs
* change backendTypeByUID to getDatasourceByUID of expected type
* use common errors in api testing
* handle 401 in errorToResponse
* replace backend type error with "unexpected datasource type"
* update swagger spec
2022-08-02 09:33:59 -04:00
Grafana I18n Bot
db08ece3db
I18n: Crowdin sync (#53104)
* New translations messages.po (French)

* New translations messages.po (Spanish)
2022-08-02 12:14:07 +01:00
Josh Hunt
4323e12588
I18n: Add X-Crowdin-SourceKey to messages.po files (#53102)
* add X-Crowdin-SourceKey to messages.po files

* remove previous fake translation
2022-08-02 06:54:24 -04:00
Josh Hunt
eaf6aea98f
Typed variables pt1: Use discriminated union for variable model (#52981)
* wip

* make diff easier to read

* Update template_srv getVariables to return new TypedVariableModel

* update VariableType to use the type from TypedVariableModel

* tidy things up
2022-08-02 10:15:25 +01:00
Ashley Harrison
4d47d7085b
don't show dashboards or starred items in navbar when unauthenticated (#53051) 2022-08-02 09:57:32 +01:00
Nathan Marrs
c00c8db13c
Canvas: Unable to add fixed text in textbox element #53080 2022-08-01 20:32:41 -05:00
Adela Almasan
5797fbc0b2
Canvas: Cleanup default elements (#52958) 2022-08-01 15:34:05 -05:00
Adela Almasan
f2436b15bf
Canvas - Clear button bugfix (#53068) 2022-08-01 14:40:01 -05:00
Nathan Marrs
7b249d19b2
Canvas: Inline element settings (#52771) 2022-08-01 12:22:13 -05:00
Andres Martinez Gotor
a4f56446ee
Azure Monitor: Restore Metrics query parameters: subscription, resourceGroup, metricNamespace and resourceName (#52897)
* Azure Monitor: (Components) deprecate ResourceURI (#52982)
2022-08-01 17:48:49 +02:00
Victor Marin
2948bf01dc
TimeSeriesPanel: Tooltip works properly when changing modes (#52876)
* TimeSeriesPanel: Tooltip works properly when changing modes

* TooltipPlugin respects display mode

* Pass options to TimeSeriesPanel props
2022-08-01 18:12:40 +03:00
Ezequiel Victorero
e0d71f02b1
Public Dashboards: add e2e tests for public dashboards (#52970) 2022-08-01 11:20:49 -03:00
Isabella Siu
74f0c3dbd4
CloudWatch: the variable editor should accept custom values (#52955) 2022-08-01 10:07:27 -04:00
Ashley Harrison
f64b241d32
Navigation: split logic, reenable unit test, copy whole node to prevent recursion error (#53033)
* split logic, reenable unit test, copy whole node to prevent recursion error

* remove double assignment
2022-08-01 14:47:52 +01:00
Konrad Lalik
f877f79bbc
Alerting: Show evaluation interval global limit warning (#52942)
Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-08-01 15:01:14 +02:00
Jeff Levin
58ff0f07b4
public dashboards: check to see if dashboard state is different from persisted on save (#52008)
* public dashboards: check to see if dashboard state is different from persisted on save

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2022-08-01 09:35:09 -03:00
Ashley Harrison
6781041860
Import: prevent recursion blowup in redux + reintroduce import e2e test (#52985)
* prevent recursion blowup in redux, attempt to reintroduce import e2e test

* try importing json like this instead?

* need the panel validation

* Update text so it finds Panel data instead of Dataframe JSON

* skip test for now
2022-08-01 12:53:31 +01:00
Konrad Lalik
54f2c056f5
Alerting: Configure alert manager data source as an external AM (#52081)
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-08-01 10:20:43 +02:00
Leo
1fc9f6f1c6
Annotations: Migrate dashboardId to dashboardUID (#52588)
* Annotations: replaced dashboardId with dashboardUID when fetching annotations

* Annotations: Replaced dashboardID with dashboardUID when adding and updating annotations

* Annotations: Used dashboardUID for PanelChrome related methods

* Annotations: Used dashboarduid in annolistpanel

* Annotations: Used dashboardUID in graph plugin

* used boolean in canEditDashboard
2022-08-01 09:21:41 +02:00
Ryan McKinley
a51d3dad4f
Loki: support template variables when running stream (live) mode (#52973) 2022-07-29 08:41:11 -07:00
Ivan Ortega Alba
c9d50ddaaa
Search: Track user searches and results interactions (#52949) 2022-07-29 11:30:13 -04:00
Josh Hunt
06d78ea904
Dashboards: Disable variable pickers for snapshots (#52827)
* user essentials mob! 🔱

lastFile:public/app/features/variables/textbox/TextBoxVariablePicker.tsx

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/variables/adhoc/picker/AdHocFilter.tsx

* finish up disabling variables in snapshots

* remove accident

* use theme.spacing instead of the v1 shim

Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Leodegario Pasakdal <leodegario.pasakdal@grafana.com>
2022-07-29 16:29:55 +01:00
Torkel Ödegaard
d3323f870e
AppChrome: Fix race condition when updating chrome state on route changed (#52694) 2022-07-29 17:16:14 +02:00
Ivana Huckova
b8e4c2abeb
Loki: Move explain section to builder mode (#52879)
* Loki: Move explain to builder and code mode

* Update

* Update transition

* Fix tests

* Fix tests

* Prometheus: Move explain section to builder mode (#52935)

* Prometheus: Move explain section to builder mode

* Show explain switch before raw query switch

* Store explain switch value in localstorage

* Make explain available for code mode too

* Introduce useFlag hook for query editor switches

* Remove Explain mode

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-07-29 17:09:43 +02:00
Ryan McKinley
fbd289c19c
Search: add starred filter and swap button order (#52184)
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-07-29 16:34:17 +02:00
Ivana Huckova
1eb3513781
Prometheus: Fix adding of multiple values for regex operator (#52978)
* Prometheus, Loki: Fix adding of multiple values for regex operator

* Refactor
2022-07-29 15:27:19 +02:00
Gábor Farkas
ba76f9b580
elastic: eliminate react warning (#52934) 2022-07-29 12:24:33 +00:00
Victor Marin
e88e3482e0
Tooltip mode works in BarChart panel (#52941) 2022-07-29 15:11:42 +03:00
Josh Hunt
b223c65a6c
Chore: remove unnessisary type assertion from GrafanaContext (#52979) 2022-07-29 11:48:52 +01:00
Ryan McKinley
197acd73c0
Storage: support git + github backed roots (#52192) 2022-07-28 23:26:44 -07:00
Drew Slobodnjak
e2044cde13
Canvas: Enable ability to instantly select and drag an element (#52861)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-07-28 16:55:31 -07:00
Leon Sorokin
7c40257baf
BarChart: fix top y tick clipping when x labels are rotated (#52964) 2022-07-28 16:51:37 -05:00
mingozh
11c79cd6da
BarchartPanel: Fix color from thresholds show incorrectly (#52038)
Signed-off-by:  Kyle Cunningham <kyle.cunningham@grafana.com>
2022-07-28 15:56:12 -05:00
Adam Simpson
165efcd9cc
CloudMonitor: Consolidate editor rows (#52675)
* consolidate project, metric, and service

* CloudMonitor: make AlignmentPeriodLabel a tooltip

alignmentPeriodLabel now returns a string instead of component. This is
because as a <label> it would cause wrapping issues when the screen size
would change. It also isn't essential information _unless_ the user is
using a template variable for the Alignment period.

* refactor: remove any hard-coded widths for auto

* chore: use newly moved experimental comps in UI
2022-07-28 17:47:01 +00:00
jcolladokuri
0acf98db5c
Azure Monitor: Add new dashboard with geo map for app insights test availability (#52494) 2022-07-28 16:15:36 +02:00
ismail simsek
2f9636e698
InfluxDB: move datasource health check to backend (#52668)
* Move datasource health check to backend

* Introduce healthcheck unit tests

* Remove unused method
2022-07-28 12:06:09 +02:00
Leo
8d6d5f2fdc
SearchV2: Add minor UX improvements to Search pages (#52833)
* Search: display dash for panel and folder when sort type is view or error

* Search: Disabled panel checkbox in folrder view
2022-07-28 11:17:47 +02:00
Gilles De Mey
9332fb65a9
Alerting: Allow testing provisioned contact points (#52824) 2022-07-28 10:03:28 +02:00
Agnès Toulet
44cc9132e3
RBAC: Add RBAC for query caching (#52113)
* start adding RBAC for query caching

* update with scope

Co-authored-by: Leonard Gram <leo@xlson.com>
2022-07-28 09:49:58 +02:00
Leon Sorokin
8ee0555bac
TimeSeries: Implement auto decimals for y axes (#52912) 2022-07-28 02:58:42 -04:00
Ryan McKinley
8a2d40c2bc
Canvas: Add all options to inline editor (#52834)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-07-27 19:20:39 -04:00
Ryan McKinley
cb3f7ccd09
Transformers: remove config from "join by labels" source fields (#52850) 2022-07-27 13:52:38 -07:00
Brendan O'Handley
6c3efb0c88
Graphite Plugin: Remove angular dependencies for graphite annotations (#52261)
* fix merge conflict

* fix betterer

* handle new creating annotations

* add h5 'or' tag to annotation editor

* fix annotation regression looking for tags before target

* remove angular annotation partial

* change ann tags type to string[] and use TagsInput to create ann

* remove GraphiteEventsType, return annotations targets setting 'textEditor': true

* fix yarn typecheck errors

* add dateTime for yarn fix to tests

* fix incorrect merge conflict resolution

* fix betterer

* making changes for PR approval resolutions

* fix prettier issue

* fix prettier
2022-07-27 16:27:42 -04:00
Alyssa Bull
6ec9a7682d
Various Panels: Add ability to toggle legend with keyboard shortcut (#52241) 2022-07-27 13:39:55 -06:00
Ieva
0d324e931d
Access Control: Allow org admins to invite new users (#52894)
* allow org admins to invite new users to Grafana

* doc updates

* fix test
2022-07-27 17:37:27 +01:00
Kristina
6ecc420534
Revert "Explore: Add Mixed Datasource (#51605)" (#52889)
This reverts commit e2258120e7.
2022-07-27 10:17:31 -05:00
Joey Tawadrous
dc0ef2913e
Tempo: Set APM table default span kind (#52851)
* Add span kind server to query

* Updated test
2022-07-27 15:48:09 +01:00
Kristina
e2258120e7
Explore: Add Mixed Datasource (#51605)
* Toggle on the mixed mode option

* Ensure switching to mixed gives existing query prev datasource

* WIP - Populate datasource when switching between mixed and not

* WIP - handle change from mixed

* Remove preimport filter, refine filter to work for queries

* WIP debugging datasource transition

* Ensure creating a new query gets target data source if switching with no matches between

* Add mixed datasource to rich history display

* Cleanup console logs, add relevant comments

* Add feature toggle for mixed datasource

* Fix Wrapper tests

* Fix tests!

* Fix test types and add feature tracking

* Remove unnecessary default, remove explore/mixed workarounds for D2E

* Move display text logic to mixed datasource file

* Add in the default query parameters to a generated empty query

* Condense some code

* Apply suggestions from code review

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-07-27 09:40:59 -05:00
Jo
c2d3c90bc8
Auth: Implement Token URL JWT Auth (#52662)
* Auth: check of auth_token in url and resolve user if present

* check if auth_token is passed in url

* Auth: Pass auth_token for request if present in path

* no need to decode token in index

* temp

* use loadURLToken and set authorization header

* cache token in memory and strip it from url

* Use loadURLToken

* Keep token in url

* strip sensitive query strings from url used by context logger

* adapt login by url to jwt token

* add jwt iframe devenv

* add jwt iframe devenv instructions

* add access note

* add test for cleaning request

* ensure jwt token is not carried into handlers

* do not reshuffle queries, might be important

* add correct db dump location

* prefer set token instead of cached token

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-07-27 16:10:47 +02:00
Sofia Papagiannaki
7ba076de10
Chore: Move swagger definitions to the handlers (#52643) 2022-07-27 09:54:37 -04:00
Andres Martinez Gotor
7505cf418b
Azure Monitor: Deprecate metricDefinition (#52793) 2022-07-27 15:26:32 +02:00
Taewoo K
8b6b82f239
PromQuery: Show exemplars in collapsed view (#52767)
* add Examplars: false in collapsed view

* assign defaut value - false to switch

* add 3 tests for 3 possible cases

Co-authored-by: Taewoo Kim <taewookim@Taewoos-MacBook-Pro.local>
2022-07-27 09:08:52 -04:00