Commit Graph

9227 Commits

Author SHA1 Message Date
Ashley Harrison
580345306b
Nested folders: Only show edit title button if user has permissions (#71426)
only show edit title button if user has permissions
2023-07-12 11:07:16 +01:00
Ashley Harrison
29ed310af9
Nested folder picker: Move options into overlay (#71042)
* move options into overlay

* add some unit tests

* Update public/app/features/browse-dashboards/components/BrowseActions/MoveModal.tsx

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>

* minor refactoring based on review comments

* just pass in uid

---------

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2023-07-12 10:37:08 +01:00
Joey
6615418df8
Tracing: Show next/prev buttons when span filters are collapsed (#71025)
* Show next/prev buttons when span filters are collapsed

* Update test

* Remove imports

* Update lint

* Prettier

* Update test

* Update styling
2023-07-12 07:52:07 +01:00
Ashley Harrison
2650aa5600
Internationalization: Correctly generate plural forms (#71341)
* user essentials mob! 🔱

lastFile:public/locales/pseudo-LOCALE/grafana.json

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:contribute/internationalization.md

* user essentials mob! 🔱

lastFile:contribute/internationalization.md

* move pseudo generation to precommit hook if en-US file is modified

Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>

* fix unit tests

---------

Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Roxana Turc <anamaria-roxana.turc@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>
2023-07-11 16:37:01 +01:00
Joao Silva
2b379ba7ea
Forms: Remove usage of sass styles in Group By and Reduce Transformations (#71223) 2023-07-11 15:48:23 +01:00
Sven Grossmann
9ddba37dbc
Logs: Fix nanosecond partition in log context (#71346)
* add ts partition

* fix setting wrong loadingstate

* improve setContext

* update context and test
2023-07-11 16:20:41 +02:00
Josh Hunt
2e5f733d2d
Dashboards: Fix frontend exception when backend fails to save dashboard (#71144) 2023-07-11 13:33:09 +00:00
Matias Chomicki
b8fbeb084a
Logs: Display log row menu cell on displayed fields (#71300)
* LogRowMenuCell: create component

* LogRowMessage: use new LogRowMenuCell component

* LogRowMessage: turn into functional component

* LogRowMenuCell: memoize component

* LogRowMessage: remove cx

* LogMessage: create component from function

* LogRowMessageDisplayedFields: turn into component

* LogRowMessageDisplayedFields: add LogRowMenuCell

* LogRowMessageDisplayedFields: rename prop and pass missing context prop

* LogRowMessageDisplayedFields: add unit test
2023-07-11 14:50:53 +02:00
Ivan Ortega Alba
699e499cc7
Variables: Page refreshes hitting enter to select a variable value (#70996) 2023-07-11 12:30:08 +02:00
Gilles De Mey
82f0ef6871
Alerting: Add support for additional colors in MetaText (#71299)
add support for additional colors in MetaText
2023-07-11 11:11:25 +02:00
Giuseppe Guerra
9945c02405
Connections console: Add Angular badge for Angular plugins (#70789)
* Angular deprecation: Add Angular badge in plugin catalog page

* Angular deprecation: Add alert in plugin details page

* Angular deprecation: Disable install button if for Angular plugins

* removed extra console.log

* Add tests for Angular badge

* Add tests for PluginDetailsAngularDeprecation

* Add tests for InstallControlsButton

* Add tests for ExternallyManagedButton

* Table tests

* Catalog: Update angular deprecation message

* PR review feedback

* Update tests

* Update copy for angular tooltip and alert

* Update tests

* Fix test warnings

* Fix angularDetected not being set for remote catalog plugins

* Dynamic alert text based on grafana config

* Connections: Add Angular badge to Angular plugins

* Add test for connections console angular badge

* Fix tests

* Fix tests

* Moved tests

* PR review: Use ternary operator instead of &&

* Fixes to how to use Card component

* comment out desc

* Do not use deprecated theme.v1 and theme.typography.size

* pr review feedback

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-07-11 10:12:09 +02:00
Sven Grossmann
212239aedb
LogContext: Fix a bug where multiple logs with similar nanosecond timestamps were loaded too often (#71319)
fix bug with multiple ns logs
2023-07-11 10:00:10 +02:00
Joey
a56a279c67
Traces: Filtering by span id (#71275)
* Filter by span id

* Update test
2023-07-11 08:59:36 +01:00
Joey
f98f6ea391
Tracing: Make show filters only keyboard accessible (#70890)
* Make show filters only keyboard accessible

* Update test

* Update styling
2023-07-11 08:05:11 +01:00
Matthew Jacobson
e3787de470
Alerting: Fix Alertmanager change detection for receivers with secure settings (#71307)
* Alerting: Make ApplyAlertmanagerConfiguration only decrypt/encrypt new/changed secure settings

Previously, ApplyAlertmanagerConfiguration would decrypt and re-encrypt all secure settings. However, this caused re-encrypted secure settings to be included in the raw configuration when applied to the embedded alertmanager, resulting in changes to the hash. Consequently, even if no actual modifications were made, saving any alertmanager configuration triggered an apply/restart and created a new historical entry in the database.

To address the issue, this modifies ApplyAlertmanagerConfiguration, which is called by POST `api/alertmanager/grafana/config/api/v1/alerts`, to decrypt and re-encrypt only new and updated secure settings. Unchanged secure settings are loaded directly from the database without alteration.

We determine whether secure settings have changed based on the following (already in-use) assumption: Only new or updated secure settings are provided via the POST `api/alertmanager/grafana/config/api/v1/alerts` request, while existing unchanged settings are omitted.

* Ensure saving a grafana-managed contact point will only send new/changed secure settings

Previously, when saving a grafana-managed contact point, empty string values were transmitted for all unset secure settings. This led to potential backend issues, as it assumed that only newly added or updated secure settings would be provided.

To address this, we now exclude empty ('', null, undefined) secure settings, unless there was a pre-existing entry in secureFields for that specific setting. In essence, this means we only transmit an empty secure setting if a previously configured value was cleared.

* Fix linting

* refactor omitEmptyUnlessExisting

* fixup

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-07-11 08:23:07 +02:00
Ryan McKinley
09cc63329f
XYChart: Improve base options setup (#67878) 2023-07-10 17:54:01 -07:00
Juan Cabanas
8a6c6c3285
PanelInspect: Download CSV without extra blank rows (#71248) 2023-07-10 12:16:47 -03:00
Torkel Ödegaard
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
Haris Rozajac
4b3050e02e
Explore: Test deleting comments in query history (#70934)
* Working test
2023-07-10 08:09:42 -06:00
Piotr Jamróz
c191a20591
Explore: Fix Query History flakey test (#71190)
* Baseline benchmark

* Baseline benchmark

* Re-trigger the build

* Use test id

* Re-trigger the build

* Re-trigger the build

* Use test id to speed up the test

* Split query history sync tests
2023-07-10 14:35:54 +02:00
Gábor Farkas
8f2f6d63eb
logs: scanning: add tracking (#71031)
* logs: scanning: add tracking

* only report start-click when it is really doing it

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

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-07-10 13:50:18 +02:00
Gilles De Mey
1945f2b64e
Alerting: Use new "Label" components for alert instance labels (#70997) 2023-07-10 13:03:35 +02:00
Torkel Ödegaard
17b2240d52
GrafanaUI: Update FilterPill active state and ToolbarButton active state (#70396) 2023-07-10 11:41:33 +02:00
Sven Grossmann
b05cc2d651
Transformations: Fix extractFields throwing Error if one value is undefined or null (#71070)
* fix extract fields with null values

* rename test

* check for null values

* revert changes

* improve position
2023-07-10 09:49:56 +02:00
Josh Hunt
b1e76a7036
Dashboards: Keep save drawer open for unhandled errors (#70434)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer.tsx

* user essentials mob! 🔱

lastFile:public/app/features/dashboard/components/SaveDashboard/SaveDashboardDrawer.tsx

* user essentials mob! 🔱

lastFile:public/app/features/dashboard/components/SaveDashboard/useDashboardSave.tsx

* rename isHandledError fn

* fix prettier

---------

Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Laura Benz <laura.benz@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-07-07 13:46:53 +00:00
Gilles De Mey
089305e399
Alerting: improve provisioning indicator for notification policies (#71160) 2023-07-07 14:00:53 +03:00
Ben Donnelly
524f111ab3
Explore: Allow the use of plugin panels (#66982)
* Explore: Allow the use of plugin panels

Allow plugins to define a visualisation to use in explore that comes from a plugin.

* Explore: Allow the use of plugin panels

Rename ExplorePanel to CustomContainer

* Explore: Allow the use of plugin panels

Changed CustomContainer to take all frames for plugin id.
Add field preferredVisualisationPluginId to frame metadata.
Updated decorators to check for plugin and fallback to preferredVisualisationType if plugin cannot be found.

* Explore: Allow the use of plugin panels

Handle case where there are no custom frames

* Explore: Allow the use of plugin panels

Add test cases
2023-07-07 11:28:44 +02:00
Sonia Aguilar
00e9185b1a
Alerting: Add legend for mixed in Loki alert history and use highlight instead of scroll (#71131)
* Add legend for mixed in Loki alert history

* Highlight row in the log list while hovering in the timeline instead of srcolling into it

* update some of the styles

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-07-07 09:10:10 +02:00
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
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
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
Torkel Ödegaard
f6f3d97288
Eslint: Remove scenes rule for member accessability (#71087) 2023-07-06 09:22:02 +02: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
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
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
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
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
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
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
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
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
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
Gábor Farkas
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
Gilles De Mey
368afc211c
Alerting: Contact points v2 – part 1 (#70643) 2023-07-04 12:47:19 +02:00
Josh Hunt
3640bf77ba
NestedFolders: Add search to NestedFolderPicker (#70848)
* NestedFolders: Add search to NestedFolderPicker

* fix pagination placeholders

* don't allow folders to be expanded in search
2023-07-04 10:20:02 +00:00