Commit Graph

46 Commits

Author SHA1 Message Date
Ashley Harrison
1261345b81
Chore: Upgrade to react 18 (#64428)
* update react 18 related deps

* fix some types

* make sure we're on react-router-dom >= 5.3.3

* Use new root API

* Remove StrictMode for now - react 18 double rendering causes issues

* fix + ignore some @grafana/ui types

* fix some more types

* use renderHook from @testing-library/react in almost all cases

* fix storybook types

* rewrite useDashboardSave to not use useEffect

* make props optional

* only render if props are provided

* add correct type for useCallback

* make resourcepicker tests more robust

* fix ModalManager rendering

* fix some more unit tests

* store the click coordinates in a ref as setState is NOT synchronous

* fix remaining e2e tests

* rewrite dashboardpage tests to avoid act warnings

* undo lint ignores

* fix ExpanderCell types

* set SymbolCell type correctly

* fix QueryAndExpressionsStep

* looks like the types were actually wrong instead :D

* undo this for now...

* remove spinner waits

* more robust tests

* rewrite errorboundary test to not explicitly count the number of renders

* make urlParam expect async

* increase timeout in waitFor

* revert ExplorePage test changes

* Update public/app/features/dashboard/containers/DashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* skip fakeTimer test, ignore table types for now + other review comments

* update package peerDeps

* small tweak to resourcepicker test

* update lockfile...

* increase timeout in sharepublicdashboard tests

* ensure ExplorePaneContainer passes correct queries to initializeExplore

* fix LokiContextUI test

* fix unit tests

* make importDashboard flow more consistent

* wait for dashboard name before continuing

* more test fixes

* readd dashboard name to variable e2e tests

* wait for switches to be enabled before clicking

* fix modal rendering

* don't use @testing-library/dom directly

* quick fix for rendering of panels in firefox

* make PromQueryField test more robust

* don't wait for chartData - in react 18 this can happen before the wait code even gets executed

---------

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2023-04-11 10:51:54 +01:00
ismail simsek
ff83367e6e
Security: Fixes for CVE-2023-1410 (#65278)
Remove rst2html dependency
2023-03-23 17:34:05 +01:00
Ludovic Viaud
e22e12455d
Revert "Fix xss in Graphite functions tooltip (#64925)" (#64933)
This reverts commit a896feb346.
2023-03-16 21:37:48 +01:00
Ludovic Viaud
a896feb346
Fix xss in Graphite functions tooltip (#64925) 2023-03-16 21:15:18 +01:00
Abdul
5ec8e370f7
Expressions: Add tests for the QueryEditorRows and QueryGroup components (#63394)
* add QueryGroup onAddQueryClick and onExpressionClick tests

* add test's for the query group component

- new query/expression should be expanded
- adds query/expression onclick

* add open data source help modal test

* add disabled expression test

* add query editor rows test

* rm unused attributes, rm renderScenario required override
2023-02-22 17:26:41 +02:00
renovate[bot]
b4490e0c6b
Update dependency eslint to v8.34.0 (#63292)
* Update dependency eslint to v8.34.0

* update sdk

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-02-13 09:12:15 +01:00
renovate[bot]
3927b6f77c
Update Yarn to v3.4.1 (#62894)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-07 10:42:28 +00:00
renovate[bot]
8f96fe5ae9
Update dependency eslint to v8.33.0 (#62913)
* Update dependency eslint to v8.33.0

* update eslint sdk as well

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-02-06 05:02:19 -05:00
renovate[bot]
c3cc236b56
Update dependency eslint to v8.32.0 (#61894)
* Update dependency eslint to v8.32.0

* update sdk

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-25 12:55:00 +00:00
Dominik Prokop
9b7418ec17
Revert "Chore: Update typescript to 4.9.3 (#60538)" (#60774)
This reverts commit 51f5334748.
2022-12-27 06:30:52 -08:00
renovate[bot]
2533b44cb6
Update dependency eslint to v8.30.0 (#60606)
* Update dependency eslint to v8.30.0

* update eslint sdk

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-12-21 10:51:38 +00:00
Josh Hunt
51f5334748
Chore: Update typescript to 4.9.3 (#60538)
* Update typescript to 4.9.3

* Update from typescript changes
2022-12-21 10:25:29 +00:00
renovate[bot]
76ce83be52
Update dependency prettier to v2.8.1 (#60483)
* Update dependency prettier to v2.8.1

* update prettier sdk

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-12-19 04:57:34 -05:00
Jack Westbrook
f3f9697914
Storybook: Bump dark-mode addon to 2.0.4 and remove patch (#60384)
chore(storybook): bump dark-mode addon to 2.0.4 and remove patch
2022-12-19 10:43:21 +01:00
renovate[bot]
8b5ad5824a
Update dependency eslint to v8.29.0 (#60328)
* Update dependency eslint to v8.29.0

* update sdk version

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-12-15 10:02:55 -05:00
renovate[bot]
90ece9d1f3
Update Yarn to v3.3.0 (#60022)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-09 14:14:32 +00:00
Gábor Farkas
afeb21e300
yarn: commit files to make yarn-install reproducible (#55979) 2022-11-22 13:49:03 +01:00
renovate[bot]
909d0f4ced
Update Monthly patch updates (#58002)
* Update Monthly patch updates

* update typescript sdk, add ignore for emotion css prop

* fix unit tests

* type fixes

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-02 12:05:32 +00:00
renovate[bot]
c0526e1905
Update dependency eslint to v8.26.0 (#57986)
* Update dependency eslint to v8.26.0

* update eslint sdk as well

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-01 14:55:41 +00:00
renovate[bot]
6856784134
Update Storybook updates to v6.5.10 (#49793)
* Update Storybook updates to v6.5.6

* refactor(storybook): fix up dependencies and webpack configs

* chore(storybook): bump to 6.5.7

* chore(yarn): refresh lock file

* chore(storybook): bump storybook to 6.5.10

* refactor(storybook): update configuration to use babel, tidy webpack config, clean dependencies

* chore(storybook): bump to 6.5.12

* chore(storybook): bump storybook-dark-mode to 1.1.2

* chore(storybook): workaround resolving storybook-docs addon for yarn pnp

* refactor(storybook): remove preview-head.html in favour of global theme styles

* chore(storybook): patch storybook-dark-mode to work with SB 6.5.x and yarn PnP

* feat(storybook): move to using MDXv2

* fix(icon): make sure icon story doesn't disappear offscreen and is scrollable

* chore(grafana-ui): clean up dependencies related to storybook

* feat(storybook): enable webpack5 filesystem cache

* feat(storybook): replace babel with esbuild

* fix(emotionperftest): fix jsx pragma for esbuild

* fix(emotionperftest): force jsxRuntime to classic so esbuild and babel compile without error

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-03 09:23:47 +02:00
renovate[bot]
678fb7c29a
Update dependency eslint to v8.24.0 (#55727)
* Update dependency eslint to v8.24.0

* bump sdk as well

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-09-28 10:43:14 +01:00
Ashley Harrison
cc5f8b9180
bump eslint sdk (#54968) 2022-09-12 10:00:09 +01: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
kay delaney
a70aba1384
Chore: Update slate and related packages (#54566)
* Chore: Update slate and related packages
2022-09-06 15:23:48 +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
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
Zoltán Bedi
309965aaf0
Dev: Bump eslint sdk for vscode (#52852) 2022-07-27 11:22:05 +02: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
Zoltán Bedi
262ee5219e
Chore: Update yarn sdks (#50726) 2022-06-14 08:42:59 +02: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
kay delaney
de3e981985
Chore: Upgrade typescript to 4.6.4 (#49016) 2022-05-17 12:08:10 +01:00
Peter Holmberg
cb03b05ced
Alerting: Add yaml editor to cloud rules (#46533)
* ruleinspector component

* Adding yaml component

* setvalues

* update yarn.lock

* bump types

* chore: update lockfile

* move apply button position

* move button back to tab

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-01 16:34:08 +02:00
Ivana Huckova
554492ec4e
Loki: Add parsing of query to visual query (#46700)
* Create parser

* Add parsing

* Update comment

* Remove operations that we don't support

* Resolve type errors

* Update test

* Handle backticks

* Handle backticks

* Remove copied test, update test

* Parsing for binary operations

* Remove error about setting state after unmount

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-03-31 10:51:49 +02:00
renovate[bot]
9fc6ee2535
Update Yarn to v3.2.0 (#45714)
* Update Yarn to v3.2.0

* Update sdks as well

* Update nodejs to latest

* Updates

* Update grabpl to 2.9.23

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-03-09 10:10:51 +01:00
Hugo Häggmark
31ba5bfea0
Yarn: Updates to SDK packages (#45043) 2022-02-08 09:45:42 +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
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
Zoltán Bedi
328b922a58
Chore: Upgrade yarn and editor sdks (#42847) 2021-12-08 14:40:24 +01:00
renovate[bot]
881dd9992c
Update pa11y-ci commit hash to 6b2d4f5 (#41536)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-11 09:51:47 +01:00
Torkel Ödegaard
3dee34c009
PanelEdit: Show when field options have override rules or data config that overrides the default (#40250)
* First pass at showing data override dots

* Added test

* Adding override rule dots

* Added unit test

* Minor changes

* Update public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Fixed ts issues

* review feedback changes

* skipp broken e2e test

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-11-08 13:18:14 +01:00
achatterjee-grafana
14225b07b2
Docs: Cleanup alerting documentation, part 1 (#40737)
* First commit.

* Adding shared content.

* More changes.

* More changes

* Updated few more topics, fixed broken relrefs.

* Checking in changes.

* Some more topics scrubbed.

* Minor update.

* Few more changes.

* Index pages are finally somewhat sorted. Added relevant information and new topics.

* Updated Alert grouping.

* Last bunch of changes for today.

* Updated folder names, relrefs, and some topic weights.

* Fixed typo in L37, notifications topic.

* Fixed another typo.

* Run prettier.

* Fixed remaining broken relrefs.

* Minor reorg, added link to basics some overview topic.

* Some more re-org of the basics section.

* Some more changes.

* More changes.

* Update docs/sources/shared/alerts/grafana-managed-alerts.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/_index.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/_index.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/opt-in.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/notification-policies.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/alert-groups.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/_index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Ran prettier and applied suggestion from code review.

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/contact-points.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/contact-points.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Change from code review. Also fixed typo "bos" in playlist topic.

* Ran prettier to fix formatting issues.

* Update docs/sources/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/contact-points.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/basics/alertmanager.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/basics/alertmanager.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/basics/evaluate-grafana-alerts.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/contact-points.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* More changes from code review.

* Replaced drop down with drop-down

* Fix broken relrefs

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/rule-list.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Few more.

* Couple more.

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
2021-10-27 16:57:54 -04:00
kay delaney
3a7c5a0755
Chore: Switch yarn 2 to plug-n-play strategy (#40300) 2021-10-27 14:21:07 +01:00
Gábor Farkas
51c5afe840
yarn2: commit the pa11y-ci package from the cache (#40372) 2021-10-14 08:28:24 +02:00
Jack Westbrook
084a9b7d1a
Chore: Fix frontend metrics (#40325)
* build(yarn): add yarn-outdated plugin for checking outdated dependencies

* refactor(frontend-metrics): update dep and vulnerablity commands to work with yarn berry

* feat(frontend-metrics): introduce critical vulnerabilities count

* feat(frontend-metrics): echo out critical vulnerabilities
2021-10-12 15:45:03 +02:00
Jack Westbrook
fa03d2ae6a
Chore: Bump Webpack dependencies (#40272)
* feat(yarn): introduce plugin-interactive-tools

* chore(webpack): bump webpack and loaders / plugins to latest
2021-10-12 11:04:36 +02:00
kay delaney
b2e94d0733
Chore: Migrate yarn from v1 to v2 (#39082)
* Chore: Migrate yarn from v1 to v2

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-10-08 15:19:10 +01:00