Commit Graph

3842 Commits

Author SHA1 Message Date
Joey
22fde6a3f2
Tracing: Add links to documentation in config pages (#66442)
Add links to documentation in config pages and clean up styles
2023-04-13 14:56:35 +01:00
kay delaney
38ee910e39
Dashboards: Prevent template variables from resolving twice (#66372) 2023-04-13 12:00:59 +01:00
Josh Hunt
5df33c0dc1
NestedFolders: New Browse Dashboards views (#66003)
* scaffold new browse routes

* a part of rtk query

* load nested data

* .

* link nested dashboards items

* add comment about bad code, update codeowners

* tidies
2023-04-12 10:44:01 +01:00
Torkel Ödegaard
1ed75f9709
PageNotFound: Update design so that it looks better in topnav (#66295) 2023-04-11 19:19:25 +02:00
Ashley Harrison
0aa301e251
Navigation: Scrolled hamburger menu links now navigate correctly in Safari (#66261)
overlayProps/dialogProps need to go inside FocusScope
2023-04-11 13:05:08 +01:00
Ashley Harrison
1261345b81
Chore: Upgrade to react 18 (#64428)
* update react 18 related deps

* fix some types

* make sure we're on react-router-dom >= 5.3.3

* Use new root API

* Remove StrictMode for now - react 18 double rendering causes issues

* fix + ignore some @grafana/ui types

* fix some more types

* use renderHook from @testing-library/react in almost all cases

* fix storybook types

* rewrite useDashboardSave to not use useEffect

* make props optional

* only render if props are provided

* add correct type for useCallback

* make resourcepicker tests more robust

* fix ModalManager rendering

* fix some more unit tests

* store the click coordinates in a ref as setState is NOT synchronous

* fix remaining e2e tests

* rewrite dashboardpage tests to avoid act warnings

* undo lint ignores

* fix ExpanderCell types

* set SymbolCell type correctly

* fix QueryAndExpressionsStep

* looks like the types were actually wrong instead :D

* undo this for now...

* remove spinner waits

* more robust tests

* rewrite errorboundary test to not explicitly count the number of renders

* make urlParam expect async

* increase timeout in waitFor

* revert ExplorePage test changes

* Update public/app/features/dashboard/containers/DashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* skip fakeTimer test, ignore table types for now + other review comments

* update package peerDeps

* small tweak to resourcepicker test

* update lockfile...

* increase timeout in sharepublicdashboard tests

* ensure ExplorePaneContainer passes correct queries to initializeExplore

* fix LokiContextUI test

* fix unit tests

* make importDashboard flow more consistent

* wait for dashboard name before continuing

* more test fixes

* readd dashboard name to variable e2e tests

* wait for switches to be enabled before clicking

* fix modal rendering

* don't use @testing-library/dom directly

* quick fix for rendering of panels in firefox

* make PromQueryField test more robust

* don't wait for chartData - in react 18 this can happen before the wait code even gets executed

---------

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2023-04-11 10:51:54 +01:00
Piotr Jamróz
0bf2b89eb9
Explore: Align multiple log volumes (#64356)
* Align log volumes on x an y axes

* Move helper functions to logs/utils

* Add tests

* Simplify supplementaryQueries.ts

* Fix tests

* Revert code simplifications

To simplify the PR, this can be added in a separate PR

* Fix reusing logs volume when limited/non-limited are used

* Use more specific property name

* Add missing property

* Stretch graph to selected range but only if there's data available

* Fix unit tests

* Fix calculating maximum when bars are stacked

* Sort log volumes by data source name

* Simplify logic to determine if log volumes can be zoomed in
2023-04-11 10:05:04 +02:00
Gábor Farkas
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
Torkel Ödegaard
42be20cbf3
Page: Remove bottom page margin (#65082)
* Remove page margin

* Only remove bottom margin

* revert other changes

* revert another change
2023-04-04 16:00:41 +02:00
Ashley Harrison
6f7363af3a
Dropdown: Stop Dropdown accepting a function as children (#65467)
remove dropdown accepting function children
2023-04-04 14:40:44 +01:00
Torkel Ödegaard
093498a03b
Angular: Prevent angular from loading when disabled (#65755)
* Angular: Prevent angular from loading when disabled

* remove stuff
2023-04-03 10:45:22 +02:00
Karl Persson
46cfb73e21
AuthToken: client token rotation fix (#65709)
* AuthToken: respond with 401 if token is not found

* Set retry to one so we don't retry a failed token rotation
2023-03-31 16:44:08 +02:00
Ashley Harrison
e39c3b76dd
Navigation: Rename Alerts & incidents to Alerts & IRM (#65635)
update Alerts & incidents to Alerts & IRM
2023-03-31 09:40:06 +01:00
Ashley Harrison
ff96cd1342
Chore: add selector for items in the megamenu (#65633)
add selector for items in the megamenu
2023-03-30 16:57:08 +01:00
Josh Hunt
31aadeaecd
Search: Remove old s o search shortcut from HelpModal (#65631) 2023-03-30 18:46:43 +03:00
Ashley Harrison
98e66654d6
Chore: Some type fixes needed for react 18 (#65600)
some type fixes needed for react 18
2023-03-30 13:40:18 +01:00
Ashley Harrison
9e68fc6e60
Navigation: Add Import dashboard to quick actions (#65528)
* add import dashboard to quick actions

* move logic into same if block
2023-03-30 10:34:16 +01:00
Joey
10d896d24e
Tracing: Docs and config improvements for Tempo/Jaeger/Zipkin (#65255)
* Docs and config improvements

* Add note

* Add traceToLogs (v1) in provisioning example

* Remove old provisioning

* PR updates
2023-03-30 07:41:27 +01:00
Torkel Ödegaard
3696958632
SectionNav: Remove root section right margin (#65507) 2023-03-29 10:51:56 +02:00
Torkel Ödegaard
b7b608418d
Templating: Introduce macros to simplify and optimize some scopedVars (#65317)
* Templating: Introduce macros to simplify and optimize some scopedVars

* Fixing tests

* fix test

* minor fix

* refactoring so macros work with formatting

* remove breaking change and keep current inconsistency

* Rename valueIndex to rowIndex

* Minor fixes

* Added test dashboard

* Added tags to dashboard

* Update

* Added test to check it returns match

* Update

* Fixed dashboard

* fix
2023-03-28 19:22:34 +02:00
Torkel Ödegaard
273e05a9a2
MegaMenu: Fixes mega menu showing scroll indicator when it shouldn't (#65452)
* MegaMenu: Fixes mega menu showing scroll indicator when it shouldn't

* fixing css
2023-03-28 17:47:49 +02:00
Ashley Harrison
f948482386
Navigation: Sanitize homeUrl (#65293)
sanitize homeUrl
2023-03-27 15:27:52 +01:00
Karl Persson
382b24742a
Auth: Add feature flag to move token rotation to client (#65060)
* FeatureToggle: Add toggle to use a new way of rotating tokens

* API: Add endpoints to perform token rotation, one endpoint for api request and one endpoint for redirectsd

* Auth: Aling not authorized handling between auth middleware and access
control middleware

* API: add utility function to get redirect for login

* API: Handle token rotation redirect for login page

* Frontend: Add job scheduling for token rotation and make call to token rotation as fallback in retry request

* ContextHandler: Prevent in-request rotation if feature flag is enabled and check if token needs to be rotated

* AuthN: Prevent in-request rotation if feature flag is enabled and check if token needs to be rotated

* Cookies: Add option NotHttpOnly

* AuthToken: Add helper function to get next rotation time and another function to check if token need to be rotated

* AuthN: Add function to delete session cookie and set expiry cookie

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-03-23 14:39:04 +01:00
Ryan McKinley
f96637b5fc
Live: Remove (alpha) ability to configure live pipelines (#65138) 2023-03-22 20:09:44 +02:00
Tobias Skarhed
590b07539f
Core: Update components to have standard radii (#65065)
* Update core border radii

* Add non-default border-radius on some grafana-ui items
2023-03-21 12:24:50 +01:00
Ashley Harrison
9ca01cc070
Notifications: Enable display of trace ID by default (#64884)
enable tracing by default
2023-03-21 09:35:21 +00:00
Ryan McKinley
91a4b8b529
Chore: remove dashboardsFromStorage (#65058) 2023-03-20 18:36:49 +02:00
Torkel Ödegaard
6f73777d59
SectionNav: Make section toggle not take up horizontal space (#64898) 2023-03-20 15:43:05 +01:00
Torkel Ödegaard
769b4598d7
Router: Fix broken link interception and router navigation (#65023)
* Router: Fix broken link interception and router navigation

* replace with instanceof Element
2023-03-20 10:54:10 +01:00
Kristian Bremberg
27e2b037ae
Chore: Use DOMPurify to sanitize strings rather than js-xss (#62787)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-03-16 19:13:34 +02:00
Ryan McKinley
2578774188
Chore: Avoid explicit React.FunctionComponent<Props> when possible (round 3) (#64839) 2023-03-16 16:56:26 +02:00
Ashley Harrison
b19f7bb653
Chore: update more unit tests to work with react 18 (#64812)
update more unit tests to work with react 18
2023-03-16 10:00:39 +00:00
Joey
596e5b43d9
Jaeger and Zipkin: Config & docs upgrade (#64250)
* Jaeger and Zipkin upgrades docs and condig

* Update text

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/jaeger/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/query-editor/index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/query-editor/index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/zipkin/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/zipkin/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/zipkin/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Minor text formatting updates

* yarn prettier:write

* Update docs/sources/datasources/zipkin/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

---------

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2023-03-16 08:49:40 +00:00
Ryan McKinley
4f13e78d11
Chore: Avoid explicit React.FC<Props> when possible (round 2) (#64749) 2023-03-15 16:56:09 +02:00
Ashley Harrison
e0e6165f70
Chore: adjust more unit tests to work with react 18 (#64759)
adjust unit tests to work with react 18
2023-03-15 10:12:13 +00:00
Ashley Harrison
85e5326040
Chore: Adjust unit tests so they work with react 18 (#64698)
tweak unit tests so they work with react 18
2023-03-14 17:24:04 +00:00
Ryan McKinley
d710507bc5
Chore: Avoid explicit React.FC<Props> when possible (#64722) 2023-03-14 16:38:21 +02:00
Ashley Harrison
53186c14a4
Chore: Improve some types (#64675)
* some type fixes

* few more

* more type fixes

* fix the majority of (window as any) calls

* don't make new variable for event

* few more

* MOAR
2023-03-14 09:51:44 +00:00
Kristina
c363a81806
Dashboards: Filter out expressions when going to Explore (#64654)
* Filter out expressions when going from dashboard to explore

* Move expression UID constant to types
2023-03-13 07:53:19 -05:00
Torkel Ödegaard
5275a203aa
TopNav: Wrap TopSearchBar in memo to prevent unnecessary re-renders (#64667) 2023-03-13 10:57:55 +01:00
Andreas Christou
a814357d6d
FalconLogScale: Traces to logs support (#64174)
* Humio traces to logs support

* Update tag formatting

* Add tests for humio

* Correct naming
2023-03-10 14:17:17 +00:00
Ashley Harrison
3336327306
Navigation: Fix Home logo always going to /login (#62658)
* only redirect to /login when anonymous access is disabled

* only search for dashboards when not logged in if anon access is enabled

* fix go logic

* add unit tests
2023-03-09 16:42:45 +00:00
Ivana Huckova
bd0fa79542
Elasticsearch: Add log highlight processing on backend (#63924)
* Elasticsearch: Add highlight for logs

* Fix running of queries trough backend only when shouldRunTroughBackend

* Fix incorrect json in test string

* Address feedback

* Keep order of words same
2023-03-09 13:34:53 +01:00
Ryan McKinley
5f7bc54fba
OptionsUI: Enabled settings on the color picker (#64483) 2023-03-09 04:53:18 -05:00
Ashley Harrison
11bc66a0e8
Chore: use React.PropsWithChildren to explicitly define the children prop (#64433)
* use React.PropsWithChildren to explicitly define the children prop

* fix ThemeDemo as well

* provide empty generics
2023-03-08 16:12:54 +00:00
renovate[bot]
523f675dd8
Update Monthly patch updates (#64323)
* Update Monthly patch updates

* don't update dangerously-set-html-content

* run prettier

* fix types

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-03-08 09:38:06 +00:00
Ieva
1b6b5dd7e9
AuthN: use the default login icon if no icon is specified (#64327)
use the default login icon if empty string passed in
2023-03-07 10:14:36 -05:00
Piotr Jamróz
a7238ba933
Explore: Support mixed data sources for supplementary query (#63036)
* Consolidate logs volume logic (full range and limited)

* Fix showing limited histogram message

* Test passing meta data to logs volume provider

* Improve readability

* Clean up types

* Add basic support for multiple log volumes

* Move the comment back to the right place

* Improve readability

* Clean up the logic to support Logs Samples

* Update docs

* Sort log volumes

* Provide title to logs volume panel

* Move logs volume cache to the provider factory

* Add helper functions

* Reuse only if queries are the same

* Fix alphabetical sorting

* Move caching out of the provider

* Support errors and loading state

* Remove unused code

* Consolidate supplementary query utils

* Add tests for supplementaryQueries

* Update tests

* Simplify logs volume extra info

* Update tests

* Remove comment

* Update tests

* Fix hiding the histogram for hidden queries

* Simplify loading message

* Update tests

* Wait for full fallback histogram to load before showing it

* Fix a typo

* Add feedback comments

* Move feedback comments to github

* Do not filter out hidden queries as they may be used as references in other queries

* Group log volume by refId

* Support showing fallback histograms per query to avoid duplicates

* Improve type-checking

* Fix supplementaryQueries.test.ts

* Fix logsModel.test.ts

* Fix loading fallback results

* Fix unit tests

* WIP

* Update deprecated styles

* Simplify test

* Simplify rendering zoom info

* Update deprecated styles

* Simplify getLogsVolumeDataSourceInfo

* Simplify isLogsVolumeLimited()

* Simplify rendering zoom info
2023-03-07 15:00:11 +01:00
Joey
b6eb324139
Tempo: Config and doc updates (#64017)
* Config and doc upgrades

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update tags text

* Use service graph as a proper noun

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Yarn prettier

---------

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2023-03-06 16:03:29 +00:00
Eric Leijonmarck
15fb7e99d9
Login: Fix sanitize input for signin url (#64203)
fix: sanitize input for signin
2023-03-06 09:54:30 +00:00
Sven Grossmann
2076282064
Logs: Log samples not being ordered correctly (#64097)
* fix log samples being unsorted and multiple results when chunking

* use `SortDirection` enum

* changed to `sortDataFrame` to support other datasources than loki

* update tests

* change capitalization
2023-03-03 16:02:14 +01:00
Ashley Harrison
d61bcdf4ca
Chore: Pass signed user_hash to Intercom via Rudderstack (#63921)
* move analytics identifiers to backend

* implement hash function

* grab secret from env

* expose and retrieve intercom secret from config

* concat email with appUrl to ensure uniqueness

* revert to just using email

* Revert "revert to just using email"

This reverts commit 8f10f9b1bc.

* add docstring
2023-03-03 14:39:53 +00:00
Jan-Otto Kröpke
c323a7cb13
Login: Allow custom name and icon for social providers (#63297) 2023-03-03 09:17:43 +01:00
Torkel Ödegaard
27070c252d
ErrorHandling: Fixes issues with bad error messages (#63775) 2023-03-02 13:09:58 +01:00
Andres Martinez Gotor
dc6d0a2bdb
Nav: Handle app plugin installation/uninstallation (#63706) 2023-03-02 09:50:01 +01:00
Eric Leijonmarck
9d6ab92e39
Service accounts: Remove Add API keys buttons and remove one state of migrating for API keys tab (#63411)
* add: hide apikeys tab on start

* make use of store method

* added hiding of apikeys tab for new org creation

* missing err check

* removed unused files

* implemennted fake to make tests run

* move check for globalHideApikeys from org to admin

* refactor to remove the fake

* removed unused method calls for interface

* Update pkg/services/serviceaccounts/manager/service.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update pkg/services/serviceaccounts/manager/service.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* remove the checkglobal method

* removed duplicate global set const

* add count of apikeys for performance

* remove apikeys adding in UI

* added back deleted file

* added comment on component

* changed wording and copy for hiding and migrating service accounts

* refactor: remove migrationstatus in front/backend

This removes the migrationstatus state from the UI in favor of only
looking at the number of API keys to determine what to show to the user.
This simplifies the logic and makes less calls to the backend with each
page load. This was called both on the API keys page and the Service
accounts page.

- removes the state of migrationstatus from the UI
- removes the backend call
- removes the backend endpoint for migrationstatus

* Update pkg/services/apikey/apikeyimpl/xorm_store.go

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

* changes the contet to also be primary

* change id of version for footer component

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2023-03-01 15:34:53 +00:00
Ashley Harrison
8e9ccfc66e
Navigation: Fix broken layout at 544px (#63793)
* ensure media queries transition properly

* fix unit tests
2023-03-01 15:31:32 +00:00
Uladzimir Dzmitračkoŭ
429d693a4a
Navigation: reserve horizontal space for img in SectionNavItem to avoid layout shift (#63722) 2023-02-28 15:04:17 +01:00
Josh Hunt
91d2df59fc
CommandPalette: Remove topnav command palette feature flag (#63620)
* CommandPalette: Remove topnav command palette feature flag

* Restore search shortcuts if topnav isnt enabled

* fix unused imports
2023-02-24 07:14:53 -05:00
Torkel Ödegaard
2023203045
SectionNav: Simplify section toggle styling (#63653) 2023-02-23 17:03:00 +01:00
Josh Hunt
0c36b247af
Chore: Refactor Search/Folder view types into DashboardViewItem (#63162)
* Chore: Refactor Search/Folder view types into DashboardViewItem

* uid is not optional in api

* rename queryResultToNestedFolderItem function

* Fix error from locationInfo being empty

* change queryResultToViewItem to take view instead

* Fix sortMeta fields not showing on search cards

* Show correct parent for panel search results
2023-02-23 15:52:54 +00:00
Josh Hunt
54aaaf169f
Internationalization: Mark up more of Dashboard Variables and Browse/Search Dashboards (#63518)
* Extract dirty translations from main

* Translate some variable phrases

* Translate nav bar

* Translate search/browse

* Fix header returning null

* Translate search results type

* fix test
2023-02-23 10:46:07 +00:00
Kristina
06dfe2156f
Explore: Add transformations to correlation data links (#61799)
* bring in source from database

* bring in transformations from database

* add regex transformations to scopevar

* Consolidate types, add better example, cleanup

* Add var only if match

* Change ScopedVar to not require text, do not leak transformation-made variables between links

* Add mappings and start implementing logfmt

* Add mappings and start implementing logfmt

* Remove mappings, turn off global regex

* Add example yaml and omit transformations if empty

* Fix the yaml

* Add logfmt transformation

* Cleanup transformations and yaml

* add transformation field to FE types and use it, safeStringify logfmt values

* Add tests, only safe stringify if non-string, fix bug with safe stringify where it would return empty string with false value

* Add test for transformation field

* Do not add null transformations object

* Break out transformation logic, add tests to backend code

* Fix lint errors I understand 😅

* Fix the backend lint error

* Remove unnecessary code and mark new Transformations object as internal

* Add support for named capture groups

* Remove type assertion

* Remove variable name from transformation

* Add test for overriding regexes

* Add back variable name field, but change to mapValue

* fix go api test

* Change transformation types to enum, add better provisioning checks for bad type name and format

* Check for expression with regex transformations
2023-02-22 06:53:03 -06:00
Torkel Ödegaard
f64b7fe8a7
Page: Remove footer from new page layout (#63455)
* Page: Option to hide footer, enabled by default for PluginPage

* Remove footer from new page layout
2023-02-22 13:30:57 +01:00
Torkel Ödegaard
6fd547881a
Page: Remove page shadow and replace with panel border (#63453) 2023-02-21 15:42:37 +01:00
Ashley Harrison
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
Sven Grossmann
0bd326d846
LogsVolume: Make log volume work with chunking (#63181)
* aggregate logs volume on streaming

* enable log volume queries to be split

* add streaming indicator

* added tests

* also chunk logs queries

* change extraInfo back to undefined
2023-02-10 14:43:41 +01:00
Ashley Harrison
fc2f7f90f8
Navigation: add a link to starred dashboards in the megamenu (#62685)
add a link to starred dashboards in the megamenu
2023-02-08 15:18:13 +00:00
Ashley Harrison
6a720f96f7
A11y: ignore rule since keyboard interaction is already handled (#62850)
* Revert "Accessibility: Remove unnecessary onClick from title element (#59696)"

This reverts commit f19b07c0bc.

* ignore eslint rule
2023-02-08 14:17:15 +00:00
Josh Hunt
504eabbe80
Navigation: Ensure command palette is correctly translated (#61103)
* Navigation: Translate nav tree in store

* Remove usage of getNavTitle

* properly translate children

* add pubdash translation

* remove extraneous calls to translation in PageHeader

* empty commit

* correctly allow subtitle to be overrwitten (thank you tests!)

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-02-08 13:15:37 +00:00
linoman
bc67edbff8
Fix RolePicker component offset when it has too many roles (#62857)
Fix role picker offset with too many roles
2023-02-08 12:09:27 +01:00
Josh Hunt
09637caade
Chore: Remove search_srv (#62964)
* Chore: Remove Search Service

* use getSortOptions from grafana searcher

* wip

* fix library panels search tests
2023-02-07 15:28:07 -05:00
Josh Hunt
5564b93e2f
CommandPalette: Move quick add actions to top level (#62900)
* Move quick actions to top level

* Change quick action verb to "Create"

* create to 'new'

* fix comment

* update translations

* undo changing alerting
2023-02-07 16:10:43 +00:00
Piotr Jamróz
999c836753
Explore: Consolidate logs volume logic (full range and limited) (#61995)
* Consolidate logs volume logic (full range and limited)

* Fix showing limited histogram message

* Test passing meta data to logs volume provider

* Improve readability

* Clean up types

* Move the comment back to the right place

* Improve readability
2023-02-07 14:32:06 +01:00
Torkel Ödegaard
39537043ec
AppChrome: Reduce re-renders for identical pageNavs (#62483)
* AppChrome: Reduce re-renders for identical pageNavs

* Update

* removed log
2023-02-07 08:01:22 +01:00
Torkel Ödegaard
0ae118d3ed
Page: Fixes plugins chromeless bug (#62879) 2023-02-03 16:14:42 +01:00
Eric Leijonmarck
ed18a249b8
Refactor: move displayname logic from backend to frontend (#62845)
* remove fallback from backend

* add: displayname logic to frontend

* Update public/app/core/components/RolePicker/utils.ts

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* add: fetchTeamRoles and return earlier

* refactor: change to const

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-02-03 10:39:44 +00:00
Levente Balogh
48e0ab2142
Plugins: Case-sensitive routes for standalone pages (#62779)
* feat: extend the RouteDescription witha `sensitive` property

* feat: use case-sensitive routes for custom plugin standalone pages

* fix: hcheck for `/a/` instead of `/a`
2023-02-03 09:01:34 +01:00
Ashley Harrison
5795553353
Navigation: Fix command palette toggle removal (#62809)
command palette is always here
2023-02-02 16:32:34 +00:00
Ashley Harrison
5e7e026c0c
Navigation: Remove commandPalette feature toggle (#62698)
* remove command palette feature toggle

* undo irrelevant AppChrome changes

* update toggle description
2023-02-02 14:44:21 +00:00
Torkel Ödegaard
b8e7ef48d0
AppChrome: Unify logic for chromeless pages that should not have NavBar, CommandPalette, Search etc (#62281)
* Keybindings: No global keybindings on chromeless pages

* simplify condition

* Refactoring

* Align name and file

* Move logic into AppChrome

* minor fix

* Update Page.tsx

* Fixing test

* Fixed tests

* More fixes

* Fixed more tests

* Fixing final test

* Fixed search in old nav
2023-02-02 09:53:06 +01:00
Ashley Harrison
b6aedaa57d
Chore: improve some types (#62363)
* improve some types

* more tidy up

* better error message handling + update tests

* undo store changes
2023-02-01 10:50:34 +00:00
Giordano Ricci
c66ab3a9e4
QueryHistory: Improve handling of mixed datasource entries (#62214)
* QueryHistory: Improve handling of mixed datasource entries

* remove todo

* remove todo

* fix comment submit test

* disable running queries if at least one doesn't have a datasource

* remove unnecessary code

* add tests for diabled buttons state
2023-02-01 10:11:17 +00:00
Torkel Ödegaard
c0f0c3d485
TopNav: Fix right padding on signin link (#62537)
* TopNav: Fix right padding on signin link

* revert yarn lock

* Update package.json

* Update
2023-01-31 17:22:36 +01:00
George Robinson
0dacb11a12
Alerting: Validate that tags are 100 characters or less (#62335)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-01-31 14:19:44 +00:00
Ashley Harrison
77a186879d
Navigation: add event tracking for navigation elements (#62563)
add user tracking for navigation elements
2023-01-31 13:03:31 +00:00
Laura Benz
439dd062da
Explore: Add unit tests for addQueryRow() and generateEmptyQuery() (#60977)
* feat: add condition

* refactor: clea up

* refactor: remove changes and add my solution as comment

* feat: add test

* refactor: test preparation

* refactor: finish test prep and remove planned changed from addQueryRow()

* refactor: finish first test

* refactor: add required props after removing any (not complete)

* refactor: replace props and clean up

* refactor: add another test

* refactor: extend tests with datasourceInstance

* refactor: add test for mixed ds enabled

* refactor: remove typescript errors

* feat: add first attempt of a test for generateEmptyQuery()

* feat: setup first test for generateEmptyQuery()

* refactor: remove typescript errors

* feat: add another test for generateEmptyQuery()

* refactor: add some assertions

* refactor: restructure tests

* refactor: remove doubled code

* refactor: remove typescript errors

* refactor: remove mocking mistake and add test

* refactor: remove mocking mistakes

* refactor: repair mock for feature toggle

* refactor: clean up

* refactor: changes from code review
2023-01-31 10:13:08 +01:00
Gilles De Mey
702fd0f9e8
Docs: Update wording / text and copy (#61868)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-01-30 15:26:21 +00:00
Ashley Harrison
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
Josh Hunt
d51e7ec7ef
Preferences: Add theme preference to match system theme (#61986)
* user essentials mob! 🔱

lastFile:pkg/api/preferences.go

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:packages/grafana-data/src/types/config.ts

* user essentials mob! 🔱

lastFile:public/app/core/services/echo/utils.test.ts

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/views/index-template.html

* user essentials mob! 🔱

* Restore currentUser.lightTheme for backwards compat

* fix types

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* cleanup

* cleanup

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-30 10:51:51 +01:00
Josh Hunt
6c990b461e
SupportBundles: Feature flag + access control navtree item (#62337)
* SupportBundles: Feature flag + access control navtree item

* remove translation
2023-01-27 20:04:04 +00:00
Ashley Harrison
1ef7cfda3f
Navigation: more command palette tweaks (#62286)
* update placeholder text, only create search keybindings if topNavCommandPalette is disabled

* make search input wider
2023-01-27 16:21:48 +00:00
Yaelle Chaudy
3281eb9223
[Navigation] Add user events for quick actions/dashboard actions (#62220)
Add fe events for quick actions/dashboard actions
2023-01-27 14:11:17 +01:00
Victor Marin
846acd28ff
StateTimeline: Show correct legend label when value mappings set (#62282)
* StateTimeline: Show correct legend label when value mappings set

* Add test dashboard for thresholds and value mappings

* run stripnulls.sh
2023-01-27 14:30:42 +02:00
Andrej Ocenas
a414b07991
Tempo: Trace to logs custom query with interpolation (#61702) 2023-01-26 16:37:16 +01:00
Ashley Harrison
f7d92ab841
Navigation: only show the img for a section root if both img and icon are present (#62127)
only show an img for a section root if both img and icon are present
2023-01-26 12:07:43 +00:00
Ashley Harrison
a77c342764
Navigation: Add keyboard shortcut to search input (#62116)
* Show shortcut

* add icon to search bar, make same changes in search modal

* rename to modKey

Co-authored-by: joshhunt <josh@trtr.co>
2023-01-26 12:07:32 +00:00
Ashley Harrison
a3b396854a
Navigation: Command palette topnav tweaks (#61991)
stylings tweaks to command palette
2023-01-26 10:03:16 +00:00
Victor Marin
6a93c77082
Refactor state timeline/status history to cue model and refactor TimelineChart component (#61631)
* Adapt state timeline to scuemata

* Refactor status history to cue model

* Refactor

* Refactor TimelineChart as a core component

* wip

* Change as per CR

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-26 07:03:59 +00:00
Ryan McKinley
a0405912a8
Preferences: Add preferences kind and remove unused navbar settings (#59621) 2023-01-25 11:00:32 -08:00
Nathan Marrs
8b574e22b5
SVG: Add dompurify preprocessor step (#62143)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-01-25 10:37:29 -08:00
Ivana Huckova
a0921f2e88
Explore: Implement logs sample in Explore (#61864)
* Implement log samples

* Explore: Implement logs sample panel

* Log samples: Add documentation

* Update docs

* Add info for log sample

* Fix label

* Update

* Default to true

* Fix copy in test

* Update public/app/features/explore/LogsSamplePanel.tsx

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

* Use timeZone from grafana/schema

* Rename data props to queryResponse

* Unify name to logs sample

* Remove redundant optional parameters in LogsSamplePanel

* Make intervalMs parameter optional in dataFrameToLogsModel and remove undefined argument when not needed

* Fix incorrect position of copy log line button

* Update public/app/core/logsModel.ts

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

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-01-24 19:10:27 +01:00
Kristina
6ab79c4fba
Explore: Be sure time range key bindings are mounted after clear (#61892)
* Add list of bindings for updating on change

* Revert "Add list of bindings for updating on change"

This reverts commit 092707371d.

* Clear keybindings before component render
2023-01-24 11:12:09 -06:00
Josh Hunt
32ff95bde3
CommandPalette: Fix feature flag (#62000) 2023-01-24 15:52:12 +01:00
Josh Hunt
88347caf5f
Navigation: Open command palette from search box (#61667)
* Reduce size of topnav search 'input' to 1/5th of the width, min width 200px

* Open command palette on topnav search box click

* Rename component

* fix comment

* feature flag the change

* update feature flag description
2023-01-24 12:41:09 +00:00
Zoltán Bedi
4167214e35
Panel edit: Add feature to drag & drop spreadsheet files to the grafana datasource (#60586)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2023-01-24 10:43:44 +01:00
Torkel Ödegaard
38d3d1c02b
Profile: Rename profile page from preferences to profile (#61777)
* Rename preferences to Profile

* Fixed tests and ran i18 extract
2023-01-24 09:32:49 +01:00
Ashley Harrison
6b53f927b2
Navigation: truncate landing page descriptions to 3 lines (#61925)
* truncate landing page descriptions to 3 lines

* use correct css prop names
2023-01-23 17:07:36 +00:00
Jo
1037ef28a9
SupportBundles: Access control guards (#61914)
* rename routes and fix access control for support bundles

* AccessControl: Hide menu if not authorized

* AccessControl: Add AC guards for create and delete

* lint
2023-01-23 16:23:20 +00:00
Torkel Ödegaard
cd99bfec68
TopNav: Fixes breadcrumb issues and title for apps when topnav is disabled (#61835) 2023-01-23 11:03:28 +01:00
Ashley Harrison
253f9657cb
Navigation: Change collapse icon + behaviour (#61496)
* adjust positioning and switch icon

* hide collapse button unless collapsed/focused

* use Button instead of IconButton
2023-01-23 09:30:28 +00:00
Ashley Harrison
a26bae45e1
Navigation: clean up colors in section nav (#61240)
* clean up colors in section nav

* just underline on hover/focus
2023-01-23 09:26:26 +00:00
Ivana Huckova
c106c7700b
Explore: Create DataSourceWithSupplementaryQueriesSupport interface to support log volume and samples (#61298)
* Create DataSourceWithLogsSampleSupport check and move to 1 place

* Add new SupplementaryQueryType

* Add and change utility functions for loading, storing ancd checking supp queries

* Add logic to redux for processing of new type of supp query

* Implement queryLogsSample used to run samples queries

* Fix tests to include also Log samples

* Add tests

* Temporarily, default to false

* Change comment

* Fix lint error

* Refactor handling of supplementary queries in query.ts

* Fix looping over array

* Remove changes for any => unknowns as in utils.ts

* Fix logic

* Fix incorrect imports after function was moved to different file

* Migrate old log volume key

* Update public/app/features/explore/utils/supplementaryQueries.ts

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Refactor to use DataSourceWithSupplementaryQueriesSupport

* Refactor, improve tests,  change internal API

* Update packages/grafana-data/src/types/logs.ts

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Add deprecation for DataSourceWithLogsVolumeSupport, but still support it

* Update comment with correct new issue

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-01-20 14:20:49 +01:00
Torkel Ödegaard
ce879ac8e1
Explore: Keyboard shortcut to go to explore (#61837) 2023-01-20 13:54:58 +01:00
Torkel Ödegaard
9b82e65b7a
TablePanel: Refactor to functional component and move add ad hoc filter action to PanelContext (#61360)
* FieldOptions: Add filterable as registry added field item

* Refactor to functional component, move ad hoc filter to PanelStateWrapper

* review tweaks
2023-01-19 14:03:13 +01:00
owensmallwood
593e8ae17c
PublicDashboards: Page to request access to protected pubdash (#61329)
Adds page to request pubdash access via email
2023-01-18 11:57:34 -06:00
Alexander Zobnin
354342ab26
Support Bundles: Improve creating bundle UX (#61611)
* Support Bundles: Improve creating bundle UX

* Refactor create bundle page

* Fix typo

* Don't show loading indicaror after deleting bundle
2023-01-17 17:50:14 +01:00
TaitChan
a1d33c63c8
Internationalization: Translate page headers and Search dashboard actions (#60727)
* Fix: PageHeader & PageHeaderTabs & NavBarItem & DashboardActions & PanelMenu is displayed in default_language (#60719)

* I18N: update strings (#60719)

Co-authored-by: TaitChan <1441645821@qq.coom>
2023-01-13 14:33:42 +00:00
Alex Khomenko
078f2d4481
Admin: Remove navigation subheaders (#61344)
* Admin: Remove navigation subheaders

* Admin: Fix tests
2023-01-13 08:32:09 +02:00
Sonia Aguilar
f2d4e24710
Alerting: improve FolderPicker and Evaluation Group Select for Huge lists (#61221)
* Add AsyncVirtualizedSelect component in grafana-ui

* Slice FolderPicker results to 1k and virtualize list using AsyncVirtualizedSelect

* Group list in alert form: Use AsyncSelect and slice results to 1000

* Virtualize and slice always in FolderPicker: set default sliceResults value and let consumers change this value

* Always slice results in FolderPicker

* Limit folder results setting the limit in the api call instead slicing in the FE

* Remove warning about the limit in the Select label
2023-01-12 11:45:03 +01:00
juanicabanas
2505f112f5
PublicDashboards: A unique page for public dashboards (#60744)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-10 14:50:37 -03:00
Misi
b3a44649ce
RolePicker: Align groupHeader to the list items horizontally (#61060)
RolePicker: align groupHeader to the list items horizontally
2023-01-10 10:43:02 +01:00
Torkel Ödegaard
349b39c909
SupportBundles: Fixes sentance casing (#61055) 2023-01-06 10:53:08 +00:00
Ryan McKinley
48fbe51d37
Chore: Avoid FC in canvas elements and dimension editors (#61014) 2023-01-05 09:55:55 -08:00
Josh Hunt
a26d4c90b2
I18N: Fail i18n:extract on warnings + update strings (#60949)
* I18N: Fail i18n:extract on warnings

* I18N: Fix onboarding page title

* extract all strings

* move t reassign outside of function
2023-01-04 15:28:07 +00:00
Ashley Harrison
ebb34560a4
Navigation: use "Home" instead of "Grafana" as the default Breadcrumb text (#60973)
* use Home instead of Grafana as the default Breadcrumb text

* use translated text
2023-01-04 15:02:30 +00:00
Ashley Harrison
7005b7bf8a
Navigation: Update e2e tests to work with topnav (#60910)
* turn on topnav toggle in e2e tests

* fix variable e2e tests

* fix remaining tests + remove some hardcoded waits

* speculative fixes

* wait for error to disappear

* use new selector, turn toggle back off
2023-01-04 14:59:53 +00:00
Will Browne
9aed364898
Plugins: Fix plugin query help markdown (#60485)
* refactor(pluginhelp): rewrite as functional component with useAsync

* mimic old behaviour

* feat(pluginhelp): display message if backend returned an empty string

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-01-03 14:20:27 +01:00
Joao Silva
993ab2587e
A11y: Fix accessibility in menu icon on small screens (#60844) 2023-01-03 11:40:25 +01:00
Dominik Prokop
4446d500a4
grafana/data: Deprecate kbn.regexEscape and move to grafana/data (#60869)
grafana/data: Deprecate kbn.regexEscape and move escapeRegex to grafana/data
2023-01-02 05:57:55 -08:00
Alexander Zobnin
5ef545d290
Role picker: Refactor menu components (#60584)
* Simplify underlying components

* Move state management deeper to RoleMenuGroupsSection component

* Get rid of some unnecessary props passing

* Reduce number of unnecessary re-renders

* Simplify state
2022-12-21 11:59:12 +03:00
Konrad Lalik
53d1f4e50b
Alerting: Add landing page (#59050)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-12-20 16:21:56 +01:00
Alexander Zobnin
f6f140c412
Role picker: Fix handling groups with the same name (#60535)
* Role picker: split components into separate files

* Role picker: fix selection groups with the same name
2022-12-20 13:43:48 +03:00
Jo
2c7410c87d
Admin: Add support bundles (#60536)
* Add support bundles

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

* tweak code owners

* rename and lint frontend

* lint

* fix backend lint

* register feature flag

* add feature toggle. fix small backend issues

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
2022-12-20 11:13:37 +01:00
Alexander Zobnin
6e2b148745
Role picker: Split components into separate files (#60519) 2022-12-20 13:05:37 +03:00
Ashley Harrison
bc3d1fdd2a
Command Palette: Correctly clear button styles when changing theme (#60511)
add topnav feature toggle to new theme created when using 'c t'
2022-12-19 10:59:28 +00:00
linoman
25d7c591cf
Auth: Add plugin roles to RolePicker (#59667)
* Add `RoleMenuGroupsSection` component

* Add plugin roles data structures

* Use `RoleMenuGroupsSection` for rendering roles

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2022-12-16 14:41:09 +01:00
Ashley Harrison
b2da0d22af
Navigation: show section toggle if there are any react children (#60336)
show section toggle if there are children
2022-12-15 12:41:46 +00:00
Ashley Harrison
c801f030fb
Navigation: use the branding menu logo in topnav (#60227)
use the branding menu logo in topnav
2022-12-13 14:44:18 +00:00
Torkel Ödegaard
58feee0b53
TopNav: Align profile button with search bar toggle (#60212) 2022-12-13 12:50:57 +01:00
Ashley Harrison
a589929c92
Navigation: Prevent app crash when importing a dashboard with a uid of home (#59874)
* change home id to be more unique, refactor so that home circular reference is never created

* prefix starred dashboards

* update reducer
2022-12-09 12:54:00 +00:00
Josh Hunt
6280780e0c
TimeRangePicker: Fix recent ranges not showing all items (#59836)
* Fix not all recently used time ranges showing

* Refactor time picker history to store simpler json objects

* Don't store duplicate items

* update todo tests:

* Add tests for TimePickerWithHistory

* better fix for focus scope issues in test
2022-12-09 11:28:57 +00:00
Ashley Harrison
5d0029c647
Navigation: handle case where navIndex is undefined (#59826)
handle case where navIndex is undefined
2022-12-07 10:16:55 +00:00
Torkel Ödegaard
18d09cd3fe
PanelEdit: Fixes broken panel edit splitter logic (#59859)
* Alt panel edit fix

* fix fix
2022-12-06 18:21:03 +01:00
Ashley Harrison
46adfb596d
Command Palette: Maintain page state when changing theme (#59787)
* use same function as the change theme keybindings

* rename toggleTheme service to just theme
2022-12-05 16:12:56 +00:00
Erik Sundell
32309a8373
Datasource: Fix - apply default query also to queries in new panels (#59625)
* apply default query also to new panels

* add comment

* add tests
2022-12-05 15:44:04 +01:00
Ashley Harrison
94c5be8dfb
Navigation: Remember expanded sections in megamenu (#59661)
use local storage to remember which sections of megamenu are expanded
2022-12-01 16:04:36 +00:00
Joao Silva
379cde3a72
FolderPicker: Fixes issue with typing to search for folder (#59434) 2022-12-01 13:34:07 +01:00
Artur Wierzbicki
009d65b794
Add query library behind dev-mode-only feature flag (#55947)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: drew08t <drew08@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-11-30 15:33:40 -08:00
Alex Khomenko
c3d13a0e2f
Admin: Combine org and admin user pages (#59365)
* Admin: Add unified users page

* Admin: Combine admin and org components

* Admin: Add combined route

* Admin: Show combined page in nav

* Admin: Update translation

* Admin: Update description

* Admin: Update description on backend

* Admin: Update translations

* Admin: Use dynamic imports
2022-11-30 15:24:53 +02:00
mikkancso
c72322874d
Connections: Update "Your connections/Data sources" page (#58589)
* navtree.go: update Data sources title and subtitle

* DataSourceList: move add button to header

* DataSourcesList: add buttons to items

The action buttons are added inside `<Card.Tags>` so that they end up at
the right end of the card, as it was designed.

The "Build a Dashboard" button's functionality is not defined yet.

* DataSourcesListHeader: add sort picker

* fix css

* tests: look for the updated "Add new data source" text

* tests: use an async test method to verify component updates are wrapped in an act()

* update e2e selector for add data source button

* fix DataSourceList{,Page} tests

* add comment for en dash character

* simplify sorting

* add link to Build a Dashboard button

* fix test

* test build a dashboard and explore buttons

* test sorting data source elements

* DataSourceAddButton: hide button when user has no permission

* PageActionBar: remove unneeded '?'

* DataSourcesList: hide explore button if user has no permission

* DataSourcesListPage.test: make setup prop explicit

* DataSourcesList: use theme.spacing

* datasources: assure explore url includes appSubUrl

* fix tests and add test case for missing permissions

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-11-30 09:41:01 +01:00
Giordano Ricci
dc918f7e91
Grafana UI: Add experimental InteractiveTable component (#58223)
* wip

* move table

* refine example

* move to experimental

* add row expansion example

* add expanded row to kitchen sink

* add column prop docs

* add props docs

* remove useless example

* WIP

* use unique id per row & proper aria attrs for expander

* add custom cell rendering example

* Remove multisort

* rename shrink to disableGrow

* move isTruthy type guard to @grafana/data

* add missing prop from TableData interface

* make column id required

* fix correlations table

* expand on docs

* remove leftover comment

* rename to InteractiveTable

* add some tests

* add expansion tests

* fix tests

* revert unneeded changes

* remove extra header rule
2022-11-29 16:18:55 +00:00
Ashley Harrison
5011b259c7
Chore: ignore eslint rules in Dropdown/TopNavBarMenu (#59385)
ignore eslint rules in dropdown/topnavbarmenu
2022-11-29 11:13:21 +00:00
Josh Hunt
b0e886840d
Internationalization: Add language preference analytics (#59230)
* Report change languange

* clean defaults.ini

* Add language to rudderstand user identify call

* undo changes not intended
2022-11-28 07:11:55 -05:00
Laura Fernández
45d3125919
OptionsUI: SliderValueEditor does not get auto focused on slider change (#59209) 2022-11-24 18:21:33 +01:00
renovate[bot]
e84a01e870
Update jest monorepo to v29 (#58261)
* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-24 14:00:41 +00:00
Josh Hunt
ba0ac08465
Internationalization: Enable internationalization by default (#59204)
* Enable internationalization feature flag by default

* Change i18n feature to beta

* Set i18n feature flag to stable

* update features
2022-11-23 14:23:26 +00:00
Laura Fernández
4a628f18b0
Internationalization: Translate menu items (#59088) 2022-11-23 09:34:53 +01:00
Ashley Harrison
824a562b03
Navigation: share logic between buildBreadcrumbs and usePageTitle (#58819)
* simplify usePageTitle logic a bit

* use buildBreadcrumbs logic in usePageTitle

* always add home item to navTree, fix some tests

* fix remaining unit tests
2022-11-22 16:48:07 +00:00
Joao Silva
f8dc333ee4
Preferences: Add confirmation modal when saving org preferences (#59119) 2022-11-22 16:47:42 +01:00
Ashley Harrison
6f26668a9f
Chore: Document theme toggle keybinding (#59031)
* make theme toggle keybinding dev only

* fix bug + add support for theme change keybinding
2022-11-22 14:01:51 +00:00
Josh Hunt
460be70261
Internationalization: Change locale preference to language (#58359)
* backend locale -> language

* frontend locale -> language

* sample.ini and tests

* fix few last locale -> language

* fix few last locale -> language
2022-11-22 12:18:34 +00:00
Kristina
bdfa127ee5
Explore: Notify when compact URL is used (#58684)
* Add explore compact url notices

* Add error checking around data links urls

* Fix tests

* remove global flag, add test for warning in title

* Move feature tracking to initialization, add better error messaging

* Fix test

* Add compact url tests, fix styling bug, remove warning tooltip

* Fix broken check, move tests to util file
2022-11-21 08:03:50 -06:00
Josh Hunt
5978dc138e
Nav: Split Admin into three sections for new IA (#58229)
* start to split admin into two sections

* most of new admin nav implemented

* landing pages

* hide admin for non-admins

* update admin redirects if not topnav

* clean up

* updated IA for admin (still WIP)

* move plugin pages into correct admin sections

* fix backend unit test

* move correlations into the correct section

* add translations for admin sections

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-18 15:11:59 +00:00
Ashley Harrison
d46e3916a1
Navigation: move connections + integrations to be a top level item (#58902)
* move connections + integrations to be a top level item

* add a test to check we can move apps to the root

* split out movePlugin logic into a separate function

* fix linting

* rename movePlugin -> addPluginToSection
2022-11-18 09:05:45 +00:00
Kristina
5cad7089b3
Explore: Enable resize of split pane (#58683)
* Move layout to paneleditor, make SplitPaneWrapper more generic

* Read/write the size ratio in local storage

* Add min height to enable scrollbar

* Enable show/hide panel options

* Add new component to explore

* Add styles

* Bring in code from other branch

* Fix update size function, add min size to explore container

* Add window size, save width as a ratio

* Fix tests

* Allow for one child

* Remove children type definition

* Use library methods for min/max size instead of hooks
2022-11-17 09:27:07 -06:00
Torkel Ödegaard
c14cbfc65d
Breadcrumbs: Remove semi-bold and change current/last breadcrumb text color (#58875) 2022-11-17 15:51:09 +01:00
Ashley Harrison
b398e8640d
Navigation: Change quick add styling (#58854)
Change quick add styling + allow for returning isOpen state to dropdown children
2022-11-17 09:03:12 +00:00
Leo
27b6b3b3bd
Folder: Replace folderId with folderUid (#58393)
* support folderuid in FolderPicker

* support folderuid in unified alerting

* support folderuid when returning to view mode after editing a panel

* support folderuid when preselecting the folderpicker in dashboard general settings

* support folderuid when saving dashboard

* support folderuid when pre-selecting folderpicker in dashboard form

* support folderuid in routes when loading a dashboard

* support folderuid when saving dashboard json

* support folderuid when validating new dashboard name

* support folderuid when moving dashboard to another folder

* support folderuid on dashboard action buttons

* support folderuid when creating a new dashboard on an empty folder

* support folderuid when showing library panel modal

* support folderuid when saving library panel

* support folderuid when importing dashboard

* fixed broken tests

* use folderuid when importing dashboards

* remove commented line

* fix typo when comparing uid values
2022-11-17 09:22:57 +01:00
Karl Persson
9283773c12
Teams: Support paginating and filtering more then 1000 teams (#58761)
* TeamList: break out rows to its own component

* TeamsState: Add total count

* TeamList: Remove teamsCount prop

* TeamList: Restructure code and use count from backend response

* TeamList: calculate total pages using totalCount

* TeamList: Rename to state to currentPage and the reducer to
setCurrentPage

* TeamList: remove wrapper functions

* TeamList: rewrite as a functional component

* TeamList: export components for test

* TeamList: pass limit, page and query to backend

* TeamList: Rename properties in state and create actions for page and
query change

* TeamList: Add flag to control if EmptyList banner should render
2022-11-16 15:55:10 +01:00
Laura Fernández
3f63ca06c3
Internationalization: Translate NavBar - 'Search dashboard' menu item (#58815) 2022-11-16 13:02:29 +01:00
Torkel Ödegaard
8c585a4ebf
Scene: Variables interpolation formats and multi value handling (#58591)
* Component that can cache and extract variable dependencies

* Component that can cache and extract variable dependencies

* Updates

* Refactoring

* Lots of refactoring and iterations of supporting both re-rendering and query re-execution

* Updated SceneCanvasText

* Updated name of file

* Updated

* Refactoring a bit

* Added back getName

* Added comment

* minor fix

* Minor fix

* Merge fixes

* Scene variable interpolation progress

* Merge fixes

* Added all format registeries

* Progress on multi value support

* Progress on multi value support

* Updates

* Progress on scoped vars

* Fixed circular dependency

* Updates

* Some review fixes

* Updated comment

* Added forceRender function

* Add back fail on console log

* Update public/app/features/scenes/variables/interpolation/sceneInterpolator.test.ts

* Moving functions from SceneObjectBase

* fixing tests

* Fixed e2e

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-11-16 11:36:30 +01:00
Giordano Ricci
2a9381e998
Explore: Refactor ExploreGraph (#58660)
* WIP

* revert collapse changes

* use HorizontalGroup instead of custom styles

* fix tests

* use import aliases
2022-11-16 11:16:27 +01:00
Kristina
2055d922f3
Refactor SplitPaneWrapper to be more centralized component, refactor PanelEditor to use it (#58380)
* Move layout to paneleditor, make SplitPaneWrapper more generic

* Read/write the size ratio in local storage

* Add min height to enable scrollbar

* Enable show/hide panel options

* Change back variable name
2022-11-15 09:10:05 -06:00
Ashley Harrison
028751a18a
Navigation: Add quick actions button (#58707)
* initial implementation for quick add

* add new isCreateAction prop on NavModel

* adjust separator margin

* switch to primary button

* undo changes to plugin.json

* remove unused props from interface

* use a consistent dropdown overlay type

* memoize findCreateActions

* add prop description

* use a function so that menus are only rendered when the dropdown is open
2022-11-15 12:08:15 +00:00
Jo
121631daae
Fix: Email and username trimming and invitation validation (#58442)
* fix: email and username trimming and invitation validation

* Trim leading and trailing whitespaces from email and username on signup

* Check whether the provided email address is the same as where the invitation sent

* Align tests

Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
2022-11-14 13:11:26 +01:00
Ashley Harrison
0bd120e01b
Navigation: fix page title spacing when there is no subtitle (#58654)
* fix page title spacing when there is no subtitle

* apply margin to whole page header
2022-11-11 09:43:11 -05:00
Ashley Harrison
159607fe6f
Navigation: Convert PluginDetails page to use new Page extensions (#58509)
* Added labels

* App page fixes

* Switch to switch

* wip

* Updates

* I am stuck

* Minor tweak

* This props interface could work

* removed change

* use new page extensions in plugin details page

* add link separator, fix action button spacing

* some renaming

* Move PageInfo into it's own folder + add tests

* add support for new props in old page header

* remove PluginDetailsHeader as it's no longer used

* Fix unit tests

* fix some badge alignments

* center align actions

* badge alignment + only show downloads for community/commercial plugins

* better link alignment

* conditionally render description

* move install control warnings to below subtitle + refactor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-09 14:44:38 +00:00
Timur Olzhabayev
008c554d7f
Echo: Add config option to prevent duplicate page views for GA4 (#57619) 2022-11-09 15:09:19 +01:00
Ashley Harrison
b3c761aaa7
Navigation: Expose new props to extend Page/PluginPage (#58465)
* add extensions and customisation to `Page`

* adjust alignment
2022-11-09 09:05:01 +00:00
Ashley Harrison
831ecb467c
Add new PageInfo component (#58421) 2022-11-08 14:20:05 +00:00
Timur Olzhabayev
228ec4c0f3
Chore: Switch Grafana to using faro libraries (#58186) 2022-11-08 10:36:27 +01:00
Gábor Farkas
6dd5ce7ab0
Tracing: Allow trace to logs for OpenSearch (#58161)
* tracing: allow trace-to-opensearch functionality

* more consistent naming
2022-11-07 12:24:01 +01:00
Ashley Harrison
ca3bcc691c
hide sectionnav items when collapsed, ensure focus ring overlays active items (#58250) 2022-11-04 16:42:34 +00:00
Torkel Ödegaard
4d2bf41efb
AppChrome: Fixes kiosk mode toggling (#58240) 2022-11-04 16:49:31 +01:00
kay delaney
f37e53f060
Chore: Migrate more theme v1 usage to v2 (#58121) 2022-11-03 09:54:18 -04:00
Ivana Huckova
a83dee6031
Elasticsearch: Add trace to logs functionality (#58063)
* Elasticsearch: Implement trace to logs

* Fix tests
2022-11-03 09:52:40 +01:00
Torkel Ödegaard
915ebcf832
Search: Refactor state and logic to be less fragmented and spread out (#57973)
* Started search state refactor

* Things are working

* Move more to statemanger

* minor tweaks

* Fixed name of hook

* revert yarn.lock changes

* Harderning StateManagerBase

* More tests and refinements

* Fixed unit test

* More polish

* fixing tests

* fixed test

* Fixed test
2022-11-03 08:29:39 +01:00
Leo
932429a545
LibraryPanels: Replace folderID with folderUID (#56414)
* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/database.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

* support filterFolderUIDs in the frontend

* move common logic to a variable

* fixed FolderLibraryPanelsPage and improved unit test

* fix backend lint error

* fix formatting error

Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
2022-11-02 16:49:02 +01:00
renovate[bot]
9e25cf7e12
Update dependency rc-slider to v10 (#49242)
* Update dependency rc-slider to v10

* start migrating to rc-slider 10

* rc-slider 10 changes

* fix

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
2022-11-02 07:00:49 -04:00
kay delaney
30dc0f56a4
Chore: Migrate more usage of v1 themes to v2 (#57680)
* Chore: Migrate more usage of v1 themes to v2

* Implement suggested changes
2022-11-02 10:25:08 +00:00
Gabriel MABILLE
101ce57a94
RBAC: Allow listing user permissions with scope (#57538)
* RBAC: Allow listing user permissions with scope

* Add docs

* Document the api endpoint

* Update docs

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Split endpoint in two

* document reloadcache

* Update docs/sources/developers/http_api/access_control.md

* Fix test

* Ieva's nit.

* Simplify flag description

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-11-02 10:48:11 +01:00
Ashley Harrison
f1f0a6f88b
Revert "Update React Aria (#57975)" (#58001)
This reverts commit 44069b64cd.
2022-11-02 09:39:32 +00:00
Ashley Harrison
e5c68f40c2
Accessibility: enable rule jsx-a11y/label-has-associated-control (#57964)
* use labels correctly

* fix opentsdb labels

* fix unit tests

* use aria-label instead of data-testid
2022-11-01 14:37:58 +00:00
renovate[bot]
44069b64cd
Update React Aria (#57975)
* Update React Aria

* fix unit tests

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-01 13:36:00 +00:00
Josh Hunt
fd5c147574
Chore: Update footer changelog link to github (#57871) 2022-10-31 07:34:21 -04:00
Torkel Ödegaard
19b961465c
TopNav: Make it possible to to have sections without children (#57815) 2022-10-31 11:01:34 +01:00
kay delaney
b49713d323
Chore: Remove unused files (#57515) 2022-10-25 23:34:53 +01:00
Ashley Harrison
d2a70bc42d
Chore: more any/type assertion improvements (#57450)
* more friday any/type assertion improvements

* Apply suggestions from code review

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* Update public/app/angular/promiseToDigest.test.ts

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-10-25 11:04:35 +02:00
Josh Hunt
e417387bc7
I18n: Add German (#57397) 2022-10-21 11:47:17 +01:00