113 Commits

Author SHA1 Message Date
8eef17cb37 QueryVariable: Add static options input (#107514)
* static options for query variable

* add toggle

* fix and add tests

* run the hack codegen thing

* more test fixes

* make betterer happier

* also make typecheck happy

* make betterer happier

* fix i18n key

* tranalte static variables sort label

* gen translations

* update snapshot
2025-07-14 16:05:56 +03:00
0f3edd3b5f Plugins: renames snake cased plugin files (#107862)
* Plugins: renames plugin_loader

* test(pluginloader): fix mock paths to pluginLoader

* chore: rename sandbox files

* Trigger build

* Trigger build

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2025-07-09 13:18:44 +02:00
20c700dd52 Chore: reduces barrel files part II (#107688)
* Chore: reduce barrel files

* chore: fixes unit test

* Chore: reduces barrel files part II

* chore: fix import sorting
2025-07-09 06:15:33 +02:00
31b71f79dd Internationalisation: Manual mark up following review (#107625)
* mark up and add confirmText to lint rule

* mark up and add ariaLabel to lint rule

* add confirmText to propertiesToCheck

* mark up and add body to propsToCheck

* mark up latest

* mark up 'Dashboard saved'

* mark up filterbyvalue options

* mark up tooltip options

* mark up and add lint rules for noOptionsMessage/loadingMessage

* mark up 'Convert field type'

* mark up placeholderText/noOptionsMessage

* mark up run query

* mark up variable editor fields

* mark up week start options

* mark up dashboard link options

* mark up prom options

* mark up builder/code toggles

* make CI happy

* kick CI
2025-07-07 16:43:19 +01:00
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
7bfa78c6e6 I18n: Update eslint rule to catch some untranslated object properties (#105072) 2025-05-28 21:14:43 +01: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
b9bc069fb9 AppChrome/MegaMenu: Fixes issue with default state being initialised to undocked (#103507)
* AppChrome/MegaMenu: Fixes default mega menu docked state

* AppChrome/MegaMenu: Fixes default mega menu docked state

* Update thresholds

* Update

* pa11y fix

* remove unnessary css

* fixed pa11y config

* try fix pa11y config + unit tests

* just increase thresholds again...

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-04-07 16:00:05 +01:00
641031cfaf Chore: Type fixes (#103340)
* tidy tidy

* more fixes

* some TableNG fixes

* another TableNG test fix

* some more fixes

* betterer...
2025-04-07 11:29:30 +01:00
6822805c32 Grafana Runtime: Use package.json exports for internal code (#102100)
* refactor(frontend): update runtime import paths for grafana/runtime/src -> grafana/runtime

* feat(runtime): introduce internal api entrypoint and exports property

* refactor(frontend): update runtime imports to use internal entrypoint

* chore(betterer): update results file

* refactor(bookmarks): update runtime/unstable import

* chore(betterer): update results file

* test(frontend): fix failing tests due to mocking nested runtime imports

* test(datasourcesrv): fix failing tests due to mocks

* chore(alerting): clean up redundant import

* fix(packages): fix default require export pointing to types declaration file

* docs(packages): update readme related to exports

* chore(internationalization): fix import paths

* chore(betterer): update results file
2025-03-27 08:59:57 +01:00
3776a0baed Chore: auto mark up some areas for translations (#102711)
* auto markup users/variables/visualization features

* mark up transformers feature

* betterer + translations

* markup trails

* mark up service accounts + translations + betterer

* undo ServiceAccountProfileRow change for now

* dedupe a little
2025-03-25 10:44:05 +00:00
feae06d81c QueryVariable: Default query is not set when creating a new variable (#99029)
* QueryVariable: Default query is not set when creating a new variable

* use correct getDefaultQuery

---------

Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
2025-01-17 15:11:25 +00: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
e147c58a7b Dashboard: Fix Variables query hides fields with non-supported datasources (#88516)
* Show queryVariable editor even if the variable does not support variables

* Fix VariableQueryRunner unit test, now takes into account the new function
2024-06-03 13:58:30 +02:00
cadc551a3c Chore: Remove deprecated re-exported template variable types (#87459)
Chore: Remove deprecated re-exported template varible types
2024-05-10 12:00:41 +01:00
5460d75e74 QueryVariableEditor: Select a variable ds does not work (#83144) 2024-02-21 17:57:53 +02:00
ffb9a4de4a Chore: some test type fixes (#82889)
* some test type fixes

* ignore table-old since it's an angular panel that will be removed
2024-02-16 14:35:26 +00:00
dcf58555e8 Chore: Some test type fixes (#81812)
some test type fixes
2024-02-05 09:47:30 +00:00
a9f17a3f24 QueryVariable: Be able to edit the variable using scenes (#80847) 2024-01-31 13:31:08 +01:00
e9f1b41d23 EditVariable: Add base form to edit variables (#80172) 2024-01-12 12:01:11 +02:00
c30098e772 QueryVariable: Always run queries with dashboard time range (#79056) 2023-12-05 06:06:26 -08:00
860b3bbce7 Dashboards: Implement natural sort for query variables (#78024) 2023-11-21 10:17:38 +01:00
2f2be24e01 Chore: Remove unnecessary type assertions (#78009)
* Chore: Remove unnecessary type assertions

* betterer
2023-11-14 09:17:29 +00:00
f183e68b1c GrafanaUI: Move Box out of unstable and into GrafanaUI (#77080) 2023-10-26 13:46:11 +01:00
963049e2b7 Loki: Fixes chained template variable queries for scene apps (#75880)
* Loki: Fixes chained template variable queries for scene apps

* Remove bit
2023-10-04 12:47:25 +02:00
c78d5fa4e3 Update QueryVariableEditor layout (#75099)
* Allow setting legend header style and add container

* Use Box and Text components

* Minor element update

* Use box instead of div
2023-09-22 11:04:22 +01:00
f6f47678a4 QueryRunners: Bind the query function where it is passed on (#73399) 2023-09-18 17:00:43 +02:00
0c44a6f9bb Chore: Improve typings 🧹 (#74599)
* various type fixes

* candlestick panel type fixes

* few more fixes

* some fixes

* more :)

* moar!

* undo change to SilencesFilter

* undo change to configureStore
2023-09-13 09:17:07 +01:00
dc6675cade Template Variables: Fix conversion from non standard data to dataFrame (#73486) 2023-08-30 10:01:32 +02:00
66cea5aac6 A11y: Make Annotations and Template Variables list and edit pages responsive (#71791) 2023-07-28 15:09:31 +02:00
8415dd40d7 DSPicker: Use new DS picker everywhere in Grafana (#70609) 2023-07-26 18:40:51 +02:00
9852b24d61 Chore: Upgrade prettier to v3 (#71764)
* Update dependency prettier to v3 (#71586)

* Update dependency prettier to v3

* run prettier

* ignore prettier update in legacy select scss

* update command line arg

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* unplug prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 15:58:22 +01:00
5ca382c88a Revert "Update dependency prettier to v3 (#71586)" (#71755)
This reverts commit 2e8cd1c021ffba522457982f3535916bbead22a4.
2023-07-17 14:46:15 +01:00
2e8cd1c021 Update dependency prettier to v3 (#71586)
* Update dependency prettier to v3

* run prettier

* ignore prettier update in legacy select scss

* update command line arg

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-07-17 09:19:27 +01:00
6c900b84bd Variables: Remount query editor when datasource changed (#70615) 2023-06-27 12:59:24 +01:00
dbdb71fbfa Templating: Fix updating of definition to empty string (#69703) 2023-06-08 11:02:47 +02:00
b24ba7b7ae FieldValues: Use plain arrays instead of Vector (part 3 of 2) (#66612)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-20 17:59:18 +03:00
f8d89eff56 Chore: fix type errors in tests (#63270)
* fix any's in tests

* fix more any's in tests

* more test type fixes

* fixing any's in tests part 3

* more test type fixes

* fixing test any's p5

* some tidy up

* fix template_srv
2023-02-14 16:46:42 +01:00
a9d44aa795 Datasources: Add support for getDetDefaultQuery in variable editor (#62026)
+Cloudwatch implementation
2023-01-30 10:58:43 +01:00
2baf967ff1 fix: Fix flattening queries with null values (#61380) 2023-01-13 10:37:29 +01:00
78d7f11b8e grafana/data: Move data frames processing functions from core (#60795) 2022-12-28 07:59:45 -08:00
45edce90d3 VariableEditor: Use new form styles (#56326) 2022-10-12 09:43:41 +01:00
264645eecd TopNav: Dashboard settings (#52682)
* Scenes: Support new top nav

* Page: Make Page component support new and old dashboard page layouts

* Pass scrollbar props

* Fixing flex layout for dashboard

* Progress on dashboard settings working with topnav

* Updated

* Annotations working

* Starting to work fully

* Fix merge issue

* Fixed tests

* Added buttons to annotations editor

* Updating tests

* Move Page component to each page

* fixed general settings page

* Fixed versions

* Fixed annotation item page

* Variables section working

* Fixed tests

* Minor fixes to versions

* Update

* Fixing unit tests

* Adding add variable button

* Restore annotations edit form so it's the same as before

* Fixed semicolon in dashboard permissions

* Fixing unit tests

* Fixing tests

* Minor test update

* Fixing unit test

* Fixing e2e tests

* fix for e2e test

* fix a11y issues

* Changing places Settings -> General

* Trying to fix a11y

* I hope this fixes the e2e test

* Fixing merge issue

* tweak
2022-08-24 18:05:12 +02:00
081d6e9d3e Typed variables pt5: Remove generics from getInstanceState (#53018)
* 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

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* use typescript/no-redeclare for compatibility with ts overloads

* remove generics from getVariable() and overload it to only return undefined based on arguments

* update usages of getVariable()

* Remove generic from getInstanceState

* update usages of getInstanceState

* fix lint
2022-08-10 16:06:49 +01:00
4b4d546e32 Typed variables pt4: Remove generics from getVariable (#53017)
* 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

* Chore: Use type-accurate mock variables in tests

* Chore: Type VariableState to use TypedVariableModel

* fix typo

* remove type assertion from template_srv.getVariables

* use typescript/no-redeclare for compatibility with ts overloads

* remove generics from getVariable() and overload it to only return undefined based on arguments

* update usages of getVariable()

* Fix Interval variable options picker not working
2022-08-05 13:44:52 +01:00
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
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
6fcb2cd307 remove exported test globals from test/lib/common (#50256) 2022-06-06 15:38:37 +01:00
9db95826a4 Variables: allow Regex tooltip links to be clickable (#48560)
Fixes #48558
2022-05-02 17:44:23 +00:00
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