* 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
* Loki: Allow setting of timeRange when using languageProvider functions
* Loki: Use timerange where available for start
* Loki: Use timerange where available for fetchLabels
* Loki: Use timerange where available for fetchSeriesLabels
* Loki: Use timerange where available for fetchLabelValues
* Loki: Use timerange where available for getParserAndLabelKeys
* Loki: Update and add tests for fetchLabels
* Loki: Update and add tests for fetchSeriesLabels
* Loki: Update and add tests for fetchSeries
* Loki: Update and add tests for fetchLabelValues
* Loki: Update and add tests for fetchLabelValues
* Loki: Update and add tests for getParserAndLabelKeys
* Update public/app/plugins/datasource/loki/LanguageProvider.test.ts
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* Update public/app/plugins/datasource/loki/LanguageProvider.test.ts
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* Not needing to use languageProvider.getDefaultTime in Monaco
* Update comment
* Update getDefaultTimeRange to be ptivate
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* Move serializeParams to @grafana/data
* Update comment
* Update solution in Tempo
* Fix type assertions
* Use toUrlParams in serializeParams
* Update data sources
* Update
* Update packages/grafana-data/src/utils/url.ts
* move the name finding logic for new data sources from frontend to backend
* cleanup and fix test
* linting
* change the way the number after the ds type is incremented - keep incrementing it without adding more hyphens
* enterprise spec updates (unrelated to the PR)
* Add routing option tabs
* Use alertingSimplifiedRouting feature toggle
* Move simplified routing tab to a separate component:SimplifiedRouting
* Populate contact point selector with the right values
* Show alert manager icons
* Fix descriptions
* Remove clear button on ContactPointSelector and save updated reducer state in the form
* Load contact points and manual option from rule data in RuleFormValues
* make contact point selector not clearable
* Refactor
* Add link to contact points view
* Move ContactPointSelector to a separate file
* Refactor: move hoook useReceiversMetadataMapByName to a separate file
* Update Need more info texts
* Address some PR review comments
* Use useContactPointsWithStatus hook and wrap each ContacPointSelector with AlertmanagerProvider
* use getAlertManagerDataSourcesByPermission instead of useGetAlertManagersMetadata in NotificationPreview
* Update enum
* Remove css style
* remove console
* update contact point selector
* file cleanup
* adds summary as description
* Update text in manual tab
* Fix preview routing not checking if alert manager can handle grafana alerts
* Fix typo
* remove unused location form field
* fix prettier
* fix test
* Remove unused location form field from AlertRuleNameInput
* Only use internal AlertManager for now
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* feat(state-timeline-tooltip): improve status history tooltip
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Default synced to true, only show synced status if panes are split
* Don’t default sync to true until split happens, handle syncing when init or history change sync happens
* Sync times if origin pane and new pane have the same range
* CloudWatch: call query method from DataSourceWithBackend to support public dashboards
* add test
* remove unneeded properties from test case
* update betterer
* add parens to group related logic
* remove unnecessary aliasing of variable
* use t.Cleanup
* remove redundant check
* add comment
* preserve label with empty string
* fix side effect of having undefined show up in the editor select for value
* re render label item when label filters change
This PR adds a new [extension point][] to each row of the
alert instances table. This allows plugins to add actions
to a dropdown menu in the rightmost column of the table.
Those actions are passed the alert instance so can use it
for contextual handling.
See https://github.com/grafana/machine-learning/pull/3461
for an example of how this can be used (e.g. by Grafana Sift
here).
* Improve time series detection
* Prettier
* Add test
* Update packages/grafana-data/src/dataframe/utils.ts
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
* Ensure correct time field support and set maximum size
* Look at each field to see if they are time series
* Add further tests
* Prettier
---------
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
* Loki: Use TemplateSrv from grafana/runtime
* Loki: Fix import for intervalToMs
* Revert "Loki: Use TemplateSrv from grafana/runtime"
This reverts commit d573925e37.
* fix some types
* more type updates
* some more fixes
* more changes
* string instead of unknown
* more like original logic
* remove outdated comment
* update betterer
* 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
* InfluxDB: Add new truthiness operators (`Is` and `Is Not`) to InfluxQL Editor for use with boolean fields
* InfluxDB: Make the front-end aware of the new operators so that translation between raw and builder works
* Chore: Add tests
* feat: identify type of field value to allow other types to work with Is/Is Not
Tags: always quote
Integer: Don't quote
Float: Don't quote
Boolean: Don't quote
String: Quote
* Chore: Add test-cases for type inference
* Update front-end to infer type for operators Is and Is Not
* chore: Add front-end tests
* chore: add additional front-end tests
* chore: fix failing lint test
* chore: fix tests (run prettier)
* MenuItem: Allow react node as label
* LinkButton: Expose ButtonLinkProps
* Typecheck fix
* DashboardLinks: Refactor and use LinkButton and menu
* DashbaordLinks scene object
* Use flex layout for dashboard controls
* Update public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* fix keepTime and includeVars
* Add ellipsis to menu item label and description
* Use DashboardLink type from grafana/schema
* Update dashboard scene controls layout
* Fix e2e
* Test fix
* Bring back keyboard navigation
* Remove unused code
* One more fix
---------
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Allow to clear datasource selection
Also improve texts for linked alerts switch
* Remove onClear prop as it does not work
* Change text on datasource selection filter
* Change datasource filter description
* InfluxDB: Add support for `>=` and `<=` comparison operators to InfluxQL Query Builder
* Add front-end support for the new operators
This ensures that the query translates correctly between raw and builder mode
* Chore: add test for new operators
* chore: add front-end tests
* fix: don't skip quoting on `<>`
This preserves the pre-existing behaviour, fixing a failing test
* chore: fix tests
* Transformations: Fix Timeseries to table transformation trend reduction when result is 0
When reduceField function returns 0, the reduced value is set to null. I
think we can remove this "|| null" statement, as:
- There is a check a few lines above to make sure the field type is a number. This might be a reasonable guarantee that the calculation we are doing will make sense and there will be no need to set to null.
- Sparkline cell type already has an option to hide value if we believe the calculation
does not make sense.
Fixes#78025
* make sure we check for undefined
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* Add `isManaged` property to frontend model
* Remove enabled and token buttons for managed SA
* Replace trash icon for lock icon for managed SA
* Block the role picker for managed SA
* Filter SA list usiong the managed filter
* Rename external for managed
* Add only managed filter
* Toggle the enable buttons for managed sa
* Disable add token and delete token buttons
* Remove the edit name button
* Disable the Role picker for managed sa
* Hide the permissions section
* Add managed by row
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Plugin: Deriving fields by name from parsed logs
Loki only derives fields by a regex matcher, this limits its usage when functions such as `line_formatter` is used on
top of the logs.
Some users already have logs parsed in json or logfmt structure which are detected as fields in loki.
This pull request allows the mapping between detected fields values and derived values by matching the fields' names.
Currently the feature is behind `lokiEnableNameMatcherOption` feature toggle.
* improve settings page to have a `fieldType`
* improve derived fields getter to use `matcherRegex`
* fix failing test
* rename feature toggle to `lokiDerivedFieldsFromLabels`
* added suggestions from review
* add empty config object
* remove feature flag
* fix width of select
* default to `regex` derived field
* fix failing test
---------
Co-authored-by: Sven Grossmann <svennergr@gmail.com>
* Add AlertStates data topic
* DashboardScene: Alert states data layer
* TMP package json
* Remove duplicated function
* Use latest scenes canry
* Use latest scenes and add transformation test
* feat: share the plugin context with app plugins
* feat: share the plugin context ui-extension modals
* feat: pre-fetch the app plugin settings
* feat: expose more utility hooks for plugins
* fix: use `location.pathname` directly
Previously it was referenced by `pluginRoot.props.path`, which stops
working in case the `pluginRoot` element is wrapped with anything.
* playlist skeleton poc
* refactor into PlaylistCard
* make card actions more responsive, update skeleton color to work on secondary background
* don't loop over array
* fix unit tests
* break out subcomponents
* prettify
* break out editors into separate files
* update betterer since this is only moving around lint issues
* Fix import
* Plugins:Allow disabling angular deprecation UI for specific plugins
* add backend test
* changed test names
* lint
* Removed angular properties from DataSourceDTO
* Update tests
* Move angularDetected and hideAngularDeprecation in angularMeta property
* Fix angular property name in AppPluginConfig
* Fix reference to angularMeta.detected
* Fix hide_angular_deprecation not working for core plugins
* lint
* Add `isExternal` property to frontend model
* Remove enabled and token buttons for external SA
* Replace trash icon for lock icon for external SA
* Block the role picker for external SA
* Filter SA list using the external filter
* Add only external filter at backend
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Dashboards: Prevent shared queries from being unnecessarily re-run
* Minor change
* Set solo panel as being viewed
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Add timeFilter macro to query builder
* Only render SQLWhereRow when fields are there
* Change the default query to timeseries and remove 50 limit
* Add timeFilter macro for the first time when timeSeries
* Add test for timeFilter macro
* Lint fix
* Annotation query format should be table
* Set order by as default
* Revert changes that made time series default
* Fix e2e test
* Fix e2e test
* Make sure to reset the date value when operator is changed
* Add docs
* Only run through with classicQuery if the language is influxql and backend migration is disabled
* Add variable editor
* Simple template variable support
* Show template variables in the drowdowns
* better imports
* unit tests
* it is now 11 just because we add rawSql interpolation in datasource.ts applyVariables method
* fix
* user essentials mob! 🔱
lastFile:public/app/plugins/panel/dashlist/DashList.tsx
* DashList: Update variables in URL when they change
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add e2e test to check dashlist variables are always correctly passed
* add comment with link to issue
* Alternative solution
* Minor tweaks
* revert accidental change
* fix
* New solution
* Fix test
* refinement
* Added unit test
* Update devenv/dev-dashboards/panel-dashlist/dashlist.json
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
---------
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* user essentials mob! 🔱
lastFile:public/app/plugins/panel/dashlist/DashList.tsx
* DashList: Update variables in URL when they change
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add e2e test to check dashlist variables are always correctly passed
* add comment with link to issue
---------
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
* PromQail: query suggester uses metric type if available
* If metadata missing, use heuristic to guess metric type
* Fix linter, fix histogram,summary case
* Fix bug confusing metric with metric family name
* Better method to fetch just metadata from datasource provider