Commit Graph

112 Commits

Author SHA1 Message Date
Ryan McKinley 7ceb4b90f6
Chore: Remove library panel thema (#112154) 2025-10-09 09:38:52 -03:00
Levente Balogh 3658b1fce7
Dashboards: Add a new variable type called "Switch" (#111366)
* feat: add schema changes for a switch type of dashboard variable

* fix: generated go

* feat: add support for a switch type of dashboard variable

* chore: update `@grafana/scenes` to a canary version

* feat: add variable editor for the switch variable

* fix: remove unnecessary jest config change

* chore: remove commented out code
2025-10-09 12:08:55 +00:00
Haris Rozajac de01b3e209
Dashboard Schema V2: Support panel actions (#110842)
* support panel actions

* refactor

* add test; move action transformer to utils

* refactor so v2 headers and queryParams are just a simple record

* update open api

* update actions to be same shape accross all dashboard schemas and add validation on the backend

* cleanup

* update snapshot

* add tests to validation
2025-09-12 11:31:05 -06:00
Levente Balogh 273731ed8e
Dashboard Controls: Allow displaying dashboard links (#110666)
* feat: add `placement` to dashboard links (v1)

* feat: add `placement` property for dashboard links (v2)

* refactor: rename the `DropdownVariableControls` to `DashboardControlsMenu`

* feat: make it possible to render links under the dashboard controls dropdown

* fix: update the v2beta1 (and remove changes from v2alpha1)

* fix: linting errors

* chore: update codegen

* fix: frontend unit tests

* tests(DashboardLinkRenderer): add tests

* fix: hide divider if not necessary

* Update apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_kind.cue

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Update packages/grafana-schema/src/raw/dashboard/x/dashboard_types.gen.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update kinds/dashboard/dashboard_kind.cue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/kinds/dashboard/dashboard_spec_gen.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/dashboard/pkg/apis/dashboard/v2beta1/zz_generated.openapi.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/dashboard/pkg/apis/dashboard/v2beta1/dashboard_spec_gen.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/dashboard/pkg/apis/dashboard/v2beta1/dashboard_spec.cue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/grafana-schema/src/schema/dashboard/v2beta1/types.spec.gen.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/dashboard/kinds/v2beta1/dashboard_spec.cue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: remove "default" placement option for links (review note)

* feat: hide the <Stack> wrapper if there are no links or variables

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-11 13:16:46 +02:00
Levente Balogh 2f558e8cb7
Grafana Schema: Extend the `VariableHide` enum (#110579)
* feat: extend the `VariableHide` enum with a new option

* feat: extend the `VariableHide` for v1
2025-09-08 09:08:09 +02:00
Dominik Prokop b4e63c36c3
Migration v42: HideFrom tooltip consistency migration (#110517)
* Migration to be verified: v42 HideFrom tooltip migration

* snap update

* make gen cue

* Add comments of 42 being the final version
2025-09-05 15:07:30 +02:00
Ryan McKinley 6f940f855e
Chore: Remove public dashboard cue (#109940) 2025-08-21 13:58:36 +03:00
Ryan McKinley 066163d710
Preferences: Move codegen to apps (#109178) 2025-08-05 15:30:34 +03:00
Domas 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
Luminessa Starlight 09e8484bac
i18n: rename locale to regionalFormat (#106585)
* locale -> regionalFormat, mirroring #102233

* set up regionalFormat to replace locale entirely

* replace locale with regionalFormat

* update reportInteraction arguments
2025-06-16 21:53:55 +02:00
Matias Chomicki 5a34447ad9
Kinds: check for entries length (#104231) 2025-06-12 14:10:57 +02:00
Ryan McKinley f0d6375b3b
Codegen: format golang code from cue (#105352) 2025-05-14 06:56:27 +03:00
Laura Fernández 4ad0492d3d
i18n: Add `locale` to backend (#102233) 2025-03-31 15:59:07 +02:00
Sergej-Vlasov d1dee968c3
Schema V2: Adjust quick_ranges in time settings and remove time_options (#100135)
* adjut quickRanges type in v2

* clean up unused time_options property

* remove deprecated time_options property on time picker

* add schema migration for time_options

* adjust test
2025-02-12 19:23:09 +00:00
Ryan McKinley e3cb73301e
Authz/Schema: Remove unused stub cue definitions (#100387) 2025-02-11 15:24:11 +03:00
Sergey Naumov eb2f8182c0
Dashboards: Allow custom quick time ranges specified in dashboard model (#93724)
* TimeRangePicker: allow to customize quick ranges per dashboard

* TimeRangePicker: show selected custom time range using its name

* rangeutil: add tests for describeTextRange + quickRanges

* Fix up tests, and add an extra case for hidden time ranges

* Don't construct an object to find options, add findRangeInOptions util

* fix type errors detected by TypeScript

---------

Co-authored-by: joshhunt <josh@trtr.co>
2025-02-04 14:36:28 +00:00
Victor Marin d5f404d082
Dashboards: Add possibility to lock multi value variables option list (#95949)
* add new option for multi variables to lock value list wip

* WIP - lock option list

* tests

* fix

* fixes + canary scenes

* wip

* wip

* fix snapshot

* bump scenes

* Dashboards: Add possibility to lock adhoc variables options list (#96077)

* Lock list of options flag for ad hoc

* refactor

* fix snapshot
2024-11-21 16:01:54 +02:00
Alexa V cd4b7ef9db
Dashboard Scene: Fix snapshots not displaying variables values (#88967)
* Use new snapshot variables from scenes

* Add snapshotVariable implementation

* Refactor: Extract variables logic from transforSaveModelToScene file

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-08-20 17:05:12 +02:00
Joao Silva 85d0e17dc4
Bookmarks: Store URLs instead of ids (#91121) 2024-07-31 13:56:39 +01:00
Ryan McKinley ec6c6bd6c3
Identity: Add read-only identity apiserver (#90418) 2024-07-26 17:09:08 +03:00
Joao Silva 546f4aa700
Navigation: Show list of pinned items on MegaMenu (#90280)
* Navigation: Show list of pinned ites on the navigation

* Rename section to 'Bookmarks'

* Internationalization

* Rename everything to bookmarks

* Update public/app/core/reducers/navBarTree.ts

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

* Ignore empty message as well

* Dont update navigation if there is an error patching

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2024-07-22 11:43:40 +01:00
Dominik Prokop f659bc1f40
Dashboard: Allow disabling dashboard grid lazy loading (#89280)
* Schema update

* Dashboard: Allow opting out from dashboard panels lazy loading

* Locale

* Lint fix

* Snaps fix
2024-07-03 16:00:45 +02:00
Joao Silva 9004b58851
Navigation: Backend to save navigation customization into preferences (#89783) 2024-07-03 10:40:51 +01:00
Jeroen Op 't Eynde e1685cb44b
fix: set schemaVersion on dashboard schema (CUE) (#87712)
* fix: set schemaVersion on dashboard schema (CUE)

* docs: add comment to migration code

* fix: run make gen-cue
2024-05-28 16:16:20 +02:00
Selene 473898e47c
Core: Remove thema and kindsys dependencies (#84499)
* Move some thema code inside grafana

* Use new codegen instead of thema for core kinds

* Replace TS generator

* Use new generator for go types

* Remove thema from oapi generator

* Remove thema from generators

* Don't use kindsys/thema for core kinds

* Remove kindsys/thema from plugins

* Remove last thema related

* Remove most of cuectx and move utils_ts into codegen. It also deletes wire dependency

* Merge plugins generators

* Delete thema dependency 🎉

* Fix CODEOWNERS

* Fix package name

* Fix TS output names

* More path fixes

* Fix mod codeowners

* Use original plugin's name

* Remove kindsys dependency 🎉

* Modify oapi schema and create an apply function to fix elasticsearch errors

* cue.mod was deleted by mistake

* Fix TS panels

* sort imports

* Fixing elasticsearch output

* Downgrade oapi-codegen library

* Update output ts files

* More fixes

* Restore old elasticsearch generated file and skip its generation. Remove core imports into plugins

* More lint fixes

* Add codeowners

* restore embed.go file

* Fix embed.go
2024-03-21 11:11:29 +01:00
Selene 5c7849417b
Schemas: Replace registry generation and github workflow (#83490)
* Create small registries for core and composable kinds

* Update workflow with new registries

* Fix imports in plugin schemas and deleted old registry generation files

* Remove verification and maturity

* Modify registries and add missing composable information to make schemas in kind-registry work

* Add missing aliases

* Remove unused templates

* Remove kinds verification

* Format generated code

* Add gen header

* Delete unused code and clean path in composable template

* Delete kind-registry loader

* Delete unused code

* Update License link

* Update codeowners path

* Sort imports

* More cleanup

* Remove verify-kinds.yml from codeowners

* Fix lint

* Update composable_kidns

* Fix cue extension

* Restore verify-kinds to avoid to push outdated kind's registry

* Fix composable format

* Restore code owners for verify-kinds

* Remove verify check
2024-03-13 18:05:21 +02:00
Selene 75ea33e0cd
Schemas: Delete unused code from the previous refactors (#84254)
* Delete unused code from the previous refactors

* Sort imports
2024-03-13 12:30:05 +01:00
Selene 275ccf994b
Schemas: Reduce duplicated jenny code (#84061)
* Remove jenny_ts_resources and use jenny_ts_types for all cases

* Unify TS generated files into one jenny

* Add missing imports to versioned files

* Update Parca plugin

* Fix loki

* Use LokiQuery

* Fix pyroscope tests

* Fix prettier

* 😒 fix default pyroscope value name

* Set the LokiQuery

* Update Elasticsearch and TestData

* Missed files from testdata

* Order imports
2024-03-11 12:51:44 +01:00
Selene f8ce8d0600
Schemas: Restore spec core go generation (#83594)
* Restore spec core go generation

* Fix go imports
2024-02-29 10:20:28 +01:00
Selene dea0a0f6c8
Kinds: Generate k8 resources without use kindys/thema (#83310)
Generate k8 resources reading cue file directly instead of use thema/kindsys binding
2024-02-26 10:18:19 +01:00
Tania 8895b43c85
Chore: Remove docs and kinds report generators (#83277)
* Chore: Remove codegen for docs

* Remove kindsysreport
2024-02-23 20:06:43 +01:00
Dominik Prokop 62efe6e170
Panel Query Options: Support query caching options (#82448)
* schema update

* Panel Query Options: Support query caching options
2024-02-14 09:19:39 -08:00
Ezequiel Victorero dbde08b03c
Scenes: Refactor original snapshot button in a new component (#82199) 2024-02-13 14:15:55 -03:00
Ashley Harrison af8ea896d0
GroupBy: add new `groupby` variable type and optional `groupByKeys` (#81717)
* add new groupby type

* rename to groupByKeys + introduce GroupByVariableModel

* fix unit test

* update scenes package

* update interface

* update fixture

* update unit test

* bump to scenes 2.6.2

* remove baseFilters for now
2024-02-07 11:14:04 +00:00
Torkel Ödegaard a5d890984b
Dashbboard: Fixes time picker schema default issues (#81847)
* Dashbboard: Fixes time picker schema default issues

* Fix tests

* fix imports
2024-02-05 12:32:59 +01:00
Torkel Ödegaard 071b301e39
Dashboard: Dashboard schema fixes and scene to save model fixes (#81867) 2024-02-05 12:27:44 +01:00
Denis f7fd8e6cd1
DashboardSchema: Add options to VariableModel (#79236)
* Add includeAll and regex fields to VariableModel  #67639

* Add allValue option to VariableModel
2024-01-23 10:56:20 -05:00
Ivan Ortega Alba eb64209301
GeneralSettings: Enable support for nowDelay (#79703) 2024-01-11 17:53:06 +01:00
Leon Sorokin fb79be4a43
Transformations: Add frame source picker to allow transforming annotations (#77842)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-01-02 23:33:31 -06:00
Ryan McKinley 67bbdd7c05
K8s/Folders: Add folders api service (with legacy storage) (#79413) 2023-12-20 20:28:56 +02:00
Julien Duchesne 637cfa89be
Swagger: Rename `Spec` to `Preferences` (#78226)
The definition for preferences is globally named `Spec` because that's the type that cue outputs
This adds a swagger annotation to rename the definition in the swagger schema to `Preferences`
This will be easier to use in generated clients
2023-12-04 09:51:09 -05:00
Ivan Ortega Alba e56a252158
GeneralSettings: Edit general dashboards settings to scenes (#78492) 2023-12-01 17:04:56 +02:00
Torkel Ödegaard 54bca5e590
DashboardSchema: Remove some old panel types (#78590) 2023-11-24 14:53:28 +01:00
Ivana Huckova 4fd1d92332
Loki: Remove relying on timeSrv.timeRange in LanguageProvider (#78450)
* Loki: Allow setting of timeRange when using languageProvider functions

* Loki: Use timerange where available for start

* Loki: Use timerange where available for fetchLabels

* Loki: Use timerange where available for fetchSeriesLabels

* Loki: Use timerange where available for fetchLabelValues

* Loki: Use timerange where available for getParserAndLabelKeys

* Loki: Update and add tests for fetchLabels

* Loki: Update and add tests for fetchSeriesLabels

* Loki: Update and add tests for fetchSeries

* Loki: Update and add tests for fetchLabelValues

* Loki: Update and add tests for fetchLabelValues

* Loki: Update and add tests for getParserAndLabelKeys

* Update public/app/plugins/datasource/loki/LanguageProvider.test.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/LanguageProvider.test.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Not needing to use languageProvider.getDefaultTime in Monaco

* Update comment

* Update getDefaultTimeRange to be ptivate

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-11-22 14:35:15 +01:00
Ivan Babrou 860b3bbce7
Dashboards: Implement natural sort for query variables (#78024) 2023-11-21 10:17:38 +01:00
Dominik Prokop 0122f7ccad
DashboardScene: Support dashboard links (#77855)
* MenuItem: Allow react node as label

* LinkButton: Expose ButtonLinkProps

* Typecheck fix

* DashboardLinks: Refactor and use LinkButton and menu

* DashbaordLinks scene object

* Use flex layout for dashboard controls

* Update public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx

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

* fix keepTime and includeVars

* Add ellipsis to menu item label and description

* Use DashboardLink type from grafana/schema

* Update dashboard scene controls layout

* Fix e2e

* Test fix

* Bring back keyboard navigation

* Remove unused code

* One more fix

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-11-15 17:49:51 +02:00
Torkel Ödegaard de8ab7efe7
DashboardScene: Support for dashboard PanelContext actions via state hook (#76192)
* DashboardScene: Support for dashboard PanelContext actions via state hook

* Update

* Progress

* Update

* Update

* update
2023-10-13 11:42:42 +02:00
Ryan McKinley 29cf60988b
Playlist: Use a different go struct for sql service vs k8s (#76393) 2023-10-12 08:29:06 -07:00
Torkel Ödegaard 72a1de855c
Schema: Clean up / correct panel schema (#76346)
* Schema: Clean up / correct panel schema

* fixes
2023-10-11 15:56:42 +02:00
Torkel Ödegaard fc0933d5f4
Schema: Clean up dashboard variables schema (#76121)
* Cleanup variable schema model

* minor fix

* remove type ignores that are no longer type errors
2023-10-09 09:10:52 +02:00