Commit Graph

40451 Commits

Author SHA1 Message Date
Kristin Laemmert
e8b8a9e276
chore: move dashboard_acl models into dashboard service (#62151) 2023-01-26 08:46:30 -05:00
Eric Leijonmarck
c5cb5be3cc
Auth: Fix catch both both ErrInvalidAPIKey for context with APIKey (#62193)
* fix: capture both ErrInvalidAPIKey

* rename of variable
2023-01-26 14:42:50 +01:00
lean.dev
7d8ec6199d
Snapshots: Add snapshot enable config (#61587)
* Add config to remove Snapshot functionality (frontend is hidden and validation in the backend)
* Add test cases
* Remove unused mock on the test
* Moving Snapshot config from globar variables to settings.Cfg
* Removing warnings on code
2023-01-26 10:28:11 -03:00
renovate[bot]
928e2c9c9e
Update dependency glob to v8.1.0 (#62186)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-26 13:24:35 +00:00
gotjosh
0bfe150928
Alerting: Fix Test Receivers when settings are non-strings (#62156)
* Alerting: Fix Test Receivers when settings are non-strings

As part of the Alerting extraction, we want to make sure we don't have circular depedencies. As such, I had to move `PostableGrafanaReceiver` to a new struct in `grafana/alerting` called `GrafanaReceiver`.

`PostableGrafanaReceiver` has an attribute called `Settings` that uses a Grafana-propietary struct called `RawMessage`, this struct shadows `json.RawMessage`.

When I created `GrafanaReceiver`, I turned settings into a `map[string]string` thinking all settings would end up as strings. This was a mistake, and this test proves that it doesn't work, and breaks the API.
2023-01-26 12:54:03 +00:00
Konrad Lalik
e8dd01df35
Alerting: Alert rules search improvements (#61398)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-01-26 13:44:14 +01:00
Karl Persson
94dca85b30
Auth: Fix error check (#62192) 2023-01-26 12:35:08 +00:00
Virginia Cepeda
a20d1eec32
Alerting: validate alert condition on saving rule (#61958)
* Validate alert condition on saving rule

* Remove unused const
2023-01-26 09:27:08 -03:00
Ludovic Viaud
bfbc8c3c4f
Transforms: Add join by fields (#61322) 2023-01-26 13:10:05 +01:00
Ashley Harrison
f7d92ab841
Navigation: only show the img for a section root if both img and icon are present (#62127)
only show an img for a section root if both img and icon are present
2023-01-26 12:07:43 +00:00
Ashley Harrison
a77c342764
Navigation: Add keyboard shortcut to search input (#62116)
* Show shortcut

* add icon to search bar, make same changes in search modal

* rename to modKey

Co-authored-by: joshhunt <josh@trtr.co>
2023-01-26 12:07:32 +00:00
Jack Westbrook
8f06784449
Chore: Bump d3-color to 3.1.0 (#61609)
* chore(d3-color): resolve all copies to 3.1.0 to fix vulnerability

* chore(yarn): fix resolution version

* chore(jest): compile d3-color from esm to cjs

* chore(d3): bump d3 to latest, set jest config to transpile es modules

* chore: bump visx packages to resolve d3-color to latest

* chore(jest): add missing es modules to config

* chore(storybook): prevent storybook config failure due to nested esm imports

* chore(storybook): use a direct path to avoid es modules breaking config build

* build(sass): use esbuild to generate sass theme vars for esm deps

* chore: clean up swc dependencies

* revert: remove debug console.log breaking tests
2023-01-26 13:02:22 +01:00
Ludovic Viaud
a3d93febd7
Transforms: Keep refId for labelsTopFields (#61916) 2023-01-26 12:55:13 +01:00
Andreas Christou
18465bc04f
Bump code-coverage workflow version (#62182) 2023-01-26 11:04:00 +00:00
Josh Hunt
43828e829b
Chore: Script to generate betterer issue summary (#61857)
* wip

* finish script

* limit by message

* fix filter message

* Add template

* improve template

* codeowners devdep
2023-01-26 10:48:33 +00:00
Ashley Harrison
64352e8d08
Chore: Move to node 18 again (#62079)
move to node 18 again
2023-01-26 10:19:39 +00:00
Torkel Ödegaard
9f7ddf1f0b
QueryEditorRow: Fixes issue loading query editor when data source variable selected (#61927)
* QueryEditorRow: Fixes issue loading query editor when data source variable selected

* Fix func name

* Removed wait

* restore waiting for with better check

* restore waiting for with better check
2023-01-26 11:07:17 +01:00
Ashley Harrison
a3b396854a
Navigation: Command palette topnav tweaks (#61991)
stylings tweaks to command palette
2023-01-26 10:03:16 +00:00
Joan López de la Franca Beltran
c4e067d49d
Encryption: Cache new DEKs (only) after a caution period (#60664)
* Encryption: Cache new DEKs (only) after commit

* Fix typo

* Update secrets manager tests with new failing case

* Update secrets manager tests with new clarifications (comments)

* Correct broken method calls

* Unify methods

* Cache data keys only after a caution period

* Caution period for data keys caching only for encrypt ops
2023-01-26 10:54:31 +01:00
Dimitris Sotirakis
3a442610d2
Packages: Fix upload-packages case for Enterprise2 mode (#61772)
* Add corner case for Enterprise2

* Add versionMode corner case

* Fix lint

* Refactor

* Add tests

* Remove break

* Fix lint

* Return error instead of panicing

* Fix lint
2023-01-26 11:52:15 +02:00
Karl Persson
95ea4bad6f
AuthN: Rebuild Authenticate so we only have to call it once in context handler (#61705)
* API: Add reqSignedIn to router groups

* AuthN: Add fall through in context handler

* AuthN: Add IsAnonymous field

* AuthN: add priority to context aware clients

* ContextHandler: Add comment

* AuthN: Add a simple priority queue

* AuthN: Add Name to client interface

* AuthN: register clients with function

* AuthN: update mock and fake to implement interface

* AuthN: rewrite test without reflection

* AuthN: add comment

* AuthN: fix queue insert

* AuthN: rewrite tests

* AuthN: make the queue generic so we can reuse it for hooks

* ContextHandler: Add fixme for auth headers

* AuthN: remove unused variable

* AuthN: use multierror

* AuthN: write proper tests for queue

* AuthN: Add queue item that can store the value and priority

Co-authored-by: Jo <joao.guerreiro@grafana.com>
2023-01-26 10:50:44 +01:00
Armand Grillet
95f052bbd1
Add handleGrafanaManagedAlerts jsonData (#61874)
* Add handleGrafanaManagedAlerts jsonData

* Update following feedback
2023-01-26 10:48:51 +01:00
Dominik Prokop
b9a1d8e5f9
Dashboard schema: Review and mature refresh property (#62104)
* Review and mature refresh property

* Update type

* Update report
2023-01-26 01:45:12 -08:00
Joey Tawadrous
1423f15b0d
Tempo: Update column width for Loki search (#61924)
Update col widths
2023-01-26 09:35:44 +00:00
Victor Marin
ab7a4e5f28
Fix Barchart legend calcs when stacking is percent (#61449)
* Fix Barchart legend calcs when stacking is percent

* doc change

* Refactor + tests
2023-01-26 11:34:57 +02:00
George Robinson
a7eab8e46e
Alerting: Support context.Context in Loki interface (#61979)
This commit adds support for canceleable contexts in the Loki
interface.
2023-01-26 09:31:20 +00:00
Ashley Harrison
e6e560e3ed
Dropdown: Make escape close a dropdown (#62098)
* make escape close a dropdown

* make tab close the dropdown
2023-01-26 09:23:53 +00:00
Sofia Papagiannaki
cd27562c76
Access control: Modify dashboard/folder resolvers so that return also the inherited scopes (#62025)
* Access Control: Add folder service dependency to the dashboard/folder resolvers

* Expose the function fetching parents to folder interface

* Add generic prepend utility

* Modify dashboard resolvers to return inherited scopes
2023-01-26 10:21:10 +02:00
Torkel Ödegaard
8e3d22ca7a
Chore: Fixes cleanNeedle regex to be more specific (#61967)
* Chore: Fixes code sec warning for frontend regex

* Update text.ts

* Update text.ts
2023-01-26 09:08:15 +01:00
Victor Marin
6a93c77082
Refactor state timeline/status history to cue model and refactor TimelineChart component (#61631)
* Adapt state timeline to scuemata

* Refactor status history to cue model

* Refactor

* Refactor TimelineChart as a core component

* wip

* Change as per CR

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-26 07:03:59 +00:00
Nathan Marrs
6c9174a766
Canvas: Fix connection anchors for svg elements (#61895) 2023-01-25 16:32:04 -08:00
Ryan McKinley
46c828c2d8
EntityAPI: Rename references from kind to family (#62044) 2023-01-25 23:42:04 +00:00
Oscar Kilhed
f3aa058886
XY Panel: Add and use schema for XY Panel configuration (#62148)
* Add schema for XYChart

* Minor cleanup

* remove unessecary fields from ScatterFieldConfigVeneer, and cleaning up more

* Fix counts

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-25 22:29:07 +00:00
Alexander Weaver
eb1293ebb1
Alerting: Re-generate swagger definitions (#62154)
Regenerate swagger, add body binding so parameters work
2023-01-25 15:01:42 -06:00
sam boyer
4a1d418157
Kindsys: Simpler PascalCase name handling (#62150) 2023-01-25 20:29:10 +00:00
Ryan McKinley
402345ac08
Chore: Fix dashboard service after refactor (#62153)
merge refactoring sequence
2023-01-25 19:52:01 +00:00
Ryan McKinley
4965cf2eda
k8s: add feature toggle and stub to save dashboards k8s (#62053) 2023-01-25 11:10:16 -08:00
Ryan McKinley
a0405912a8
Preferences: Add preferences kind and remove unused navbar settings (#59621) 2023-01-25 11:00:32 -08:00
Nathan Marrs
8b574e22b5
SVG: Add dompurify preprocessor step (#62143)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-01-25 10:37:29 -08:00
Kristin Laemmert
dd147a3c31
chore: move entity models into entity store service (#62145) 2023-01-25 12:43:22 -05:00
Alexander Weaver
046a9bb7c1
Alerting: Copy rule definitions into state history (#62032)
* Copy rules instead of accepting pointer

* Deep-copy the rule, for even more guarantees

* Create struct just for needed fields

* Move RuleMeta to historian/model package, iron out package dependencies

* Move tests for dash ID parsing to model package along with code
2023-01-25 11:29:57 -06:00
Hamas Shafiq
1f55a54543
Tempo: Create separate functions for querying the v1/v2 API for tag values (#61998) 2023-01-25 17:12:59 +00:00
Gabriel MABILLE
f99523048a
Schema: Covering service accounts Core Kind (#62091)
* Adding service accounts schema

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Change metadata field

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Merging the two DTOs into one schema

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Eric dedup things

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Add optional to teams/created/updated

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Lower case the OrgId

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2023-01-25 18:07:00 +01:00
Selene
3c073b00ec
Schema: Fix interfaces with blank spaces (#62144)
Fixes interfaces with blank spaces
2023-01-25 17:03:46 +00:00
Taewoo K
069dc2d357
add export customHeadersSettings component (#62131) 2023-01-25 11:32:35 -05:00
Polina Boneva
08806924d8
[Chore] Add unit tests to PanelChrome component (#61695)
* PanelChrome: test loadingState and status

* add some tests

* fix error-related tests

* clean up

* fix tests

* pass aria-label from PanelChrome to ToolbarButton

* add prop comments and clean up
2023-01-25 18:29:53 +02:00
renovate[bot]
4dafdcbdc4
Update dependency fork-ts-checker-webpack-plugin to v7.3.0 (#62129)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-25 16:27:55 +00:00
Yuri Tseretyan
e2899dd6bd
Docs: Update expression documentation to mention no data (#61934)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-25 11:17:09 -05:00
Stephanie Hingtgen
0a1f31814a
Plugins: add UI for more supported datasources with secure socks proxy feature toggle (#61962) 2023-01-25 08:39:17 -07:00
Dan Cech
0c8a2bbfd5
copy .github folder into golang build container since we rely on codeowners (#62122)
* copy .github folder into golang build container since we rely on codeowners

* remove .github for .dockerignore
2023-01-25 10:31:16 -05:00