Commit Graph

43754 Commits

Author SHA1 Message Date
Alex Khomenko
420b19e0e4
Dashboards: Add dashboard embed route (#69596)
* Dashboard embed: Set up route

* Dashboard embed: Cleanup

* Dashboard embed: Separate routes

* Dashboard embed: Render dashboard page

* Dashboard embed: Add toolbar

* Dashboard embed: Send JSON on save

* Dashboard embed: Add JSON param

* Dashboard embed: Make the dashboard editable

* Fix sending dashboard to remote server

* Add notifications

* Add "dashboardEmbed" feature toggle

* Use the toggle

* Update toggles

* Add toggle on backend

* Add get JSON endpoint

* Add drawer

* Close drawer on success

* Update toggles

* Cleanup

* Update toggle

* Allow embedding for the d-embed url

* Allow embedding via custom X-Allow-Embedding header

* Use callbackUrl

* Cleanup

* Update public/app/features/dashboard/containers/EmbeddedDashboardPage.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Use theme for spacing

* Update toggles

* Update public/app/features/dashboard/components/EmbeddedDashboard/SaveDashboardForm.tsx

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>

* Add select data source modal

---------

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
2023-07-06 17:43:20 +03:00
Giuseppe Guerra
a8d2a9ae2b
Plugins: Angular detector: Add database cache store for remote patterns (#70693)
* Plugins: Angular detector: Remote patterns fetching

* Renamed PatternType to GCOMPatternType

* Renamed files

* Renamed more files

* Moved files again

* Add type checks, unexport GCOM structs

* Cache failures, update log messages, fix GCOM URL

* Fail silently for unknown pattern types, update docstrings

* Fix tests

* Rename gcomPattern.Value to gcomPattern.Pattern

* Refactoring

* Add FlagPluginsRemoteAngularDetectionPatterns feature flag

* Fix tests

* Re-generate feature flags

* Add TestProvideInspector, renamed TestDefaultStaticDetectorsInspector

* Add TestProvideInspector

* Add TestContainsBytesDetector and TestRegexDetector

* Renamed getter to provider

* More tests

* TestStaticDetectorsProvider, TestSequenceDetectorsProvider

* GCOM tests

* Lint

* Made detector.detect unexported, updated docstrings

* Allow changing grafana.com URL

* Fix API path, add more logs

* Update tryUpdateRemoteDetectors docstring

* Use angulardetector http client

* Return false, nil if module.js does not exist

* Chore: Split angualrdetector into angularinspector and angulardetector packages

Moved files around, changed references and fixed tests:
- Split the old angulardetector package into angular/angulardetector and angular/angularinspector
- angulardetector provides the detection structs/interfaces (Detector, DetectorsProvider...)
- angularinspector provides the actual angular detection service used directly in pluginsintegration
- Exported most of the stuff that was private and now put into angulardetector, as it is not required by angularinspector

* Renamed detector.go -> angulardetector.go and inspector.go -> angularinspector.go

Forgot to rename those two files to match the package's names

* Renamed angularinspector.ProvideInspector to angularinspector.ProvideService

* Renamed "harcoded" to "static" and "remote" to "dynamic"

from PR review, matches the same naming schema used for signing keys fetching

* WIP: Angular: cache patterns in db, moved gcom into pluginsintegration

More similar to signing keys fetching

* Rename package, refactoring

* try to solve circular import

* Fix merge conflict on updated angular patterns

* Fix circular imports

* Fix wire gen

* Add docstrings, refactoring

* Removed angualrdetectorsprovider dependency into angularpatternsstore

* Moved GCOM test files

* Removed GCOM cache

* Renamed Detect to DetectAngular and Detector to AngularDetector

* Fix call to NewGCOMDetectorsProvider in newDynamicInspector

* Removed unused test function newError500GCOMScenario

* Added angularinspector service definition in pluginsintegration

* refactoring

* lint

* Fix angularinspector TestProvideService

* cleanup

* Await initial restore

* Register dynamicAngularDetector background service

* Removed static detectors provider from pluginsintegration

* Add tests for kvstore

* Add more tests

* order imports in dynamic_test.go

* Fix potential panic in dynamic_test

* Add "runs the job periodically" test

* lint

* add timeout to test

* refactoring

* Removed context.Context from DetectorsProvider

* Refactoring, ensure angular dynamic background service is not started if feature flag is off

* Fix deadlock on startup

* Fix angulardetectorsprovider tests

* Revert "Removed context.Context from DetectorsProvider"

This reverts commit 4e8c6dded7.

* Fix wrong argument number in dynamic_teset

* Standardize gcom http client

* Reduce context timeout for angular inspector in plugins loader

* Simplify initial restore logic

* Fix dynamic detectors provider tests

* Chore: removed angulardetector/provider.go

* Add more tests

* Removed backgroundJob interface, PR review feedback

* Update tests

* PR review feedback: remove ErrNoCachedValue from kv store Get

* Update tests

* PR review feedback: add IsDisabled and remove nop background srevice

* Update tests

* Remove initialRestore channel, use mux instead

* Removed backgroundJobInterval, use package-level variable instead

* Add TestDynamicAngularDetectorsProviderBackgroundService

* Removed timeouts

* pr review feedback: restore from store before returning the service

* Update tests

* Log duration on startup restore and cron run

* Switch cron job start log to debug level

* Do not attempt to restore if disabled
2023-07-06 17:34:27 +03:00
Torkel Ödegaard
0fb7369a79
Docs: Fix scenes what's new in Grafana 10 entry (#71128)
Fix scenes release note
2023-07-06 14:19:51 +00:00
Michael Mandrus
ff6d6659fb
Query: Fix concurrency handling for mixed datasource queries (#70100)
* split queries and merge responses

* increase concurrency again

* update unit test to verify the headers are merged

* fix lint issue

* fix race condition in unit test

* Fix function name and add a bit more documentation about how the func should be used

* update function call after rename

* check for duplicate header vals

* make concurrent query limit configurable

* Update conf/sample.ini

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-07-06 17:15:43 +03:00
Jo
d6c468c1c2
Auth: Add empty role definition (#64694)
* Allow setting role as None

Co-authored-by: gamab <gabi.mabs@gmail.com>

Seeking for places where role.None would be used

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Adding None role to the frontend

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

unify org role declaration and remove from add permission

fix backend test

fix backend lint

* remove role none from frontend

* Simplify checks

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

* nits

---------

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
2023-07-06 15:40:06 +02:00
Kristina
b6fbf307d9
Explore: Add checking for target datasources and add test (#70855)
Add checking for target datasources and add test
2023-07-06 08:36:39 -05:00
Ivan Ortega Alba
ad5a36e7a3
AsyncSegment: Display no-options placeholder for no items status (#70995)
AsyncSegment: Display no options dropdown placeholder for no items status
2023-07-06 15:27:11 +02:00
Will Browne
4818568c65
Chore: Convert background service registry to dskit module (#64062)
* Chore: Add initial support for deployment modes

* revert CLI changes and start modules independently

* add modules to codeowners

* additional comments

* add Engine and Manager interface to fix test issues

* convert background service registry to dskit module

* remove extra context from serviceListener logger

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

* Remove whitespace

* fix import

* undo ide changes

* only register All by default

* with registry

* add test

* add comments

* re-add debug log

* fix import

* reorganize arg

* undo kind changes

* add provide service test

* fix import

* rejig systemd calls

* update codeowners

---------

Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2023-07-06 14:45:47 +02:00
Laura Fernández
76974009d0
GLDS: Get metrics of '@emotion/css' imports (#71064) 2023-07-06 13:30:46 +02:00
Gilles De Mey
441660b7b4
Alerting: Details page v2 feature flag (#69326) 2023-07-06 13:16:47 +02:00
Ivan Ortega Alba
6ad9e386ad
DS Picker: Filter available DS based on component props (#70613)
* Apply filters consistently to every list in the picker

* Display all built-in DS when editing a panel

* Add `uploadFile` prop to toggle the CSV file DS
2023-07-06 11:50:55 +02:00
Torkel Ödegaard
d87c2c4049
SceneDashboard: Move time controls from nav toolbar into controls and make controls them sticky, and edit mode (#71082)
* Scene with sticky controls

* Progress on an edit mode
2023-07-06 11:21:03 +02:00
Matias Chomicki
1b80df0168
Loki: add additional settings section (#71035)
* Loki: add additional settings section

* Derived fields: add config subsection

* Query settings: add config subsection

* Loki config: use divider instead of hr

* Derived fields: refactor legacy styles

* Loki config: add divider between derived fields and query settings

* Loki config: create alerting settings for Loki
2023-07-06 10:20:38 +02:00
Torkel Ödegaard
f6f3d97288
Eslint: Remove scenes rule for member accessability (#71087) 2023-07-06 09:22:02 +02:00
Adela Almasan
901495a54a
BarChart: Fix legend for fields with labels (#71098) 2023-07-05 14:54:10 -05:00
Galen Kistler
daf9f9cd19
Prometheus: Incremental querying profile data updates (#70701)
* add prometheusIncrementalQueryInstrumentation feature flag, update instrumentation data
2023-07-05 14:39:49 -05:00
Agnès Toulet
f96ceb7804
Kinds: Fix report generation (#71048)
Fix kindsys report generation
2023-07-05 14:58:00 -04:00
Joseph Perez
f9df1f3051
Docs: Plugins doc reorganization, part 1 (#69864)
* Initial commit

* Prettier fixes

* Doc-validator fixes part 1

* Doc-validator fixes part 2

* More doc-validator fixes

* More doc-validator fixes

* Test

* link test

* Linnk test

* Link test

* More fixes

* More fixes

* Doc-validator fixes

* Doc-validator fixes

* fix broken link

* Fix

* Testing

* Doc fixes

* Link fixes

* Fix links

* Update docs/sources/developers/plugins/create-a-grafana-plugin/_index.md

Co-authored-by: David Harris <david.harris@grafana.com>

* Testing

* Testing

* Testing

* Testing

* Doc-validator fixes

* Doc-validator fixes

* Doc-validator fixes

* Fix broken links for plugins reorganization project

* Prettier fixes

* Prettier fixes

* Incorporate reviewer feedback

* Link fixes

* Link fixes

* Link fixes

* Link fix

* Deleted space

* Codeowners fix

* Change grafana.com links to absolute URLs for Hugo

---------

Co-authored-by: David Harris <david.harris@grafana.com>
2023-07-05 13:25:11 -05:00
prenzlern
bdf60d69de
Docs: update heatmap panel options (#71058)
Added some heatmap panel configuration options which were missing from the docs
2023-07-05 13:43:54 -04:00
Ashley Harrison
ab09c9efc7
TimePicker: Fix issue with previous fiscal quarter not parsing correctly (#71083)
* fix issue with previous fiscal quarter not parsing correctly

* add comment
2023-07-05 17:02:28 +01:00
Karl Persson
b9442c98ad
AuthN: Fix url token auth when clientTokenRotation is enabled (#71073)
* ContextSrv: No longer try to rotate token if we are using auth_token in url

Also extract the logic to check if we should schedule the job into its own function
2023-07-05 17:08:49 +02:00
Kristina
f18a02149a
Correlations: Create paginated API (#65241)
* Add pagination params and apply to sql

* Create getCorrelationsResponse that returns metadata

* Set up pagination, change correlations fetch to only get source datasource correlations

* Move correlations from root to pane, only fetch correlations for one datasource when initialized or datasource is changed

* Fix tests

* Fix remaining tests

* Use functional component to handle state

* Remove unneeded mocks, fix tests

* Change perPage to limit

* Fix Go Tests

* Fix linter

* Remove parameter

* Account for mixed datasources

* Delete unused hook

* add source UID filter to API, start backing out front end hook changes

* add source IDs to API, use when loading or changing datasource

* Fix prettier

* Mock correlations response

* Get correlations for all datasources in mixed scenario

* Add documentation for new parameters

* Attempt to fix swagger

* Fix correlations page

* add swagger and openapi docs

* Add mocks to failing test

* Change API for consistency, remove extra hooks and unused function

* Add max to limit and re-gen api docs

* Move the page to the previous page if deleting all the rows on the page

* Only fetch if remove does not have value

* Change page to a reference hook

* Fix documentation, a test and some logic thinking page could be 0
2023-07-05 09:37:17 -05:00
Andre Pereira
340c536d0e
Tempo: TraceQL editor - Match type of new values with values in dropdown (#69468)
Tempo: TraceQL editor - set type of added values to match the type of the other values in the dropdown
2023-07-05 15:34:22 +01:00
Dominik Prokop
61459e2b96
Bump scenes to 0.17.2 (#70893)
* Bump scenes to 0.17.2

* Update jest config

* Update tsconfig

* Update webpack config

* Update to latest API
2023-07-05 07:24:48 -07:00
ismail simsek
81ba27c149
Feat: Match allowed cookies with optional character (#71047)
* Match allowed cookies with optional character

* Use strings package
2023-07-05 16:12:56 +02:00
Christopher Moyer
971058919f
Docs: adds uninstall instructions to debian/ubuntu (#70841)
* adds uninstall to debian/ubuntu

* updates based on SME feedback

* Update docs/sources/setup-grafana/installation/debian/index.md

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>

* Moved remove grafana repo as separate step

* adds uninstall docs to remaining linux topics

* Update docs/sources/setup-grafana/installation/debian/index.md

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>

* Update docs/sources/setup-grafana/installation/suse-opensuse/index.md

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>

* Update docs/sources/setup-grafana/installation/redhat-rhel-fedora/index.md

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>

* Update docs/sources/setup-grafana/installation/suse-opensuse/index.md

* corrects punctuation

* makes prettier

---------

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
2023-07-05 08:06:03 -05:00
fabrizio-grafana
d31e96104a
Dashboard: Add suggestion box for Flame Graph (#70763)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-07-05 14:25:00 +02:00
Galen Kistler
927393633c
Prometheus: Code editor autocomplete returns bad results when text is highlighted (#70856)
* adjust cursor when text is selected to give better autocomplete results in prometheus code editor
2023-07-05 07:22:23 -05:00
Torkel Ödegaard
7252c6dd91
PanelChrome: Fixes issues with hover header and resizing panel above (#71040)
* PanelChrome: Fixes issues with hover header and sizing panel above

* Update

* Make panel be focusable

* Fix tooltip when using keyboard nav

* Re-render grid when layout change to have dom positions match absolute css positions

* Fix clicking panel leaves hover header open
2023-07-05 14:17:51 +02:00
Alfredo
f02e1548d7
Update derived fields provisioning example (#66027)
* Update derived fields provisioning example

*WHAT*

Update loki derived fields provisioning example:
- Remove `# Right now, Grafana supports only Jaeger and Zipkin data sources as link targets.` comment since it supports other trace data sources as well such as Tempo".
- Add example to include `URL Label` to provide full configuration example that reflects the options visible on the UI.

* Update _index.md

* makes prettier

---------

Co-authored-by: lwandz13 <larissa.wandzura@grafana.com>
2023-07-05 07:08:45 -05:00
Esteban Beltran
72f6793344
Plugins: Add monitoring only mode to frontend sandbox (#70688) 2023-07-05 13:48:25 +02:00
Virginia Cepeda
549e04a8f1
Alerting: Keep rule form buttons always on top (#71056)
* Keep form buttons always on top

* Fix tests
2023-07-05 13:47:15 +02:00
Gilles De Mey
09330890f3
add setupListeners to the redux store (#70953) 2023-07-05 12:22:48 +02:00
Joey
280f259f73
Tracing: Remove unused selectors (#71038)
Remove unused selectors
2023-07-05 10:42:12 +01:00
Esteban Beltran
d618bc46d1
Plugins: Add config option to exclude specific plugins from frontend sandbox (#70899) 2023-07-05 11:16:56 +02:00
Matias Chomicki
d153fd434a
Elasticsearch: add additional settings section (#71037)
* Elasticsearch: add additional settings section

* Remove extra lines

* Elastic config: add divider between name and http settings

* Data links: fix subsection title

* Remove unused import
2023-07-05 10:45:10 +02:00
RoxanaAnamariaTurc
7fed3f84f6
Segment Story Component: Removed any type from Segment story component (#71043)
* Removed any type from Segment story component

* Updated the component with the suggested changes
2023-07-05 09:27:03 +01:00
Laura Benz
9a8125ca3b
Elasticsearch: Replace duplicate IconButton component (#71050)
* refactor: replace IconButtons

* refactor: replace tooltip text in order to make it more universal

* refactor: remove additional IconButton

* refactor: add aria-labels

* refactor: fix test
2023-07-05 08:47:38 +02:00
Natalia Bernarte Oses
529be0f513
Add dashboards label to issues in dashboards project (#70992)
* Create dashboards-issue-add-label.yml

* Update code owners with the new file

* Update .github/workflows/dashboards-issue-add-label.yml

---------

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2023-07-04 14:42:17 -03:00
Bohdan Jóža
d36b70dec6
I18n: Translate phrases for new Browse Dashboards (#70654)
* Mark strings in folder manager nav for translation

* Mark strings in folder actions for translation

* Mark strings in new folder modal for translation

* Mark strings in delete modal for translation

* Mark strings in move modal for translation

* Fix interpunction in translations

* Run i18n:extract

* Fix Manage Permissions drawer test

* Redundnt useMemo

* Updated extracted translations after resolving conflicts

---------

Co-authored-by: Roxana Turc <anamaria-roxana.turc@grafana.com>
2023-07-04 16:32:32 +01:00
Ezequiel Victorero
82f788b7a2
PublicDashboards: Add validation on update (#70993) 2023-07-04 12:03:39 -03:00
Kévin Gomez
467c818c47
Kinds: Fix kind publishing to the registry (#71041)
* Build: Generate core kinds in their own folder

* Build: Generate composable kinds within a package
2023-07-04 16:52:41 +02:00
Virginia Cepeda
db2770d992
Alerting: Improve time range and max data points info in QueryEditor (#70867)
* Add component to display QueryOptions in editor

* Display QueryOptions in QueryWrapper

* Display real data for time range and max data points

* Improve QueryOptions styling

* Remove Portal from RelativeTimeRangePicker

* Prevent RefID from hiding on small screens

Fixes https://github.com/grafana/grafana/issues/70900

* Address review comments

* Fix lint
2023-07-04 11:17:14 -03:00
Emil Tullstedt
f2bb9fd92a
Docs: Provide absolute paths for set-up-https.md (#70681)
Fixes #69664
2023-07-04 14:08:37 +00:00
Ludovic Viaud
211bff1fd0
Extend transformations data (#70247)
Extend transformations
2023-07-04 15:34:22 +02:00
Neel
2216e40cc0
Fix width for Resample label (#71011)
Fix overflowing width for Resample label
2023-07-04 14:34:47 +02:00
Ezequiel Victorero
ddd96a36a7
A11y: Do not force colors in the color swatch and icon series (#70862) 2023-07-04 09:11:30 -03:00
Ezequiel Victorero
37d4c8deff
A11y: Add support for toggle buttons in high contrast mode (#70838) 2023-07-04 09:10:42 -03:00
Ashley Harrison
0e4743b852
NestedFolderPicker: Expand/collapse keyboard handling (#70949)
* better keyboard handling in NestedFolderList

* add check for foldersAreOpenable
2023-07-04 12:55:25 +01:00
ismail simsek
61a77b4f6b
InfluxDB: Return better error messages from backend (#70066)
Co-authored-by: ludovio <ludovic.viaud@gmail.com>
2023-07-04 13:55:08 +02:00