Commit Graph

571 Commits

Author SHA1 Message Date
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
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
Alyssa Bull
6ec9a7682d
Various Panels: Add ability to toggle legend with keyboard shortcut (#52241) 2022-07-27 13:39:55 -06: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
Josh Hunt
972105cc52
I18n: Wrap event-based modals with I18nProvider (#52720) 2022-07-25 08:44:11 -04:00
Torkel Ödegaard
9ef29bb5c3
TopNav: Keyboard shortcut to toggle topnav on or off (#52572)
* TopNav: Keyboard shortcut to google topnav on off

* gate it behind dev mode
2022-07-21 20:55:24 +02:00
Ryan McKinley
da1701ce57
Dashboards: load from storage (#51949) 2022-07-14 15:36:17 -07: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
Ieva
0c33b9f211
Access control: Allow organisation admins to add existing users to org (#51668)
* check users with user add permission to access the invite endpoint

* undo unneeded changes

* tests and cleanup

* linting

* linting

* betterer

* betterer again

* fix prettier issue

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-07-08 12:07:00 +01:00
Ryan McKinley
281ed419a8
Chore: add generics to backendSrv (#51606) 2022-06-30 14:34:23 -04:00
Ryan McKinley
c0f10af545
SearchV2: Use the same components for both SQL and bluge backends (#50125) 2022-06-30 12:45:45 -04:00
Konrad Lalik
117bac71f5
Alerting: Use folders' RBAC permission to control rules actions (#51434)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-30 13:00:29 +02: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
owensmallwood
e7d6a58037
Owensmallwood/pubdash get public dashboard definition (#50269)
* When getting a public dashboard, backend returns a response structured the same as when you get a regular dashboard

* Updates backend tests for getting public dashboard

* Frontend can load the public dashboard based on the pubdash uid provided

* adds frontend test to make sure public dashboard doesnt render toolbar and submenu

* sorts imports
2022-06-06 16:19:34 -06:00
Ashley Harrison
6fcb2cd307
remove exported test globals from test/lib/common (#50256) 2022-06-06 15:38:37 +01:00
Piotr Jamróz
16a948fc88
Query History: Implement RemoteStorage methods: settings (#49320)
* Implement methods to get an update user preferences

* Update integration test

* Update label

* Remove unused type

* Simplify async code
2022-05-23 13:42:12 +02: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
Ryan McKinley
68757cfa73
Search: a few minor improvements (#48989) 2022-05-17 00:38:27 +02: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
Jguer
8ed3fb1f2d
AccessControl: don't pull builtin role assignments when refactor is enabled (#48675) 2022-05-05 13:02:34 +02:00
Ryan McKinley
a8f3b17262
SaveDashboard: remove feature flag for save drawer (#48462) 2022-05-02 09:29:22 -07:00
Kristina
090afc9ae0
Bind command palette specific overrides and reset when no longer relevant (#48217)
* Bind command palette specific overrides and reset when no longer relevant

* Use original global escape instead of resetting the whole keybinding profile
2022-04-26 06:31:13 -05: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
kay delaney
c48d8d1d48
Frontend: Add notification persistence behind feature flag (#47871) 2022-04-20 10:42:32 +01:00
Torkel Ödegaard
7181efd1cf
Explore: Allow users to save Explore queries to dashboards (#47083)
* Select: Expose AsyncSelectProps interface

* DashboardPicker: Add a generic DashboardPicker component

* Dashboard Service: improve types

* Explore: allow saving explore state in a new panel in an existing dashboard

* Handle saving provisioned dashboards error

* Improve test coverage

* simplify test setup

* Strip base path from url when redirecting to a dashboard

* Keep existing variables when saving to an existing dashboard

* group assertions in test

* SearchCard: handle undefined in meta.updated

* Change required error message

* Add to dashboard alternative

* Add to existing is working

* Add to dashboard form

* remove default add-panel when creating a dashboard from explore

* types cleanup

* remove unneeded BE change

* simplify selector

* Add explore2Dashboard feature toggle

* add tests

* Small refactor & add tests

* small DashboardPicker improvements

* use partial from lodash

* Better error handling

* improve tests & disable button when there are no queries

* rename addPanelToDashboard function

* remove localStorage item if opening tab fails

* UI touchups & tracking

* Fix tests & remove close reporting

* remove echologger debug

* fix adding a panel to an existing dashboard

* Enable explore2Dashboard by default and add docs

* Ensure each panel in dashboards has a valid ID

* force CI restart

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-04-12 13:26:07 +02:00
Josh Hunt
1b27e55e5a
Analytics: Identify users to Rudderstack by externalUserId where available (#47325)
* wip

* tests

* move util, fix test

* fixes

* Update public/app/core/services/echo/utils.ts

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-04-05 17:41:22 +02:00
Ryan McKinley
edf384c730
DashboardSave: use a feature flag for drawer behavior (#46972) 2022-03-30 10:07:41 -07: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
Ashley Harrison
280b1ee828
Update @types/mousetrap to latest version (#46893)
* Update @types/mousetrap to latest version

* kick drone

* kick drone again

* Remove @types from the import
2022-03-29 12:13:31 +01: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
Ryan McKinley
15ca294be0
Dashboards: show changes in save dialog (#46557)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-03-16 09:28:09 -07:00
Kristina
773da0e330
Explore: Add t * keybindings to change time range (#45020)
* Add keybindings to explore, allow override of dashboard model update for explore update

* Remove edits to Dashboard Model, add definition when url params should be updated

* Add tests

* Add and expose util function instead of bringing in unrelated library do not define explicit path to library file

* Use more generic model for TimeSrv

* Remove url utility functions, use javascript function instead

* Break out TimeModel into new type and bring it in

* condense object creation
2022-02-17 07:39:02 -06:00
Gabriel MABILLE
6fbf346747
AccessControl: Add endpoint to get user permissions (#45309)
* AccessControl: Add endpoint to get user permissions

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Fix SA tests

* Linter is wrong :p

* Wait I was wrong

* Adding the route for teams:creator too

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2022-02-11 17:40:43 +01:00
Ashley Harrison
378ce15418
Stub console.warn (#45311) 2022-02-11 14:56:25 +00:00
Leon Sorokin
9af6202a7f
Fetch: parse JSON off-main-thread (async) based on response Content-Type (#45188) 2022-02-10 11:45:41 -06:00
Gabriel MABILLE
8217d6d206
AccessControl: Change teams permissions page when accesscontrol is enabled (#43971)
* AccessControl: Change teams permissions page when frontend is hit

* Implement frontend changes for group sync

* Changing the org/teams/edit permissions

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

* Fixing routes

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

* Use props straight away no need to go through the state

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

* Update public/app/features/teams/TeamPages.tsx

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-02-03 17:49:39 +01:00
Gabriel MABILLE
86756ee3e5
AccessControl: introduce a different accesscontrol check (licensed or not) (#44777)
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-02-03 16:27: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
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
Ryan McKinley
f94c0decbd
FeatureFlags: manage feature flags outside of settings.Cfg (#43692) 2022-01-20 13:42:05 -08: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
Ryan McKinley
7e5e3f9dc0
FeatureToggles: typed as optional booleans (#43925) 2022-01-11 16:18:54 -08: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
David
a08e0581de
Hotkeys: Make time range permanent (#43802)
Typing `t a` in Explore or Dashboards will turn a relative time like "Last 1 hour"
into an absolute range to make the URL permanent, so that when sharing it others
will see the same data.

- registered `t a` in key service
- new `AbsoluteTimeEvent` dispatch via global event bus
- dashboard times handled in TimeSrv
- Explore times handled in Explore.tsx and Explore's time reducer

I could not find an easy way to combine time handling for Exlore and Dashboard in one place.
2022-01-07 16:51:29 +01:00
Gabriel MABILLE
c7cabdfd6f
AccessControl: Add accesscontrol metadata to datasources DTOs (#42675)
* AccessControl: Provide scope to frontend

* Covering datasources with accesscontrol metadata

* Write benchmark tests for GetResourcesMetadata

* Add accesscontrol util and interface

* Add the hasPermissionInMetadata function in the frontend access control code

* Use IsDisabled rather that performing a feature toggle check

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2021-12-15 12:08:15 +01:00
Erin Noe-Payne
4d5e39abff
Analytics: Add user id tracking to google analytics (#42763) 2021-12-06 16:34:19 +01:00
William Assis
eab0ba8716
Analytics: RudderStack custom URLs to fetch SDK and Config (#41988)
* Add config options to provide custom URL to fetch Rudderstack SDK and Config

* Add new entries to defaults.ini

* Update docs
2021-12-06 09:42:29 -05:00
Dominik Prokop
fa930e7dbd
KeybindingSrv: Prevent dashboard save modal when dashboard cannot be saved (#42505) 2021-12-01 13:47:47 +01:00