Commit Graph

494 Commits

Author SHA1 Message Date
Marcus Andersson
c95b530502
DataSource: Adding possibility to hide queries from the inspector (#54892)
* adding the possibility to hide queries when they are executed via the DataSourceWithBackend.query
2022-09-13 13:27:16 +02:00
kay delaney
4c7732ad17
Chore: Upgrade Typescript to 4.8.2 (#54901)
* Chore: Upgrade typescript to 4.8.2
2022-09-09 16:17:58 +01:00
renovate[bot]
ad19f018a9
Update dependency esbuild to v0.15.7 (#54928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-09 10:56:49 +01:00
Torkel Ödegaard
11de1dfe40
TopNav: Plugin page layouts / information architecture (#53174)
* Change nav structure when topnav is enable to do initial tests with new information architecture

* Support for nested sections

* Updated

* sentance case

* Progress on plugin challange

* Rewrite to functional component

* Progress

* Updates

* Progress

* Progress on things

* missing file

* Fixing issue with runtime, need to use setter way to set component exposed via runtime

* Move PageLayoutType to grafana/data

* Fixing breadcrumb issue, adding more tests

* reverted backend change

* fix recursive issue with cleanup
2022-09-05 14:56:08 +02:00
Timur Olzhabayev
b5b41988cf
Docs: Deprecating packages_api and removing it from our pipelines (#54473) 2022-09-01 18:15:44 +02:00
Giordano Ricci
26524e3ff1
GrafanaUI: Fix styles for invalid selects & DataSourcePicker (#53476)
* GrafanaUI: fix styles for invalid select & DataSourcePicker

* Apply suggestions from code review

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* fix focus issues & tests

* remove unused import

* TypeScript work in progress

* Move react select props to types.ts

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
2022-08-26 13:48:51 +01:00
renovate[bot]
6f72c4d10d
Update dependency @testing-library/user-event to v14.4.3 (#54292)
* Update dependency @testing-library/user-event to v14.4.3

* use ReturnType instead of using a nested import

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-26 13:30:34 +01:00
Karl Persson
4ff4aaab23
RBAC: Remove builtin role code (#53767)
* remove rbacBuiltInRoleAssignmentEnabled from frontendsettings

* RBAC: Remove RBACBuiltInRoleAssignmentEnabled

* RBAC: Remove code for builtin role

* RolePicker: Remove unused prop

* RolePicker: Rename builtinRole to basicRole

* RolePicker: Rename onBuiltinRoleChange to onBasicRoleChange

* RolePicker: Rename properties
2022-08-18 12:25:37 +02: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
Andres Martinez Gotor
a31d96d20a
Prometheus: Promote Azure auth flag to configuration (#53447) 2022-08-11 16:12:57 +02:00
owensmallwood
dc23643bee
Public Dashboards: Usage Insights (#52768) 2022-08-10 14:14:48 -03:00
kay delaney
1772bd4238
Chore: Reduce usage of v1 theme (#53245) 2022-08-08 16:37:06 +01: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
Ieva
67d817ff48
update versions (#53167) 2022-08-02 11:55:46 -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
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
renovate[bot]
a4355bd6e4
Update Monthly patch updates (#52885)
* Update Monthly patch updates

* ignore updates to lezer-logql and @types/slate

* update lockfile

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-27 16:02:48 +01: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
renovate[bot]
290b2e1ed0
Update grafana monorepo to v0.4.0 (#52805)
* Update grafana monorepo to v0.4.0

* update mock

* actually mock...

* typescript is hard...

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-27 09:21:13 +01:00
renovate[bot]
4d7e26abfd
Update dependency rollup to v2.77.1 (#52786)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-26 11:33:24 +01:00
kay delaney
c35c3abaa3
Chore: Bump typescript version to 4.7.4 (#52325)
* Chore: Bump typescript version to 4.7.4

* Bump related packages

* Revert eslint-plugin-react upgrade
2022-07-25 13:47:59 +01:00
renovate[bot]
044d8315de
Update dependency @testing-library/user-event to v14.3.0 (#52690)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-25 10:11:42 +01:00
Torkel Ödegaard
7947629f82
TopNav: Make dashboard toolbar actions work in new top nav (#51950)
* Initial work on new toolbar button

* Minor step

* Small progress

* Minor progress

* Minor fix

* removed console.log

* Removing stuff we don't need yet
2022-07-14 20:34:00 +02:00
owensmallwood
2aff83d4e1
Public Dashboards Bug: Permissions error on panel when using mixed datasource with Enterprise (#51930)
Fixes pubdash bug for enterprise when pubdash panel uses a mixed datasource
2022-07-07 15:58:11 -06:00
Torkel Ödegaard
935334cbda
Scene: POC for a future dashboard model and runtime (#50980)
* Playing around

* This is getting interesting

* Updates

* Updated

* Observable experiments

* This is tricky

* VizPanel panel renderer

* New model progress

* Maybe this could be something

* Updated

* Rename

* updates

* Updated

* Query runners? not sure

* Updated

* updates

* flex box layout starting to work

* Testing

* Tested an action

* Parent context sort of working

* Progress

* Progress

* Updated

* Starting to work

* Things are working

* Scene list, nested scene demo

* Progress on repeats

* Moving things

* Pretty big progress

* More things working

* Great progress

* Progress

* Name changing

* Minor tweaks

* Simplified sizing

* Move toggleDirection to SceneFlexLayout

* add feature flag (#50990)

* removed new useObservable hook

* Rename folder and feature toggle to scenes

* Caching scenes so you can go back to another scene without having to re-query data

* Fix issue with subs on re-mount

* Fixing test

* Added SceneCanvasText to play around with layout elements with size based on content

* Scene: Edit mode and component edit wrapper that handles selection  (#51078)

* First step for scene variables

* Started playing around with a scene edit mode

* Better way to set component

* Progress on edit mode

* Update

* Progress on edit mode

* Progress on editor

* Progress on editor

* Updates

* More working

* Progress

* Minor update

* removed unnessary file

* Moving things around

* Updated

* Making time range separate from time picker

* minor rename of methods

* The most basic variable start

* Minor renames

* Fixed interpolate issue if not found at closest level

* An embryo of event model and url sync handling

* Update url sync types

* Removed unnessary any type arg

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-07-07 08:53:02 +02:00
owensmallwood
0b4af38bfa
Public Dashboards: Query Caching (#51403)
* passes id and uid to PublicDashboardDatasource

* betterer results

* If for a public dashboard, return the PublicDashboardDataSource first or else getDatasourceSrv.get() will fail bc of no authed user.

Added some unit tests for resolving the uid from the many possible datasource types.

* updates betterer

* Exports DashboardService. Adds method to DashboardService to build anonymous user for use with public dashboards where there is no authed user. Adds method on dashboard_queries to get all dashboard uids from a dashboard.

* refactors to get unique datasource uids

* Adds tests for getting all unique datasource uids off a dashboard

* adds test for building anonymous user with read and query actions that are scoped to each datasource uid in the dashboard

* updates casing of DashboardService

* updates test case to have additional panel with a different datasource

* gives default interval to public dashboard data source
2022-07-06 12:42:39 -06:00
Ryan McKinley
281ed419a8
Chore: add generics to backendSrv (#51606) 2022-06-30 14:34:23 -04:00
Michael Mandrus
7ef21662f9
Plugins: Show that Secrets Manager Plugin is active in the UI (#50953)
* add special handling on the plugin gathering side to check whether secrets manager plugins are enabled or not

* show disabled badge in front end if the plugin is not enabled

* Only show error in disabled badge hover if one is present (otherwise it shows "undefined")

* refactor to make use of fields already available in the DTO

* fix typo

* if there is no error returned for the plugin, just show 'disabled'

* fix typo

* Update public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx

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

* Update frontendsettings.go

add clarifying comment

* fix unit test

* rework task to use new frontend property combined with plugin type to determine if the plugin should be disabled

* Update helpers.test.ts

revert test change

* fix unit test

* bogus commit to trigger precommit

* undo commit

* run precommit manually

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 08:48:23 -04:00
Timur Olzhabayev
7c886fb6f9
Frontend Logging: Integrate grafana javascript agent (#50801)
Add Grafana Javascript Agent integration to Grafana
2022-06-28 03:25:30 -04:00
Jeff Levin
d076bedb5e
public dashboards: finalize db schema & v1 feature complete (#50467)
This PR completes public dashboards v1 functionality and simplifies public dashboard conventions. It exists as a large PR so that we are not making constant changes to the database schema.

models.PublicDashboardConfig model replaced with models.PublicDashboard directly
dashboard_public_config table renamed to dashboard_public
models.Dashboard.IsPublic removed from the dashboard and replaced with models.PublicDashboard.isEnabled
Routing now uses a uuid v4 as an access token for viewing a public dashboard anonymously, PublicDashboard.Uid only used as database identifier
Frontend utilizes uuid for auth'd operations and access token for anonymous access
Default to time range defined on dashboard when viewing public dashboard
Add audit fields to public dashboard

Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>, Ezequiel Victorero <ezequiel.victorero@grafana.com>, Jesse Weaver <jesse.weaver@grafana.com>
2022-06-22 13:58:52 -08:00
Josh Hunt
26f6b91fd9
Chore: Type GA and Rudderstack analytics config (#51197)
* Chore: Type GA and Rudderstack analytics config

* rely on implicit unknown
2022-06-22 09:27:55 +01:00
Josh Hunt
98132fc7dc
Remove as any from requireActual usage (#51182) 2022-06-21 17:48:38 +01:00
Torkel Ödegaard
3a586a6053
PanelRenderer: Improves PanelRenderer performance (#51092)
* PanelRenderer: Improves PanelRenderer performance

* Minor refactor

* remove old func
2022-06-20 14:41:39 +02:00
renovate[bot]
dd98107201
Update dependency rollup to v2.75.6 (#50770)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-15 10:09:32 +01:00
Ashley Harrison
803473f479
Chore: Enable useUnknownInCatchVariables for stricter type checking in catch blocks (#50591)
* wrap a bunch of errors

* wrap more things!

* fix up some unit tests

* wrap more errors

* tiny bit of tidy up
2022-06-15 08:59:29 +01:00
Dimitris Sotirakis
443083c7df
Bump version: Update main branch version to 9.1.0-pre (#50803)
* Update main branch version to 9.1.0-pre

* Update yarn.lock
2022-06-14 09:06:14 -07:00
owensmallwood
1bb2d2599c
Public Dashboards: Pubdash panels get data from pubdash api (#50556)
* Public dashboard query API

* Create new API on service for building metric request

* Flesh out testing, implement BuildPublicDashboardMetricRequest

* Test for errors and missing panels

* WIP: Test for multiple datasources

* Refactor tests, add supporting code for multiple datasources

* Gets the panel data from the pubdash query api

* Adds tests to make sure we get the correct api url from retrieving panel data

* Public dashboard query API

* Create new API on service for building metric request

* Flesh out testing, implement BuildPublicDashboardMetricRequest

* Test for errors and missing panels

* WIP: Test for multiple datasources

* Refactor tests, add supporting code for multiple datasources

* Handle queries from multiple datasources

* Replace dashboard time range with pubdash time range settings

* Fix comments from review, build failure

* removes changes to DataSourceWithBackend.ts regarding getting the pubdash panel query url. Going to do this in a new class, PublicDashboardDataSource.ts

* Include pubdash Uid in dashboard meta

* Creates new PublicDashboardDataSource.ts and adds test

* Passes pubdash uid down to PanelQueryRunner.ts to a PublicDashboardDatasource can be chosen when were looking at a public dashboard

* removes comment

* checks for error when unmarshalling json

* Only replace dashboard time settings with pubdash time settings when pubdash time settings exist

* formatting and added comment

Co-authored-by: Jesse Weaver <jesse.weaver@grafana.com>
Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-06-13 18:03:43 -06:00
Ryan McKinley
fdf67276ea
FeatureToggles: Support changing feature toggles with URL parameters (#50275) 2022-06-09 11:42:38 +02:00
renovate[bot]
0c32dec9e2
Update dependency @types/jest to v28 (#49249)
* Update dependency @types/jest to v28

* modern is now default!

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-06 14:45:02 +01:00
Sriram
a3071b7797
Expression: Filter query, mixed mode fixes and panel error message (#50218)
* implement filterQuery to support query.hide

* Fixed - expression ds name in mixed mode

* Execute expression query on blur

* show actual error message when ds return Query data error
2022-06-06 11:51:23 +01:00
owensmallwood
cfdea1ee30
PublicDashboards: Frontend routing for public dashboards (#48834)
* add isPublic to dashboard

* refactor routes to use route group and add placeholder method for sharing apii

* add sharing pane and utils for public dashboard config to sharing modal

* Sharing modal now persists data through the api

* moves ShareDashboard endpoint to new file and starts adding tests

* generates mocks. Adds tests for public dashboard feature flag

* Adds ability to pass in array of features to enable for the test

* test to update public flag on dashboard WIP

* Adds mock for SaveDashboardSharingConfig

* Fixes tests. Had to use FakeDashboardService

* Adds React tests for public dashboards toggle

* removes semicolons

* refactors SharePublic component to use hooks

* rename from `share publicly` to `public dashboard config`

* checkpoint. debugging tests. need to verify name changes

* checkpoint. test bugs fixed. need to finish returning proper response codes

* finish renaming. fix test

* Update pkg/api/api.go

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

* update backend url

* rename internal objects and commands. fix configuration modal labels

* add endpoint for retrieving public dashboard configuration and populate the frontend state from it

* add test for dashboardCanBePublic

* adds backend routes

* copy DashboardPage component into component for public dashboards. WIP

* adds react routes, and doesnt render main nav bar when viewing a public route

* removes extra react route from testing

* updates component name

* Wrap the original dashboard component so we can pass props relevant to public dashboards, turn kiosk mode on/off, etc

* Wraps DashboardPage in PublicDashboardPage component. DashboardPage gets rendered in kiosk mode when public prop is passed.

* removes commented out code from exploratory work

* Makes public dashboard routes require no auth

* extracts helper to own util file to check if were viewing a public page

* Hides panel dropdown when its being viewed publicly

* formatting

* use function from utils file for determining if publicly viewed. If public, hides app notifications, searchwrapper, and commandpalette.

* adds unit tests for util function used to see if page is being viewed publicly

* cant added annotations to panel when being publicly viewed

* removes useless comment

* hides backend and frontend pubdash routes behind feature flag

* consider feature flag when checking url path to see if on public dashboard

* renames function

* still render app notifications when in public view

* Extract pubdash route logic into own file

* fixes failing tests

* Determines path using location locationUtils. This covers the case when grafana is being hosted on a subpath. Updates tests.

* renames pubdash web route to be more understandable

* rename route

* fixes failing test

* fixes failing test. Needed to update pubdash urls

* sets flag on grafana boot config for if viewing public dashboard. Removes hacky check that looks at the url

* fixes failing tests. Uses config to determine if viewing public dashboard

* renders the blue panel timeInfo on public dashboard panel

* Extracts conditional logic for rendering components out into their own functions

* removes publicDashboardView check, and uses dashboard meta instead

* the timeInfo is always displayed on the panel

* After fetch of public dashboard dto, the meta isPublic flag gets set and used to determine if viewing public dashboard for child components. Fixes tests for PanelHeader.

* Fixes failing test. Needed to add isPublic flag to dashboard meta.

Co-authored-by: Jeff Levin <jeff@levinology.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-02 14:57:55 -06:00
Ashley Harrison
216565aa00
Chore: Upgrade to jest 28 (#49679)
* bump packages to jest 28

* changes needed for jest 28

* map react-colorful as well

* use customResolver and fix last test

* don't need react-colorful installed if we're using a custom resolver

* return correct thing in mock

* remove watchPathIgnorePatterns since we don't have node_modules anymore
2022-05-30 14:14:34 +01:00
renovate[bot]
be7de1041a
Update Monthly patch updates (#49257)
* Update Monthly patch updates

* remove @types/slate update and run prettier

* fix @types/slate resolution

* lockfile update

* more fixes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-20 13:07:07 +01:00
Gabriel MABILLE
689f51599a
AccessControl: Use RBACBuiltInRoleAssignmentEnabled in the frontend instead of FeatureToggle (#49261)
* AccessControl: Frontend changes to basic role enablement
2022-05-20 06:53:28 +00:00
renovate[bot]
258e48678a
Update dependency rollup to v2.74.0 (#49215)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 10:13:16 +01:00
renovate[bot]
eecee16b66
Update dependency @rollup/plugin-commonjs to v22 (#49172)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 16:16:55 +01:00
renovate[bot]
7ac9a0a087
Update dependency rollup to v2.73.0 (#49152)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 13:04:21 +01:00
kay delaney
de3e981985
Chore: Upgrade typescript to 4.6.4 (#49016) 2022-05-17 12:08:10 +01:00
renovate[bot]
d477394d6c
Update dependency @testing-library/user-event to v14.2.0 (#49060)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:25:40 +01:00
Ieva
f256f625d8
AccessControl: Enable RBAC by default (#48813)
* Add RBAC section to settings

* Default to RBAC enabled settings to true

* Update tests to respect RBAC

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-16 12:45:41 +02:00
Ashley Harrison
06d3c27bc1
Select: Portal menu by default (#48176)
* Remove menuShouldPortal from all <Select /> components

* fix unit tests

* leave menuShouldPortal as an escape hatch

* Fix import order
2022-05-04 15:12:59 +01:00
renovate[bot]
46e53cf42c
Update dependency @rollup/plugin-node-resolve to v13.3.0 (#48645)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 17:17:55 +01:00
Peter Holmberg
69ee917c89
SSE: Add constant for data source name (#48443)
* add property for expressions datasource name

* remove console log
2022-05-02 11:42:20 +02:00
Ivana Huckova
98161be9ad
Query history: Pass config to frontend and add missing documentation (#48204)
* Query history: Pass config to frontend and add missing documentation

* Update
2022-04-26 11:15:08 +02:00
Josh Hunt
3c6e0e8ef8
Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
owensmallwood
9a4bd1f2d4
Usage insights query caching (#47893)
* Updates queryResponse tests to include new cachedResponse bool

* Adds cachedResponse bool to QueryResponse

* Adds tests to assert the correct query counts (totalQueries and cachedQueries) are dispatched for data-requests

* Adds totalQueries and cachedQueries counts to the data-request events

* Adds new metrics and their descriptions to docs

* uses more descriptive variable name

* changes naming

* removes hyphen in docs

* extracts calculations to own lines prior to assignment
2022-04-21 09:16:13 -06:00
renovate[bot]
03cf38e659
Update dependency @testing-library/user-event to v14.1.1 (#47008)
* Update dependency @testing-library/user-event to v14.1.1

* make this test more consistent

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-04-21 13:44:36 +01:00
Ashley Harrison
d832bde270
Upgrade @testing-library/user-event to v14 (#47898)
* Update dependency @testing-library/user-event to v14

* everything is async...

* everything is async pt.2

* Fix cascader tests

* hack the yarn.lock file to remove the old version of @testing-library/dom

* some more fixes!

* MOAR FIXES

* more fixes

* remove a bunch of places where we're wrapping in act()

* down to 7 failing tests...

* Fix arrow tests

* Fix rest of NavBarItem tests

* Fix last tests

* Use {Enter} instead of {enter}

* Revert "Use {Enter} instead of {enter}"

This reverts commit e72453bb52.

* remove some unused act imports

* Fix LibraryPanelsSearch tests

* more stable test

* More consistent test...

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-21 13:15:21 +01:00
Torkel Ödegaard
057ff5bcf5
Prometheus: Query builder UX tweaks and feedback link (#47655)
* Prometheus: Query builder UX tweaks and feedback link

* Remove .

* Fixed link

* added option to hide feedback links

* feedback link setting name change

* move config check

* fixed ts issue
2022-04-14 15:18:03 +02:00
Torkel Ödegaard
e3590e1a9b
Panels: Use the No value option when showing the no data message (#47675)
* Performance: Create separate div for portal root to limit reflow -> recalc style

* refactoring

* NoData: Use field config No value option as text when display no data message

* Use PanelDataErrorView in TabelPanel

* Add PanelDataErrorView to PieChart

* Updated
2022-04-14 10:10:03 +02:00
Jack Westbrook
398f2b3d18
Build: Fix failing recompile of Grafana packages (#47492)
* build(packages): remove incremental as cache fails to recompile

* build(packages): remove tsBuildInfoFile property from tsconfig files
2022-04-11 09:41:03 +02:00
Agnès Toulet
59388bf546
Config: fix buildInfo initialization (#47402)
* Config: fix buildInfo initialization

* change default to be parseable

* apply default values for buildInfo
2022-04-07 16:17:37 +02:00
renovate[bot]
fba31c2708
Update dependency @testing-library/dom to v8.13.0 (#47423)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 14:25:16 +01:00
Tania
1c13bfdd1b
Chore: Update pre version (#47438) 2022-04-07 14:32:37 +02:00
Cat Perry
b5f2f3e710
Tempo: Traces to Logs - From viewing Tempo traces to displaying Splunk logs (#46855)
* Add functionality to see splunk logs via tempo trace view
2022-04-04 13:24:33 -07:00
CommanderRoot
d29b8e8858
Chore: Replace deprecated String.prototype.substr() (#46763)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-04-04 11:08:06 +02:00
Ashley Harrison
3d23722b30
Update @types/lodash everywhere (#47020)
* Update @types/lodash everywhere

* Update @grafana/e2e as well
2022-03-31 10:19:33 +01:00
Zoltán Bedi
15b48fc188
Table: Add enable pagination option (#45732)
* Table: Add page size option / pagination

* Update docs/sources/visualizations/table/_index.md

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

* FIx packages build

* Move pagination below footer

* Move styles to tableStyles

* Fix typecheck in jaeger-ui

* Set footer to hide onChange

* Styling tweaks

* Center paging

* Tweaks

* Change pageSize to enablePagination

* Move header and footer options to a separate category

* Fix performance and styling issue for the pagination

* Some more styling and tweaking

* Fix tests

* Update docs/sources/visualizations/table/_index.md

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Update docs/sources/visualizations/table/_index.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-03-31 09:36:04 +02:00
kay delaney
f1c3177e79
Chore: Add type info for grafana boot data (#45322)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-03-30 10:48:58 +01:00
Cameron Waterman
8426cfe400
Profile/Help: Expose option to disable profile section and help menu (#46308)
* Expose option to disable help menu

* Expose option to disable profile menu

* Add Profile FeatureTogglePage

* Update public/app/features/profile/FeatureTogglePage.tsx

Uptake PR wording suggestion.

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

* Fix front end lint issue

* Fix back end lint issue

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-29 16:27:53 +01:00
Piotr Jamróz
bf977ac245
Explore: Fix time interpolation (#46737)
* Ensure TemplateService is updated with new time range on each time range change.

* Fix linting errors

* Fix explorePane.test.ts

* Reuse createDefaultInitialState

* Remove unused imports

* Add a test for left/right split

* Silence console.error in tests

* Silence console.error in tests
2022-03-29 15:10:40 +02:00
renovate[bot]
6218ca4725
Update dependency @testing-library/dom to v8.12.0 (#46981)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-26 17:45:42 +00:00
renovate[bot]
7b23c7fe1e
Update Monthly patch updates (#46875)
* Update Monthly patch updates

* Remove 3 packages...

* Fix type error

* undo cypress upgrade

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-03-23 14:56:44 +00:00
Jesse Weaver
560fc9812d
Expose reporting-enabled flag to frontend (#46753) 2022-03-22 14:30:45 -06:00
renovate[bot]
dd2a952c29
Update sentry-javascript monorepo to v6.19.1 (#46799)
* Update sentry-javascript monorepo to v6.19.1

* fix breaking change

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Domas <domasx2@gmail.com>
2022-03-22 16:06:53 +01:00
renovate[bot]
801d751b20
Update dependency rollup to v2.70.0 (#46275)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-07 08:59:50 +01:00
Jack Westbrook
efe9eed758
Chore: Move Typescript cache file to root (#45964)
* chore(typescript): move TS cache file to root of repo

* chore(typescript): cache packages ts checks to disk for faster yarn typecheck
2022-03-04 09:26:25 +01:00
renovate[bot]
141b1fad20
Update dependency rollup to v2.69.0 (#46098)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-02 18:35:16 +00:00
renovate[bot]
26e5af4b2e
Update dependency rollup to v2.68.0 (#45747)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-01 17:21:56 +00:00
renovate[bot]
36b039a10e
Update sentry-javascript monorepo to v6.18.1 (#45842)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-01 10:49:46 +00:00
Todd Treece
01df00fd0f
DataFrame: Add cached response notice for X-Cache: HIT header (#45564) 2022-02-23 04:17:35 +01:00
Artur Wierzbicki
6c76aa71e8
Previews: capability check (#44601)
* add SQL migrations

* dashboard previews from sql: poc

* added todos

* refactor: use the same enums where possible

* use useEffect, always return json

* added todo

* refactor + delete files after use

* refactor + fix manual thumbnail upload

* refactor: move all interactions with sqlStore to thumbnail repo

* refactor: remove file operations in thumb crawler/service

* refactor: fix dashboard_thumbs sql store

* refactor: extracted thumbnail fetching/updating to a hook

* refactor: store thumbnails in redux store

* refactor: store thumbnails in redux store

* refactor: private'd repo methods

* removed redux storage, saving images as blobs

* allow for configurable rendering timeouts

* added 1) query for dashboards with stale thumbnails, 2) command for marking thumbnails as stale

* use sql-based queue in crawler

* ui for marking thumbnails as stale

* replaced `stale` boolean prop with `state` enum

* introduce rendering session

* compilation errors

* fix crawler stop button

* rename thumbnail state frozen to locked

* #44449: fix merge conflicts

* #44449: remove thumb methods from `Store` interface

* #44449: clean filepath, defer file closing

* #44449: fix rendering.Theme cyclic import

* #44449: linting

* #44449: linting

* #44449: mutex'd crawlerStatus access

* #44449: added integration tests for `sqlstore.dashboard_thumbs`

* #44449: added comments to explain the `ThumbnailState` enum

* #44449: use os.ReadFile rather then os.Open

* #44449: always enable dashboardPreviews feature during integration tests

* #44449: add /previews/system-requirements API

* #44449: remove sleep time, adjust number of threads

* #44449: review fix: add `orgId` to `DashboardThumbnailMeta`

* #44449: review fix: automatic parsing of thumbnailState

* #44449: update returned json

* #44449: UI changes - dashboard previews sytem req check

* #44449: lint fixes

* #44449: fix tests

* #44449: typo

* #44449: fix getSystemRequirements API: return 200 even if we plugin version is invalid

* #44449: fix getSystemRequirements API: don't return SemverConstraint on error

* #44449: fix getSystemRequirements API

* #44449: fix previews sytem requirements text

* #44449: add `doThumbnailsExist` to repo

* #44449: remove redux api

* #44449: add missing model

* #44449: implement frontedsettings-driven capability check

* #44449: simplify

* #44449: revert test changes

* #44449: add dummy setup settings

* #44449: implicit typing over `FC<Props>`

* #44449: refactor conditionals

* #44449: replace `getText` with a react component

* #44449: fix component interface

* #44449: add onRemove to `PreviewsSystemRequirements` alert

* #44449: add bottom/top margin to previewSystemRequirements modal

* #44449: merge conflict fix

* #44449: remove console.log

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-02-16 21:49:50 +04:00
Torkel Ödegaard
2b9e46d1f8
Angular: Option to disable angular support and isolate angular dependencies (#45421)
* Angular: Initial setting that disables angular, load angular support in separate chunk

* Load angular panels on demand

* Load alerting in separate chunk only when angularSupportEnabled

* progress, do not export core_module if angular disabled

* Progress

* Update public/app/features/plugins/built_in_plugins.ts

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

* Removing remaining usage of angular from outside angular app (not counting plugins)

* Update config and docs

* Fix sample.ini

* Update public/app/features/alerting/AlertTab.tsx

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

* Fixing prettier issue

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-02-16 17:14:33 +01:00
Marcus Andersson
9a12b3ea00
TemplateSrv: exposing a function to detect if a target contains a template (#45214)
* exposing a function to check if a target contains variables.

* fixed tests.

* renamed function

* updated betterer result.
2022-02-15 08:53:42 +01:00
kay delaney
10cc2fd6bc
Chore: Add types for OAuth settings in config (#45247) 2022-02-11 13:54:24 +00:00
Jack Westbrook
979907e9dd
Chore: Set tsconfig target to ES6 (#44842)
* chore(tsconfig): update grafana/tsconfig to 1.2.0 for outputting es6

* rewrote the unsubscription part to use first().

* test: update failing tests to work with es6 output

* removed bug where we dispatch a promise instead of an array of ritch history.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-02-10 14:37:39 +01:00
renovate[bot]
9c2363ef08
Update dependency rollup to v2.67.1 (#44750)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-08 12:18:11 +00:00
renovate[bot]
a8e9369084
Update Monthly patch updates (#44686)
* Update Monthly patch updates

* Remove 3 troublesome packages...

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-07 13:08:10 +00:00
Marcus Andersson
eb9d85a2bf
Deprecation: use locationService in favor of getLocationSrv (#44813)
* deprecated

* updating documentation.

* added deprecation notice.

* Replacing deprecated getLocationSrv.

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* updating according to feedback.

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-07 09:37:56 +01:00
Andres Martinez Gotor
71e3e6ec93
Chore: Update pre version (#44855) 2022-02-03 16:52:53 +01:00
renovate[bot]
d87cd6f26c
Update dependency prettier to v2.5.1 (#43473)
* Update dependency prettier to v2.5.1

* prettier fixes

* chore(toolkit): bump prettier to 2.5.1

* style(eslint): bump grafana config to 2.5.2 in core and toolkit

* style(mssql-datasource): fix no-inferrable-types eslint errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-02-02 12:02:32 +00:00
renovate[bot]
793e3d3556
Update sentry-javascript monorepo to v6.17.2 (#44364)
* Update sentry-javascript monorepo to v6.17.2

* update Sentry transport impl to be compat with latest sentry

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Domas <domasx2@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-31 16:51:09 +00:00
Todd Treece
4d1f3a3f6c
Recorded Queries: Enable by default (#44397) 2022-01-27 11:09:39 -05:00
renovate[bot]
e9375ecd4c
Update dependency rollup to v2.66.1 (#44348)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-25 15:59:06 +01:00
Agnès Toulet
65bdb3a899
FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382)
* Revert "FeatureToggles: register all enterprise feature toggles (#44336)"

This reverts commit f53b3fb007.

* Revert "FeatureFlags: manage feature flags outside of settings.Cfg (#43692)"

This reverts commit f94c0decbd.
2022-01-24 16:08:05 +01:00
Timur Olzhabayev
c3f69cc4d9
Adding reload to datasourceSrv (#44217) 2022-01-24 10:45:05 +01:00
renovate[bot]
53dfae3c86
Update dependency rollup to v2.65.0 (#44302)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 09:37:03 +00:00
Ryan McKinley
f94c0decbd
FeatureFlags: manage feature flags outside of settings.Cfg (#43692) 2022-01-20 13:42:05 -08:00
renovate[bot]
633da39d53
Update dependency rollup to v2.64.0 (#44053)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-19 11:34:21 +00:00
Agnès Toulet
99cdb56f72
Analytics: add experimentview events (#44120)
* Analytics: add experimentview event

* remove ref to feature-highlights

* Experimentview -> ExperimentView
2022-01-19 11:07:18 +01:00
Ashley Harrison
f74b21c119
Dependencies: downgrade typescript to 4.4.4 for now (#43970)
* Downgrade typescript to 4.5.2 for now

* Downgrade to 4.4.4 instead :(

* kick drone

* Update .github/renovate.json5

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

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-01-13 10:08:38 +00:00
Agnès Toulet
5eaaadd59d
Tabs: add suffix prop for the tab name (#43869)
* Tabs: add suffix prop for the tab name

* Replace FC with JSX.Element
2022-01-12 15:37:16 +01:00
Ryan McKinley
7e5e3f9dc0
FeatureToggles: typed as optional booleans (#43925) 2022-01-11 16:18:54 -08:00
Connor Lindsey
ef12028a68
Tempo: Add time range to tempo search query behind a feature flag (#43811) 2022-01-10 07:38:40 -07:00
Dan Cech
34f757ba5a
switch to using featureEnabled for enterprise features (#41559)
* switch to using featureEnabled for enterprise features
2022-01-07 15:11:23 -05:00
renovate[bot]
a29ddfd386
Update Monthly patch updates (#43798)
* Update Monthly patch updates

* remove lodash and mousetrap type updates

* Remove slate types upgrade

* Update storybook versions in yarnrc

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-07 16:33:26 +00:00
renovate[bot]
125438946f
Update sentry-javascript monorepo to v6.16.1 (#43792)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-07 10:37:59 +00:00
renovate[bot]
846c6ce758
Update dependency typescript to v4.5.4 (#43756)
* Update dependency typescript to v4.5.4

* Changes needed to support new TypeScript version

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-06 16:16:13 +00:00
Ryan McKinley
e77b4abcc8
StreamingDataFrame: support legend format and prometheus style labels (#43637) 2022-01-05 08:56:23 -08:00
Alexander Emelin
b4204628e4
Live: optionally send queries over websocket connection (#41653)
Co-authored-by: ArturWierzbicki <artur.wierzbicki@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-01-05 08:02:12 -08:00
renovate[bot]
bfecbdc0bd
Update dependency rxjs to v7.5.1 (#43718)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-05 15:53:40 +00:00
renovate[bot]
9e5a7b056c
Update dependency rollup to v2.63.0 (#43711)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-05 14:58:56 +00:00
renovate[bot]
0ad440069f
Update dependency @types/jest to v27.4.0 (#43643)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-04 10:06:17 +00:00
Ryan McKinley
4233a62aeb
DashboardPreviews: add dashboard previews behind feature flag (#43226)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Artur Wierzbicki <artur@arturwierzbicki.com>
2021-12-23 09:43:53 -08:00
Connor Lindsey
70c0a9d117
A11y: Fix Fastpass issues for tracing query editors and config pages (#42759)
* Add aria-labels to Jaeger config page

* Fix fastpass issues for Tempo config page

* Fix fastpass issues for other tracing query types like search
2021-12-17 11:49:21 -07:00
Artur Wierzbicki
84ae13fe5d
Live: keep stream history on 'refresh' (#41492)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-15 11:01:55 -08:00
renovate[bot]
12d7c98932
Update dependency @rollup/plugin-node-resolve to v13.1.1 (#43037)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-13 16:12:35 +00:00
Torkel Ödegaard
8828d5e8d7
BarChart: Use new data error view component to show actions in panel edit (#42474) 2021-12-08 11:45:56 +01:00
Ashley Harrison
a345b06095
Chore(dependencies): Tidy up deps in our packages (#42085)
* Chore(dependencies): Tidy up deps in root package

* Tidy up dependencies in @grafana/data

* Tidy up dependencies in @grafana/e2e

* Tidy up @grafana/e2e-selectors packages

* Tidy up packages in @grafana/runtime

* tidy up packages in @grafana/ui

* tidy up packages in jaeger-ui-components

* Readd regenerator-runtime in @grafana/data
2021-12-06 17:32:55 +00:00
Ashley Harrison
cc9151d382
Dependencies: Jest 27 (#42681)
* Update jest monorepo

* Update version of marked so it doesn't throw an error, set testEnvironment

* Fix some unit tests

* Remove all these tests that aren't actually working...

* use spyOn instead of mocking the whole module

* Fix linting

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-03 17:09:25 +00:00
renovate[bot]
e89c9b9194
Update dependency @types/angular to v1.8.3 (#42471)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-30 16:26:18 +00:00
Torkel Ödegaard
1f8336e5fe
DataSourceVariable: Fixes issue repeating panels by data source variable (#42462) 2021-11-29 20:32:18 +01:00
Torkel Ödegaard
070344943c
PanelEditor: Present actionable suggestions when panel cannot visualize current data (#42083)
* PanelDataError: Show actions when current panel cannot visualize data

* Fixed so that suggestions tab is opened from action

* Cleanup

* Fixed tests

* Fix tests

* Fixing tests

* Fixed ts issues
2021-11-25 09:41:03 +01:00
renovate[bot]
0ab4afa2b7
Update sentry-javascript monorepo to v6 (#41991)
* Update sentry-javascript monorepo to v6

* Pass fetch implementation to FetchTransport and stub in unit tests

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-23 15:59:32 +00:00
Jack Westbrook
8b3725b9f2
Chore: Bump versions to 8.4.0-pre (#42116) 2021-11-23 11:23:02 +01:00
renovate[bot]
f97b7858b4
Update dependency @types/react to v17 (#42035)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 11:27:33 +01:00
Andrej Ocenas
e237ff20a9
CloudWatch Logs: Add retry strategy for hitting max concurrent queries (#39290)
* Add error passing and retry strategy

* Change generic error to specific one

* Make the error more generic

* Refactor retry strategy

* Add retry that handles multiple queries

* Rollback some backend changes

* Remove simple retry strategy

* Add comments

* Add tests

* Small test fixes

* Add log timeout config

* Fix tests

* Fix tests

* Add validation

* Remove commented code and add comment

* Fix snapshots

* Remove unnecessary cast
2021-11-17 21:46:13 +01:00
Ryan McKinley
e5811ad106
Query: send datasourceId along with datasource ref (#41830) 2021-11-17 21:00:50 +01:00
Ryan McKinley
bce7cb3ebf
DatasourceRef: keep uid/type ref when using template variables (#41785) 2021-11-17 07:55:12 +01:00
Domas
c60933b49b
Alerting: Fix rule editor issues with Azure Monitor data source (#41317)
* properly set query type

* set default unit from data when found

* make AlertQueryRunner take into account ds.filterQuery

* fix tests

* feedback after pr

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2021-11-16 14:02:32 +01:00
Andrew Hackmann
53905f2d4a
recorded queries/enable recorded queries option (#41670) 2021-11-15 15:04:45 -06:00
Ryan McKinley
c780854a18
Live: remove hardcoded frontend channel support (#41584) 2021-11-15 07:54:14 -08:00
Levente Balogh
4219e4f107
Plugins Catalog: hide plugins based on the Grafana config (#41679)
* refactor(pkg/api/frontendsettings): group plugin catalog settings

* feat(plugins/admin): add a default config value for `pluginCatalogHiddenPlugins`

* chore(grafana/config): add type for `pluginCatalogHiddenPlugins`

* feat(plugins/admin): hide plugins from the catalog based on the grafana config

* fix(plugins/admin): fix a rebase typo

* fix(plugins/admin): remove unnecessary filtering
2021-11-15 15:51:16 +01:00
Giordano Ricci
13db125558
Explore: Use PageToolbar component & some cleanup (#41318)
* Explore: Use PageToolbar component & some cleanup

* remove unneeded getStyles

* remove unneeded fragment

* restore cancelQueries action handler in reducer

* avoid nested ternary operator

* Clean up explore e2e
2021-11-12 10:09:25 +00:00
Marcus Andersson
e5421dd53e
Chore: Change so we cache loading plugins by its version (#41367)
* making it possible to cache plugins based on the version.

* feat(plugincache): introduce function to invalidate entries

* removed todo's

* added tests for the cache buster.

* fixed tests.

* fixed failing tests.

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-11-10 11:54:58 +01:00
Piotr Jamróz
7d2e9aa979
Elasticsearch: Enable full range log volume histogram (#41202)
* Rename "Logs volume" labels to "Log volume"

Code references are kept intact as there's a lot of them, it could be renamed in a separate PR just with renaming

* Add log level docs

* Remove feature flag to enable log volume by default

* Update error message

* Update docs

* Fix unit test

* Fix unit test

Queries are now run automatically

* Add extra param for Loki API

* Remove "Load volume" button

* Update documentation about log volume

* Move comment

* Make reload button more accessible

* Update docs/sources/explore/logs-integration.md

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

* Hide full range log volume for Loki behind the feature toggle

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-10 11:20:30 +01:00
Gilles De Mey
2bc30daa49
Alerting: allows clearing the datasource selection in rule list (#41264) 2021-11-09 18:20:36 +01:00
Artur Wierzbicki
f45eb309ef
Live: move centrifuge service to a web worker (#41090)
* Fix: make webpack pickup workers written in TS

* Add comlink to dependencies

* Temporary fix: copy paste `toDataQueryError` from @grafana/runtime to avoid web dependencies

* Implemented comlink-based centrifuge worker & worker proxy

* Temporary fix: implement comlink transferHandlers for subscriptions and streamingdataframes

* Move liveTimer filtering from CentrifugeService into GrafanaLiveService

* Switch from CentrifugeService to CentrifugeServiceWorkerProxy in GrafanaLive

* Naming fix

* Refactor: move liveTimer-based data filtering from GrafanaLiveService to CentrifugeServiceWorker

* observe dataStream on an async scheduler

* Fix: - Unsubscribe is now propagated from the main thread to the worker, - improve worker&workerProxy types

* Fix: Prettify types

* Fix: Add error & complete observers

* Docs: Add comment explaining the `subscriberTransferHandler`

* Fix: Replace `StreamingDataFrameHandler` with explicitly converting StreamingDataFrame to a DataFrameDTO

* Refactor: move liveTimer filtering to service.ts to make it easy to implement a `live-service-web-worker` feature flag

* Feat: add `live-service-web-worker` feature flag

* Fix: extract toDataQueryError.ts to a separate file within `@grafana-runtime` to avoid having a dependency from webworker to the whole package (@grafana-runtime/index.ts)

* Update public/app/features/dashboard/dashgrid/liveTimer.ts

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>

* Fix: fixed default import class in worker file

* Fix: cast worker as Endpoint

* Migrate from worker-loader to webpack native worker support v1 - broken prod build

* Fix: Use custom path in HtmlWebpackPlugin

* Fix: Loading workers from CDNs

* Fix: Avoid issues with jest ESM support by mocking `createWorker` files

* Fix: move the custom mockWorker rendering layout to `test/mocks`

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-09 21:05:01 +04:00
Gábor Farkas
9d82111a1a
prometheus: enable new monaco-based query field (#41357)
* prometheus: enable new monaco-based query field

* updated test

* updated tests

* fix e2e tests

* updated comment
2021-11-08 14:20:48 +01:00
Ryan McKinley
3489721ed6
api/ds/query: simplify data sources lookup for queries and expressions (#41172) 2021-11-05 08:12:55 -07:00
Jack Westbrook
f2f31f60f2
Chore: Bump rollup and rollup plugins to latest (#40800) 2021-11-02 11:10:32 +01:00
Ryan McKinley
340ed4125e
DataSourceWithBackend: implement interpolateVariablesInQueries by default (#41152) 2021-11-02 00:29:52 -07:00
Ryan McKinley
7319efe077
Dashboard: replace datasource name with a reference object (#33817)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Elfo404 <me@giordanoricci.com>
2021-10-29 10:57:24 -07:00
kay delaney
3a7c5a0755
Chore: Switch yarn 2 to plug-n-play strategy (#40300) 2021-10-27 14:21:07 +01:00
Torkel Ödegaard
54af57b8e6
VisualizationSelection: Real previews of suitable visualisation and options based on current data (#40527)
* Initial pass to move panel state to it's own, and make it by key not panel.id

* Progress

* Not making much progress, having panel.key be mutable is causing a lot of issues

* Think this is starting to work

* Began fixing tests

* Add selector

* Bug fixes and changes to cleanup, and fixing all flicking when switching library panels

* Removed console.log

* fixes after merge

* fixing tests

* fixing tests

* Added new test for changePlugin thunk

* Initial struture in place

* responding to state changes in another part of the state

* bha

* going in a different direction

* This is getting exciting

* minor

* More structure

* More real

* Added builder to reduce boiler plate

* Lots of progress

* Adding more visualizations

* More smarts

* tweaks

* suggestions

* Move to separate view

* Refactoring to builder concept

* Before hover preview test

* Increase line width in preview

* More suggestions

* Removed old elements of onSuggestVisualizations

* Don't call suggestion suppliers if there is no data

* Restore card styles to only borders

* Changing supplier interface to support data vs option suggestion scenario

* Renamed functions

* Add dynamic width support

* not sure about this

* Improve suggestions

* Improve suggestions

* Single grid/list

* Store vis select pane & size

* Prep for option suggestions

* more suggestions

* Name/title option for preview cards

* Improve barchart suggestions

* Support suggestions when there are no data

* Minor change

* reverted some changes

* Improve suggestions for stacking

* Removed size option

* starting on unit tests, hit cyclic dependency issue

* muuu

* First test for getting suggestion seems to work, going to bed

* add missing file

* A basis for more unit tests

* More tests

* More unit tests

* Fixed unit tests

* Update

* Some extreme scenarios

* Added basic e2e test

* Added another unit test for changePanelPlugin action

* More cleanup

* Minor tweak

* add wait to e2e test

* Renamed function and cleanup of unused function

* Adding search support and adding search test to e2e test
2021-10-25 13:55:06 +02:00
renovate[bot]
f496c31018
Update dependency @types/jest to v27 (#40403)
* Update dependency @types/jest to v27

* Fix type errors

* Linting!

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-22 17:44:01 +01:00
Piotr Jamróz
f86fa876f2
Logs: Add a feature toggle to run logs volume query automatically (#40579)
* Add a feature toggle to run logs volume query automatically

* Add missing default value

* Move feature toggle after moving auto-load button

* Remove unused import
2021-10-21 15:56:31 +02:00
Ryan McKinley
ad69de4a10
AppEvents: export appEvents in @grafana/runtime and support copy panel (#40715) 2021-10-20 13:01:21 -07:00
renovate[bot]
39866d4a7f
Update dependency @types/rollup-plugin-visualizer to v4 (#40484)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 15:40:54 +01:00