* Add anonymous stats and user table
- anonymous users users page
- add feature toggle `anonymousAccess`
- remove check for enterprise for `Device-Id` header in request
- add anonusers/device count to stats
* promise all, review comments
* make use of promise all settled
* refactoring: devices instead of users
* review comments, moved countdevices to httpserver
* fakeAnonService for tests and generate openapi spec
* do not commit openapi3 and api-merged
* add openapi
* Apply suggestions from code review
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* formatin
* precise anon devices to avoid confusion
---------
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: jguer <me@jguer.space>
* regression analysis first dragt
* Swap to better regression libraries
* fix name
* Interpolate x points instead of using source x points
* clean up ui and add feature toggle
* fix merge error
* change to loop for finding min max, rename resolution
* Add docs
* add docs and tests
* change name to regression analysis
* update docs
* Fix editor labels
* add regression images
* fix docs
* Embed flame graph
* Update test
* Update test
* Use toggle
* Update test
* Add tests
* Use const
* Cleanup
* Update profile tag
* Move flame graph out of tags, remove request and other cleanup + tests
* Update test
* Set flame graph by profile id and simplify logic
* Cleanup and redrawListView
* Create/use feature toggle
* remove all the things
* fix OldFolderPicker tests
* i18n
* remove more unused code
* remove mutation of error object since it's now frozen in the redux state
* fix error handling
* prepare backend for structured metadata
* add `lokiStructuredMetadata` feature toggle
* use `lokiStructuredMetadata` feature flag
* add field type check to `labelTypesField`
* remove fixme
* fix feature toggle
* add field in dataplane mode
* use `data.Labels` where possible
* adjust framing tests
* improve verbiage
* improve naming
* update tests to "attributes"
* LogRow: detect text selection
* LogRow: refactor menu as component
* LogRow: add actions to menu
* LogRow: hack menu position
* Remove unsused imports
* LogRowMessage: remove popover code
* PopoverMenu: refactor
* LogRows: implement PopoverMenu at log rows level
* PopoverMenu: implement copy
* PopoverMenu: receive row model
* PopoverMenu: fix onClick capture issue
* Explore: add new filter methods and props for line filters
* PopoverMenu: use new filter props
* Explore: separate toggleable and non toggleable filters
* PopoverMenu: improve copy
* ModifyQuery: extend line filter with value argument
* PopoverMenu: close with escape
* Remove unused import
* Prettier
* PopoverMenu: remove label filter options
* LogRow: rename text selection handling prop
* Update test
* Remove unused import
* Popover menu: add unit test
* LogRows: update unit test
* Log row: hide the log row menu if the user is selecting text
* Log row: dont hide row menu if popover is not in scope
* Log rows: rename state variable
* Popover menu: allow menu to scroll
* Log rows: fix classname prop
* Log rows: close popover if mouse event comes from outside the log rows
* Declare new class using object style
* Fix style declaration
* Logs Popover Menu: add string filtering functions (#76757)
* Loki modifyQuery: add line does not contain query modification
* Elastic modifyQuery: implement line filters
* Modify query: change action name to not be loki specific
* Prettier
* Prettier
* Elastic: escape filter values
* Popover menu: create feature flag
* Log Rows: integrate logsRowsPopoverMenu flag
* Rename feature flag
* Popover menu: track interactions
* Prettier
* logRowsPopoverMenu: update stage
* Popover menu: add ds type to tracking data
* Log rows: move feature flag check
* Improve handle deselection
* inital changes, db migration
* changes
* Implement basic GetAll, Delete
* Add first batch of tests
* Add more tests
* Add service tests for GetForProvider, List
* Update http_server.go + wire.go
* Lint + update fixed role
* Update CODEOWNERS
* Change API init
* Change roles, rename
* Review with @kalleep
* Revert a mistakenly changed part
* Updates based on @dmihai 's feedback
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* cumulative sum
* refactor and create new mode
* refactor - use reduceOptions for new mode also
* revert naming
* Add window function, rename statistical to cumulative (#77066)
* Add window function, rename statistical to cumulative
* Fix merge errors
* fix more merge errors
* refactor + add window funcs
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* add ff + tests + centered moving avg
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* make sum and mean cumulative more efficient (#77173)
* make sum and mean cumulative more efficient
* remove cumulative variance, add window stddev
* refactor window to not use reducer for mean. wip variance stdDev
* fix tests after optimization
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* optimize window func (#77266)
* make sum and mean cumulative more efficient
* remove cumulative variance, add window stddev
* refactor window to not use reducer for mean. wip variance stdDev
* fix tests after optimization
* fix test lint
* optimize window
* tests are passing
* fix nulls
* fix all nulls
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* change window size to be percentage
* fix tests to use percentage
* fixed/percentage window size (#77369)
* Add docs for cumulative and window functions of the add field from calculation transform. (#77352)
add docs
* splling
* change WindowType -> WindowAlignment
* update betterer
* refactor getWindowCreator
* add docs to content.ts
* add feature toggle message
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* Chore: Replace grafana-authnz-team with identity-access-team as code owner
* Chore: Replace grafana-authnz-team with identity-access-team as code owner
* Fix the failing test
* Update Tempo devenv to include profiles
* Update devenv to scrape profiles from local services
* Cleanup devenv
* Fix issue with flame graph
* Add width prop to ProfileTypeCascader
* Add trace to profiles settings
* Add new spanSelector API
* Add spanSelector to query editor
* Update span link query
* Conditionally show span link
* Combine profile and spanProfile query types and run specific query type in backend based on spanSelector presence
* Update placeholder
* Create feature toggle
* Remove spanProfile query type
* Cleanup
* Use feeature toggle
* Update feature toggle
* Update devenv
* Update devenv
* Tests
* Tests
* Profiles for this span
* Styling
* Types
* Update type check
* Tidier funcs
* Add config links from dataframe
* Remove time shift
* Update tests
* Update range in test
* Simplify span link logic
* Update default keys
* Update pyro link
* Use const
* initial commit for PromQAIL
* add feature toggle and start button
* add drawer
* set up drawer and state
* fix styles and start the conditional text display
* add data info list going to ai
* add logos and style
* metric display table style, neeed to make responsive
* make feature toggle frontend only
* add logic for want prompt for list or not, add helpers, addquerysuggestion type
* make query suggestion component
* add buttons to add or refine prompt
* refactor logic to add interactions to have multiple AI or historical interactions
* refactor and enable multiple questions, all flow
* add colorful AI icon to drawer open button
* fix linting
* refactor for hooking up promQail app and only giving one suggestion
* design fixes
* fix next prompt button styling
* historical suggestions give us 5, fixed that and some design things
* hook up the api, provide defense filler if it's down, refactor lots
* use query, fix linting
* add metadata to explain for ai suggestions
* styling fixes
* give metadata for historical suggestions by parsing query on the fly
* no prompt field to query-suggestion endpoint if prompt is empty
* fix linting
* use suggest rte for historical list, fix long code style
* use suggest rte for historical list, fix long code style
* fix historical bug
* added prompt file
* updated llm logic in explainer helper
* bump @grafana/experimental from 1.7.0 to 1.7.2
* use llmservice and vectorservice
* cleanup prompts + streaming explainer
* promqail feature toggle: fix re-order
* PromQL non-llm failback recommendation logic (#75469)
* added template recommendation logic directly in helpers
* also added selected labels to recommendation
* PromQail: query gen: fix prompt formatting and fetch metric labels to be used (#75450)
* PromQail: query gen: fix prompt formatting and fetch metric labels to be used
* Code fixes as suggested
* Use newly decided collection name for promql templates
* Prometheus: Promqail tests and bug fixes (#75852)
* add tests for drawer
* refine one prompt at a time, fix css
* scroll into view on interaction change
* fix styles for light
* disable prompt input after getting sugestions for that interaction
* make buttons disappear after selecting refine prompt or show historical queries to prevent user from clicking many times
* fix border radius
* fix new eslint rule about css requiring objects and not template literals
* add scrollIntoView for test
* grafana_prometheus_promqail_explanation_feedback - add feedback rudderstack interaction for explanation
* add form link to feedback for query suggestions
* fix bugs
* for prettier
* PromQL Builder Explainer: Added promql documentation and updated prompt (#75593)
* added promql documentation and updated prompt
* refactor prompt generation into isolated function
* updated prompt to answer with a question
* removed commented code
* updated metadata logic
* updated documentation body logic
* Prometheus: PromQAIL UI fixes (#76654)
* align buttons at 16px
* only autoscroll when an interaction has been added or the suggestions have been updated
* add 12px below explain for suggested queries
* add . after suggestion number
* fix linting error
* Prometheus: PromQAIL feedback improvements (#76711)
* align buttons at 16px
* only autoscroll when an interaction has been added or the suggestions have been updated
* add 12px below explain for suggested queries
* add . after suggestion number
* add text indication for explanation feedback
* add form for suggestion feedback, add form for not helpful explanation feedback
* fix linting error
* make radio button feedback required
* required text, padding additions, thank you for your feedback
* PromQL Builder Suggestion: Added type level templates and removed explainer steps for fallback suggestion logic (#75764)
* adding more detailed templates to promql fallback suggest
* remove debug logs
* added missing explain logic
* Fix brendan's type issue
---------
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
Co-authored-by: bohandley <brendan.ohandley@gmail.com>
* make yarn.lock equal to current in main
* fix feature toggles
* fix prettier issues
---------
Co-authored-by: Edward Qian <edward.qian@grafana.com>
Co-authored-by: Yasir Ekinci <yas.ekinci@grafana.com>
Co-authored-by: Edward Qian <edward.c.qian@gmail.com>
Co-authored-by: Gerry Boland <gerboland@users.noreply.github.com>
* feat: add cost management to admin and put adaptive metrics and log volume under it
* test: fix applinks test
* chore: fix lint error
* remove "new" from feature toggle description
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Add teamHeaders for datasource proxy requests
* adds validation for the teamHeaders
* added tests for applying teamHeaders
* remove previous implementation
* validation for header values being set to authproxy
* removed unnecessary checks
* newline
* Add middleware for injecting headers on the data source backend
* renamed feature toggle
* Get user teams from context
* Fix feature toggle name
* added test for validation of the auth headers and fixed evaluation to cover headers
* renaming of teamHeaders to teamHTTPHeaders
* use of header set for non-existing header and add for existing headers
* moves types into datasources
* fixed unchecked errors
* Refactor
* Add tests for data model
* Update pkg/api/datasources.go
Co-authored-by: Victor Cinaglia <victor@grafana.com>
* Update pkg/api/datasources.go
Co-authored-by: Victor Cinaglia <victor@grafana.com>
---------
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Victor Cinaglia <victor@grafana.com>
* Add images
* Basic button functionality; TODO placeholders for dispatching contentOutlineToggle and rendering content outline component
* Basic content outline container
* Content outline toggles
* Remove icon files from explore
* Scroll into view v1
* outline that reflect's explore's order of vizs
* Update icon name
* Add scrollId to PanelChrome; scrolling enabled for Table
* Add queries icon
* Improve scroll behavior in split view
* Add wrapper so the sticky navigation doesn't scroll when on the bottom of the window
* Fix the issue with logs gap; center icons
* Memoize register and unregister functions; adjust content height
* Make displayOrderId optional
* Use Node API for finding position of panels in content outline; add tooltip
* Dock content outline in expanded mode; at tooltip to toggle button
* Handle content outline visibility from Explore and not redux; pass outlineItems as a prop
* Fix ContentOutline test
* Add interaction tracking
* Add padding to fix test
* Replace string literals with objects for styles
* Update event reporting payloads
* Custom content outline button; content outline container improvements
* Add aria-expanded to content outline button in ExploreToolbar
* Fix vertical and horizontal scrolling
* Add aria-controls
* Remove unneccessary css since ExploreToolbar is sticky
* Update feature toggles; Fix typos
* Make content outline button more prominent in split mode; add padding to content outline items;
* Diego's UX updates
* WIP: some scroll fixes
* Fix test and type error
* Add id to ContentOutline to differentiate in split mode
* No default exports
---------
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* extend threshold command with second evaluator called `unloadEvaluator`
* Introduce a new expression command Hysteresis and update Threshold unmarshaller to create the HysteresisCommand if the second eval
* add feature flag `recoveryThreshold`
* update unmarshal threshold command to not re-marshall because it breaks frame definition by shuffling the schema and data fields
* Create a state for dockedMegaMenu and the function to manage it
* Add the dockedMenu icon and handle the status when clicking it
* Add Megamenu to section nav area when it is docked
* get logic working
* fix mobile
* refactor state + persist in localStorage
* adjust icon and don't use position absolute
* restore old rudderstack tracking
* use Flex instead
* adjust feature toggle to be experimental
* extract out localStorage handling into utils
* don't need separate file
* use store.set/get instead
---------
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
* variables for filterforvalue
* use datalinkinput for basic matcher
* fix user select issue
* heatmap transformation variable interpolation
* clean code
* interpolate sort by
* add options interpolation in histogram transformation
* interpolation for limit
* Add suggestions UI to Filter by data value Transformation
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
* add validation for number/variable fields
* Add variables to add field from calculation
* Add validator to limit transformation
* Refactor validator
* Refactor suggestionInput styles
* Add variable support in heatmap calculate options to be in sync with tranform
* Refactor SuggestionsInput
* Fix histogram, limit and filter by value matchers
* clean up weird state ref
* Only interpolate when the feature toggle is set
* Add feature toggle to ui
* Fix number of variable test
* Fix issue with characters typed after opening suggestions still remains after selecting a suggestion
* Clean up from review
* Add more tests for numberOrVariableValidator
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* Initial POC for modified rule expor
* Add rule and group export options to modified export
* Add feature toggle for modifier export
* Rename GrafanaRuleDesigner to ModifyExportRuleForm to identify it easily as a rule form
* Refactor naming and folder for RuleDesigner => ModifyExport
* Don't render more action drop-down button when no more actions are allowed
* Redirect cancel button to alert list view
* Fix modify export page being reloaded correctly without errors
* Fix test
* Protect modify-export route when toggle-feature is not enabled
* Fix css betterer error
* Address pr review coments
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Fix unexpected error when creating a new cloudwatch datasource.
Involves a fair amount of refactoring, so if this causes unexpected issues related to region fetching we can turn this off with the cloudwatchNewRegionsHandler feature toggle, although we do not predict it will so we are enabling it to default to true and hope to remove it shortly.
* issue loki queries in parallel so total query time is only the slowest query rather than the sum of all query times.
* Fix lint
* Add running of queries in parallel behind feature toggle to test the functonality before release
* Add span end
* Move shared logic to separate function
* Add logging and tracing around running of all queries
---------
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
* delete PanelHeader
* PanelHeaderMenuItem is only used in PageHeader
* PanelHeaderCorner only used by PanelEditorTableView
* PanelHeaderMenuTrigger not used anywhere
* PanelHeaderMenuWrapperNew is PanelHeaderMenuWrapper, old one is deleted
* remove newPanelChromeUI from test
* delete feature flag newPanelChromeUI
* PanelHeaderMenuWrapperNew is PanelHeaderMenuWrapper, old one is deleted
* create new feature toggle + start to put stuff behind it
* block move, tidy up interfaces
* fix new/folder actions buttons
* show warning when deleting library panels/alert rules + run i18n:extract
* pseudo
* update unit tests
* pass alert in description
* GA toggleable labels
* Logs integration: update readme with new features
* Build a logs data source: update docs with the new interface
* Plugin docs: update example function signatures and arguments
* Plugin docs: update modifyQuery function names
* Formatting
* Remove character
* Remove `expr` from docs
* Plugin docs: improve code
* Plugin docs: further code improvements
* Add angularDeprecationUI feature toggle
* Add angular notice in angular panel header
* Show angular notice for angular datasources
* Show angular notice at the top of the dashboard
* Changed Angular deprecation messages
* Fix angular deprecation alert displayed for new dashboards
* re-generate feature flags
* Removed unnecessary changes
* Add angular deprecation dashboard notice tests
* Add test for angular deprecation panel icon
* Update test suite name
* Moved isAngularDatasourcePlugin to app/features/plugins/angularDeprecation
* Add hasAngularPlugins to DashboardModel
* re-generate feature toggles
* Fix tests
* Fix data source spelling
* Fix typing issues
* Extract plugin type into a separate function
* re-generate feature flags
* reportInteraction on angular dashboard notice dismiss
* re-generate feature flags
* Re-generate feature flags
* lint
* Metrics summary
* Update query
* Remove colors
* Update states
* Add group by into its own component
* Add group by to search and traceql tabs
* Add spacing for group by
* Update span kind values
* Update span status code values
* Update query based on target + group by
* Cleanup
* Only add targetQuery if not empty
* Add kind=server to table
* Update groupBy query logic
* Add feature toggle
* Use feature toggle
* Self review
* Update target query
* Make gen-cue
* Tweak query
* Update states
* useRef for onChange
* Fix for steaming in search tab
* Add loading state tests
* metricsSummary tests
* Datasource tests
* Review updates
* Update aria-label
* Update test
* Simplify response state
* More manual testing and feedback from sync call
* Prettier and fix test
* Remove group by component from traceql tab
* Cleanup, tests, error messages
* Add feature tracking
* Add feature flag
* Introduce interface and dummy implementation
* Add tests for the new filter
* accessControlDashboardPermissionFilterNoFolderSubquery implementation
* join only if it's necessary
* force ordering for tests
* Temporarily enable new query for benchmarks
* Lucene: add dependency
* ModifyQuery: use Lucene parser to detect key:values in queries
* ModifyQuery: use Lucene parser to remove filters
* Remove test code
* Modify query: switch to recursive implementation
* Modify query: implement remove filter
* Update query normalizing function
* FlagElasticToggleableFilters: remove feature flag
* Remove unused feature flag from test
* Elasticsearch: escape quotes in filter values
* build httpsettings overhaul with new auth component
* remove test code
* add connection and advanced http settings components
* use tooltip with link
* add correct styling and spacing
* save option select for sigV4
* fix styles in Azure auth to fit new auth component
* add types in overhaul folder that are not available yet in grafana
* update e2e tests for new connection component
* update e2e tests for new connection component
* update width of azure inputs
* fix non custom auth selects
* add feature toggle
* wrap azure style changes behind the feature flag
* fix feature toggle rebase fix error
* move advanced http setting and wrap everything in the config subsection component to fix font
* fix input width
* use cx for conditional classes
* use cx for conditional class
* add a new feature toggle for locking down role sync for users managed by GCom
* protect the frontend and the backend using the new feature toggle
* fix merge
* Remove feature flag from registry.go
* Remove usages of toggle
* Refactor and cleanup Tempo's query field components
* Added deprecation alert
* Mark nativeSearch fields as deprecated
* Also show deprecated search tab if queryType is nativeSearch
* Update deprecation message to list grafana version
* Fix merge conflict
* Remove mention of toggle from docs
* Azure: AzureMonitorMetrics - change response to be dataplane compliant
can be disabled via toggle azureMonitorDataplane
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Datasource test: fix describe nesting
* Parsing: export handleQuotes function
* Modify query: add functions to detect the presence of a label and remove it
* Loki: add support to toggle filters if already present
* Datasource test: fix describe nesting
* Loki: add support to toggle filter out if present
* Remove label: handle escaped values
* Datasource: add test case for escaped label values
* Loki: remove = filter when applying !=
* Remove selector: add support for Selector node being far from Matcher
* Modify query: add unit tests
* Elasticsearch: create modifyQuery for elastic
* Elastic modify query: implement functions
* Elasticsearch: implement modifyQuery functions in datasource
* Elasticsearch: update datasource test
* Loki modify query: check for streamSelectorPositions length
* Elasticsearch query has filter: escape filter value in regex
* Remove unused type
* Modify query: add functions to detect the presence of a label and remove it
* Remove label: handle escaped values
* Logs: create props to check for label filters in the query
* Log Details Row: use label state props to show visual feedback
* Make isCallbacks async
* Explore: add placeholder for checking for filter in query
* Datasource: define new API method
* Inspect query: add base implementation
* Remove isFilterOutLabelActive as it will not be needed
* Check for "isActive" on every render
Otherwise the active state will be out of sync
* Elasticsearch: implement inspectQuery in the datasource
* Logs: update test
* Log details: update test
* Datasources: update tests
* Inspect query: rename to analize query to prevent confusion
* Datasource types: mark method as alpha
* Explore: add comment to log-specific functions
* Remove duplicated code from bad rebase
* Remove label filter: check node type
* getMatchersWithFilter: rename argument
* Fix bad rebase
* Create DataSourceWithQueryManipulationSupport interface
* Implement type guard for DataSourceWithQueryManipulationSupport
* DataSourceWithQueryManipulationSupport: move to logs module
* hasQueryManipulationSupport: change implementation
`modifyQuery` comes from the prototype.
* DataSourceWithQueryManipulationSupport: expand code comments
* AnalyzeQueryOptions: move to logs module
* DataSourceWithQueryManipulationSupport: add support for more return types
* Fix merge error
* Update packages/grafana-data/src/types/logs.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* DatasourceAPI: deprecate modifyQuery
* Explore: refactor isFilterLabelActive
* DataSourceWithQueryModificationSupport: rename interface
* Split interfaces into Analyze and Modify
* Query analysis: better name for interface
* Fix guard
* Create feature flag for active state
* Use new feature flag in Explore
* DataSourceToggleableQueryFiltersSupport: create a specific interface for this feature
* Rename feature flag
* De-deprecate modifyQuery
* DataSourceToggleableQueryFiltersSupport: Rethink types and methods
* Explore: adjust modifyQuery and isFilterLabelActive to new methods
* Loki: implement new interface and revert modifyQuery
* DataSourceToggleableQueryFiltersSupport: better name for arguments
* Elasticsearch: implement new interface and revert modifyQuery
* Loki: better name for arguments
* Explore: document current limitation on isFilterLabelActive
* Explore: place toggleable filters under feature flag
* Loki: add tests for the new methods
* Loki: add legacy modifyQuery tests
* Elasticsearch: add tests for the new methods
* Elasticsearch: add legacy modifyQuery tests
* Toggle filter action: improve type values
* Logs types: update interface description
* DataSourceWithToggleableQueryFiltersSupport: update interface name
* Update feature flag description
* Explore: add todo comment for isFilterLabelActive
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* add a feature toggle
* add the fields for attribute, kind and identifier to permission
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* set the new fields when new permissions are stored
* add migrations
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* remove comments
* Update pkg/services/accesscontrol/migrator/migrator.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* feedback: put column migrations behind the feature toggle, added an index, changed how wildcard scopes are split
* PR feedback: add a comment and revert an accidentally changed file
* PR feedback: handle the case with : in resource identifier
* switch from checking feature toggle through cfg to checking it through featuremgmt
* don't put the column migrations behind a feature toggle after all - this breaks permission queries from db
---------
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* pushed to get help of a genius
* fix: error response is not json
* feat: make request on click
* refactor: remove print statement
* refactor: remove unnecessary code
* feat: convert grafana variables to value for API request
* use the parser to interpolate and recover the original query (#64591)
* Prettify query: use the parser to interpolate and recover the original query
* Fix typo
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Fix typo
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* fix: reverse transformation not working
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Gareth Dawson <gwdawson.work@gmail.com>
* fix: bugs created from merge
* refactor: move prettify code out of monaco editor
* fix: variables with the same value get converted back to the incorect variable
* refactor
* use consistent styling with bigquery
* fix: only allow text/plain and application/json
* fix: only make the request if the query is valid
* endpoint now returns application/json
* prettify from js
* WIP: not all cases are handles, code still needs cleaning up
* WIP
* large refactor, finished support for all pipeline expressions
* add tests for all format functions
* idk why these files changed
* add support for range aggregation expr & refactor
* add support for vector aggregation expressions
* add support for bin op expression
* add support for literal and vector expressions
* add tests and fix some bugs
* add support for distinct and decolorize
* feat: update variable replace and return
* fix: lezer throws an errow when using a range variable
* remove api implementation
* remove api implementation
* remove type assertions
* add feature flag
* update naming
* fix: bug incorrectly formatting unwrap with labelfilter
* support label replace expr
* remove duplicate code (after migration)
* add more tests
* validate query before formatting
* move tests to lezer repo
* add feature tracking
* populate feature tracking with some data
* upgrade lezer version to 0.1.7
* bump lezer to 0.1.8
* add tests
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* add grafana-apiserver
* remove watchset & move provisioning and http server to background
services
* remove scheme
* otel fixes (#70874)
* remove module ProvideRegistry test
* use certgenerator from apiserver package
* Control collector/pdata from going to v1.0.0-rc8 (as Tempo 1.5.1 would have it)
* Refactor Tempo datasource backend to support multiple queryData types.
Added traceId query type that is set when performing the request but doesn't map to a tab.
* WIP data is reaching the frontend
* WIP
* Use channels and goroutines
* Some fixes
* Simplify backend code.
Return traces, metrics, state and error in a dataframe.
Shared state type between FE and BE.
Use getStream() instead of getQueryData()
* Handle errors in frontend
* Update Tempo and use same URL for RPC and HTTP
* Cleanup backend code
* Merge main
* Create grpc client only with host and authenticate
* Create grpc client only with host and authenticate
* Cleanup
* Add streaming to TraceQL Search tab
* Fix merge conflicts
* Added tests for processStream
* make gen-cue
* make gen-cue
* goimports
* lint
* Cleanup go.mod
* Comments
* Addressing PR comments
* Fix streaming for tracel search tab
* Added streaming kill switch as the disableTraceQLStreaming feature toggle
* Small comment
* Fix conflicts
* Correctly capture and send all errors as a DF to client
* Fix infinite error loop
* Fix merge conflicts
* Fix test
* Update deprecated import
* Fix feature toggles gen
* Fix merge conflicts
* introduce a new node-type ML and implement a command outlier that uses ML plugin as a source of data.
* add feature flag mlExpressions that guards the feature
* add table visualisation for logs
* add `logsExploreTableVisualisation` feature flag
* add feature flag to visualisation switch
* fix english
* improve state when no data is present
* improve margin
* add missing prop to test
* add tests
* fix logs table height
* fix linting
* move visualisation toggle
* add field config overrides
* update tests
* fix explore test
* fix explore test
* add missing header and revert test changes
* use timefield from logsFrame.ts
* add TODO
* move to new file
* hide fields that should be hidden
* add test to hide fields
* remove unused lines
* Plugins: Angular detector: Remote patterns fetching
* Renamed PatternType to GCOMPatternType
* Renamed files
* Renamed more files
* Moved files again
* Add type checks, unexport GCOM structs
* Cache failures, update log messages, fix GCOM URL
* Fail silently for unknown pattern types, update docstrings
* Fix tests
* Rename gcomPattern.Value to gcomPattern.Pattern
* Refactoring
* Add FlagPluginsRemoteAngularDetectionPatterns feature flag
* Fix tests
* Re-generate feature flags
* Add TestProvideInspector, renamed TestDefaultStaticDetectorsInspector
* Add TestProvideInspector
* Add TestContainsBytesDetector and TestRegexDetector
* Renamed getter to provider
* More tests
* TestStaticDetectorsProvider, TestSequenceDetectorsProvider
* GCOM tests
* Lint
* Made detector.detect unexported, updated docstrings
* Allow changing grafana.com URL
* Fix API path, add more logs
* Update tryUpdateRemoteDetectors docstring
* Use angulardetector http client
* Return false, nil if module.js does not exist
* Chore: Split angualrdetector into angularinspector and angulardetector packages
Moved files around, changed references and fixed tests:
- Split the old angulardetector package into angular/angulardetector and angular/angularinspector
- angulardetector provides the detection structs/interfaces (Detector, DetectorsProvider...)
- angularinspector provides the actual angular detection service used directly in pluginsintegration
- Exported most of the stuff that was private and now put into angulardetector, as it is not required by angularinspector
* Renamed detector.go -> angulardetector.go and inspector.go -> angularinspector.go
Forgot to rename those two files to match the package's names
* Renamed angularinspector.ProvideInspector to angularinspector.ProvideService
* Renamed "harcoded" to "static" and "remote" to "dynamic"
from PR review, matches the same naming schema used for signing keys fetching
* Fix merge conflict on updated angular patterns
* Removed GCOM cache
* Renamed Detect to DetectAngular and Detector to AngularDetector
* Fix call to NewGCOMDetectorsProvider in newDynamicInspector
* Removed unused test function newError500GCOMScenario
* Added angularinspector service definition in pluginsintegration
* Moved dynamic inspector into pluginsintegration
* Move gcom angulardetectorsprovider into pluginsintegration
* Log errUnknownPatternType at debug level
* re-generate feature flags
* fix error log
Currently does not do anything as it is for use with a future enterprise PR
Eventually: "Enables writing multiple items from a single query within Recorded Queries"
* remove i18n toggle
* remove beta badge on language picker
* remove toggle from go code
* Revert "remove beta badge on language picker"
This reverts commit 3b76300aa7.
* Basic implementation in web worker
* Move instances discovery to the worker
* Remove filtering from the worker
* Use normalized routes, use rtk query for alert groups fetching
* Reorganize matchers utilities to be available for web workers
* Move object matchers to the machers util file, rename worker
* Move worker code to a separate hook, add perf logging
* Add a mock for the web worker code, fix tests
* Fix tests warnings
* Remove notification policy feature flag
* Add normalizeRoute tests, change the regex match to test for label matching
* Move worker init to the file scope
* Simplify useAsyncFn hook
* Use CorsWorker as a workaround for web workers loading from CDN
* Use a feature flag to enable/disable worker-based preview, add worker error handling
* Add POC for react-enable working with grafana feature toggles
* Code cleanup
* Remove console error, add useRouteGroupsMatcher tests
* Fix tests mock
* Wip
* remove name input from page body
* render title & subTitle in datasource page in connections and remove unused prop - uid
* styling on actions button group
* remove unused props in edit datasource page
* set gap as 8px between buttons
* move editable datasourcename to the header
* add subTitle component
* remove useRef and use autoFocus prop
* pass false to isDefault when dataSource is undefined
* change button text
* remove suffix icon
* remove unused import - Icon
* consolidate duplicate useDataSourceSettingsNav into datasrouces hook
* move dataSource context to useDataSourceSettingsNav
* remove Explore button in the footer
* remove unused props
* fix failing test on button group
* fix typo on file naming
* remove disabled prop
* fix param
* add test
* add test files
* disable editing title in readOnly provision datasource
* update name should save dataSource
* prevent swith toggle change from label clicking and change margin
* update tooltip message
* use datasource update on header instead of state update
* remvoe subTitle component and move subTitle component next to page Info component
* Added title
* remove subTitle in buildNavModel
* replace Button with Badge
* make datasourceheader as a component
* horizontal gap of 24px between pageInfo and actions components
* align page Info value items
* accept react node as page info label and add tooltip to Default item
* update navId for edit datasource page in connections
* update unit testing for Title
* fix gen_que
* betterer
* prettier fix
* fix e2e test
* add data-testid to nameEditIcon selector
* fix tooltip text
* fix navId for connections datasources edit page
* fix e2e selector: change autoSizeInput to Input
* adding ellipsis to EditDataSourceTitle
* override grafana-ui titleContainer h1 styles
* UI cleanup and apply readOnly to default datasource switch
* add period
* datasource name validation
* title and page info alignment
* add feature toggle - dataSourcePageHeader
* restore basicSettings component and apply feature toggle
* go lint
* Revert "title and page info alignment"
This reverts commit 681ac51f11.
* remove editable fields from page Header - name, default datasource switch
* fix go test: toggle generator
* remove test id
* remove alerting badge in BasicSettings component
* Revert "remove alerting badge in BasicSettings component"
This reverts commit fb33ff9028.
* feature toggle on alerting badge
* rename component & filename
* move DataSourceInfo type
* change button to link in test
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Miguel Palau Zarza <mpalauzarza@gmail.com>