105 Commits

Author SHA1 Message Date
2b8c74de2e i18n: removes useTranslate hook (#106556)
* i18n: removes useTranslate hook

* chore: fix duplicate imports

* chore: fix import sorting and hook dependencies
2025-06-12 11:03:52 +02:00
c7cd06d5f5 i18n: exports TFunction from @grafana/i18n package (#105921) 2025-05-23 10:34:35 +02:00
119d5897ea i18n: imports use @grafana/i18n (#105177)
* i18n: everything should target @grafana/i18n

* wip

* chore: updates after PR feedback

* Trigger build

* Trigger build

* Trigger build

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: revert all flaky tests

* chore: some incorrect usages of useTranslate
2025-05-15 09:17:14 +02:00
b052b28a88 Internationalisation: Enable i18n eslint rules (#104277)
* enable i18n rules by default

* commit translation changes
2025-04-22 13:56:25 +01:00
9ed3c9ee8a Internationalisation: Final mark up of strings (#104165)
* some more markup

* more markup

* more markup

* almost there...

* more markup

* more markup

* last markup!

* fix unit tests
2025-04-22 11:02:01 +01:00
e2a6f9a849 Logs: Add new Controls component to Explore (#103401)
* ControlledLogRows: create component

* Fix imports

* ControlledLogRows: handle scroll events

* Rename storage key prop

* LogListControls: externally control syntax highlighting

* ControlledLogRows: add support for level filtering

* Logs: implement deduplication from controls

* Fix imports

* Create feature flag

* Use feature flag

* LogListControls: add download button

* LogsMetaRow: extract download function to logs utils

* Filter and download logs

* Update tests with new props

* LogList: pass logs and logs meta to context

* Remove prefix from downloaded file

* Update unit tests

* LogListControl: update unit tests

* Fix type assertion

* Fix imports

* Formatting

* i18n

* Fix test

* LogListControls: adjust scroll to top styles

* LogListContext: control legacy options

* LogListControls: add showUniqueLabels and prettifyJSON options

* LogListControls: test new controls

* Extract translations

* Hide old controls by feature flag

* LogListControls: update prettify json copy

* ControlledLogRows: disable preview

* Prettier

* LogListControls: Fix test
2025-04-07 16:38:55 +02:00
684b37556f Logs Panel: Add ISO8601 date to log download files (#102932)
* feat: add ISO8601 date to log download files
2025-03-27 07:11:16 -05:00
dc5badd9b2 Internationalisation: More automatic markup (#102792)
* more automatic i18n markup

* better labels

* little bit of tidy up

* fix unit tests
2025-03-27 10:12:25 +00:00
5a004939da QueryInspector: Show all buttons small screen sizes (#102292) 2025-03-19 12:02:41 +01:00
336449c169 Explore: Add hide_logs_download and hide button to download logs (#99512)
* Explore: Add `disableLogsDownload` and hide button to download logs

* change copy

* Explore: Change `disableLogsDownload` to `hide_logs_download`

* change casing in frontend

* also hide from inspector

* add test

* lint
2025-01-29 11:53:52 +01:00
1fc9b4bfc1 Chore: Remove dashboard state barrel file (#97562)
* refactor(dashboard-state): delete dashboard/state barrel file and update imports

* chore(betterer): update results
2024-12-06 16:01:51 +01:00
b23b6d228a Chore: Convert styles to use emotion object syntax (#94989)
* convert to use emotion object syntax

* missed one

* review comments

* set back to 0 and disable lint rule
2024-10-23 15:25:28 +01:00
cc9881343e Explore: Explore Log Download doesn't have same time format (#94519)
* Fixes #94296

* format code

* format code

* remove the timezone

* fix bug

* format code

* update unit test

* modified csv data order

* format code

* delete csv change
2024-10-16 12:29:29 +02:00
47f8717149 React: Use new JSX transform (#88802)
* update eslint, tsconfig + esbuild to handle new jsx transform

* remove thing that breaks the new jsx transform

* remove react imports

* adjust grafana-icons build

* is this the correct syntax?

* try this

* well this was much easier than expected...

* change grafana-plugin-configs webpack config

* fixes

* fix lockfile

* fix 2 more violations

* use path.resolve instead of require.resolve

* remove react import

* fix react imports

* more fixes

* remove React import

* remove import React from docs

* remove another react import
2024-06-25 12:43:47 +01:00
080adaf987 Inspect: Include only BOM char for excel files (#88994) 2024-06-13 09:41:50 +02:00
13d00e09ab Chore: Migrate some more SCSS to emotion (#89038)
* migrate section-heading

* move fonts to global styles

* migrate code styles to emotion globals

* migrate spacings styles and leave some in angular

* padding should be 2 here not 1
2024-06-12 14:46:20 +01:00
5dd8353ab1 Dashboards: Migrate from aria-label e2e selectors to data-testid (#78536)
* Dashboards: Migrate from aria-label e2e selectors to data-testid

* more changes

* addPanelwidget

* Test: Update .betterer.results

* refactor: fix e2e tests

* refactor: fix failing test

* refactor: update plugin-e2e after adding selector changes to the packege

---------

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: Laura Benz <laura.benz@grafana.com>
2024-04-24 15:16:19 +02:00
1b376546e2 Dashboards: Fix issue with changing panel JSON from edit view (#85717) 2024-04-08 12:49:38 +01:00
7b4dd4fe47 Explore: Only update pane's instance of Inspector (#80106)
* send instance ID to query inspector, ensure requestId match before updating data

* Extract logic for mixed request ID, use in Explore prefix when appropriate

* Change query inspector to get passed request ID

* Fix test
2024-02-16 08:10:22 -06:00
a1ff439a20 Fix query inspector in explore to scroll to bottom (#82369) 2024-02-14 10:00:16 +02:00
f8056a3e56 Update dependency react-virtualized-auto-sizer to v1.0.20 (#80596)
* Update dependency react-virtualized-auto-sizer to v1.0.20

* Update dependency react-virtualized-auto-sizer to v1.0.20

* update types

* mock in a few more tests

* fix InspectDataTab test

* fix test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-01-17 12:13:14 +00:00
bdbc3f351c Explore: Format data in Data tab in Query Inspector (#80004)
* Fix betterer

* Improve formatting logic
2024-01-16 07:04:31 -07:00
522519f671 Tempo: Decouple Tempo from Grafana core (#79888) 2024-01-16 11:36:40 +01:00
c80b14951d InspectDataTab: Use templateSrv.replace with getProcessedData (#79113) 2023-12-11 14:11:27 +00:00
fc4b0faacd Explore: Hide support button (#78710)
Only show support button if there is a dashboard
2023-11-28 07:30:58 -06:00
9e11779921 Chore: Clean up usage of deprecated stylesFactory function (#78419) 2023-11-21 14:01:53 +00:00
2c0c51a0df Chore: improve types (#78126)
* fix some types

* more type updates

* some more fixes

* more changes

* string instead of unknown

* more like original logic

* remove outdated comment

* update betterer
2023-11-16 12:39:12 +00:00
0b03344baa Chore: Update to typescript 5 (#76511)
* Update dependency typescript to v5

* Update yarn.lock

* Fix typescript errors

* Update typescript version sdk

* Revert useDescription.ts

* Fix ts errors

* Fix Typescript errors after Symbol.unscopables type change

* Fix colormanipulator errors

* Update packages/grafana-data/src/vector/FunctionalVector.ts

* Fix ts errors in dashboardmigrator

* Fix sandbox component typescript error

* Update yarn

* Update to typescript 5.2

* Fix typescript error

* update typescript/vscode patch/sdk/whatever

* fix ts errors in elasticsearch

* Fix two errors in alerting

* Fix error in dashboard-scene

* Fix errors in dashboard tests

* Fix errors in explore tests

* Fix error in plugins sandbox

* fix error in DashboardQueryRunner

* fix errors in grafana-data

* fix errors in PanelChrome story

* update betterer

* better fix for cloud monitoring

* fix error in reducer tester

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
2023-11-07 13:20:20 +00:00
25779bb6e5 Stack: Use the component from grafana/ui (#77543)
* grafana/ui: Move Stack out of unstable

* grafana/ui: Replace imports

* Replace the import from experimental

* Cleanup

* Remove invalid prop

* Add flexGrow

* Remove Stack used in Field

* Remove import
2023-11-06 18:15:52 +02:00
4d8560d9a9 i18n: Markup Explore's Query Inspector for translations (#76157) 2023-10-13 18:36:43 +01:00
af3ea54d0e Logs Panel: Add milliseconds to download file (#75045)
* add milliseconds to log panel txt file download
2023-09-26 07:14:40 -05:00
a1250632c3 Inspector: Show transformation query errors (#73344) 2023-09-20 09:09:51 -07:00
05f01dee0c DashboardScene: Inspect / query tab (#74795) 2023-09-14 12:45:13 +02:00
5e9f252962 DashboardScene: Inspect / Json tab (#74701)
* DashboardScene: Inspect / Json tab

* Fixing behaviors and writing tests

* Progress

* limit options based on data provider

* Fixes

* Add tracking

* Remove unused function

* Remove unused function

* Fix test

* Update

* Move utils function

* Rename to source
2023-09-14 12:17:04 +02:00
73a675af02 DashboardScene: Inspect panel data tab (#74646)
* Refactor data tab to be usable from scenes

* DashboardScene: Inspect data tab

* Everything seem to work now

* don't change drawer size in this PR

* Remove uncommented code

* Fix layout issues for data actions

* Added comment explaining retry
2023-09-11 16:11:22 +02:00
963fffeef1 Chore: fix some more types (#72726)
fix some more types
2023-08-14 16:04:04 +01:00
2c82a6b6c4 Traces: Enable showing trace ids (#71950)
* traces: enable showing trace ids by default

* removed unused imports
2023-07-20 07:59:38 +02:00
8a6c6c3285 PanelInspect: Download CSV without extra blank rows (#71248) 2023-07-10 12:16:47 -03:00
9f2baaf5c3 PanelInspect: Clean table display settings from field config (#71226)
* Does not work, hmm..

* now it works

* fixing and refactoring

* remove unused import
2023-07-10 16:27:03 +02:00
a62ae10a02 logs: refactor: move logsModel to the logs folder (#70989)
* move files

* fixed imports in the moved files

* updated imports pointing to the moved files
2023-07-04 13:27:52 +02:00
c025783367 Dashboard: Fix Drawer validation to avoid errors with empty request objects (#68214) 2023-05-11 10:59:50 +02:00
fcb14d2548 InspectDrawer: Fixes issue with double scrollbars (#67884)
* InspectDrawer: Fixes issue with double scrollbars

* Fixed minor issue
2023-05-05 09:54:43 +02:00
ffd83a027d Trace View: Export trace button (#67368)
* Add export button to trace view

* Support zipkin, jaeger and otlp formats
2023-04-28 15:34:14 +01:00
c11baa3ead Stats Inspector: Prevent long stats from being hidden (#66866)
* Stats Inspector: Prevent stats from being hidden

* Inspect stats: inline container styles
2023-04-20 17:06:47 +02:00
507c6e7d97 Templating: Replace __data , __field and __cell_n with macros (#65324)
* Templating: __data __field and __series macros

* filter out datacontext from json serialization

* Fix condition

* Update

* Added test cases for formatting data, and field macros
2023-04-05 11:10:33 +02:00
4ded937c79 Show traceids for failing and successful requests (#64903)
* tracing: show backend trace ids in frontend

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* added feature flag

* bind functionality to the feature flag

* use non-generic name for traceid header

* fixed tests

* loki: do not create empty fields

* do not add empty fields

* fixed graphite test mock data

* added unit-tests to queryResponse

* added unit-tests for backend_srv

* more typescript-friendly check

* added unit-tests for runRequest

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-04-05 09:13:24 +02:00
fa740a8bcf Chore: Remove panel inspect Actions hack (#64643)
remove actions tab hook
2023-03-13 08:07:36 -07:00
15aae5e8a9 Panel: Show multiple errors info in the inspector (#64340) 2023-03-08 16:11:38 +01:00
6a720f96f7 A11y: ignore rule since keyboard interaction is already handled (#62850)
* Revert "Accessibility: Remove unnecessary onClick from title element (#59696)"

This reverts commit f19b07c0bc096ac6190cc71ec1f8baa1f87da061.

* ignore eslint rule
2023-02-08 14:17:15 +00:00
f19b07c0bc Accessibility: Remove unnecessary onClick from title element (#59696)
* remove unnecessary onClick from title element

* associate icon label with title + fix unit tests

* remove cursor: pointer;

* remove link color from title as it's no longer clickable

* remove useless aria-label

* stop incorrectly marking title as a ReactNode - it's just a string
2023-01-30 13:32:16 +00:00