* Templating: __data __field and __series macros
* filter out datacontext from json serialization
* Fix condition
* Update
* Added test cases for formatting data, and field macros
* 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>
* Added onClick to the link and made path optional.
* Added type to the import.
* revert(plugin-extensions): put back isPromise utility function
* Minor update to the isPromise function.
* added onClick in the panel menu item.
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* define 3 feature toggles for rollout phases
* Pass feature toggles along
* Implement first feature toggle
* Try a different strategy with fall-throughs to specific configurations
* Apply toggle overrides once outside of backend composition
* Emit log messages when we coerce backends
* Run code generator for feature toggle files
* Improve wording in flag descs
* Re-run generator
* Use code-generated constants instead of plain strings
* Use converted enum values rather than strings for pre-parsing
* Merge log volume by data source name
* Fix creating response for multiple fallback volumes
* Fix unit tests
* Hide title if there's only one log volume visible
* Make hide title optional
* Remove redundant parentheses
* Do not use frame.name, so the visualization can pick displayNameFromDS from the field config
* Simplify setting aggregated data frame meta data
* Update public/app/features/logs/utils.ts
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Fix legend toggling
* Ensure limited graph info is shown
* Always show the data source name
---------
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* 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
* Empty Dashboard state has its own CTA items and its own separate box to choose a library panel to create
* show empty dashboard screen if no panels
* start page for empty dashboard
* add feature flag for empty dashboard redesign
* only show empty dashboard redesign if FF
* 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>
* fix: disable orgrolepicker if externaluser is synced
* add disable to role picker
* just took me 2 hours to center the icon
* wip
* fix: check externallySyncedUser for API call
* remove check from store
* add: tests
* refactor authproxy and made tests run
* add: feature toggle
* set feature toggle for tests
* add: IsProviderEnabled
* refactor: featuretoggle name
* IsProviderEnabled tests
* add specific tests for isProviderEnabled
* fix: org_user tests
* add: owner to featuretoggle
* add missing authlabels
* remove fmt
* feature toggle
* change config
* add test for a different authmodule
* test refactor
* gen feature toggle again
* fix basic auth user able to change the org role
* test for basic auth role
* make err.base to error
* lowered lvl of log and input mesg
* 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
* Add provisioning (to be removed) and show log lines with links
* Only display links if change to query was made
* 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
* Change transformation types to enum, add better provisioning checks for bad type name and format
* Check for expression with regex transformations
* Remove isInterpolated variable, add option to always use format function
* Add template variable check to links
* Use new functions
* Filter log line at render, remove extra createSpanLink imports
* Add scrollable to long log messages
* Remove test that is no longer accurate
* Remove test correlation
* Add tests, fix duplicate key issue
* WIP: show log line links key/value pairs
* Some not great style changes
* Change LogDetailsRow for better multi value formatting
* Cleanup
* Add additional information around variable regex, implement PR feedback
* Display name with fieldPath if applicable
* Add variables with fieldPaths to test
* Count empty string as undefined variable
* Add better commented version of function, fix tests by removing new variable
* Modify when links show
* Remove sample yaml
* If a link has no variables, set value to field name, and some formatting issues
* Add comments and change variable names to be more clear, add back logic where needed, add test coverage for new scenario
* Fix formatting of replaceInVariableRegex comment
* Remove changes from Grafana-data, move logic into explore
* Rename function and property to match similar format
* Move types to type files and consolidate definitions, rename functions, change field definitions to accept arrays of keys/values, move function to parser, hide actions on multi key/value rows
* Add tests to logParser’s new function
* add `lokiQueryChunkingOption` feature flag
* be safe and also rely on `config.featureToggles.lokiQuerySplitting`
* renamed to `lokiQuerySplittingConfig`
* fix typo
* Scenes: Progress on demo app
* Argh
* Fixing breadcrumbs
* Added spacer
* Conditional scene objects
* Quick and dirty test for drilldown link via panel title
* Changed the toggle
* Add url state syncing for most links
* Add url state syncing for most links
* Fix instance in url params
* Quick and dirty tabs on the handler page
* fixing breadcrumbs
* Hide footer
* Updates
* new table styles
* Update table cell link styles
* Added search box
* Scene app demo: dynamic data link (#60398)
* Dynamically build data links
* Add field override tests
* Updates
* Updated
* Updates
* before nesting routing
* Something is working
* Caching and nested routes working
* Simplify model
* Use app components from grafana/scenes
* Make the monitoring app work with section nav
* Fixing
* Update scenes
* Remove unused route
* Updates
* remove file
* Update scenes version and use new features
* Remove semicolon
* removed unused thing
* Add refresh pickers
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* add `correlationId` to queries
* trace correlation id in backend
* add correlation id to loki's span
* add correlation id to query chunks
* fix test
* fix DataSourceWithBackend test
* change to `queryGroupId`
* remove empty line
* fix test in `DataSourceWithBackend`
* baldm0mma/feature/solidOption/ update cue and ts types
* baldm0mma/feature/solidOption/ update data structures
* baldm0mma/feature/solidOption/ vizrepeater investigation
* baldm0mma/feature/solidOption/ add buildGradientBackground
* baldm0mma/feature/solidOption/ remove conlogs from fieldDisplay.ts
* baldm0mma/feature/solidOption/ rem destruct in fielddisplay.ts
* baldm0mma/feature/solidOption/ rem conlogs from bivaluelayout.tsx
* baldm0mma/feature/solidOption/ rem conlogs in visrepeater
* baldm0mma/feature/solidOption/ rem conlogs from statpanel.tsx
* baldm0mma/feature/solidOption/ add annotations in BigValue.tsx
* baldm0mma/feature/solidOption/ update cue
* baldm0mma/feature/solidOption/ remove unused anno
* baldm0mma/feature/solidOption/ update with toggle conditinal
* Update module.tsx
update anno
* baldm0mma/feature/solidOption/ update annos
* baldm0mma/feature/solidOption/ undo change
* baldm0mma/featurew/solidOption/ add anno for boolean toggle in stat module
* baldm0mma/featurew/solidOption/ update anno in BigValue.tsx for hasGradient
* baldm0mma/featurew/solidOption/ updart default logic in bigValueLayout.tsx
* 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
* feat(plugins): introduce dashboard panel menu placement for adding menu items
* test: add test for getPanelMenu()
* added an unique identifier for each extension.
* added context to getPluginExtensions.
* wip
* Wip
* wiwip
* Wip
* feat: WWWIIIIPPPP 🧨
* Wip
* Renamed some of the types to align a bit better.
* added limit to how many extensions a plugin can register per placement.
* decreased number of items to 2
* will trim the lenght of titles to max 25 chars.
* wrapping configure function with error handling.
* added error handling for all scenarios.
* moved extension menu items to the bottom of the more sub menu.
* added tests for configuring the title.
* minor refactorings.
* changed so you need to specify the full path in package.json.
* wip
* removed unused type.
* big refactor to make things simpler and to centralize all configure error/validation handling.
* added missing import.
* fixed failing tests.
* fixed tests.
* revert(extensions): remove static extensions config in favour of registering via AppPlugin APIs
* removed the compose that didn't work for some reason.
* added tests just to verify that validation and error handling is tied together in configuration function.
* adding some more values to the context.
* draft validation.
* added missing tests for getPanelMenu.
* added more tests.
* refactor(extensions): move logic for validating extension link config to function
* Fixed ts errors.
* Started to add structure for supporting commands.
* fixed tests.
* adding commands to the registry
* tests: group test cases in describe blocks
* tests: add a little bit more refactoring to the tests
* tests: add a test case for checking correct placements
* feat: first version of the command handler
* feat: register panel menu items with commands
* refactor: make the 'configure' function not optional on `PluginExtensionRegistryItem`
* Wip
* Wip
* Wip
* added test to verify the default configure function.
* added some more tests to verify that commands have the proper error handling for its configure function.
* tests: fix TS errors in tests
* tests: add auxiliary functions
* refactor: small refactoring in tests
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* refactor: refactoring tests for registryFactory
* draft of wrapping command handler with error handling.
* refactor: refactoring tests for registryFactory
* added test for edge case.
* replaced the registry item with a configure function.
* renamed the configure function type.
* refactoring of the registryfactory.
* added tests for handler error handling.
* fixed issue with assert function.
* added comment about the limited type.
* Update public/app/features/plugins/extensions/errorHandling.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Update public/app/features/plugins/extensions/errorHandling.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Update public/app/features/plugins/extensions/errorHandling.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* added missing tests.
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* add metric encyclopedia feature toggle and component
* remove unused button
* move file, add test file
* add tests
* add pagination and tests
* test with 10,000,000 metrics
* remove unused import
* add filter by type
* search alphabetically and add switch to exclude metrics with no metadata
* add suggested functions and filter for functions
* allow user to select variables in encyclopedia
* fix style and tests
* add fuzzy search by either metric name or all metadata
* if missing metadata, remove metadata fuzzy search option, exclude metadata, and filter by type
* add encyclopedia feature tracking
* indicate that metrics are filtered by labels
* handle metric singular or plural
* add tooltips and fix language
* add filtering tests
* change 'search' to 'browse'
* remove functions filter and tests as not part of work flow
* add m.e. button and selected metric is a tag
* fix hanging search and update styles, padding, labels, and groupings
* small performance improvements
* fix tests
* add backend metrics query option
* add loading spinner for start load and backend search
* autofocus search input
* Update docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* run prettier
* run prettier
* fix text for feature toggle
* for license check since https://cla-assistant.io/check/grafana/grafana?pullRequest=<PR#> is not working
* fixing tests
* fix feature toggle docs
* fix feature toggle
* fix feature toggle
* add owner to feature toggle
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* 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
* WIP of creating new components to support the Search tab using TraceQL
* Search fields now require an ID. Added duration fields to new Search UI
* Distinguish static from dynamic fields. Added dynamic tags input
* Moved new search behind traceqlSearch feature flag. Added handling of different types of values to accurately wrap them in quotes when generating query.
* Hold search state in TempoQuery to leverage state in URL. Moved types to schema file
* Use a read only monaco editor to render a syntax highlighted generated query. Added tooltip to duration. Added query options section
* Support multiple values using the regex operator and multi input
* Delete dynamic filters
* Automatically select the regex op when multiple values are selected. Revert to previous operator when only one value is selected
* Added tests for SearchField component
* Added tests for the TraceQLSearch component
* Added tests for function that generates the query
* Fix merge conflicts
* Update test
* Replace Search tab when traceqlSearch feature flag is enabled. Limit operators for both name fields to =,!=,=~
* Disable clear button for values
* Changed delete and add buttons to AccessoryButton. Added descriptions to operators
* Remove duplicate test
* Added a prismjs grammar for traceql. Replaced read only query editor with syntax highlighted query. Removed spaces between tag operator and value when generating query.
* Fix support for custom values when isMulti is enabled in Select
* Use toOption function
* 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
* feat(plugins): introduce dashboard panel menu placement for adding menu items
* test: add test for getPanelMenu()
* added an unique identifier for each extension.
* added context to getPluginExtensions.
* wip
* Wip
* wiwip
* Wip
* feat: WWWIIIIPPPP 🧨
* Wip
* Renamed some of the types to align a bit better.
* added limit to how many extensions a plugin can register per placement.
* decreased number of items to 2
* will trim the lenght of titles to max 25 chars.
* wrapping configure function with error handling.
* added error handling for all scenarios.
* moved extension menu items to the bottom of the more sub menu.
* added tests for configuring the title.
* minor refactorings.
* changed so you need to specify the full path in package.json.
* wip
* removed unused type.
* big refactor to make things simpler and to centralize all configure error/validation handling.
* added missing import.
* fixed failing tests.
* fixed tests.
* revert(extensions): remove static extensions config in favour of registering via AppPlugin APIs
* removed the compose that didn't work for some reason.
* added tests just to verify that validation and error handling is tied together in configuration function.
* adding some more values to the context.
* draft validation.
* added missing tests for getPanelMenu.
* added more tests.
* refactor(extensions): move logic for validating extension link config to function
* Fixed ts errors.
* Update packages/grafana-data/src/types/app.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Update packages/grafana-runtime/src/services/pluginExtensions/extensions.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* refactor(extensions): rename limiter -> pluginPlacementCount
* refactor(getpanelmenu): remove redundant continue statement
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* chore: remove export service POC from main
This is a POC and we'll see it, or something like it, again!
* remove frontend changes
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Enable serving Swagger UI by default
It used to be served behind the `swaggerUi` feature toggle.
* Remove `swaggerUi` feature toggle
* Add docs and guidelines for updating swagger
* Apply suggestions from code review
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
* MVP of a new datasource picker
* Add datasource select history, naming DatasourceSelect -> DataSourceDrawer
* refactor cards
* Cleanup and fixing sort order for recents
* add feature flag
* fix feature flag name and use it
* Highlight selected
* Move new ds picker to core
* Restore original datasource picker
* Remove unused property
* update yarn.lock
* Rename folder, update codeowners
* add test for util functions
* Remove es-lint exception
* Change feature toggle description
* remove unnecessary if
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Make test a bit more clear
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Clean up api, filter once and before maps, minor code cleanup
* Fix prettier issue
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Reworked header
* Remove toggle from merge
* Update test
* Update how span is retrived
* Tests
* Update tests
* Move new trace page header into its own component
* Remove tests already covered in TracePageHeader.test.tsx
* Update findHeaderTags
* Tooltip updates
* Update dependency rollup to v3
* build(rollup): update all rollup related deps to latest version
* chore(runtime): update peerDeps to match other package semver ranges
* chore(yarn): refresh lock file
* refactor(packages): migrate to esm for rollup@3 configs
* build(packages): remove unused rollup dependencies
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* 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