* PanelChrome: Fixes issues with hover header and sizing panel above
* Update
* Make panel be focusable
* Fix tooltip when using keyboard nav
* Re-render grid when layout change to have dom positions match absolute css positions
* Fix clicking panel leaves hover header open
* Elasticsearch: add additional settings section
* Remove extra lines
* Elastic config: add divider between name and http settings
* Data links: fix subsection title
* Remove unused import
* refactor: replace IconButtons
* refactor: replace tooltip text in order to make it more universal
* refactor: remove additional IconButton
* refactor: add aria-labels
* refactor: fix test
* Mark strings in folder manager nav for translation
* Mark strings in folder actions for translation
* Mark strings in new folder modal for translation
* Mark strings in delete modal for translation
* Mark strings in move modal for translation
* Fix interpunction in translations
* Run i18n:extract
* Fix Manage Permissions drawer test
* Redundnt useMemo
* Updated extracted translations after resolving conflicts
---------
Co-authored-by: Roxana Turc <anamaria-roxana.turc@grafana.com>
* Add component to display QueryOptions in editor
* Display QueryOptions in QueryWrapper
* Display real data for time range and max data points
* Improve QueryOptions styling
* Remove Portal from RelativeTimeRangePicker
* Prevent RefID from hiding on small screens
Fixes https://github.com/grafana/grafana/issues/70900
* Address review comments
* Fix lint
When building a query for multiple resources only a subset of metrics
are valid and that selection is only available via the API version `2017-12-01-preview`.
fixes#68603
* Reduce number of unnecessary request in the alert list panel in case we have data source filter selected
* use fetchPromAndRulerRulesAction instead of fetchAllPromAndRulerRulesAction in case of having datasource selected in options
* remove unnecessary useEffect
* Reduce number of requests in GroupBy component if data source is selected
* use redux utils for asyncmapslice
* lint
* Address review comments
* Skip fetching grafana rules if datasource is not Grafana rules source name
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* fix: use correct validate funtion
* rename isValidQuery to isQueryWithError
* lets pretend i didnt break things again
* Loki validation: add missing comments and refactor validation function
* isValidQuery: add unit test
* Loki datasource: add tests for getQueryStats
* Remove isValidQuery function
* UnwrapParamEditor: interpolate query before testing validity
* Stats: trim queries when evaluating change
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* remove hover style from results
* remove metric select keyboard interactions and highlighting for table results
* update naming for metrics explorer
* fix bug for match highlighting persisting when empty query
* I18n:Mark up Permissions
* Mark up strings in Permissions file
* I18n:Mark up phrases for on Permissions drawer
* I18n:Mark up phrases for translation on Permissions page
* I18n:Mark up phrases for translation on Permissions page
* Made the changes based on suggestions received
* restore translations
* Run extract again
* unify search table styles with browse
* add a skeleton state when switching to search view
* show all column headers
* use isItemLoaded
* extract number of placeholder rows into variable + add comment
* fix all selection toggle behaviour
* tidy up
* fix unit test
* Add limit query parameter
* Drop copy paste comment
* Extend history query limit to 30 days and 250 entries
* Fix history log entries ordering
* Update no history message, add empty history test
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Cleaned up solution and starting to make it work properly.
* will disable add button if no queries available.
* Changed so 'add to dashboard' is registered as an extension in explore.
* moved utility function to utils
* hides button if insufficent permissions.
* Fixed ts issue.
* cleaned up the code and change to using the 'getPluginLinkExtensions'
* Added values to explore context.
* truncating title in menu.
* added tests to verify explore extension point.
* fixed failing tests in explore.
* made excludeModal optional.
* removed temporary fix to force old button.
* reverted generated files.
* fixed according to feedback.
* Update public/app/features/explore/extensions/ToolbarExtensionPoint.test.tsx
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Update public/app/features/explore/extensions/ToolbarExtensionPoint.test.tsx
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* added tests suggested in reviews.
* fixed failing tests after sync with main.
* replaced exploreId type with stirng.
* cleaned up code a bit more.
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Angular deprecation: Add Angular badge in plugin catalog page
* Angular deprecation: Add alert in plugin details page
* Angular deprecation: Disable install button if for Angular plugins
* removed extra console.log
* Add tests for Angular badge
* Add tests for PluginDetailsAngularDeprecation
* Add tests for InstallControlsButton
* Add tests for ExternallyManagedButton
* Table tests
* Catalog: Update angular deprecation message
* PR review feedback
* Update tests
* Update copy for angular tooltip and alert
* Update tests
* Fix test warnings
* Fix angularDetected not being set for remote catalog plugins
* Dynamic alert text based on grafana config
* Moved deprecation message to a separate function
* Removed unused Props in PluginAngularBadge
* Account for restricted datasource
* Allow for fetching datasource to return undefined and beef up filtering after to remove invalid datasources
* Revert "Account for restricted datasource"
This reverts commit 1087159b93.
* Empty-Commit
* Generate plugin version and remove lineage version
* Generate version for each major
* Remove pluginVersion from core plugins
* Remove code version generation
* Generate cue files
* Move grafana version into jenny
* fix go import
* Show description for each expression type in the body and change widht depending on the type
* Move condition indicator to the header
* Make order of fields in expressions to be consistent for each expression type
* Add tooltip for expression type menu
* Update styles depending on the expression type
* Update styles and move add query button under queries
* Add NeedHelpInfo component
* Adress PR review comments
* Apply description updates from #70540
* Rename gelTypes to expressionTypes
* Update layout for expressions according to the real usecases
* Update footer to include series count in all expressions
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Prevent using original rule uid when cloning
* Use uid from url instead of a new param in the alert rule form
* Add function to clone rule and tests for it
* Fix lint & tests
---------
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* Reformatting and restructuring
* Update unit test
* Always send the default retention policy as first element
* Fix typo
* Update test
* Update test once more
* Field names start with capital letters
* Simplify the condition
* Case-insensitive checks
* Fix typo
* Update response_parser test
* Update imports
* Refactor annotation transform logic
* More types
* Moore types
* Fix table rendering issue
* Use it as raw query
* Migrate annotations
* Set default retention policy when there is no policy in the query
---------
Co-authored-by: Ludovic Viaud <ludovic.viaud@gmail.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: use query modeller instance from module
* Reformatting and restructuring
* Update unit test
* Always send the default retention policy as first element
* Fix typo
* Update test
* Update test once more
* Field names start with capital letters
* Simplify the condition
* Case-insensitive checks
* Fix typo
* Update response_parser test
* Update imports
* Dashboards: Allow dashboards with same name in different folders
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
* fix
---------
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Trigger separate rules request for each alerting panel in a dashboard
* Add RTK method to fetch prom rules
* Use RTKQuery to get prom rules in UnifiedAlertList
* Fix lint
* Mock promRules call
* Address PR comments
* Fix tests
* refactor: modify interfaces to make tooltip or aria-label required
* refactor: change functionality around aria-label and tooltip
* refactor: change and add information in storybook documentation
* refactor: remove default from tooltip
* refactor: IconButton to make tooltip or aria-label required
* refactor: Fix tests
* refactor: Fix tests
* refactor: Fix tests
* refactor: Fix tests
* feat: add migration guide for breaking change
* feat: add latest requirements to storybook docs
* refactor: separate iconbutton story with and without tooltip
* refactor: remove exported baseArgs
* refactor: clean up and restructure original story
* refactor: adjust styling
* refactor: enable control for tooltip
* refactor: clean up
* refactor: enable control for aria-label
* refactor: fix theme getting the wrong theme
* refactor: fix tests
* refactor: adjust story
* refactor: remove confusing story
* refactor: adjust controls for stories
* Tempo: Move upload trace to its own button
* Zipkin: Move upload trace to its own button
* Jaeger: Move upload trace to its own button
* Fix test
* Remove extra upload section from editor body
---------
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
* DS Picker: Add `inputId` and `noDefault` options
* DS Picker: Add `disabled` state
* Add tests for `disabled`
* Select default DS if `current` is not provided
* Remove `width` from style
* Move types next to components
* Only calculate height when opening
* Adds new text input in prometheus template variable UI that allows label names function to filter values by metric.
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
* this is an ok intermediate point
* delete some unused actions + fix tag invalidation on folder save
* remove prefetching for now (it creates a permanent subscription?!)
* leave paginated fetch out of rtk query for now
* ensure we're invalidating the cache correctly
* fix dashboard saving
* simplify
* recursively invalidate children on rename
* tidy up
* don't need to invalidate tags on delete
* don't need to invalidate on new either
* make new refreshParents action
* pageheader spacing
* invalidate getFolder on move
* bit of rearrangement
* Change how we display annotations in the rule form
* Allow to add custom annotations using a free text input
* Get dashboard and panel titles to display in the annotations section
* Add component to display dashboard and panel annotations as links
* Add styling to help tooltip
* Fix styling on annotations controls
* Fix tests
* Fix tests
* Remove unused imports
* Add component for custom annotations
* Display default annotations even if editing and they're empty
* Adjust tests
* Make conditional rendering more clear
* Fix tests
* Move annotation header to separate component
* Fix lint
* Show annotation fields in the right order
* Prevent showing custom annotation fields by default
* Don't display links to dashboard/panel if response fails
* Rename custom annotation header component
* Fix after rebase
* Query utils: refactor isQueryPipelineErrorFiltering and getLogQueryFromMetricsQuery
* Query utils: refactor isQueryWithRangeVariable and getHighlighterExpressionsFromQuery
* Get parser: return log expression even if no pipelineExpr is present
* Update tests
* refactor file drop out of query group
* make sure we display errors when file upload fails
* refactor to make onChange take default queries
* let grafana datasource handle file -> query
* add dropdown tests
* add modal tests
* add filtering props to dropdown
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Remove storing derived state (loading property) and use a selector instead
* Remove redundant tests
There's no way to change the interval while live streaming
* Remove check for isLive when deriving waiting for data
It was introduced in #18804
* Remove unused props
* Add notification policies preview in alert rule form
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Refactor using new useGetPotentialInstances hook and apply some style changes
* Add notification policy detail modal
* Use backtesting api for simulating potential alert instances
* Fix logic to travserse all the children from the root route
* Split notification preview by alert manager
* Add instance count to matching policy header and fix some styles
* Move some logic to a new hook useGetAlertManagersSourceNames to make the code more clean
* Fix some tests
* Add initial test for NotificationPreview
* Use button to preview potential instances
* Add link to contact point details
* Add route matching result details
* Show AlertManager image in the routing preview list
* Add tests setup, add single AM preview test
* Handle no matchers and no labels use case
* Update some style in collapse component and fix policy path in modal
* Update modal styles
* Update styles
* Update collapse header styling
* Normalize tree nodes should happen before findMatchingRoutes call
* Fix findMatchingRoutes and findMatchingAlertGroups methods after reabasing
* Move instances matching to the web worker code
* Fix config fetching for vanilla prometheus AMs
* Add tests
* Add tests mocks
* Fix tests after adding web worker
* Display matching labels for each matching alert instance
* Add minor css improvements
* Revert changes added in Collapse component as we don't use it anymore
* Move the route details modal to a separate file
* Move NotificationRoute and preview hook into separate files
* Fix Alertmanager preview tests
* Fix tests
* Move matcher code to a separate file, improve matcher mock
* Add permissions control for contact point edit view link
* Fix from and to for the temporal use of backtesting api
* Fix tests, add lazy loading of the preview component
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* Fix preview test
* Add onclick on the header div so it collapse and expands when clicking on it, and update styles to be consistent with the rest of tables
* Adapt the code to the new rule testing endpoint definition
* Fix tests
* small changes after reviewing the final code
* compute entire inherited tree before computing the routes map
* Throw error in case of not having receiver in routesByIdMap and add test for the use case of inheriting receiver from parent to check UI throws no errors
* Add list of labels in the policy route path that produces the policy matchers to match potential instances
* Use color determined by the key, in label tags when hovering matchers in the policy tree
* Remove labels in modal and handle empty string as receiver to inherit from parent as we do with undefined
* Revert "Add list of labels in the policy route path that produces the policy matchers to match potential instances"
This reverts commit ee73ae9cf9.
* fix inheritance for computeInheritedTree
* Fix message shown when preview has not been executed yet
* First round for adressing PR review comments
* Adress the rest of PR review commments
* Update texts and rename id prop in NotificaitonStep to alertUid
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Elasticsearch: remove usages of any
* Elasticsearch: check for filter type when accessing field aggs
* Elasticsearch: use type guards instead of checking types
* Use unknown for isPrimitive function
* Add deprecation notice
* Remove unused type
* Fix bug in "isPrimitive" function
* Remove unused import
* Revert "Fix bug in "isPrimitive" function"
This reverts commit 27f9874cce.
* refactor metric select and label filters, add variables to label names dropdown
* use MetricsLabelsSection in variable editor
* use variable editor UI with MetricsLabelsSection
* filter label names by optional metric and allow metric to be cleared
* fix tests
* testing types for onChangeLabels
* testing types for onChangeLabels
* testing types for onChangeLabels
* Ismails review, remove comment and indent
* wrap label filters
* improved behavior for selects and inputs, add tests and document behavior
* Add option to make QueryEditor not collapsable
* Make QueryEditor not collapsable in Alerting
* Change query editor border to weak
The medium border is really only for inputs, everything else should use weak border
* Add tests
* show invite button if disable login form is set to false
* fix test
* Update public/app/features/users/UsersActionBar.tsx
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Make EchoSrvTransport batched
With the update of faro web sdk to 1.1.0, batching was introduced, in
which several telemetry signals can be grouped together in a fixed
interval or buffer length. The current setup in which the
EchoSrvTransport was proxying signals through the Echo Backend was
yielding the following issue.
The updated Fetch transport is batched but the way it was being used by
the `GrafanaJavascriptAgentBackend` was pushing single items.
* add analytics for folder creation
* add interaction tracking for move/delete
* add tracking for item clicked in the new browse view
* review comments
* emit counts instead
* feat: template data source option current by uid
* fix: e2e with explicit uid for "slow-prometheus"
* revert: unrelated change
* revert: unreverted the actually related change
* chore: e2e support for testing ${variable:text}
* fix: use `:raw` instead of `:value` in e2e dashboard
* remove infer type functionality because usability tests confirmed it was confusing/not helpful
* persist button option to open modal when typing in metric select
* update copy desc for setting that includes type and description in search
* when filtering by type, only return metrics with defined type
* give focused metric row more contrast, consistent with metric select focused option
* allow selection of metrics with unknown types and undefined types
* add highlighting to backend search
* augment counters created from summaries with (summary)
* remove type from search input setting and only search by name and description
* fix test to reflect that type has been removed from the metadata input search as duplicated by the filter
* add button to select metric, change wording, make table hover row consistent with grafana table
* add tooltip icon with docs link for metric types that are augmented, histogram and summary
* remove files slated for future refactoring
* style changes based on catherine's review
* remove border from settings btn, select btn increase to md, change col size in table, fix responsive inputs ui for sm screens
* add tests for empty dashboard page
* add tests for AddPanelButton
* export default components
* test +Add menu in dashboard page
* use userEvent instead of firing an event on the DOM itself
* fix test to match new analytic events
* refactor: tooltip is required
* refactor: add tooltips
* refactor: add tooltips
* refactor: add tooltips
* refactor: add tooltips
* refactor: add tooltips
* refactor: add tooltips
* refactor: adjust tests
* refactor: apply changes from code review
* refactor: adjust component for e2e test
* refactor: adjust fallback
* refactor: apply changes from code review
* refactor: apply changes from code review
* refactor: set IconButton default as type=button and remove from use cases
* refactor: remove aria-labels when duplicated and type=button from use cases
* refactor: clean up
* refactor: fix tests
* refactor: fix type errors
* refactor: remove changes in order in order to add them to a separate PR
* refactor: set IconButton default as type=button
* refactor: remove tooltip
* refactor: apply changes requested in review
* ui migration WIP
* merge
* migration tests for api
* revert chagnes to align with main
* revert chagnes to align with main
* revert chagnes to align with main
* remove unused code and comments
* revert gen files
* retry logic inplace
* fix a any
* fixed types
* migraiton results now show only result if no failures
* review comments
* wording to make it more actionable
* add migraiton summary text onyl for failed apikeys
* fixed wording and added a close button to the modal
* made the button close the modal
* moved state into component
* fix based on review, naming and removed unused code
* service account migration state optional
* making migration result undefined
* showing total and migrated numbers for a successful migration
* fix payload const to take the payload